Fix for VULKAN_HPP_TYPESAFE_CONVERSION defined to 0 (#1806)

* Fix for VULKAN_HPP_TYPESAFE_CONVERSION defined to 0

* Remove the check if VULKAN_HPP_TYPESAFE_CONVERSION actually is defined, just check if it's 1.

---------

Co-authored-by: asuessenbach <asuessenbach@nvidia.com>
This commit is contained in:
David Ryskalczyk 2024-03-11 04:39:39 -04:00 committed by GitHub
parent 80826e4001
commit 17226363e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 88 additions and 84 deletions

View File

@ -944,7 +944,7 @@ With this define you can specify whether the ```DispatchLoaderDynamic``` is impo
#### VULKAN_HPP_TYPESAFE_CONVERSION
32-bit vulkan is not typesafe for non-dispatchable handles, so we don't allow copy constructors on this platform by default. To enable this feature on 32-bit platforms define ```VULKAN_HPP_TYPESAFE_CONVERSION```.
32-bit vulkan is not typesafe for non-dispatchable handles, so we don't allow copy constructors on this platform by default. To enable this feature on 32-bit platforms, ```#define VULKAN_HPP_TYPESAFE_CONVERSION 1```. To disable this feature on 64-bit platforms, ```#define VULKAN_HPP_TYPESAFE_CONVERSION 0```.
#### VULKAN_HPP_UNEXPECTED

View File

@ -7582,7 +7582,7 @@ std::string VulkanHppGenerator::generateHandle( std::pair<std::string, HandleDat
}
const std::string typesafeExplicitKeyword = handleData.second.isDispatchable ? "" : "VULKAN_HPP_TYPESAFE_EXPLICIT ";
const std::string typesafeConversionConditional = handleData.second.isDispatchable ? "" : "#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)\n";
const std::string typesafeConversionConditional = handleData.second.isDispatchable ? "" : "#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )\n";
const std::string typesafeConversionConditionalEnd = handleData.second.isDispatchable ? "" : "#endif\n";
static const std::string templateString = R"(

View File

@ -78,13 +78,15 @@
#endif
// 32-bit vulkan is not typesafe for non-dispatchable handles, so don't allow copy constructors on this platform by default.
// To enable this feature on 32-bit platforms please define VULKAN_HPP_TYPESAFE_CONVERSION
// To enable this feature on 32-bit platforms please #define VULKAN_HPP_TYPESAFE_CONVERSION 1
// To disable this feature on 64-bit platforms please #define VULKAN_HPP_TYPESAFE_CONVERSION 0
#if ( VK_USE_64_BIT_PTR_DEFINES == 1 )
# if !defined( VULKAN_HPP_TYPESAFE_CONVERSION )
# define VULKAN_HPP_TYPESAFE_CONVERSION
# define VULKAN_HPP_TYPESAFE_CONVERSION 1
# endif
#endif
#if defined( __GNUC__ )
# define GCC_VERSION ( __GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ )
#endif
@ -121,7 +123,7 @@
# endif
#endif
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
# define VULKAN_HPP_TYPESAFE_EXPLICIT
#else
# define VULKAN_HPP_TYPESAFE_EXPLICIT explicit

View File

@ -2410,7 +2410,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT SurfaceKHR( VkSurfaceKHR surfaceKHR ) VULKAN_HPP_NOEXCEPT : m_surfaceKHR( surfaceKHR ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
SurfaceKHR & operator=( VkSurfaceKHR surfaceKHR ) VULKAN_HPP_NOEXCEPT
{
m_surfaceKHR = surfaceKHR;
@ -2500,7 +2500,7 @@ namespace VULKAN_HPP_NAMESPACE
{
}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
DebugReportCallbackEXT & operator=( VkDebugReportCallbackEXT debugReportCallbackEXT ) VULKAN_HPP_NOEXCEPT
{
m_debugReportCallbackEXT = debugReportCallbackEXT;
@ -2590,7 +2590,7 @@ namespace VULKAN_HPP_NAMESPACE
{
}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
DebugUtilsMessengerEXT & operator=( VkDebugUtilsMessengerEXT debugUtilsMessengerEXT ) VULKAN_HPP_NOEXCEPT
{
m_debugUtilsMessengerEXT = debugUtilsMessengerEXT;
@ -2671,7 +2671,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT DisplayKHR( VkDisplayKHR displayKHR ) VULKAN_HPP_NOEXCEPT : m_displayKHR( displayKHR ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
DisplayKHR & operator=( VkDisplayKHR displayKHR ) VULKAN_HPP_NOEXCEPT
{
m_displayKHR = displayKHR;
@ -2758,7 +2758,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT SwapchainKHR( VkSwapchainKHR swapchainKHR ) VULKAN_HPP_NOEXCEPT : m_swapchainKHR( swapchainKHR ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
SwapchainKHR & operator=( VkSwapchainKHR swapchainKHR ) VULKAN_HPP_NOEXCEPT
{
m_swapchainKHR = swapchainKHR;
@ -2845,7 +2845,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT Semaphore( VkSemaphore semaphore ) VULKAN_HPP_NOEXCEPT : m_semaphore( semaphore ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
Semaphore & operator=( VkSemaphore semaphore ) VULKAN_HPP_NOEXCEPT
{
m_semaphore = semaphore;
@ -2932,7 +2932,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT Fence( VkFence fence ) VULKAN_HPP_NOEXCEPT : m_fence( fence ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
Fence & operator=( VkFence fence ) VULKAN_HPP_NOEXCEPT
{
m_fence = fence;
@ -3022,7 +3022,7 @@ namespace VULKAN_HPP_NAMESPACE
{
}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
PerformanceConfigurationINTEL & operator=( VkPerformanceConfigurationINTEL performanceConfigurationINTEL ) VULKAN_HPP_NOEXCEPT
{
m_performanceConfigurationINTEL = performanceConfigurationINTEL;
@ -3103,7 +3103,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT QueryPool( VkQueryPool queryPool ) VULKAN_HPP_NOEXCEPT : m_queryPool( queryPool ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
QueryPool & operator=( VkQueryPool queryPool ) VULKAN_HPP_NOEXCEPT
{
m_queryPool = queryPool;
@ -3190,7 +3190,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT Buffer( VkBuffer buffer ) VULKAN_HPP_NOEXCEPT : m_buffer( buffer ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
Buffer & operator=( VkBuffer buffer ) VULKAN_HPP_NOEXCEPT
{
m_buffer = buffer;
@ -3277,7 +3277,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT PipelineLayout( VkPipelineLayout pipelineLayout ) VULKAN_HPP_NOEXCEPT : m_pipelineLayout( pipelineLayout ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
PipelineLayout & operator=( VkPipelineLayout pipelineLayout ) VULKAN_HPP_NOEXCEPT
{
m_pipelineLayout = pipelineLayout;
@ -3364,7 +3364,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT DescriptorSet( VkDescriptorSet descriptorSet ) VULKAN_HPP_NOEXCEPT : m_descriptorSet( descriptorSet ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
DescriptorSet & operator=( VkDescriptorSet descriptorSet ) VULKAN_HPP_NOEXCEPT
{
m_descriptorSet = descriptorSet;
@ -3451,7 +3451,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT ImageView( VkImageView imageView ) VULKAN_HPP_NOEXCEPT : m_imageView( imageView ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
ImageView & operator=( VkImageView imageView ) VULKAN_HPP_NOEXCEPT
{
m_imageView = imageView;
@ -3538,7 +3538,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT Pipeline( VkPipeline pipeline ) VULKAN_HPP_NOEXCEPT : m_pipeline( pipeline ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
Pipeline & operator=( VkPipeline pipeline ) VULKAN_HPP_NOEXCEPT
{
m_pipeline = pipeline;
@ -3625,7 +3625,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT ShaderEXT( VkShaderEXT shaderEXT ) VULKAN_HPP_NOEXCEPT : m_shaderEXT( shaderEXT ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
ShaderEXT & operator=( VkShaderEXT shaderEXT ) VULKAN_HPP_NOEXCEPT
{
m_shaderEXT = shaderEXT;
@ -3706,7 +3706,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT Image( VkImage image ) VULKAN_HPP_NOEXCEPT : m_image( image ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
Image & operator=( VkImage image ) VULKAN_HPP_NOEXCEPT
{
m_image = image;
@ -3796,7 +3796,7 @@ namespace VULKAN_HPP_NAMESPACE
{
}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
AccelerationStructureNV & operator=( VkAccelerationStructureNV accelerationStructureNV ) VULKAN_HPP_NOEXCEPT
{
m_accelerationStructureNV = accelerationStructureNV;
@ -3886,7 +3886,7 @@ namespace VULKAN_HPP_NAMESPACE
{
}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
OpticalFlowSessionNV & operator=( VkOpticalFlowSessionNV opticalFlowSessionNV ) VULKAN_HPP_NOEXCEPT
{
m_opticalFlowSessionNV = opticalFlowSessionNV;
@ -3970,7 +3970,7 @@ namespace VULKAN_HPP_NAMESPACE
{
}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
DescriptorUpdateTemplate & operator=( VkDescriptorUpdateTemplate descriptorUpdateTemplate ) VULKAN_HPP_NOEXCEPT
{
m_descriptorUpdateTemplate = descriptorUpdateTemplate;
@ -4059,7 +4059,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT Event( VkEvent event ) VULKAN_HPP_NOEXCEPT : m_event( event ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
Event & operator=( VkEvent event ) VULKAN_HPP_NOEXCEPT
{
m_event = event;
@ -4149,7 +4149,7 @@ namespace VULKAN_HPP_NAMESPACE
{
}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
AccelerationStructureKHR & operator=( VkAccelerationStructureKHR accelerationStructureKHR ) VULKAN_HPP_NOEXCEPT
{
m_accelerationStructureKHR = accelerationStructureKHR;
@ -4236,7 +4236,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT MicromapEXT( VkMicromapEXT micromapEXT ) VULKAN_HPP_NOEXCEPT : m_micromapEXT( micromapEXT ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
MicromapEXT & operator=( VkMicromapEXT micromapEXT ) VULKAN_HPP_NOEXCEPT
{
m_micromapEXT = micromapEXT;
@ -6705,7 +6705,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT DeviceMemory( VkDeviceMemory deviceMemory ) VULKAN_HPP_NOEXCEPT : m_deviceMemory( deviceMemory ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
DeviceMemory & operator=( VkDeviceMemory deviceMemory ) VULKAN_HPP_NOEXCEPT
{
m_deviceMemory = deviceMemory;
@ -6792,7 +6792,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT VideoSessionKHR( VkVideoSessionKHR videoSessionKHR ) VULKAN_HPP_NOEXCEPT : m_videoSessionKHR( videoSessionKHR ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
VideoSessionKHR & operator=( VkVideoSessionKHR videoSessionKHR ) VULKAN_HPP_NOEXCEPT
{
m_videoSessionKHR = videoSessionKHR;
@ -6876,7 +6876,7 @@ namespace VULKAN_HPP_NAMESPACE
{
}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
DeferredOperationKHR & operator=( VkDeferredOperationKHR deferredOperationKHR ) VULKAN_HPP_NOEXCEPT
{
m_deferredOperationKHR = deferredOperationKHR;
@ -6961,7 +6961,7 @@ namespace VULKAN_HPP_NAMESPACE
{
}
# if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
# if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
BufferCollectionFUCHSIA & operator=( VkBufferCollectionFUCHSIA bufferCollectionFUCHSIA ) VULKAN_HPP_NOEXCEPT
{
m_bufferCollectionFUCHSIA = bufferCollectionFUCHSIA;
@ -7049,7 +7049,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT BufferView( VkBufferView bufferView ) VULKAN_HPP_NOEXCEPT : m_bufferView( bufferView ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
BufferView & operator=( VkBufferView bufferView ) VULKAN_HPP_NOEXCEPT
{
m_bufferView = bufferView;
@ -7136,7 +7136,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT CommandPool( VkCommandPool commandPool ) VULKAN_HPP_NOEXCEPT : m_commandPool( commandPool ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
CommandPool & operator=( VkCommandPool commandPool ) VULKAN_HPP_NOEXCEPT
{
m_commandPool = commandPool;
@ -7223,7 +7223,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT PipelineCache( VkPipelineCache pipelineCache ) VULKAN_HPP_NOEXCEPT : m_pipelineCache( pipelineCache ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
PipelineCache & operator=( VkPipelineCache pipelineCache ) VULKAN_HPP_NOEXCEPT
{
m_pipelineCache = pipelineCache;
@ -7310,7 +7310,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT CuFunctionNVX( VkCuFunctionNVX cuFunctionNVX ) VULKAN_HPP_NOEXCEPT : m_cuFunctionNVX( cuFunctionNVX ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
CuFunctionNVX & operator=( VkCuFunctionNVX cuFunctionNVX ) VULKAN_HPP_NOEXCEPT
{
m_cuFunctionNVX = cuFunctionNVX;
@ -7397,7 +7397,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT CuModuleNVX( VkCuModuleNVX cuModuleNVX ) VULKAN_HPP_NOEXCEPT : m_cuModuleNVX( cuModuleNVX ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
CuModuleNVX & operator=( VkCuModuleNVX cuModuleNVX ) VULKAN_HPP_NOEXCEPT
{
m_cuModuleNVX = cuModuleNVX;
@ -7485,7 +7485,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT CudaFunctionNV( VkCudaFunctionNV cudaFunctionNV ) VULKAN_HPP_NOEXCEPT : m_cudaFunctionNV( cudaFunctionNV ) {}
# if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
# if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
CudaFunctionNV & operator=( VkCudaFunctionNV cudaFunctionNV ) VULKAN_HPP_NOEXCEPT
{
m_cudaFunctionNV = cudaFunctionNV;
@ -7574,7 +7574,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT CudaModuleNV( VkCudaModuleNV cudaModuleNV ) VULKAN_HPP_NOEXCEPT : m_cudaModuleNV( cudaModuleNV ) {}
# if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
# if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
CudaModuleNV & operator=( VkCudaModuleNV cudaModuleNV ) VULKAN_HPP_NOEXCEPT
{
m_cudaModuleNV = cudaModuleNV;
@ -7662,7 +7662,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT DescriptorPool( VkDescriptorPool descriptorPool ) VULKAN_HPP_NOEXCEPT : m_descriptorPool( descriptorPool ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
DescriptorPool & operator=( VkDescriptorPool descriptorPool ) VULKAN_HPP_NOEXCEPT
{
m_descriptorPool = descriptorPool;
@ -7752,7 +7752,7 @@ namespace VULKAN_HPP_NAMESPACE
{
}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
DescriptorSetLayout & operator=( VkDescriptorSetLayout descriptorSetLayout ) VULKAN_HPP_NOEXCEPT
{
m_descriptorSetLayout = descriptorSetLayout;
@ -7839,7 +7839,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT Framebuffer( VkFramebuffer framebuffer ) VULKAN_HPP_NOEXCEPT : m_framebuffer( framebuffer ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
Framebuffer & operator=( VkFramebuffer framebuffer ) VULKAN_HPP_NOEXCEPT
{
m_framebuffer = framebuffer;
@ -7929,7 +7929,7 @@ namespace VULKAN_HPP_NAMESPACE
{
}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
IndirectCommandsLayoutNV & operator=( VkIndirectCommandsLayoutNV indirectCommandsLayoutNV ) VULKAN_HPP_NOEXCEPT
{
m_indirectCommandsLayoutNV = indirectCommandsLayoutNV;
@ -8010,7 +8010,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT PrivateDataSlot( VkPrivateDataSlot privateDataSlot ) VULKAN_HPP_NOEXCEPT : m_privateDataSlot( privateDataSlot ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
PrivateDataSlot & operator=( VkPrivateDataSlot privateDataSlot ) VULKAN_HPP_NOEXCEPT
{
m_privateDataSlot = privateDataSlot;
@ -8093,7 +8093,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT RenderPass( VkRenderPass renderPass ) VULKAN_HPP_NOEXCEPT : m_renderPass( renderPass ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
RenderPass & operator=( VkRenderPass renderPass ) VULKAN_HPP_NOEXCEPT
{
m_renderPass = renderPass;
@ -8180,7 +8180,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT Sampler( VkSampler sampler ) VULKAN_HPP_NOEXCEPT : m_sampler( sampler ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
Sampler & operator=( VkSampler sampler ) VULKAN_HPP_NOEXCEPT
{
m_sampler = sampler;
@ -8270,7 +8270,7 @@ namespace VULKAN_HPP_NAMESPACE
{
}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
SamplerYcbcrConversion & operator=( VkSamplerYcbcrConversion samplerYcbcrConversion ) VULKAN_HPP_NOEXCEPT
{
m_samplerYcbcrConversion = samplerYcbcrConversion;
@ -8359,7 +8359,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT ShaderModule( VkShaderModule shaderModule ) VULKAN_HPP_NOEXCEPT : m_shaderModule( shaderModule ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
ShaderModule & operator=( VkShaderModule shaderModule ) VULKAN_HPP_NOEXCEPT
{
m_shaderModule = shaderModule;
@ -8448,7 +8448,7 @@ namespace VULKAN_HPP_NAMESPACE
{
}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
ValidationCacheEXT & operator=( VkValidationCacheEXT validationCacheEXT ) VULKAN_HPP_NOEXCEPT
{
m_validationCacheEXT = validationCacheEXT;
@ -8538,7 +8538,7 @@ namespace VULKAN_HPP_NAMESPACE
{
}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
VideoSessionParametersKHR & operator=( VkVideoSessionParametersKHR videoSessionParametersKHR ) VULKAN_HPP_NOEXCEPT
{
m_videoSessionParametersKHR = videoSessionParametersKHR;
@ -14002,7 +14002,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT DisplayModeKHR( VkDisplayModeKHR displayModeKHR ) VULKAN_HPP_NOEXCEPT : m_displayModeKHR( displayModeKHR ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
DisplayModeKHR & operator=( VkDisplayModeKHR displayModeKHR ) VULKAN_HPP_NOEXCEPT
{
m_displayModeKHR = displayModeKHR;

View File

@ -88,10 +88,11 @@
#endif
// 32-bit vulkan is not typesafe for non-dispatchable handles, so don't allow copy constructors on this platform by default.
// To enable this feature on 32-bit platforms please define VULKAN_HPP_TYPESAFE_CONVERSION
// To enable this feature on 32-bit platforms please #define VULKAN_HPP_TYPESAFE_CONVERSION 1
// To disable this feature on 64-bit platforms please #define VULKAN_HPP_TYPESAFE_CONVERSION 0
#if ( VK_USE_64_BIT_PTR_DEFINES == 1 )
# if !defined( VULKAN_HPP_TYPESAFE_CONVERSION )
# define VULKAN_HPP_TYPESAFE_CONVERSION
# define VULKAN_HPP_TYPESAFE_CONVERSION 1
# endif
#endif
@ -131,7 +132,7 @@
# endif
#endif
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
# define VULKAN_HPP_TYPESAFE_EXPLICIT
#else
# define VULKAN_HPP_TYPESAFE_EXPLICIT explicit

View File

@ -1028,7 +1028,7 @@ namespace VULKAN_HPP_NAMESPACE
{
}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
DebugUtilsMessengerEXT & operator=( VkDebugUtilsMessengerEXT debugUtilsMessengerEXT ) VULKAN_HPP_NOEXCEPT
{
m_debugUtilsMessengerEXT = debugUtilsMessengerEXT;
@ -1109,7 +1109,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT SurfaceKHR( VkSurfaceKHR surfaceKHR ) VULKAN_HPP_NOEXCEPT : m_surfaceKHR( surfaceKHR ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
SurfaceKHR & operator=( VkSurfaceKHR surfaceKHR ) VULKAN_HPP_NOEXCEPT
{
m_surfaceKHR = surfaceKHR;
@ -1196,7 +1196,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT SwapchainKHR( VkSwapchainKHR swapchainKHR ) VULKAN_HPP_NOEXCEPT : m_swapchainKHR( swapchainKHR ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
SwapchainKHR & operator=( VkSwapchainKHR swapchainKHR ) VULKAN_HPP_NOEXCEPT
{
m_swapchainKHR = swapchainKHR;
@ -1283,7 +1283,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT Semaphore( VkSemaphore semaphore ) VULKAN_HPP_NOEXCEPT : m_semaphore( semaphore ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
Semaphore & operator=( VkSemaphore semaphore ) VULKAN_HPP_NOEXCEPT
{
m_semaphore = semaphore;
@ -1370,7 +1370,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT Fence( VkFence fence ) VULKAN_HPP_NOEXCEPT : m_fence( fence ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
Fence & operator=( VkFence fence ) VULKAN_HPP_NOEXCEPT
{
m_fence = fence;
@ -1457,7 +1457,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT QueryPool( VkQueryPool queryPool ) VULKAN_HPP_NOEXCEPT : m_queryPool( queryPool ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
QueryPool & operator=( VkQueryPool queryPool ) VULKAN_HPP_NOEXCEPT
{
m_queryPool = queryPool;
@ -1544,7 +1544,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT PipelineLayout( VkPipelineLayout pipelineLayout ) VULKAN_HPP_NOEXCEPT : m_pipelineLayout( pipelineLayout ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
PipelineLayout & operator=( VkPipelineLayout pipelineLayout ) VULKAN_HPP_NOEXCEPT
{
m_pipelineLayout = pipelineLayout;
@ -1631,7 +1631,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT DescriptorSet( VkDescriptorSet descriptorSet ) VULKAN_HPP_NOEXCEPT : m_descriptorSet( descriptorSet ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
DescriptorSet & operator=( VkDescriptorSet descriptorSet ) VULKAN_HPP_NOEXCEPT
{
m_descriptorSet = descriptorSet;
@ -1718,7 +1718,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT Buffer( VkBuffer buffer ) VULKAN_HPP_NOEXCEPT : m_buffer( buffer ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
Buffer & operator=( VkBuffer buffer ) VULKAN_HPP_NOEXCEPT
{
m_buffer = buffer;
@ -1805,7 +1805,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT Pipeline( VkPipeline pipeline ) VULKAN_HPP_NOEXCEPT : m_pipeline( pipeline ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
Pipeline & operator=( VkPipeline pipeline ) VULKAN_HPP_NOEXCEPT
{
m_pipeline = pipeline;
@ -1892,7 +1892,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT Image( VkImage image ) VULKAN_HPP_NOEXCEPT : m_image( image ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
Image & operator=( VkImage image ) VULKAN_HPP_NOEXCEPT
{
m_image = image;
@ -1979,7 +1979,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT Event( VkEvent event ) VULKAN_HPP_NOEXCEPT : m_event( event ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
Event & operator=( VkEvent event ) VULKAN_HPP_NOEXCEPT
{
m_event = event;
@ -3204,7 +3204,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT DeviceMemory( VkDeviceMemory deviceMemory ) VULKAN_HPP_NOEXCEPT : m_deviceMemory( deviceMemory ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
DeviceMemory & operator=( VkDeviceMemory deviceMemory ) VULKAN_HPP_NOEXCEPT
{
m_deviceMemory = deviceMemory;
@ -3291,7 +3291,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT BufferView( VkBufferView bufferView ) VULKAN_HPP_NOEXCEPT : m_bufferView( bufferView ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
BufferView & operator=( VkBufferView bufferView ) VULKAN_HPP_NOEXCEPT
{
m_bufferView = bufferView;
@ -3378,7 +3378,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT CommandPool( VkCommandPool commandPool ) VULKAN_HPP_NOEXCEPT : m_commandPool( commandPool ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
CommandPool & operator=( VkCommandPool commandPool ) VULKAN_HPP_NOEXCEPT
{
m_commandPool = commandPool;
@ -3465,7 +3465,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT PipelineCache( VkPipelineCache pipelineCache ) VULKAN_HPP_NOEXCEPT : m_pipelineCache( pipelineCache ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
PipelineCache & operator=( VkPipelineCache pipelineCache ) VULKAN_HPP_NOEXCEPT
{
m_pipelineCache = pipelineCache;
@ -3552,7 +3552,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT DescriptorPool( VkDescriptorPool descriptorPool ) VULKAN_HPP_NOEXCEPT : m_descriptorPool( descriptorPool ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
DescriptorPool & operator=( VkDescriptorPool descriptorPool ) VULKAN_HPP_NOEXCEPT
{
m_descriptorPool = descriptorPool;
@ -3642,7 +3642,7 @@ namespace VULKAN_HPP_NAMESPACE
{
}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
DescriptorSetLayout & operator=( VkDescriptorSetLayout descriptorSetLayout ) VULKAN_HPP_NOEXCEPT
{
m_descriptorSetLayout = descriptorSetLayout;
@ -3729,7 +3729,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT Framebuffer( VkFramebuffer framebuffer ) VULKAN_HPP_NOEXCEPT : m_framebuffer( framebuffer ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
Framebuffer & operator=( VkFramebuffer framebuffer ) VULKAN_HPP_NOEXCEPT
{
m_framebuffer = framebuffer;
@ -3816,7 +3816,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT ImageView( VkImageView imageView ) VULKAN_HPP_NOEXCEPT : m_imageView( imageView ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
ImageView & operator=( VkImageView imageView ) VULKAN_HPP_NOEXCEPT
{
m_imageView = imageView;
@ -3903,7 +3903,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT PrivateDataSlot( VkPrivateDataSlot privateDataSlot ) VULKAN_HPP_NOEXCEPT : m_privateDataSlot( privateDataSlot ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
PrivateDataSlot & operator=( VkPrivateDataSlot privateDataSlot ) VULKAN_HPP_NOEXCEPT
{
m_privateDataSlot = privateDataSlot;
@ -3986,7 +3986,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT RenderPass( VkRenderPass renderPass ) VULKAN_HPP_NOEXCEPT : m_renderPass( renderPass ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
RenderPass & operator=( VkRenderPass renderPass ) VULKAN_HPP_NOEXCEPT
{
m_renderPass = renderPass;
@ -4073,7 +4073,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT Sampler( VkSampler sampler ) VULKAN_HPP_NOEXCEPT : m_sampler( sampler ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
Sampler & operator=( VkSampler sampler ) VULKAN_HPP_NOEXCEPT
{
m_sampler = sampler;
@ -4163,7 +4163,7 @@ namespace VULKAN_HPP_NAMESPACE
{
}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
SamplerYcbcrConversion & operator=( VkSamplerYcbcrConversion samplerYcbcrConversion ) VULKAN_HPP_NOEXCEPT
{
m_samplerYcbcrConversion = samplerYcbcrConversion;
@ -4250,7 +4250,7 @@ namespace VULKAN_HPP_NAMESPACE
{
}
# if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
# if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
SemaphoreSciSyncPoolNV & operator=( VkSemaphoreSciSyncPoolNV semaphoreSciSyncPoolNV ) VULKAN_HPP_NOEXCEPT
{
m_semaphoreSciSyncPoolNV = semaphoreSciSyncPoolNV;
@ -4332,7 +4332,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT DisplayKHR( VkDisplayKHR displayKHR ) VULKAN_HPP_NOEXCEPT : m_displayKHR( displayKHR ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
DisplayKHR & operator=( VkDisplayKHR displayKHR ) VULKAN_HPP_NOEXCEPT
{
m_displayKHR = displayKHR;
@ -6750,7 +6750,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT DisplayModeKHR( VkDisplayModeKHR displayModeKHR ) VULKAN_HPP_NOEXCEPT : m_displayModeKHR( displayModeKHR ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
DisplayModeKHR & operator=( VkDisplayModeKHR displayModeKHR ) VULKAN_HPP_NOEXCEPT
{
m_displayModeKHR = displayModeKHR;
@ -8029,7 +8029,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_TYPESAFE_EXPLICIT ShaderModule( VkShaderModule shaderModule ) VULKAN_HPP_NOEXCEPT : m_shaderModule( shaderModule ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
ShaderModule & operator=( VkShaderModule shaderModule ) VULKAN_HPP_NOEXCEPT
{
m_shaderModule = shaderModule;

View File

@ -88,10 +88,11 @@
#endif
// 32-bit vulkan is not typesafe for non-dispatchable handles, so don't allow copy constructors on this platform by default.
// To enable this feature on 32-bit platforms please define VULKAN_HPP_TYPESAFE_CONVERSION
// To enable this feature on 32-bit platforms please #define VULKAN_HPP_TYPESAFE_CONVERSION 1
// To disable this feature on 64-bit platforms please #define VULKAN_HPP_TYPESAFE_CONVERSION 0
#if ( VK_USE_64_BIT_PTR_DEFINES == 1 )
# if !defined( VULKAN_HPP_TYPESAFE_CONVERSION )
# define VULKAN_HPP_TYPESAFE_CONVERSION
# define VULKAN_HPP_TYPESAFE_CONVERSION 1
# endif
#endif
@ -131,7 +132,7 @@
# endif
#endif
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
# define VULKAN_HPP_TYPESAFE_EXPLICIT
#else
# define VULKAN_HPP_TYPESAFE_EXPLICIT explicit