Introduce explicit constructors of handle-wrappers from raw handles in case of non-typesafe conversion (#82)

Resolves issue #70.
This commit is contained in:
Andreas Süßenbach 2017-02-15 17:07:50 +01:00 committed by Markus Tavenrath
parent 9e8f233557
commit 413dfd8f12
2 changed files with 135 additions and 220 deletions

View File

@ -302,25 +302,25 @@ std::string const arrayProxyHeader = (
"\n"
);
std::string const versionCheckHeader = (
"#if !defined(VULKAN_HPP_HAS_UNRESTRICTED_UNIONS)\n"
"# if defined(__clang__)\n"
"# if __has_feature(cxx_unrestricted_unions)\n"
"# define VULKAN_HPP_HAS_UNRESTRICTED_UNIONS\n"
"# endif\n"
"# elif defined(__GNUC__)\n"
"# define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)\n"
"# if 40600 <= GCC_VERSION\n"
"# define VULKAN_HPP_HAS_UNRESTRICTED_UNIONS\n"
"# endif\n"
"# elif defined(_MSC_VER)\n"
"# if 1900 <= _MSC_VER\n"
"# define VULKAN_HPP_HAS_UNRESTRICTED_UNIONS\n"
"# endif\n"
"# endif\n"
"#endif\n"
"\n"
);
std::string const versionCheckHeader = { R"(
#if !defined(VULKAN_HPP_HAS_UNRESTRICTED_UNIONS)
# if defined(__clang__)
# if __has_feature(cxx_unrestricted_unions)
# define VULKAN_HPP_HAS_UNRESTRICTED_UNIONS
# endif
# elif defined(__GNUC__)
# define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
# if 40600 <= GCC_VERSION
# define VULKAN_HPP_HAS_UNRESTRICTED_UNIONS
# endif
# elif defined(_MSC_VER)
# if 1900 <= _MSC_VER
# define VULKAN_HPP_HAS_UNRESTRICTED_UNIONS
# endif
# endif
#endif
)"
};
std::string const inlineHeader = {R"(
#if !defined(VULKAN_HPP_INLINE)
@ -338,7 +338,15 @@ std::string const inlineHeader = {R"(
# define VULKAN_HPP_INLINE inline
# endif
#endif
)"
};
std::string const explicitHeader = { R"(
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
# define VULKAN_HPP_TYPESAFE_EXPLICIT
#else
# define VULKAN_HPP_TYPESAFE_EXPLICIT explicit
#endif
)"
};
@ -3396,13 +3404,13 @@ void writeTypeHandle(std::ofstream & ofs, VkData const& vkData, DependencyData c
<< " : m_" << memberName << "(VK_NULL_HANDLE)" << std::endl
<< " {}" << std::endl
<< std::endl
<< "#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)" << std::endl
// construct from native handle
<< " " << dependencyData.name << "(Vk" << dependencyData.name << " " << memberName << ")" << std::endl
<< " VULKAN_HPP_TYPESAFE_EXPLICIT " << dependencyData.name << "(Vk" << dependencyData.name << " " << memberName << ")" << std::endl
<< " : m_" << memberName << "(" << memberName << ")" << std::endl
<< " {}" << std::endl
<< std::endl
// assignment from native handle
<< "#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)" << std::endl
<< " " << dependencyData.name << "& operator=(Vk" << dependencyData.name << " " << memberName << ")" << std::endl
<< " {" << std::endl
<< " m_" << memberName << " = " << memberName << ";" << std::endl
@ -3445,10 +3453,7 @@ void writeTypeHandle(std::ofstream & ofs, VkData const& vkData, DependencyData c
writeTypeCommandDeclaration(ofs, " ", vkData, cit->second);
}
ofs << "#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)" << std::endl
<< " explicit" << std::endl
<< "#endif" << std::endl
<< " operator Vk" << dependencyData.name << "() const" << std::endl
ofs << " VULKAN_HPP_TYPESAFE_EXPLICIT operator Vk" << dependencyData.name << "() const" << std::endl
<< " {" << std::endl
<< " return m_" << memberName << ";" << std::endl
<< " }" << std::endl
@ -3772,8 +3777,7 @@ void writeTypesafeCheck(std::ofstream & ofs, std::string const& typesafeCheck)
<< "# if !defined( VULKAN_HPP_TYPESAFE_CONVERSION )" << std::endl
<< "# define VULKAN_HPP_TYPESAFE_CONVERSION" << std::endl
<< "# endif" << std::endl
<< "#endif" << std::endl
<< std::endl;
<< "#endif" << std::endl;
}
int main( int argc, char **argv )
@ -3868,6 +3872,8 @@ int main( int argc, char **argv )
writeTypesafeCheck(ofs, vkData.typesafeCheck);
ofs << versionCheckHeader
<< inlineHeader
<< explicitHeader
<< std::endl
<< "namespace vk" << std::endl
<< "{" << std::endl
<< flagsHeader

