Compare commits

...

4 Commits

Author SHA1 Message Date
Jan Kuhlmann 1dd0f87196
Merge 55b7ba81bc into e511715fce 2025-11-06 11:04:52 +01:00
Sharadh Rajaraman e511715fce
Do not `export import std` as a macro (#2340)
Set Version Tag / set-version-tag (push) Has been cancelled Details
* Do not export-import `std` as a macro

* Move warning expansion to macros file, and create a macro for it
- Also remove macro for `std.compat` and hardcode it
2025-11-06 10:59:34 +01:00
Andreas Süßenbach d0b04b733a
Removed special handling for VkDeviceFaultInfoEXT, which was plainly wrong. (#2343) 2025-11-06 08:22:31 +01:00
Andreas Süßenbach 3a948949cc
Extent function call tests with Sparse resource memory management API commands (optional) (#2341)
Set Version Tag / set-version-tag (push) Has been cancelled Details
2025-11-04 13:48:27 +01:00
10 changed files with 163 additions and 174 deletions

View File

@ -2060,8 +2060,7 @@ std::string VulkanHppGenerator::generateArgumentListEnhanced( std::vector<ParamD
} }
else if ( params[i].optional ) else if ( params[i].optional )
{ {
arguments.push_back( "Optional<" + stripPostfix( composedType, " *" ) + "> " + name + arguments.push_back( "Optional<" + stripPostfix( composedType, " *" ) + "> " + name + ( ( definition || withAllocators ) ? "" : " = nullptr" ) );
( ( definition || withAllocators ) ? "" : " = nullptr" ) );
hasDefaultAssignment = true; hasDefaultAssignment = true;
} }
else else
@ -2079,8 +2078,7 @@ std::string VulkanHppGenerator::generateArgumentListEnhanced( std::vector<ParamD
assert( params[i].type.type == "char" ); assert( params[i].type.type == "char" );
if ( params[i].optional ) if ( params[i].optional )
{ {
arguments.push_back( "Optional<const std::string> " + name + arguments.push_back( "Optional<const std::string> " + name + ( ( definition || withAllocators ) ? "" : " = nullptr" ) );
( ( definition || withAllocators ) ? "" : " = nullptr" ) );
hasDefaultAssignment = true; hasDefaultAssignment = true;
} }
else else
@ -11976,84 +11974,8 @@ std::string VulkanHppGenerator::generateStructure( std::pair<std::string, Struct
std::string str = "\n" + enter; std::string str = "\n" + enter;
std::string constructorsAndSetters; std::string constructorsAndSetters;
if ( strcmp( &structure.first[0], "VkDeviceFaultInfoEXT" ) == 0 ) static const std::string constructorsTemplate = R"(
{
// special handling for this structure, as it is filled with dynamic memory on VULKAN_HPP_NAMESPACE::Device::getFaultInfoEXT!
constructorsAndSetters += R"(
#if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS )
VULKAN_HPP_CONSTEXPR_14 DeviceFaultInfoEXT( std::array<char, VK_MAX_DESCRIPTION_SIZE> const & description_ = {},
DeviceFaultAddressInfoEXT * pAddressInfos_ = {},
DeviceFaultVendorInfoEXT * pVendorInfos_ = {},
void * pVendorBinaryData_ = {},
void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT
: pNext{ pNext_ }
, description{ description_ }
, pAddressInfos{ pAddressInfos_ }
, pVendorInfos{ pVendorInfos_ }
, pVendorBinaryData{ pVendorBinaryData_ }
{
}
# ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
VULKAN_HPP_CONSTEXPR_14 DeviceFaultInfoEXT( DeviceFaultInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default;
DeviceFaultInfoEXT( VkDeviceFaultInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceFaultInfoEXT( *reinterpret_cast<DeviceFaultInfoEXT const *>( &rhs ) ) {}
DeviceFaultInfoEXT & operator=( DeviceFaultInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default;
# else
DeviceFaultInfoEXT( DeviceFaultInfoEXT const & ) = delete;
DeviceFaultInfoEXT & operator=( DeviceFaultInfoEXT const & ) = delete;
DeviceFaultInfoEXT( DeviceFaultInfoEXT && rhs ) VULKAN_HPP_NOEXCEPT
: pNext{ rhs.pNext }
, pAddressInfos{ rhs.pAddressInfos }
, pVendorInfos{ rhs.pVendorInfos }
, pVendorBinaryData{ rhs.pVendorBinaryData }
{
memcpy( description, rhs.description, VK_MAX_DESCRIPTION_SIZE );
rhs.pNext = nullptr;
memset( rhs.description, 0, VK_MAX_DESCRIPTION_SIZE );
rhs.pAddressInfos = nullptr;
rhs.pVendorInfos = nullptr;
rhs.pVendorBinaryData = nullptr;
}
DeviceFaultInfoEXT & operator=( DeviceFaultInfoEXT && rhs ) VULKAN_HPP_NOEXCEPT
{
free( pAddressInfos );
free( pVendorInfos );
free( pVendorBinaryData );
pNext = rhs.pNext;
memcpy( description, rhs.description, VK_MAX_DESCRIPTION_SIZE );
pAddressInfos = rhs.pAddressInfos;
pVendorInfos = rhs.pVendorInfos;
pVendorBinaryData = rhs.pVendorBinaryData;
rhs.pNext = nullptr;
memset( rhs.description, 0, VK_MAX_DESCRIPTION_SIZE );
rhs.pAddressInfos = nullptr;
rhs.pVendorInfos = nullptr;
rhs.pVendorBinaryData = nullptr;
return *this;
}
~DeviceFaultInfoEXT() VULKAN_HPP_NOEXCEPT
{
free( pAddressInfos );
free( pVendorInfos );
free( pVendorBinaryData );
}
# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#endif /*VULKAN_HPP_NO_CONSTRUCTORS*/
)";
}
else
{
static const std::string constructorsTemplate = R"(
#if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS )
${pushIgnored}${constructors} ${pushIgnored}${constructors}
${subConstructors} ${subConstructors}
@ -12068,10 +11990,10 @@ ${deprecatedConstructors}
} }
)"; )";
std::string pushIgnored, popIgnored; std::string pushIgnored, popIgnored;
if ( containsDeprecated( structure.second.members ) ) if ( containsDeprecated( structure.second.members ) )
{ {
pushIgnored = R"( pushIgnored = R"(
#if defined( _MSC_VER ) #if defined( _MSC_VER )
# pragma warning( push ) # pragma warning( push )
# pragma warning( disable : 4996 ) // 'function': was declared deprecated # pragma warning( disable : 4996 ) // 'function': was declared deprecated
@ -12086,7 +12008,7 @@ ${deprecatedConstructors}
#endif #endif
)"; )";
popIgnored = R"( popIgnored = R"(
#if defined( _MSC_VER ) #if defined( _MSC_VER )
# pragma warning( pop ) # pragma warning( pop )
@ -12098,18 +12020,17 @@ ${deprecatedConstructors}
// unknown compiler... just ignore the warnings for yourselves ;) // unknown compiler... just ignore the warnings for yourselves ;)
#endif #endif
)"; )";
}
constructorsAndSetters = replaceWithMap( constructorsTemplate,
{ { "castAssignments", generateStructCastAssignments( structure ) },
{ "constructors", generateStructConstructors( structure ) },
{ "deprecatedConstructors", generateDeprecatedConstructors( structure.first ) },
{ "popIgnored", popIgnored },
{ "pushIgnored", pushIgnored },
{ "structName", stripPrefix( structure.first, "Vk" ) },
{ "subConstructors", generateStructSubConstructor( structure ) } } );
} }
constructorsAndSetters = replaceWithMap( constructorsTemplate,
{ { "castAssignments", generateStructCastAssignments( structure ) },
{ "constructors", generateStructConstructors( structure ) },
{ "deprecatedConstructors", generateDeprecatedConstructors( structure.first ) },
{ "popIgnored", popIgnored },
{ "pushIgnored", pushIgnored },
{ "structName", stripPrefix( structure.first, "Vk" ) },
{ "subConstructors", generateStructSubConstructor( structure ) } } );
if ( !structure.second.returnedOnly ) if ( !structure.second.returnedOnly )
{ {
// only structs that are not returnedOnly get setters! // only structs that are not returnedOnly get setters!

View File

@ -13,12 +13,7 @@ module;
"To silence this warning, define the VULKAN_HPP_CXX_MODULE_EXPERIMENTAL_WARNING macro.\n\n" \ "To silence this warning, define the VULKAN_HPP_CXX_MODULE_EXPERIMENTAL_WARNING macro.\n\n" \
"For feedback, go to: https://github.com/KhronosGroup/Vulkan-Hpp/issues" "For feedback, go to: https://github.com/KhronosGroup/Vulkan-Hpp/issues"
VULKAN_HPP_COMPILE_WARNING( VULKAN_HPP_CXX_MODULE_EXPERIMENTAL_WARNING )
# if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
_Pragma(VULKAN_HPP_STRINGIFY(GCC warning VULKAN_HPP_CXX_MODULE_EXPERIMENTAL_WARNING))
# elif defined(_MSC_VER)
_Pragma(VULKAN_HPP_STRINGIFY(message(__FILE__ "(" VULKAN_HPP_STRINGIFY(__LINE__) "): warning: " VULKAN_HPP_CXX_MODULE_EXPERIMENTAL_WARNING)))
# endif
#endif #endif
#include <vulkan/${api}.hpp> #include <vulkan/${api}.hpp>
@ -29,7 +24,7 @@ _Pragma(VULKAN_HPP_STRINGIFY(message(__FILE__ "(" VULKAN_HPP_STRINGIFY(__LINE__)
#include <vulkan/${api}_shared.hpp> #include <vulkan/${api}_shared.hpp>
export module ${api}_hpp; export module ${api}_hpp;
export import VULKAN_HPP_STD_MODULE; export import std.compat;
export namespace VULKAN_HPP_NAMESPACE export namespace VULKAN_HPP_NAMESPACE
{ {

View File

@ -30,6 +30,20 @@ ${licenseHeader}
# include <ciso646> # include <ciso646>
#endif #endif
#define VULKAN_HPP_STRINGIFY2( text ) #text
#define VULKAN_HPP_STRINGIFY( text ) VULKAN_HPP_STRINGIFY2( text )
#define VULKAN_HPP_NAMESPACE_STRING VULKAN_HPP_STRINGIFY( VULKAN_HPP_NAMESPACE )
#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
# define VULKAN_HPP_COMPILE_WARNING( text ) \
_Pragma( VULKAN_HPP_STRINGIFY( GCC warning text ))
#elif defined(_MSC_VER)
# define VULKAN_HPP_COMPILE_WARNING( text ) \
_Pragma( VULKAN_HPP_STRINGIFY( message(__FILE__ "(" VULKAN_HPP_STRINGIFY(__LINE__) "): warning: " text )))
#else
# define VULKAN_HPP_COMPILE_WARNING( text )
#endif
#if defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) #if defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
# if !defined( VULKAN_HPP_NO_SMART_HANDLE ) # if !defined( VULKAN_HPP_NO_SMART_HANDLE )
# define VULKAN_HPP_NO_SMART_HANDLE # define VULKAN_HPP_NO_SMART_HANDLE
@ -82,8 +96,8 @@ ${licenseHeader}
# define VULKAN_HPP_SUPPORT_SPAN # define VULKAN_HPP_SUPPORT_SPAN
#endif #endif
#if !defined( VULKAN_HPP_STD_MODULE ) && defined( __cpp_modules ) && defined( __cpp_lib_modules ) #if defined( VULKAN_HPP_CXX_MODULE ) && !( defined( __cpp_modules ) && defined( __cpp_lib_modules ) )
# define VULKAN_HPP_STD_MODULE std.compat VULKAN_HPP_COMPILE_WARNING( "This is a non-conforming implementation of C++ named modules and the standard library module." )
#endif #endif
${vulkan_64_bit_ptr_defines} ${vulkan_64_bit_ptr_defines}
@ -213,10 +227,6 @@ ${vulkan_64_bit_ptr_defines}
# define VULKAN_HPP_NAMESPACE vk # define VULKAN_HPP_NAMESPACE vk
#endif #endif
#define VULKAN_HPP_STRINGIFY2( text ) #text
#define VULKAN_HPP_STRINGIFY( text ) VULKAN_HPP_STRINGIFY2( text )
#define VULKAN_HPP_NAMESPACE_STRING VULKAN_HPP_STRINGIFY( VULKAN_HPP_NAMESPACE )
#if !defined( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC ) #if !defined( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC )
# if defined( VK_NO_PROTOTYPES ) # if defined( VK_NO_PROTOTYPES )
# define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 1 # define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 1

View File

@ -28,7 +28,7 @@
# include <cassert> # include <cassert>
# include <cstring> # include <cstring>
# include <cstdlib> # include <cstdlib>
import VULKAN_HPP_STD_MODULE; import std.compat;
#endif #endif
#include <vulkan/${vulkan_h}> #include <vulkan/${vulkan_h}>

View File

@ -426,6 +426,84 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::MemoryRequirements memoryRequirements = device.getImageMemoryRequirements( image ); vk::MemoryRequirements memoryRequirements = device.getImageMemoryRequirements( image );
} }
// Sparse resource memory management API commands (optional)
{
vk::Device device;
vk::Image image;
uint32_t sparseMemoryRequirementCount;
device.getImageSparseMemoryRequirements( image, &sparseMemoryRequirementCount, nullptr );
if ( sparseMemoryRequirementCount )
{
std::vector<vk::SparseImageMemoryRequirements> sparseImageMemoryRequirements( sparseMemoryRequirementCount );
device.getImageSparseMemoryRequirements( image, &sparseMemoryRequirementCount, sparseImageMemoryRequirements.data() );
}
}
{
vk::Device device;
vk::Image image;
std::vector<vk::SparseImageMemoryRequirements> sparseImageMemoryRequirementss = device.getImageSparseMemoryRequirements( image );
}
{
vk::Device device;
vk::Image image;
using Allocator = std::allocator<vk::SparseImageMemoryRequirements>;
Allocator allocator;
std::vector<vk::SparseImageMemoryRequirements, Allocator> sparseImageMemoryRequirementss = device.getImageSparseMemoryRequirements( image, allocator );
}
{
vk::PhysicalDevice physicalDevice;
vk::Format format = {};
vk::ImageType type = {};
vk::SampleCountFlagBits samples = {};
vk::ImageUsageFlags usage = {};
vk::ImageTiling tiling = {};
uint32_t propertyCount = 0;
physicalDevice.getSparseImageFormatProperties( format, type, samples, usage, tiling, &propertyCount, nullptr );
if ( propertyCount )
{
std::vector<vk::SparseImageFormatProperties> sparseImageFormatProperties( propertyCount );
physicalDevice.getSparseImageFormatProperties( format, type, samples, usage, tiling, &propertyCount, sparseImageFormatProperties.data() );
}
}
{
vk::PhysicalDevice physicalDevice;
vk::Format format = {};
vk::ImageType type = {};
vk::SampleCountFlagBits samples = {};
vk::ImageUsageFlags usage = {};
vk::ImageTiling tiling = {};
std::vector<vk::SparseImageFormatProperties> sparseImageFormatProperties =
physicalDevice.getSparseImageFormatProperties( format, type, samples, usage, tiling );
}
{
vk::PhysicalDevice physicalDevice;
vk::Format format = {};
vk::ImageType type = {};
vk::SampleCountFlagBits samples = {};
vk::ImageUsageFlags usage = {};
vk::ImageTiling tiling = {};
using Allocator = std::allocator<vk::SparseImageFormatProperties>;
Allocator allocator;
std::vector<vk::SparseImageFormatProperties, Allocator> sparseImageFormatProperties =
physicalDevice.getSparseImageFormatProperties( format, type, samples, usage, tiling, allocator );
}
{
vk::Queue queue;
uint32_t bindInfoCount = 1;
vk::BindSparseInfo bindSparseInfo;
vk::Fence fence;
vk::Result result = queue.bindSparse( bindInfoCount, &bindSparseInfo, fence );
}
{
vk::Queue queue;
vk::BindSparseInfo bindSparseInfo;
vk::Fence fence;
queue.bindSparse( bindSparseInfo, fence );
}
#if 0 #if 0
{ {
vk::PhysicalDevice physicalDevice; vk::PhysicalDevice physicalDevice;

View File

@ -207,14 +207,38 @@ int main( int /*argc*/, char ** /*argv*/ )
} }
{ {
vk::raii::Buffer buffer = nullptr; vk::raii::Buffer buffer = nullptr;
vk::MemoryRequirements memoryRequirements = buffer.getMemoryRequirements(); vk::MemoryRequirements memoryRequirements = buffer.getMemoryRequirements();
} }
{ {
vk::raii::Image image = nullptr; vk::raii::Image image = nullptr;
vk::MemoryRequirements memoryRequirements = image.getMemoryRequirements(); vk::MemoryRequirements memoryRequirements = image.getMemoryRequirements();
} }
// Sparse resource memory management API commands (optional)
{
vk::raii::Image image = nullptr;
std::vector<vk::SparseImageMemoryRequirements> sparseImageMemoryRequirements = image.getSparseMemoryRequirements();
}
{
vk::raii::PhysicalDevice physicalDevice = nullptr;
vk::Format format = {};
vk::ImageType type = {};
vk::SampleCountFlagBits samples = {};
vk::ImageUsageFlags usage = {};
vk::ImageTiling tiling = {};
std::vector<vk::SparseImageFormatProperties> sparseImageFormatProperties =
physicalDevice.getSparseImageFormatProperties( format, type, samples, usage, tiling );
}
{
vk::raii::Queue queue = nullptr;
vk::BindSparseInfo bindSparseInfo;
vk::Fence fence;
queue.bindSparse( bindSparseInfo, fence );
}
return 0; return 0;
} }

View File

@ -18,11 +18,7 @@ module;
"To silence this warning, define the VULKAN_HPP_CXX_MODULE_EXPERIMENTAL_WARNING macro.\n\n" \ "To silence this warning, define the VULKAN_HPP_CXX_MODULE_EXPERIMENTAL_WARNING macro.\n\n" \
"For feedback, go to: https://github.com/KhronosGroup/Vulkan-Hpp/issues" "For feedback, go to: https://github.com/KhronosGroup/Vulkan-Hpp/issues"
# if defined( __clang__ ) || defined( __GNUC__ ) || defined( __GNUG__ ) VULKAN_HPP_COMPILE_WARNING( VULKAN_HPP_CXX_MODULE_EXPERIMENTAL_WARNING )
_Pragma( VULKAN_HPP_STRINGIFY( GCC warning VULKAN_HPP_CXX_MODULE_EXPERIMENTAL_WARNING ) )
# elif defined( _MSC_VER )
_Pragma( VULKAN_HPP_STRINGIFY( message( __FILE__ "(" VULKAN_HPP_STRINGIFY( __LINE__ ) "): warning: " VULKAN_HPP_CXX_MODULE_EXPERIMENTAL_WARNING ) ) )
# endif
#endif #endif
#include <vulkan/vulkan.hpp> #include <vulkan/vulkan.hpp>
@ -32,8 +28,8 @@ _Pragma( VULKAN_HPP_STRINGIFY( message( __FILE__ "(" VULKAN_HPP_STRINGIFY( __LIN
#include <vulkan/vulkan_raii.hpp> #include <vulkan/vulkan_raii.hpp>
#include <vulkan/vulkan_shared.hpp> #include <vulkan/vulkan_shared.hpp>
export module vulkan_hpp; export module vulkan_hpp;
export import VULKAN_HPP_STD_MODULE; export import std.compat;
export namespace VULKAN_HPP_NAMESPACE export namespace VULKAN_HPP_NAMESPACE
{ {
@ -9369,8 +9365,7 @@ export namespace std
#endif #endif
} // namespace std } // namespace std
export export {
{
// This VkFlags type is used as part of a bitfield in some structures. // This VkFlags type is used as part of a bitfield in some structures.
// As it can't be mimicked by vk-data types, we need to export just that. // As it can't be mimicked by vk-data types, we need to export just that.
using ::VkGeometryInstanceFlagsKHR; using ::VkGeometryInstanceFlagsKHR;

View File

@ -38,7 +38,7 @@
# include <cassert> # include <cassert>
# include <cstdlib> # include <cstdlib>
# include <cstring> # include <cstring>
import VULKAN_HPP_STD_MODULE; import std.compat;
#endif #endif
#include <vulkan/vulkan.h> #include <vulkan/vulkan.h>

View File

@ -35,6 +35,18 @@
# include <ciso646> # include <ciso646>
#endif #endif
#define VULKAN_HPP_STRINGIFY2( text ) #text
#define VULKAN_HPP_STRINGIFY( text ) VULKAN_HPP_STRINGIFY2( text )
#define VULKAN_HPP_NAMESPACE_STRING VULKAN_HPP_STRINGIFY( VULKAN_HPP_NAMESPACE )
#if defined( __clang__ ) || defined( __GNUC__ ) || defined( __GNUG__ )
# define VULKAN_HPP_COMPILE_WARNING( text ) _Pragma( VULKAN_HPP_STRINGIFY( GCC warning text ) )
#elif defined( _MSC_VER )
# define VULKAN_HPP_COMPILE_WARNING( text ) _Pragma( VULKAN_HPP_STRINGIFY( message( __FILE__ "(" VULKAN_HPP_STRINGIFY( __LINE__ ) "): warning: " text ) ) )
#else
# define VULKAN_HPP_COMPILE_WARNING( text )
#endif
#if defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) #if defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
# if !defined( VULKAN_HPP_NO_SMART_HANDLE ) # if !defined( VULKAN_HPP_NO_SMART_HANDLE )
# define VULKAN_HPP_NO_SMART_HANDLE # define VULKAN_HPP_NO_SMART_HANDLE
@ -87,8 +99,8 @@
# define VULKAN_HPP_SUPPORT_SPAN # define VULKAN_HPP_SUPPORT_SPAN
#endif #endif
#if !defined( VULKAN_HPP_STD_MODULE ) && defined( __cpp_modules ) && defined( __cpp_lib_modules ) #if defined( VULKAN_HPP_CXX_MODULE ) && !( defined( __cpp_modules ) && defined( __cpp_lib_modules ) )
# define VULKAN_HPP_STD_MODULE std.compat VULKAN_HPP_COMPILE_WARNING( "This is a non-conforming implementation of C++ named modules and the standard library module." )
#endif #endif
#ifndef VK_USE_64_BIT_PTR_DEFINES #ifndef VK_USE_64_BIT_PTR_DEFINES
@ -225,10 +237,6 @@
# define VULKAN_HPP_NAMESPACE vk # define VULKAN_HPP_NAMESPACE vk
#endif #endif
#define VULKAN_HPP_STRINGIFY2( text ) #text
#define VULKAN_HPP_STRINGIFY( text ) VULKAN_HPP_STRINGIFY2( text )
#define VULKAN_HPP_NAMESPACE_STRING VULKAN_HPP_STRINGIFY( VULKAN_HPP_NAMESPACE )
#if !defined( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC ) #if !defined( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC )
# if defined( VK_NO_PROTOTYPES ) # if defined( VK_NO_PROTOTYPES )
# define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 1 # define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 1

View File

@ -39031,61 +39031,19 @@ namespace VULKAN_HPP_NAMESPACE
{ {
} }
# ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
VULKAN_HPP_CONSTEXPR_14 DeviceFaultInfoEXT( DeviceFaultInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; VULKAN_HPP_CONSTEXPR_14 DeviceFaultInfoEXT( DeviceFaultInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default;
DeviceFaultInfoEXT( VkDeviceFaultInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceFaultInfoEXT( *reinterpret_cast<DeviceFaultInfoEXT const *>( &rhs ) ) {} DeviceFaultInfoEXT( VkDeviceFaultInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceFaultInfoEXT( *reinterpret_cast<DeviceFaultInfoEXT const *>( &rhs ) ) {}
DeviceFaultInfoEXT & operator=( DeviceFaultInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DeviceFaultInfoEXT & operator=( DeviceFaultInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default;
# else #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/
DeviceFaultInfoEXT( DeviceFaultInfoEXT const & ) = delete;
DeviceFaultInfoEXT & operator=( DeviceFaultInfoEXT const & ) = delete;
DeviceFaultInfoEXT( DeviceFaultInfoEXT && rhs ) VULKAN_HPP_NOEXCEPT DeviceFaultInfoEXT & operator=( VkDeviceFaultInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
: pNext{ rhs.pNext }
, pAddressInfos{ rhs.pAddressInfos }
, pVendorInfos{ rhs.pVendorInfos }
, pVendorBinaryData{ rhs.pVendorBinaryData }
{ {
memcpy( description, rhs.description, VK_MAX_DESCRIPTION_SIZE ); *this = *reinterpret_cast<DeviceFaultInfoEXT const *>( &rhs );
rhs.pNext = nullptr;
memset( rhs.description, 0, VK_MAX_DESCRIPTION_SIZE );
rhs.pAddressInfos = nullptr;
rhs.pVendorInfos = nullptr;
rhs.pVendorBinaryData = nullptr;
}
DeviceFaultInfoEXT & operator=( DeviceFaultInfoEXT && rhs ) VULKAN_HPP_NOEXCEPT
{
free( pAddressInfos );
free( pVendorInfos );
free( pVendorBinaryData );
pNext = rhs.pNext;
memcpy( description, rhs.description, VK_MAX_DESCRIPTION_SIZE );
pAddressInfos = rhs.pAddressInfos;
pVendorInfos = rhs.pVendorInfos;
pVendorBinaryData = rhs.pVendorBinaryData;
rhs.pNext = nullptr;
memset( rhs.description, 0, VK_MAX_DESCRIPTION_SIZE );
rhs.pAddressInfos = nullptr;
rhs.pVendorInfos = nullptr;
rhs.pVendorBinaryData = nullptr;
return *this; return *this;
} }
~DeviceFaultInfoEXT() VULKAN_HPP_NOEXCEPT
{
free( pAddressInfos );
free( pVendorInfos );
free( pVendorBinaryData );
}
# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#endif /*VULKAN_HPP_NO_CONSTRUCTORS*/
operator VkDeviceFaultInfoEXT const &() const VULKAN_HPP_NOEXCEPT operator VkDeviceFaultInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{ {
return *reinterpret_cast<const VkDeviceFaultInfoEXT *>( this ); return *reinterpret_cast<const VkDeviceFaultInfoEXT *>( this );