View File

@ -68,7 +68,6 @@ static_assert( VK_HEADER_VERSION == 40 , "Wrong VK_HEADER_VERSION!" );
# endif
#endif
#if !defined(VULKAN_HPP_INLINE)
# if defined(__clang___)
# if __has_attribute(always_inline)
@ -85,6 +84,12 @@ static_assert( VK_HEADER_VERSION == 40 , "Wrong VK_HEADER_VERSION!" );
# endif
#endif
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
# define VULKAN_HPP_TYPESAFE_EXPLICIT
#else
# define VULKAN_HPP_TYPESAFE_EXPLICIT explicit
#endif
namespace vk
{
template <typename FlagBitsType> struct FlagTraits
@ -1096,11 +1101,11 @@ namespace vk
: m_deviceMemory(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
DeviceMemory(VkDeviceMemory deviceMemory)
VULKAN_HPP_TYPESAFE_EXPLICIT DeviceMemory(VkDeviceMemory deviceMemory)
: m_deviceMemory(deviceMemory)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
DeviceMemory& operator=(VkDeviceMemory deviceMemory)
{
m_deviceMemory = deviceMemory;
@ -1129,10 +1134,7 @@ namespace vk
return m_deviceMemory < rhs.m_deviceMemory;
}
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkDeviceMemory() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDeviceMemory() const
{
return m_deviceMemory;
}
@ -1163,11 +1165,11 @@ namespace vk
: m_commandPool(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
CommandPool(VkCommandPool commandPool)
VULKAN_HPP_TYPESAFE_EXPLICIT CommandPool(VkCommandPool commandPool)
: m_commandPool(commandPool)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
CommandPool& operator=(VkCommandPool commandPool)
{
m_commandPool = commandPool;
@ -1196,10 +1198,7 @@ namespace vk
return m_commandPool < rhs.m_commandPool;
}
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkCommandPool() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkCommandPool() const
{
return m_commandPool;
}
@ -1230,11 +1229,11 @@ namespace vk
: m_buffer(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
Buffer(VkBuffer buffer)
VULKAN_HPP_TYPESAFE_EXPLICIT Buffer(VkBuffer buffer)
: m_buffer(buffer)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
Buffer& operator=(VkBuffer buffer)
{
m_buffer = buffer;
@ -1263,10 +1262,7 @@ namespace vk
return m_buffer < rhs.m_buffer;
}
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkBuffer() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkBuffer() const
{
return m_buffer;
}
@ -1297,11 +1293,11 @@ namespace vk
: m_bufferView(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
BufferView(VkBufferView bufferView)
VULKAN_HPP_TYPESAFE_EXPLICIT BufferView(VkBufferView bufferView)
: m_bufferView(bufferView)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
BufferView& operator=(VkBufferView bufferView)
{
m_bufferView = bufferView;
@ -1330,10 +1326,7 @@ namespace vk
return m_bufferView < rhs.m_bufferView;
}
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkBufferView() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkBufferView() const
{
return m_bufferView;
}
@ -1364,11 +1357,11 @@ namespace vk
: m_image(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
Image(VkImage image)
VULKAN_HPP_TYPESAFE_EXPLICIT Image(VkImage image)
: m_image(image)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
Image& operator=(VkImage image)
{
m_image = image;
@ -1397,10 +1390,7 @@ namespace vk
return m_image < rhs.m_image;
}
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkImage() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkImage() const
{
return m_image;
}
@ -1431,11 +1421,11 @@ namespace vk
: m_imageView(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
ImageView(VkImageView imageView)
VULKAN_HPP_TYPESAFE_EXPLICIT ImageView(VkImageView imageView)
: m_imageView(imageView)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
ImageView& operator=(VkImageView imageView)
{
m_imageView = imageView;
@ -1464,10 +1454,7 @@ namespace vk
return m_imageView < rhs.m_imageView;
}
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkImageView() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkImageView() const
{
return m_imageView;
}
@ -1498,11 +1485,11 @@ namespace vk
: m_shaderModule(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
ShaderModule(VkShaderModule shaderModule)
VULKAN_HPP_TYPESAFE_EXPLICIT ShaderModule(VkShaderModule shaderModule)
: m_shaderModule(shaderModule)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
ShaderModule& operator=(VkShaderModule shaderModule)
{
m_shaderModule = shaderModule;
@ -1531,10 +1518,7 @@ namespace vk
return m_shaderModule < rhs.m_shaderModule;
}
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkShaderModule() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkShaderModule() const
{
return m_shaderModule;
}
@ -1565,11 +1549,11 @@ namespace vk
: m_pipeline(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
Pipeline(VkPipeline pipeline)
VULKAN_HPP_TYPESAFE_EXPLICIT Pipeline(VkPipeline pipeline)
: m_pipeline(pipeline)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
Pipeline& operator=(VkPipeline pipeline)
{
m_pipeline = pipeline;
@ -1598,10 +1582,7 @@ namespace vk
return m_pipeline < rhs.m_pipeline;
}
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkPipeline() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPipeline() const
{
return m_pipeline;
}
@ -1632,11 +1613,11 @@ namespace vk
: m_pipelineLayout(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
PipelineLayout(VkPipelineLayout pipelineLayout)
VULKAN_HPP_TYPESAFE_EXPLICIT PipelineLayout(VkPipelineLayout pipelineLayout)
: m_pipelineLayout(pipelineLayout)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
PipelineLayout& operator=(VkPipelineLayout pipelineLayout)
{
m_pipelineLayout = pipelineLayout;
@ -1665,10 +1646,7 @@ namespace vk
return m_pipelineLayout < rhs.m_pipelineLayout;
}
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkPipelineLayout() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPipelineLayout() const
{
return m_pipelineLayout;
}
@ -1699,11 +1677,11 @@ namespace vk
: m_sampler(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
Sampler(VkSampler sampler)
VULKAN_HPP_TYPESAFE_EXPLICIT Sampler(VkSampler sampler)
: m_sampler(sampler)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
Sampler& operator=(VkSampler sampler)
{
m_sampler = sampler;
@ -1732,10 +1710,7 @@ namespace vk
return m_sampler < rhs.m_sampler;
}
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkSampler() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSampler() const
{
return m_sampler;
}
@ -1766,11 +1741,11 @@ namespace vk
: m_descriptorSet(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
DescriptorSet(VkDescriptorSet descriptorSet)
VULKAN_HPP_TYPESAFE_EXPLICIT DescriptorSet(VkDescriptorSet descriptorSet)
: m_descriptorSet(descriptorSet)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
DescriptorSet& operator=(VkDescriptorSet descriptorSet)
{
m_descriptorSet = descriptorSet;
@ -1799,10 +1774,7 @@ namespace vk
return m_descriptorSet < rhs.m_descriptorSet;
}
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkDescriptorSet() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDescriptorSet() const
{
return m_descriptorSet;
}
@ -1833,11 +1805,11 @@ namespace vk
: m_descriptorSetLayout(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
DescriptorSetLayout(VkDescriptorSetLayout descriptorSetLayout)
VULKAN_HPP_TYPESAFE_EXPLICIT DescriptorSetLayout(VkDescriptorSetLayout descriptorSetLayout)
: m_descriptorSetLayout(descriptorSetLayout)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
DescriptorSetLayout& operator=(VkDescriptorSetLayout descriptorSetLayout)
{
m_descriptorSetLayout = descriptorSetLayout;
@ -1866,10 +1838,7 @@ namespace vk
return m_descriptorSetLayout < rhs.m_descriptorSetLayout;
}
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkDescriptorSetLayout() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDescriptorSetLayout() const
{
return m_descriptorSetLayout;
}
@ -1900,11 +1869,11 @@ namespace vk
: m_descriptorPool(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
DescriptorPool(VkDescriptorPool descriptorPool)
VULKAN_HPP_TYPESAFE_EXPLICIT DescriptorPool(VkDescriptorPool descriptorPool)
: m_descriptorPool(descriptorPool)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
DescriptorPool& operator=(VkDescriptorPool descriptorPool)
{
m_descriptorPool = descriptorPool;
@ -1933,10 +1902,7 @@ namespace vk
return m_descriptorPool < rhs.m_descriptorPool;
}
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkDescriptorPool() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDescriptorPool() const
{
return m_descriptorPool;
}
@ -1967,11 +1933,11 @@ namespace vk
: m_fence(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
Fence(VkFence fence)
VULKAN_HPP_TYPESAFE_EXPLICIT Fence(VkFence fence)
: m_fence(fence)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
Fence& operator=(VkFence fence)
{
m_fence = fence;
@ -2000,10 +1966,7 @@ namespace vk
return m_fence < rhs.m_fence;
}
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkFence() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkFence() const
{
return m_fence;
}
@ -2034,11 +1997,11 @@ namespace vk
: m_semaphore(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
Semaphore(VkSemaphore semaphore)
VULKAN_HPP_TYPESAFE_EXPLICIT Semaphore(VkSemaphore semaphore)
: m_semaphore(semaphore)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
Semaphore& operator=(VkSemaphore semaphore)
{
m_semaphore = semaphore;
@ -2067,10 +2030,7 @@ namespace vk
return m_semaphore < rhs.m_semaphore;
}
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkSemaphore() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSemaphore() const
{
return m_semaphore;
}
@ -2101,11 +2061,11 @@ namespace vk
: m_event(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
Event(VkEvent event)
VULKAN_HPP_TYPESAFE_EXPLICIT Event(VkEvent event)
: m_event(event)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
Event& operator=(VkEvent event)
{
m_event = event;
@ -2134,10 +2094,7 @@ namespace vk
return m_event < rhs.m_event;
}
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkEvent() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkEvent() const
{
return m_event;
}
@ -2168,11 +2125,11 @@ namespace vk
: m_queryPool(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
QueryPool(VkQueryPool queryPool)
VULKAN_HPP_TYPESAFE_EXPLICIT QueryPool(VkQueryPool queryPool)
: m_queryPool(queryPool)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
QueryPool& operator=(VkQueryPool queryPool)
{
m_queryPool = queryPool;
@ -2201,10 +2158,7 @@ namespace vk
return m_queryPool < rhs.m_queryPool;
}
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkQueryPool() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkQueryPool() const
{
return m_queryPool;
}
@ -2235,11 +2189,11 @@ namespace vk
: m_framebuffer(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
Framebuffer(VkFramebuffer framebuffer)
VULKAN_HPP_TYPESAFE_EXPLICIT Framebuffer(VkFramebuffer framebuffer)
: m_framebuffer(framebuffer)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
Framebuffer& operator=(VkFramebuffer framebuffer)
{
m_framebuffer = framebuffer;
@ -2268,10 +2222,7 @@ namespace vk
return m_framebuffer < rhs.m_framebuffer;
}
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkFramebuffer() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkFramebuffer() const
{
return m_framebuffer;
}
@ -2302,11 +2253,11 @@ namespace vk
: m_renderPass(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
RenderPass(VkRenderPass renderPass)
VULKAN_HPP_TYPESAFE_EXPLICIT RenderPass(VkRenderPass renderPass)
: m_renderPass(renderPass)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
RenderPass& operator=(VkRenderPass renderPass)
{
m_renderPass = renderPass;
@ -2335,10 +2286,7 @@ namespace vk
return m_renderPass < rhs.m_renderPass;
}
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkRenderPass() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkRenderPass() const
{
return m_renderPass;
}
@ -2369,11 +2317,11 @@ namespace vk
: m_pipelineCache(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
PipelineCache(VkPipelineCache pipelineCache)
VULKAN_HPP_TYPESAFE_EXPLICIT PipelineCache(VkPipelineCache pipelineCache)
: m_pipelineCache(pipelineCache)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
PipelineCache& operator=(VkPipelineCache pipelineCache)
{
m_pipelineCache = pipelineCache;
@ -2402,10 +2350,7 @@ namespace vk
return m_pipelineCache < rhs.m_pipelineCache;
}
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkPipelineCache() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPipelineCache() const
{
return m_pipelineCache;
}
@ -2436,11 +2381,11 @@ namespace vk
: m_objectTableNVX(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
ObjectTableNVX(VkObjectTableNVX objectTableNVX)
VULKAN_HPP_TYPESAFE_EXPLICIT ObjectTableNVX(VkObjectTableNVX objectTableNVX)
: m_objectTableNVX(objectTableNVX)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
ObjectTableNVX& operator=(VkObjectTableNVX objectTableNVX)
{
m_objectTableNVX = objectTableNVX;
@ -2469,10 +2414,7 @@ namespace vk
return m_objectTableNVX < rhs.m_objectTableNVX;
}
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkObjectTableNVX() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkObjectTableNVX() const
{
return m_objectTableNVX;
}
@ -2503,11 +2445,11 @@ namespace vk
: m_indirectCommandsLayoutNVX(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
IndirectCommandsLayoutNVX(VkIndirectCommandsLayoutNVX indirectCommandsLayoutNVX)
VULKAN_HPP_TYPESAFE_EXPLICIT IndirectCommandsLayoutNVX(VkIndirectCommandsLayoutNVX indirectCommandsLayoutNVX)
: m_indirectCommandsLayoutNVX(indirectCommandsLayoutNVX)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
IndirectCommandsLayoutNVX& operator=(VkIndirectCommandsLayoutNVX indirectCommandsLayoutNVX)
{
m_indirectCommandsLayoutNVX = indirectCommandsLayoutNVX;
@ -2536,10 +2478,7 @@ namespace vk
return m_indirectCommandsLayoutNVX < rhs.m_indirectCommandsLayoutNVX;
}
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkIndirectCommandsLayoutNVX() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkIndirectCommandsLayoutNVX() const
{
return m_indirectCommandsLayoutNVX;
}
@ -2570,11 +2509,11 @@ namespace vk
: m_displayKHR(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
DisplayKHR(VkDisplayKHR displayKHR)
VULKAN_HPP_TYPESAFE_EXPLICIT DisplayKHR(VkDisplayKHR displayKHR)
: m_displayKHR(displayKHR)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
DisplayKHR& operator=(VkDisplayKHR displayKHR)
{
m_displayKHR = displayKHR;
@ -2603,10 +2542,7 @@ namespace vk
return m_displayKHR < rhs.m_displayKHR;
}
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkDisplayKHR() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDisplayKHR() const
{
return m_displayKHR;
}
@ -2637,11 +2573,11 @@ namespace vk
: m_displayModeKHR(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
DisplayModeKHR(VkDisplayModeKHR displayModeKHR)
VULKAN_HPP_TYPESAFE_EXPLICIT DisplayModeKHR(VkDisplayModeKHR displayModeKHR)
: m_displayModeKHR(displayModeKHR)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
DisplayModeKHR& operator=(VkDisplayModeKHR displayModeKHR)
{
m_displayModeKHR = displayModeKHR;
@ -2670,10 +2606,7 @@ namespace vk
return m_displayModeKHR < rhs.m_displayModeKHR;
}
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkDisplayModeKHR() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDisplayModeKHR() const
{
return m_displayModeKHR;
}
@ -2704,11 +2637,11 @@ namespace vk
: m_surfaceKHR(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
SurfaceKHR(VkSurfaceKHR surfaceKHR)
VULKAN_HPP_TYPESAFE_EXPLICIT SurfaceKHR(VkSurfaceKHR surfaceKHR)
: m_surfaceKHR(surfaceKHR)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
SurfaceKHR& operator=(VkSurfaceKHR surfaceKHR)
{
m_surfaceKHR = surfaceKHR;
@ -2737,10 +2670,7 @@ namespace vk
return m_surfaceKHR < rhs.m_surfaceKHR;
}
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkSurfaceKHR() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSurfaceKHR() const
{
return m_surfaceKHR;
}
@ -2771,11 +2701,11 @@ namespace vk
: m_swapchainKHR(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
SwapchainKHR(VkSwapchainKHR swapchainKHR)
VULKAN_HPP_TYPESAFE_EXPLICIT SwapchainKHR(VkSwapchainKHR swapchainKHR)
: m_swapchainKHR(swapchainKHR)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
SwapchainKHR& operator=(VkSwapchainKHR swapchainKHR)
{
m_swapchainKHR = swapchainKHR;
@ -2804,10 +2734,7 @@ namespace vk
return m_swapchainKHR < rhs.m_swapchainKHR;
}
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkSwapchainKHR() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSwapchainKHR() const
{
return m_swapchainKHR;
}
@ -2838,11 +2765,11 @@ namespace vk
: m_debugReportCallbackEXT(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
DebugReportCallbackEXT(VkDebugReportCallbackEXT debugReportCallbackEXT)
VULKAN_HPP_TYPESAFE_EXPLICIT DebugReportCallbackEXT(VkDebugReportCallbackEXT debugReportCallbackEXT)
: m_debugReportCallbackEXT(debugReportCallbackEXT)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
DebugReportCallbackEXT& operator=(VkDebugReportCallbackEXT debugReportCallbackEXT)
{
m_debugReportCallbackEXT = debugReportCallbackEXT;
@ -2871,10 +2798,7 @@ namespace vk
return m_debugReportCallbackEXT < rhs.m_debugReportCallbackEXT;
}
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkDebugReportCallbackEXT() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDebugReportCallbackEXT() const
{
return m_debugReportCallbackEXT;
}
@ -17563,11 +17487,11 @@ namespace vk
: m_commandBuffer(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
CommandBuffer(VkCommandBuffer commandBuffer)
VULKAN_HPP_TYPESAFE_EXPLICIT CommandBuffer(VkCommandBuffer commandBuffer)
: m_commandBuffer(commandBuffer)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
CommandBuffer& operator=(VkCommandBuffer commandBuffer)
{
m_commandBuffer = commandBuffer;
@ -17786,10 +17710,7 @@ namespace vk
void reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX & reserveSpaceInfo ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkCommandBuffer() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkCommandBuffer() const
{
return m_commandBuffer;
}
@ -18376,11 +18297,11 @@ namespace vk
: m_queue(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
Queue(VkQueue queue)
VULKAN_HPP_TYPESAFE_EXPLICIT Queue(VkQueue queue)
: m_queue(queue)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
Queue& operator=(VkQueue queue)
{
m_queue = queue;
@ -18430,10 +18351,7 @@ namespace vk
Result presentKHR( const PresentInfoKHR & presentInfo ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkQueue() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkQueue() const
{
return m_queue;
}
@ -18563,11 +18481,11 @@ namespace vk
: m_device(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
Device(VkDevice device)
VULKAN_HPP_TYPESAFE_EXPLICIT Device(VkDevice device)
: m_device(device)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
Device& operator=(VkDevice device)
{
m_device = device;
@ -19149,10 +19067,7 @@ namespace vk
ResultValue<uint64_t> getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkDevice() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDevice() const
{
return m_device;
}
@ -21022,11 +20937,11 @@ namespace vk
: m_physicalDevice(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
PhysicalDevice(VkPhysicalDevice physicalDevice)
VULKAN_HPP_TYPESAFE_EXPLICIT PhysicalDevice(VkPhysicalDevice physicalDevice)
: m_physicalDevice(physicalDevice)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
PhysicalDevice& operator=(VkPhysicalDevice physicalDevice)
{
m_physicalDevice = physicalDevice;
@ -21272,10 +21187,7 @@ namespace vk
ResultValueType<SurfaceCapabilities2EXT>::type getSurfaceCapabilities2EXT( SurfaceKHR surface ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkPhysicalDevice() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPhysicalDevice() const
{
return m_physicalDevice;
}
@ -21949,11 +21861,11 @@ namespace vk
: m_instance(VK_NULL_HANDLE)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
Instance(VkInstance instance)
VULKAN_HPP_TYPESAFE_EXPLICIT Instance(VkInstance instance)
: m_instance(instance)
{}
#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
Instance& operator=(VkInstance instance)
{
m_instance = instance;
@ -22099,10 +22011,7 @@ namespace vk
void debugReportMessageEXT( DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const std::string & layerPrefix, const std::string & message ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)
explicit
#endif
operator VkInstance() const
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkInstance() const
{
return m_instance;
}