From 06b91cfdc21ecf5ba67d57847839582357404bdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20S=C3=BC=C3=9Fenbach?= Date: Thu, 28 Nov 2024 08:50:43 +0100 Subject: [PATCH] Add comparison operators for vk::raii handles, remove them for vk handles (#2001) --- VulkanHppGenerator.cpp | 107 ++-- tests/Handles/Handles.cpp | 78 ++- vulkan/vulkan_handles.hpp | 1032 ----------------------------------- vulkan/vulkan_raii.hpp | 378 +++++++++++++ vulkan/vulkansc_handles.hpp | 652 ---------------------- vulkan/vulkansc_raii.hpp | 256 +++++++++ 6 files changed, 775 insertions(+), 1728 deletions(-) diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index c76a580..89ce0b4 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -233,31 +233,6 @@ ${handleForwardDeclarations} ${uniqueHandles} ${handles} } // namespace VULKAN_HPP_NAMESPACE - -// operators to compare vk::-handles with nullptr -template -typename std::enable_if::value, bool>::type operator==( const T & v, std::nullptr_t ) -{ - return !v; -} - -template -typename std::enable_if::value, bool>::type operator==( std::nullptr_t, const T & v ) -{ - return !v; -} - -template -typename std::enable_if::value, bool>::type operator!=( const T & v, std::nullptr_t ) -{ - return v; -} - -template -typename std::enable_if::value, bool>::type operator!=( std::nullptr_t, const T & v ) -{ - return v; -} #endif )"; @@ -8035,24 +8010,6 @@ ${typesafeConversionConditionalEnd} return *this; } -#if defined(VULKAN_HPP_HAS_SPACESHIP_OPERATOR) - auto operator<=>( ${className} const & ) const = default; -#else - bool operator==( ${className} const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_${memberName} == rhs.m_${memberName}; - } - - bool operator!=(${className} const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_${memberName} != rhs.m_${memberName}; - } - - bool operator<(${className} const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_${memberName} < rhs.m_${memberName}; - } -#endif ${commands} ${typesafeExplicitKeyword}operator Vk${className}() const VULKAN_HPP_NOEXCEPT { @@ -8959,6 +8916,13 @@ ${memberFunctionsDeclarations} private: ${memberVariables} }; + + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + ${leave})"; str += replaceWithMap( handleTemplate, @@ -10306,7 +10270,64 @@ ${forwardDeclarations} //=== RAII HANDLES === //==================== + template + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = false; + }; + ${raiiHandles} + + // operators to compare vk::raii-handles +#if defined(VULKAN_HPP_HAS_SPACESHIP_OPERATOR) + template ::value,bool>::type = 0> + auto operator<=>( T const & a, T const & b ) VULKAN_HPP_NOEXCEPT + { + return *a <=> *b; + } +#else + template ::value,bool>::type = 0> + bool operator==( T const & a, T const & b ) VULKAN_HPP_NOEXCEPT + { + return *a == *b; + } + + template ::value,bool>::type = 0> + bool operator!=(T const & a, T const & b ) VULKAN_HPP_NOEXCEPT + { + return *a != *b; + } + + template ::value,bool>::type = 0> + bool operator<(T const & a, T const & b ) VULKAN_HPP_NOEXCEPT + { + return *a < *b; + } +#endif + + template ::value,bool>::type = 0> + bool operator==( const T & v, std::nullptr_t ) VULKAN_HPP_NOEXCEPT + { + return !*v; + } + + template ::value,bool>::type = 0> + bool operator==( std::nullptr_t, const T & v ) VULKAN_HPP_NOEXCEPT + { + return !*v; + } + + template ::value,bool>::type = 0> + bool operator!=( const T & v, std::nullptr_t ) VULKAN_HPP_NOEXCEPT + { + return *v; + } + + template ::value,bool>::type = 0> + bool operator!=( std::nullptr_t, const T & v ) VULKAN_HPP_NOEXCEPT + { + return *v; + } )"; std::string forwardDeclarations; diff --git a/tests/Handles/Handles.cpp b/tests/Handles/Handles.cpp index 7abb6f9..a800479 100644 --- a/tests/Handles/Handles.cpp +++ b/tests/Handles/Handles.cpp @@ -19,7 +19,7 @@ #define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 0 #include -#include +#include int main( int /*argc*/, char ** /*argv*/ ) { @@ -34,7 +34,83 @@ int main( int /*argc*/, char ** /*argv*/ ) assert( instance != nullptr ); assert( nullptr != instance ); + vk::Instance instance2; + assert( instance != instance2 ); + assert( !( instance == instance2 ) ); + + instance2 = vk::createInstance( {} ); + assert( instance != instance2 ); + + if ( instance == instance2 ) + { + std::cout << "hoho"; + } + if (instance != instance2) + { + std::cout << "haha"; + } + if (instance < instance2) + { + std::cout << "hihi"; + } + + VkInstance vki = 0; + if (vki == instance) + { + std::cout << "hoho"; + } + + vk::PhysicalDevice physicalDevice; + if (physicalDevice == instance ) + { + std::cout << "hoho"; + } + instance.destroy(); + instance2.destroy(); + + // test operator==() with vk::raii-handle and nullptr + vk::raii::Context context; + + vk::raii::Instance i0 = context.createInstance( {} ); + vk::raii::Instance i1 = context.createInstance( {} ); + + if ( i0 == i1 ) + { + std::cout << "hahah"; + } + if ( i0 != i1 ) + { + std::cout << "hoho"; + } + if ( i0 < i1 ) + { + std::cout << "hihi"; + } + + if (i0 == nullptr) + { + std::cout << "kiki"; + } + if (nullptr == i0) + { + std::cout << "kaka"; + } + if (i0 != nullptr) + { + std::cout << "keke"; + } + if (nullptr != i0) + { + std::cout << "kuku"; + } + + vk::raii::PhysicalDevices physicalDevices( i0 ); + assert( physicalDevices.size() == 2 ); + if ( physicalDevices[0] == physicalDevices[1] ) + { + std::cout << "fufu"; + } } catch ( vk::SystemError const & err ) { diff --git a/vulkan/vulkan_handles.hpp b/vulkan/vulkan_handles.hpp index 4964e9b..20b4be3 100644 --- a/vulkan/vulkan_handles.hpp +++ b/vulkan/vulkan_handles.hpp @@ -2567,25 +2567,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SurfaceKHR const & ) const = default; -#else - bool operator==( SurfaceKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_surfaceKHR == rhs.m_surfaceKHR; - } - - bool operator!=( SurfaceKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_surfaceKHR != rhs.m_surfaceKHR; - } - - bool operator<( SurfaceKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_surfaceKHR < rhs.m_surfaceKHR; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSurfaceKHR() const VULKAN_HPP_NOEXCEPT { return m_surfaceKHR; @@ -2683,25 +2664,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DebugReportCallbackEXT const & ) const = default; -#else - bool operator==( DebugReportCallbackEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_debugReportCallbackEXT == rhs.m_debugReportCallbackEXT; - } - - bool operator!=( DebugReportCallbackEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_debugReportCallbackEXT != rhs.m_debugReportCallbackEXT; - } - - bool operator<( DebugReportCallbackEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_debugReportCallbackEXT < rhs.m_debugReportCallbackEXT; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDebugReportCallbackEXT() const VULKAN_HPP_NOEXCEPT { return m_debugReportCallbackEXT; @@ -2799,25 +2761,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DebugUtilsMessengerEXT const & ) const = default; -#else - bool operator==( DebugUtilsMessengerEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_debugUtilsMessengerEXT == rhs.m_debugUtilsMessengerEXT; - } - - bool operator!=( DebugUtilsMessengerEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_debugUtilsMessengerEXT != rhs.m_debugUtilsMessengerEXT; - } - - bool operator<( DebugUtilsMessengerEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_debugUtilsMessengerEXT < rhs.m_debugUtilsMessengerEXT; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDebugUtilsMessengerEXT() const VULKAN_HPP_NOEXCEPT { return m_debugUtilsMessengerEXT; @@ -2903,25 +2846,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DisplayKHR const & ) const = default; -#else - bool operator==( DisplayKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_displayKHR == rhs.m_displayKHR; - } - - bool operator!=( DisplayKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_displayKHR != rhs.m_displayKHR; - } - - bool operator<( DisplayKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_displayKHR < rhs.m_displayKHR; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDisplayKHR() const VULKAN_HPP_NOEXCEPT { return m_displayKHR; @@ -3013,25 +2937,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SwapchainKHR const & ) const = default; -#else - bool operator==( SwapchainKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_swapchainKHR == rhs.m_swapchainKHR; - } - - bool operator!=( SwapchainKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_swapchainKHR != rhs.m_swapchainKHR; - } - - bool operator<( SwapchainKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_swapchainKHR < rhs.m_swapchainKHR; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSwapchainKHR() const VULKAN_HPP_NOEXCEPT { return m_swapchainKHR; @@ -3123,25 +3028,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Semaphore const & ) const = default; -#else - bool operator==( Semaphore const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_semaphore == rhs.m_semaphore; - } - - bool operator!=( Semaphore const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_semaphore != rhs.m_semaphore; - } - - bool operator<( Semaphore const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_semaphore < rhs.m_semaphore; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSemaphore() const VULKAN_HPP_NOEXCEPT { return m_semaphore; @@ -3233,25 +3119,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Fence const & ) const = default; -#else - bool operator==( Fence const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_fence == rhs.m_fence; - } - - bool operator!=( Fence const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_fence != rhs.m_fence; - } - - bool operator<( Fence const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_fence < rhs.m_fence; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkFence() const VULKAN_HPP_NOEXCEPT { return m_fence; @@ -3349,25 +3216,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PerformanceConfigurationINTEL const & ) const = default; -#else - bool operator==( PerformanceConfigurationINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_performanceConfigurationINTEL == rhs.m_performanceConfigurationINTEL; - } - - bool operator!=( PerformanceConfigurationINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_performanceConfigurationINTEL != rhs.m_performanceConfigurationINTEL; - } - - bool operator<( PerformanceConfigurationINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_performanceConfigurationINTEL < rhs.m_performanceConfigurationINTEL; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPerformanceConfigurationINTEL() const VULKAN_HPP_NOEXCEPT { return m_performanceConfigurationINTEL; @@ -3453,25 +3301,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( QueryPool const & ) const = default; -#else - bool operator==( QueryPool const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_queryPool == rhs.m_queryPool; - } - - bool operator!=( QueryPool const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_queryPool != rhs.m_queryPool; - } - - bool operator<( QueryPool const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_queryPool < rhs.m_queryPool; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkQueryPool() const VULKAN_HPP_NOEXCEPT { return m_queryPool; @@ -3563,25 +3392,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Buffer const & ) const = default; -#else - bool operator==( Buffer const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_buffer == rhs.m_buffer; - } - - bool operator!=( Buffer const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_buffer != rhs.m_buffer; - } - - bool operator<( Buffer const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_buffer < rhs.m_buffer; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkBuffer() const VULKAN_HPP_NOEXCEPT { return m_buffer; @@ -3673,25 +3483,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineLayout const & ) const = default; -#else - bool operator==( PipelineLayout const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_pipelineLayout == rhs.m_pipelineLayout; - } - - bool operator!=( PipelineLayout const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_pipelineLayout != rhs.m_pipelineLayout; - } - - bool operator<( PipelineLayout const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_pipelineLayout < rhs.m_pipelineLayout; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPipelineLayout() const VULKAN_HPP_NOEXCEPT { return m_pipelineLayout; @@ -3783,25 +3574,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DescriptorSet const & ) const = default; -#else - bool operator==( DescriptorSet const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorSet == rhs.m_descriptorSet; - } - - bool operator!=( DescriptorSet const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorSet != rhs.m_descriptorSet; - } - - bool operator<( DescriptorSet const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorSet < rhs.m_descriptorSet; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDescriptorSet() const VULKAN_HPP_NOEXCEPT { return m_descriptorSet; @@ -3893,25 +3665,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageView const & ) const = default; -#else - bool operator==( ImageView const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_imageView == rhs.m_imageView; - } - - bool operator!=( ImageView const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_imageView != rhs.m_imageView; - } - - bool operator<( ImageView const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_imageView < rhs.m_imageView; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkImageView() const VULKAN_HPP_NOEXCEPT { return m_imageView; @@ -4003,25 +3756,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Pipeline const & ) const = default; -#else - bool operator==( Pipeline const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_pipeline == rhs.m_pipeline; - } - - bool operator!=( Pipeline const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_pipeline != rhs.m_pipeline; - } - - bool operator<( Pipeline const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_pipeline < rhs.m_pipeline; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPipeline() const VULKAN_HPP_NOEXCEPT { return m_pipeline; @@ -4113,25 +3847,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ShaderEXT const & ) const = default; -#else - bool operator==( ShaderEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_shaderEXT == rhs.m_shaderEXT; - } - - bool operator!=( ShaderEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_shaderEXT != rhs.m_shaderEXT; - } - - bool operator<( ShaderEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_shaderEXT < rhs.m_shaderEXT; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkShaderEXT() const VULKAN_HPP_NOEXCEPT { return m_shaderEXT; @@ -4217,25 +3932,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Image const & ) const = default; -#else - bool operator==( Image const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_image == rhs.m_image; - } - - bool operator!=( Image const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_image != rhs.m_image; - } - - bool operator<( Image const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_image < rhs.m_image; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkImage() const VULKAN_HPP_NOEXCEPT { return m_image; @@ -4333,25 +4029,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AccelerationStructureNV const & ) const = default; -#else - bool operator==( AccelerationStructureNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_accelerationStructureNV == rhs.m_accelerationStructureNV; - } - - bool operator!=( AccelerationStructureNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_accelerationStructureNV != rhs.m_accelerationStructureNV; - } - - bool operator<( AccelerationStructureNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_accelerationStructureNV < rhs.m_accelerationStructureNV; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkAccelerationStructureNV() const VULKAN_HPP_NOEXCEPT { return m_accelerationStructureNV; @@ -4449,25 +4126,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( OpticalFlowSessionNV const & ) const = default; -#else - bool operator==( OpticalFlowSessionNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_opticalFlowSessionNV == rhs.m_opticalFlowSessionNV; - } - - bool operator!=( OpticalFlowSessionNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_opticalFlowSessionNV != rhs.m_opticalFlowSessionNV; - } - - bool operator<( OpticalFlowSessionNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_opticalFlowSessionNV < rhs.m_opticalFlowSessionNV; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkOpticalFlowSessionNV() const VULKAN_HPP_NOEXCEPT { return m_opticalFlowSessionNV; @@ -4559,25 +4217,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DescriptorUpdateTemplate const & ) const = default; -#else - bool operator==( DescriptorUpdateTemplate const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorUpdateTemplate == rhs.m_descriptorUpdateTemplate; - } - - bool operator!=( DescriptorUpdateTemplate const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorUpdateTemplate != rhs.m_descriptorUpdateTemplate; - } - - bool operator<( DescriptorUpdateTemplate const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorUpdateTemplate < rhs.m_descriptorUpdateTemplate; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDescriptorUpdateTemplate() const VULKAN_HPP_NOEXCEPT { return m_descriptorUpdateTemplate; @@ -4671,25 +4310,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Event const & ) const = default; -#else - bool operator==( Event const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_event == rhs.m_event; - } - - bool operator!=( Event const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_event != rhs.m_event; - } - - bool operator<( Event const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_event < rhs.m_event; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkEvent() const VULKAN_HPP_NOEXCEPT { return m_event; @@ -4787,25 +4407,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AccelerationStructureKHR const & ) const = default; -#else - bool operator==( AccelerationStructureKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_accelerationStructureKHR == rhs.m_accelerationStructureKHR; - } - - bool operator!=( AccelerationStructureKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_accelerationStructureKHR != rhs.m_accelerationStructureKHR; - } - - bool operator<( AccelerationStructureKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_accelerationStructureKHR < rhs.m_accelerationStructureKHR; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkAccelerationStructureKHR() const VULKAN_HPP_NOEXCEPT { return m_accelerationStructureKHR; @@ -4897,25 +4498,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MicromapEXT const & ) const = default; -#else - bool operator==( MicromapEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_micromapEXT == rhs.m_micromapEXT; - } - - bool operator!=( MicromapEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_micromapEXT != rhs.m_micromapEXT; - } - - bool operator<( MicromapEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_micromapEXT < rhs.m_micromapEXT; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkMicromapEXT() const VULKAN_HPP_NOEXCEPT { return m_micromapEXT; @@ -4999,25 +4581,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CommandBuffer const & ) const = default; -#else - bool operator==( CommandBuffer const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_commandBuffer == rhs.m_commandBuffer; - } - - bool operator!=( CommandBuffer const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_commandBuffer != rhs.m_commandBuffer; - } - - bool operator<( CommandBuffer const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_commandBuffer < rhs.m_commandBuffer; - } -#endif - //=== VK_VERSION_1_0 === template @@ -7454,25 +7017,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DeviceMemory const & ) const = default; -#else - bool operator==( DeviceMemory const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_deviceMemory == rhs.m_deviceMemory; - } - - bool operator!=( DeviceMemory const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_deviceMemory != rhs.m_deviceMemory; - } - - bool operator<( DeviceMemory const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_deviceMemory < rhs.m_deviceMemory; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDeviceMemory() const VULKAN_HPP_NOEXCEPT { return m_deviceMemory; @@ -7564,25 +7108,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoSessionKHR const & ) const = default; -#else - bool operator==( VideoSessionKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_videoSessionKHR == rhs.m_videoSessionKHR; - } - - bool operator!=( VideoSessionKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_videoSessionKHR != rhs.m_videoSessionKHR; - } - - bool operator<( VideoSessionKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_videoSessionKHR < rhs.m_videoSessionKHR; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkVideoSessionKHR() const VULKAN_HPP_NOEXCEPT { return m_videoSessionKHR; @@ -7674,25 +7199,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DeferredOperationKHR const & ) const = default; -#else - bool operator==( DeferredOperationKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_deferredOperationKHR == rhs.m_deferredOperationKHR; - } - - bool operator!=( DeferredOperationKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_deferredOperationKHR != rhs.m_deferredOperationKHR; - } - - bool operator<( DeferredOperationKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_deferredOperationKHR < rhs.m_deferredOperationKHR; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDeferredOperationKHR() const VULKAN_HPP_NOEXCEPT { return m_deferredOperationKHR; @@ -7785,25 +7291,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BufferCollectionFUCHSIA const & ) const = default; -# else - bool operator==( BufferCollectionFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_bufferCollectionFUCHSIA == rhs.m_bufferCollectionFUCHSIA; - } - - bool operator!=( BufferCollectionFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_bufferCollectionFUCHSIA != rhs.m_bufferCollectionFUCHSIA; - } - - bool operator<( BufferCollectionFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_bufferCollectionFUCHSIA < rhs.m_bufferCollectionFUCHSIA; - } -# endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkBufferCollectionFUCHSIA() const VULKAN_HPP_NOEXCEPT { return m_bufferCollectionFUCHSIA; @@ -7896,25 +7383,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BufferView const & ) const = default; -#else - bool operator==( BufferView const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_bufferView == rhs.m_bufferView; - } - - bool operator!=( BufferView const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_bufferView != rhs.m_bufferView; - } - - bool operator<( BufferView const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_bufferView < rhs.m_bufferView; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkBufferView() const VULKAN_HPP_NOEXCEPT { return m_bufferView; @@ -8006,25 +7474,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CommandPool const & ) const = default; -#else - bool operator==( CommandPool const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_commandPool == rhs.m_commandPool; - } - - bool operator!=( CommandPool const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_commandPool != rhs.m_commandPool; - } - - bool operator<( CommandPool const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_commandPool < rhs.m_commandPool; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkCommandPool() const VULKAN_HPP_NOEXCEPT { return m_commandPool; @@ -8116,25 +7565,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineCache const & ) const = default; -#else - bool operator==( PipelineCache const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_pipelineCache == rhs.m_pipelineCache; - } - - bool operator!=( PipelineCache const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_pipelineCache != rhs.m_pipelineCache; - } - - bool operator<( PipelineCache const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_pipelineCache < rhs.m_pipelineCache; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPipelineCache() const VULKAN_HPP_NOEXCEPT { return m_pipelineCache; @@ -8226,25 +7656,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CuFunctionNVX const & ) const = default; -#else - bool operator==( CuFunctionNVX const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_cuFunctionNVX == rhs.m_cuFunctionNVX; - } - - bool operator!=( CuFunctionNVX const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_cuFunctionNVX != rhs.m_cuFunctionNVX; - } - - bool operator<( CuFunctionNVX const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_cuFunctionNVX < rhs.m_cuFunctionNVX; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkCuFunctionNVX() const VULKAN_HPP_NOEXCEPT { return m_cuFunctionNVX; @@ -8336,25 +7747,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CuModuleNVX const & ) const = default; -#else - bool operator==( CuModuleNVX const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_cuModuleNVX == rhs.m_cuModuleNVX; - } - - bool operator!=( CuModuleNVX const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_cuModuleNVX != rhs.m_cuModuleNVX; - } - - bool operator<( CuModuleNVX const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_cuModuleNVX < rhs.m_cuModuleNVX; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkCuModuleNVX() const VULKAN_HPP_NOEXCEPT { return m_cuModuleNVX; @@ -8447,25 +7839,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CudaFunctionNV const & ) const = default; -# else - bool operator==( CudaFunctionNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_cudaFunctionNV == rhs.m_cudaFunctionNV; - } - - bool operator!=( CudaFunctionNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_cudaFunctionNV != rhs.m_cudaFunctionNV; - } - - bool operator<( CudaFunctionNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_cudaFunctionNV < rhs.m_cudaFunctionNV; - } -# endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkCudaFunctionNV() const VULKAN_HPP_NOEXCEPT { return m_cudaFunctionNV; @@ -8559,25 +7932,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CudaModuleNV const & ) const = default; -# else - bool operator==( CudaModuleNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_cudaModuleNV == rhs.m_cudaModuleNV; - } - - bool operator!=( CudaModuleNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_cudaModuleNV != rhs.m_cudaModuleNV; - } - - bool operator<( CudaModuleNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_cudaModuleNV < rhs.m_cudaModuleNV; - } -# endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkCudaModuleNV() const VULKAN_HPP_NOEXCEPT { return m_cudaModuleNV; @@ -8670,25 +8024,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DescriptorPool const & ) const = default; -#else - bool operator==( DescriptorPool const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorPool == rhs.m_descriptorPool; - } - - bool operator!=( DescriptorPool const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorPool != rhs.m_descriptorPool; - } - - bool operator<( DescriptorPool const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorPool < rhs.m_descriptorPool; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDescriptorPool() const VULKAN_HPP_NOEXCEPT { return m_descriptorPool; @@ -8786,25 +8121,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DescriptorSetLayout const & ) const = default; -#else - bool operator==( DescriptorSetLayout const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorSetLayout == rhs.m_descriptorSetLayout; - } - - bool operator!=( DescriptorSetLayout const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorSetLayout != rhs.m_descriptorSetLayout; - } - - bool operator<( DescriptorSetLayout const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorSetLayout < rhs.m_descriptorSetLayout; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDescriptorSetLayout() const VULKAN_HPP_NOEXCEPT { return m_descriptorSetLayout; @@ -8896,25 +8212,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Framebuffer const & ) const = default; -#else - bool operator==( Framebuffer const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_framebuffer == rhs.m_framebuffer; - } - - bool operator!=( Framebuffer const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_framebuffer != rhs.m_framebuffer; - } - - bool operator<( Framebuffer const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_framebuffer < rhs.m_framebuffer; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkFramebuffer() const VULKAN_HPP_NOEXCEPT { return m_framebuffer; @@ -9012,25 +8309,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( IndirectCommandsLayoutEXT const & ) const = default; -#else - bool operator==( IndirectCommandsLayoutEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_indirectCommandsLayoutEXT == rhs.m_indirectCommandsLayoutEXT; - } - - bool operator!=( IndirectCommandsLayoutEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_indirectCommandsLayoutEXT != rhs.m_indirectCommandsLayoutEXT; - } - - bool operator<( IndirectCommandsLayoutEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_indirectCommandsLayoutEXT < rhs.m_indirectCommandsLayoutEXT; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkIndirectCommandsLayoutEXT() const VULKAN_HPP_NOEXCEPT { return m_indirectCommandsLayoutEXT; @@ -9122,25 +8400,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( IndirectCommandsLayoutNV const & ) const = default; -#else - bool operator==( IndirectCommandsLayoutNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_indirectCommandsLayoutNV == rhs.m_indirectCommandsLayoutNV; - } - - bool operator!=( IndirectCommandsLayoutNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_indirectCommandsLayoutNV != rhs.m_indirectCommandsLayoutNV; - } - - bool operator<( IndirectCommandsLayoutNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_indirectCommandsLayoutNV < rhs.m_indirectCommandsLayoutNV; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkIndirectCommandsLayoutNV() const VULKAN_HPP_NOEXCEPT { return m_indirectCommandsLayoutNV; @@ -9232,25 +8491,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( IndirectExecutionSetEXT const & ) const = default; -#else - bool operator==( IndirectExecutionSetEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_indirectExecutionSetEXT == rhs.m_indirectExecutionSetEXT; - } - - bool operator!=( IndirectExecutionSetEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_indirectExecutionSetEXT != rhs.m_indirectExecutionSetEXT; - } - - bool operator<( IndirectExecutionSetEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_indirectExecutionSetEXT < rhs.m_indirectExecutionSetEXT; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkIndirectExecutionSetEXT() const VULKAN_HPP_NOEXCEPT { return m_indirectExecutionSetEXT; @@ -9336,25 +8576,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PrivateDataSlot const & ) const = default; -#else - bool operator==( PrivateDataSlot const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_privateDataSlot == rhs.m_privateDataSlot; - } - - bool operator!=( PrivateDataSlot const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_privateDataSlot != rhs.m_privateDataSlot; - } - - bool operator<( PrivateDataSlot const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_privateDataSlot < rhs.m_privateDataSlot; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPrivateDataSlot() const VULKAN_HPP_NOEXCEPT { return m_privateDataSlot; @@ -9442,25 +8663,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( RenderPass const & ) const = default; -#else - bool operator==( RenderPass const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_renderPass == rhs.m_renderPass; - } - - bool operator!=( RenderPass const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_renderPass != rhs.m_renderPass; - } - - bool operator<( RenderPass const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_renderPass < rhs.m_renderPass; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkRenderPass() const VULKAN_HPP_NOEXCEPT { return m_renderPass; @@ -9552,25 +8754,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Sampler const & ) const = default; -#else - bool operator==( Sampler const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_sampler == rhs.m_sampler; - } - - bool operator!=( Sampler const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_sampler != rhs.m_sampler; - } - - bool operator<( Sampler const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_sampler < rhs.m_sampler; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSampler() const VULKAN_HPP_NOEXCEPT { return m_sampler; @@ -9668,25 +8851,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SamplerYcbcrConversion const & ) const = default; -#else - bool operator==( SamplerYcbcrConversion const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_samplerYcbcrConversion == rhs.m_samplerYcbcrConversion; - } - - bool operator!=( SamplerYcbcrConversion const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_samplerYcbcrConversion != rhs.m_samplerYcbcrConversion; - } - - bool operator<( SamplerYcbcrConversion const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_samplerYcbcrConversion < rhs.m_samplerYcbcrConversion; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSamplerYcbcrConversion() const VULKAN_HPP_NOEXCEPT { return m_samplerYcbcrConversion; @@ -9780,25 +8944,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ShaderModule const & ) const = default; -#else - bool operator==( ShaderModule const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_shaderModule == rhs.m_shaderModule; - } - - bool operator!=( ShaderModule const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_shaderModule != rhs.m_shaderModule; - } - - bool operator<( ShaderModule const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_shaderModule < rhs.m_shaderModule; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkShaderModule() const VULKAN_HPP_NOEXCEPT { return m_shaderModule; @@ -9894,25 +9039,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ValidationCacheEXT const & ) const = default; -#else - bool operator==( ValidationCacheEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_validationCacheEXT == rhs.m_validationCacheEXT; - } - - bool operator!=( ValidationCacheEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_validationCacheEXT != rhs.m_validationCacheEXT; - } - - bool operator<( ValidationCacheEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_validationCacheEXT < rhs.m_validationCacheEXT; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkValidationCacheEXT() const VULKAN_HPP_NOEXCEPT { return m_validationCacheEXT; @@ -10010,25 +9136,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoSessionParametersKHR const & ) const = default; -#else - bool operator==( VideoSessionParametersKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_videoSessionParametersKHR == rhs.m_videoSessionParametersKHR; - } - - bool operator!=( VideoSessionParametersKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_videoSessionParametersKHR != rhs.m_videoSessionParametersKHR; - } - - bool operator<( VideoSessionParametersKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_videoSessionParametersKHR < rhs.m_videoSessionParametersKHR; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkVideoSessionParametersKHR() const VULKAN_HPP_NOEXCEPT { return m_videoSessionParametersKHR; @@ -10114,25 +9221,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineBinaryKHR const & ) const = default; -#else - bool operator==( PipelineBinaryKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_pipelineBinaryKHR == rhs.m_pipelineBinaryKHR; - } - - bool operator!=( PipelineBinaryKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_pipelineBinaryKHR != rhs.m_pipelineBinaryKHR; - } - - bool operator<( PipelineBinaryKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_pipelineBinaryKHR < rhs.m_pipelineBinaryKHR; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPipelineBinaryKHR() const VULKAN_HPP_NOEXCEPT { return m_pipelineBinaryKHR; @@ -10216,25 +9304,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Queue const & ) const = default; -#else - bool operator==( Queue const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_queue == rhs.m_queue; - } - - bool operator!=( Queue const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_queue != rhs.m_queue; - } - - bool operator<( Queue const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_queue < rhs.m_queue; - } -#endif - //=== VK_VERSION_1_0 === template @@ -10488,25 +9557,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Device const & ) const = default; -#else - bool operator==( Device const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_device == rhs.m_device; - } - - bool operator!=( Device const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_device != rhs.m_device; - } - - bool operator<( Device const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_device < rhs.m_device; - } -#endif - //=== VK_VERSION_1_0 === template @@ -16020,25 +15070,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DisplayModeKHR const & ) const = default; -#else - bool operator==( DisplayModeKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_displayModeKHR == rhs.m_displayModeKHR; - } - - bool operator!=( DisplayModeKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_displayModeKHR != rhs.m_displayModeKHR; - } - - bool operator<( DisplayModeKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_displayModeKHR < rhs.m_displayModeKHR; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDisplayModeKHR() const VULKAN_HPP_NOEXCEPT { return m_displayModeKHR; @@ -16128,25 +15159,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDevice const & ) const = default; -#else - bool operator==( PhysicalDevice const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_physicalDevice == rhs.m_physicalDevice; - } - - bool operator!=( PhysicalDevice const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_physicalDevice != rhs.m_physicalDevice; - } - - bool operator<( PhysicalDevice const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_physicalDevice < rhs.m_physicalDevice; - } -#endif - //=== VK_VERSION_1_0 === template @@ -17685,25 +16697,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Instance const & ) const = default; -#else - bool operator==( Instance const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_instance == rhs.m_instance; - } - - bool operator!=( Instance const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_instance != rhs.m_instance; - } - - bool operator<( Instance const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_instance < rhs.m_instance; - } -#endif - //=== VK_VERSION_1_0 === template @@ -18411,29 +17404,4 @@ namespace VULKAN_HPP_NAMESPACE #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ } // namespace VULKAN_HPP_NAMESPACE - -// operators to compare vk::-handles with nullptr -template -typename std::enable_if::value, bool>::type operator==( const T & v, std::nullptr_t ) -{ - return !v; -} - -template -typename std::enable_if::value, bool>::type operator==( std::nullptr_t, const T & v ) -{ - return !v; -} - -template -typename std::enable_if::value, bool>::type operator!=( const T & v, std::nullptr_t ) -{ - return v; -} - -template -typename std::enable_if::value, bool>::type operator!=( std::nullptr_t, const T & v ) -{ - return v; -} #endif diff --git a/vulkan/vulkan_raii.hpp b/vulkan/vulkan_raii.hpp index d8ca95f..27df31c 100644 --- a/vulkan/vulkan_raii.hpp +++ b/vulkan/vulkan_raii.hpp @@ -2770,6 +2770,12 @@ namespace VULKAN_HPP_NAMESPACE //=== RAII HANDLES === //==================== + template + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = false; + }; + class Context { public: @@ -3144,6 +3150,12 @@ namespace VULKAN_HPP_NAMESPACE std::unique_ptr m_dispatcher; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class PhysicalDevice { public: @@ -3585,6 +3597,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class PhysicalDevices : public std::vector { public: @@ -4746,6 +4764,12 @@ namespace VULKAN_HPP_NAMESPACE std::unique_ptr m_dispatcher; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class AccelerationStructureKHR { public: @@ -4866,6 +4890,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class AccelerationStructureNV { public: @@ -4994,6 +5024,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class Buffer { public: @@ -5119,6 +5155,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + # if defined( VK_USE_PLATFORM_FUCHSIA ) class BufferCollectionFUCHSIA { @@ -5247,6 +5289,13 @@ namespace VULKAN_HPP_NAMESPACE const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + # endif /*VK_USE_PLATFORM_FUCHSIA*/ class BufferView @@ -5368,6 +5417,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class CommandPool { public: @@ -5499,6 +5554,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class CommandBuffer { public: @@ -6561,6 +6622,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class CommandBuffers : public std::vector { public: @@ -6706,6 +6773,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class CuModuleNVX { public: @@ -6825,6 +6898,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + # if defined( VK_ENABLE_BETA_EXTENSIONS ) class CudaFunctionNV { @@ -6944,6 +7023,13 @@ namespace VULKAN_HPP_NAMESPACE const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + # endif /*VK_ENABLE_BETA_EXTENSIONS*/ # if defined( VK_ENABLE_BETA_EXTENSIONS ) @@ -7069,6 +7155,13 @@ namespace VULKAN_HPP_NAMESPACE const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + # endif /*VK_ENABLE_BETA_EXTENSIONS*/ class DebugReportCallbackEXT @@ -7191,6 +7284,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class DebugUtilsMessengerEXT { public: @@ -7311,6 +7410,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class DeferredOperationKHR { public: @@ -7438,6 +7543,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class DescriptorPool { public: @@ -7562,6 +7673,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class DescriptorSet { public: @@ -7683,6 +7800,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class DescriptorSets : public std::vector { public: @@ -7835,6 +7958,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class DescriptorUpdateTemplate { public: @@ -7955,6 +8084,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class DeviceMemory { public: @@ -8094,6 +8229,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class DisplayKHR { public: @@ -8236,6 +8377,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class DisplayKHRs : public std::vector { public: @@ -8369,6 +8516,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class Event { public: @@ -8496,6 +8649,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class Fence { public: @@ -8638,6 +8797,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class Framebuffer { public: @@ -8761,6 +8926,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class Image { public: @@ -8913,6 +9084,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class ImageView { public: @@ -9036,6 +9213,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class IndirectCommandsLayoutEXT { public: @@ -9156,6 +9339,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class IndirectCommandsLayoutNV { public: @@ -9276,6 +9465,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class IndirectExecutionSetEXT { public: @@ -9404,6 +9599,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class MicromapEXT { public: @@ -9523,6 +9724,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class OpticalFlowSessionNV { public: @@ -9649,6 +9856,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class PerformanceConfigurationINTEL { public: @@ -9756,6 +9969,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class PipelineCache { public: @@ -9882,6 +10101,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class Pipeline { public: @@ -10099,6 +10324,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class Pipelines : public std::vector { public: @@ -10294,6 +10525,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class PipelineBinaryKHRs : public std::vector { public: @@ -10441,6 +10678,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class PrivateDataSlot { public: @@ -10561,6 +10804,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class QueryPool { public: @@ -10705,6 +10954,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class Queue { public: @@ -10853,6 +11108,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class RenderPass { public: @@ -10989,6 +11250,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class Sampler { public: @@ -11108,6 +11375,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class SamplerYcbcrConversion { public: @@ -11228,6 +11501,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class Semaphore { public: @@ -11355,6 +11634,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class ShaderEXT { public: @@ -11491,6 +11776,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class ShaderEXTs : public std::vector { public: @@ -11641,6 +11932,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class SurfaceKHR { public: @@ -11912,6 +12209,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class SwapchainKHR { public: @@ -12080,6 +12383,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class SwapchainKHRs : public std::vector { public: @@ -12233,6 +12542,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class VideoSessionKHR { public: @@ -12359,6 +12674,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class VideoSessionParametersKHR { public: @@ -12483,6 +12804,63 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + + // operators to compare vk::raii-handles +# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) + template ::value, bool>::type = 0> + auto operator<=>( T const & a, T const & b ) VULKAN_HPP_NOEXCEPT + { + return *a <=> *b; + } +# else + template ::value, bool>::type = 0> + bool operator==( T const & a, T const & b ) VULKAN_HPP_NOEXCEPT + { + return *a == *b; + } + + template ::value, bool>::type = 0> + bool operator!=( T const & a, T const & b ) VULKAN_HPP_NOEXCEPT + { + return *a != *b; + } + + template ::value, bool>::type = 0> + bool operator<( T const & a, T const & b ) VULKAN_HPP_NOEXCEPT + { + return *a < *b; + } +# endif + + template ::value, bool>::type = 0> + bool operator==( const T & v, std::nullptr_t ) VULKAN_HPP_NOEXCEPT + { + return !*v; + } + + template ::value, bool>::type = 0> + bool operator==( std::nullptr_t, const T & v ) VULKAN_HPP_NOEXCEPT + { + return !*v; + } + + template ::value, bool>::type = 0> + bool operator!=( const T & v, std::nullptr_t ) VULKAN_HPP_NOEXCEPT + { + return *v; + } + + template ::value, bool>::type = 0> + bool operator!=( std::nullptr_t, const T & v ) VULKAN_HPP_NOEXCEPT + { + return *v; + } + //=========================== //=== COMMAND Definitions === //=========================== diff --git a/vulkan/vulkansc_handles.hpp b/vulkan/vulkansc_handles.hpp index fb34403..3983a2b 100644 --- a/vulkan/vulkansc_handles.hpp +++ b/vulkan/vulkansc_handles.hpp @@ -1094,25 +1094,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DebugUtilsMessengerEXT const & ) const = default; -#else - bool operator==( DebugUtilsMessengerEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_debugUtilsMessengerEXT == rhs.m_debugUtilsMessengerEXT; - } - - bool operator!=( DebugUtilsMessengerEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_debugUtilsMessengerEXT != rhs.m_debugUtilsMessengerEXT; - } - - bool operator<( DebugUtilsMessengerEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_debugUtilsMessengerEXT < rhs.m_debugUtilsMessengerEXT; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDebugUtilsMessengerEXT() const VULKAN_HPP_NOEXCEPT { return m_debugUtilsMessengerEXT; @@ -1198,25 +1179,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SurfaceKHR const & ) const = default; -#else - bool operator==( SurfaceKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_surfaceKHR == rhs.m_surfaceKHR; - } - - bool operator!=( SurfaceKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_surfaceKHR != rhs.m_surfaceKHR; - } - - bool operator<( SurfaceKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_surfaceKHR < rhs.m_surfaceKHR; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSurfaceKHR() const VULKAN_HPP_NOEXCEPT { return m_surfaceKHR; @@ -1308,25 +1270,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DisplayKHR const & ) const = default; -#else - bool operator==( DisplayKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_displayKHR == rhs.m_displayKHR; - } - - bool operator!=( DisplayKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_displayKHR != rhs.m_displayKHR; - } - - bool operator<( DisplayKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_displayKHR < rhs.m_displayKHR; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDisplayKHR() const VULKAN_HPP_NOEXCEPT { return m_displayKHR; @@ -1418,25 +1361,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SwapchainKHR const & ) const = default; -#else - bool operator==( SwapchainKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_swapchainKHR == rhs.m_swapchainKHR; - } - - bool operator!=( SwapchainKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_swapchainKHR != rhs.m_swapchainKHR; - } - - bool operator<( SwapchainKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_swapchainKHR < rhs.m_swapchainKHR; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSwapchainKHR() const VULKAN_HPP_NOEXCEPT { return m_swapchainKHR; @@ -1528,25 +1452,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Semaphore const & ) const = default; -#else - bool operator==( Semaphore const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_semaphore == rhs.m_semaphore; - } - - bool operator!=( Semaphore const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_semaphore != rhs.m_semaphore; - } - - bool operator<( Semaphore const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_semaphore < rhs.m_semaphore; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSemaphore() const VULKAN_HPP_NOEXCEPT { return m_semaphore; @@ -1638,25 +1543,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Fence const & ) const = default; -#else - bool operator==( Fence const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_fence == rhs.m_fence; - } - - bool operator!=( Fence const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_fence != rhs.m_fence; - } - - bool operator<( Fence const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_fence < rhs.m_fence; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkFence() const VULKAN_HPP_NOEXCEPT { return m_fence; @@ -1748,25 +1634,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( QueryPool const & ) const = default; -#else - bool operator==( QueryPool const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_queryPool == rhs.m_queryPool; - } - - bool operator!=( QueryPool const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_queryPool != rhs.m_queryPool; - } - - bool operator<( QueryPool const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_queryPool < rhs.m_queryPool; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkQueryPool() const VULKAN_HPP_NOEXCEPT { return m_queryPool; @@ -1858,25 +1725,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineLayout const & ) const = default; -#else - bool operator==( PipelineLayout const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_pipelineLayout == rhs.m_pipelineLayout; - } - - bool operator!=( PipelineLayout const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_pipelineLayout != rhs.m_pipelineLayout; - } - - bool operator<( PipelineLayout const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_pipelineLayout < rhs.m_pipelineLayout; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPipelineLayout() const VULKAN_HPP_NOEXCEPT { return m_pipelineLayout; @@ -1968,25 +1816,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DescriptorSet const & ) const = default; -#else - bool operator==( DescriptorSet const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorSet == rhs.m_descriptorSet; - } - - bool operator!=( DescriptorSet const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorSet != rhs.m_descriptorSet; - } - - bool operator<( DescriptorSet const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorSet < rhs.m_descriptorSet; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDescriptorSet() const VULKAN_HPP_NOEXCEPT { return m_descriptorSet; @@ -2078,25 +1907,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Buffer const & ) const = default; -#else - bool operator==( Buffer const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_buffer == rhs.m_buffer; - } - - bool operator!=( Buffer const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_buffer != rhs.m_buffer; - } - - bool operator<( Buffer const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_buffer < rhs.m_buffer; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkBuffer() const VULKAN_HPP_NOEXCEPT { return m_buffer; @@ -2188,25 +1998,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Pipeline const & ) const = default; -#else - bool operator==( Pipeline const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_pipeline == rhs.m_pipeline; - } - - bool operator!=( Pipeline const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_pipeline != rhs.m_pipeline; - } - - bool operator<( Pipeline const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_pipeline < rhs.m_pipeline; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPipeline() const VULKAN_HPP_NOEXCEPT { return m_pipeline; @@ -2298,25 +2089,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Image const & ) const = default; -#else - bool operator==( Image const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_image == rhs.m_image; - } - - bool operator!=( Image const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_image != rhs.m_image; - } - - bool operator<( Image const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_image < rhs.m_image; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkImage() const VULKAN_HPP_NOEXCEPT { return m_image; @@ -2408,25 +2180,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Event const & ) const = default; -#else - bool operator==( Event const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_event == rhs.m_event; - } - - bool operator!=( Event const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_event != rhs.m_event; - } - - bool operator<( Event const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_event < rhs.m_event; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkEvent() const VULKAN_HPP_NOEXCEPT { return m_event; @@ -2516,25 +2269,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CommandBuffer const & ) const = default; -#else - bool operator==( CommandBuffer const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_commandBuffer == rhs.m_commandBuffer; - } - - bool operator!=( CommandBuffer const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_commandBuffer != rhs.m_commandBuffer; - } - - bool operator<( CommandBuffer const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_commandBuffer < rhs.m_commandBuffer; - } -#endif - //=== VK_VERSION_1_0 === template @@ -3679,25 +3413,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DeviceMemory const & ) const = default; -#else - bool operator==( DeviceMemory const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_deviceMemory == rhs.m_deviceMemory; - } - - bool operator!=( DeviceMemory const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_deviceMemory != rhs.m_deviceMemory; - } - - bool operator<( DeviceMemory const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_deviceMemory < rhs.m_deviceMemory; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDeviceMemory() const VULKAN_HPP_NOEXCEPT { return m_deviceMemory; @@ -3789,25 +3504,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BufferView const & ) const = default; -#else - bool operator==( BufferView const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_bufferView == rhs.m_bufferView; - } - - bool operator!=( BufferView const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_bufferView != rhs.m_bufferView; - } - - bool operator<( BufferView const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_bufferView < rhs.m_bufferView; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkBufferView() const VULKAN_HPP_NOEXCEPT { return m_bufferView; @@ -3899,25 +3595,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CommandPool const & ) const = default; -#else - bool operator==( CommandPool const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_commandPool == rhs.m_commandPool; - } - - bool operator!=( CommandPool const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_commandPool != rhs.m_commandPool; - } - - bool operator<( CommandPool const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_commandPool < rhs.m_commandPool; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkCommandPool() const VULKAN_HPP_NOEXCEPT { return m_commandPool; @@ -4009,25 +3686,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineCache const & ) const = default; -#else - bool operator==( PipelineCache const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_pipelineCache == rhs.m_pipelineCache; - } - - bool operator!=( PipelineCache const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_pipelineCache != rhs.m_pipelineCache; - } - - bool operator<( PipelineCache const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_pipelineCache < rhs.m_pipelineCache; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPipelineCache() const VULKAN_HPP_NOEXCEPT { return m_pipelineCache; @@ -4119,25 +3777,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DescriptorPool const & ) const = default; -#else - bool operator==( DescriptorPool const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorPool == rhs.m_descriptorPool; - } - - bool operator!=( DescriptorPool const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorPool != rhs.m_descriptorPool; - } - - bool operator<( DescriptorPool const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorPool < rhs.m_descriptorPool; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDescriptorPool() const VULKAN_HPP_NOEXCEPT { return m_descriptorPool; @@ -4235,25 +3874,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DescriptorSetLayout const & ) const = default; -#else - bool operator==( DescriptorSetLayout const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorSetLayout == rhs.m_descriptorSetLayout; - } - - bool operator!=( DescriptorSetLayout const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorSetLayout != rhs.m_descriptorSetLayout; - } - - bool operator<( DescriptorSetLayout const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorSetLayout < rhs.m_descriptorSetLayout; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDescriptorSetLayout() const VULKAN_HPP_NOEXCEPT { return m_descriptorSetLayout; @@ -4345,25 +3965,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Framebuffer const & ) const = default; -#else - bool operator==( Framebuffer const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_framebuffer == rhs.m_framebuffer; - } - - bool operator!=( Framebuffer const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_framebuffer != rhs.m_framebuffer; - } - - bool operator<( Framebuffer const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_framebuffer < rhs.m_framebuffer; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkFramebuffer() const VULKAN_HPP_NOEXCEPT { return m_framebuffer; @@ -4455,25 +4056,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageView const & ) const = default; -#else - bool operator==( ImageView const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_imageView == rhs.m_imageView; - } - - bool operator!=( ImageView const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_imageView != rhs.m_imageView; - } - - bool operator<( ImageView const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_imageView < rhs.m_imageView; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkImageView() const VULKAN_HPP_NOEXCEPT { return m_imageView; @@ -4565,25 +4147,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PrivateDataSlot const & ) const = default; -#else - bool operator==( PrivateDataSlot const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_privateDataSlot == rhs.m_privateDataSlot; - } - - bool operator!=( PrivateDataSlot const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_privateDataSlot != rhs.m_privateDataSlot; - } - - bool operator<( PrivateDataSlot const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_privateDataSlot < rhs.m_privateDataSlot; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPrivateDataSlot() const VULKAN_HPP_NOEXCEPT { return m_privateDataSlot; @@ -4671,25 +4234,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( RenderPass const & ) const = default; -#else - bool operator==( RenderPass const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_renderPass == rhs.m_renderPass; - } - - bool operator!=( RenderPass const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_renderPass != rhs.m_renderPass; - } - - bool operator<( RenderPass const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_renderPass < rhs.m_renderPass; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkRenderPass() const VULKAN_HPP_NOEXCEPT { return m_renderPass; @@ -4781,25 +4325,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Sampler const & ) const = default; -#else - bool operator==( Sampler const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_sampler == rhs.m_sampler; - } - - bool operator!=( Sampler const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_sampler != rhs.m_sampler; - } - - bool operator<( Sampler const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_sampler < rhs.m_sampler; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSampler() const VULKAN_HPP_NOEXCEPT { return m_sampler; @@ -4897,25 +4422,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SamplerYcbcrConversion const & ) const = default; -#else - bool operator==( SamplerYcbcrConversion const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_samplerYcbcrConversion == rhs.m_samplerYcbcrConversion; - } - - bool operator!=( SamplerYcbcrConversion const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_samplerYcbcrConversion != rhs.m_samplerYcbcrConversion; - } - - bool operator<( SamplerYcbcrConversion const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_samplerYcbcrConversion < rhs.m_samplerYcbcrConversion; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSamplerYcbcrConversion() const VULKAN_HPP_NOEXCEPT { return m_samplerYcbcrConversion; @@ -5016,25 +4522,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SemaphoreSciSyncPoolNV const & ) const = default; -# else - bool operator==( SemaphoreSciSyncPoolNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_semaphoreSciSyncPoolNV == rhs.m_semaphoreSciSyncPoolNV; - } - - bool operator!=( SemaphoreSciSyncPoolNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_semaphoreSciSyncPoolNV != rhs.m_semaphoreSciSyncPoolNV; - } - - bool operator<( SemaphoreSciSyncPoolNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_semaphoreSciSyncPoolNV < rhs.m_semaphoreSciSyncPoolNV; - } -# endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSemaphoreSciSyncPoolNV() const VULKAN_HPP_NOEXCEPT { return m_semaphoreSciSyncPoolNV; @@ -5119,25 +4606,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Queue const & ) const = default; -#else - bool operator==( Queue const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_queue == rhs.m_queue; - } - - bool operator!=( Queue const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_queue != rhs.m_queue; - } - - bool operator<( Queue const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_queue < rhs.m_queue; - } -#endif - //=== VK_VERSION_1_0 === template @@ -5314,25 +4782,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Device const & ) const = default; -#else - bool operator==( Device const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_device == rhs.m_device; - } - - bool operator!=( Device const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_device != rhs.m_device; - } - - bool operator<( Device const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_device < rhs.m_device; - } -#endif - //=== VK_VERSION_1_0 === template @@ -7516,25 +6965,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DisplayModeKHR const & ) const = default; -#else - bool operator==( DisplayModeKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_displayModeKHR == rhs.m_displayModeKHR; - } - - bool operator!=( DisplayModeKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_displayModeKHR != rhs.m_displayModeKHR; - } - - bool operator<( DisplayModeKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_displayModeKHR < rhs.m_displayModeKHR; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDisplayModeKHR() const VULKAN_HPP_NOEXCEPT { return m_displayModeKHR; @@ -7624,25 +7054,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDevice const & ) const = default; -#else - bool operator==( PhysicalDevice const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_physicalDevice == rhs.m_physicalDevice; - } - - bool operator!=( PhysicalDevice const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_physicalDevice != rhs.m_physicalDevice; - } - - bool operator<( PhysicalDevice const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_physicalDevice < rhs.m_physicalDevice; - } -#endif - //=== VK_VERSION_1_0 === template @@ -8584,25 +7995,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Instance const & ) const = default; -#else - bool operator==( Instance const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_instance == rhs.m_instance; - } - - bool operator!=( Instance const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_instance != rhs.m_instance; - } - - bool operator<( Instance const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_instance < rhs.m_instance; - } -#endif - //=== VK_VERSION_1_0 === template @@ -8952,25 +8344,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ShaderModule const & ) const = default; -#else - bool operator==( ShaderModule const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_shaderModule == rhs.m_shaderModule; - } - - bool operator!=( ShaderModule const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_shaderModule != rhs.m_shaderModule; - } - - bool operator<( ShaderModule const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_shaderModule < rhs.m_shaderModule; - } -#endif - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkShaderModule() const VULKAN_HPP_NOEXCEPT { return m_shaderModule; @@ -9017,29 +8390,4 @@ namespace VULKAN_HPP_NAMESPACE }; } // namespace VULKAN_HPP_NAMESPACE - -// operators to compare vk::-handles with nullptr -template -typename std::enable_if::value, bool>::type operator==( const T & v, std::nullptr_t ) -{ - return !v; -} - -template -typename std::enable_if::value, bool>::type operator==( std::nullptr_t, const T & v ) -{ - return !v; -} - -template -typename std::enable_if::value, bool>::type operator!=( const T & v, std::nullptr_t ) -{ - return v; -} - -template -typename std::enable_if::value, bool>::type operator!=( std::nullptr_t, const T & v ) -{ - return v; -} #endif diff --git a/vulkan/vulkansc_raii.hpp b/vulkan/vulkansc_raii.hpp index 2f6fe9f..26d0c41 100644 --- a/vulkan/vulkansc_raii.hpp +++ b/vulkan/vulkansc_raii.hpp @@ -1127,6 +1127,12 @@ namespace VULKAN_HPP_NAMESPACE //=== RAII HANDLES === //==================== + template + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = false; + }; + class Context { public: @@ -1351,6 +1357,12 @@ namespace VULKAN_HPP_NAMESPACE std::unique_ptr m_dispatcher; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class PhysicalDevice { public: @@ -1621,6 +1633,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class PhysicalDevices : public std::vector { public: @@ -2124,6 +2142,12 @@ namespace VULKAN_HPP_NAMESPACE std::unique_ptr m_dispatcher; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class Buffer { public: @@ -2249,6 +2273,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class BufferView { public: @@ -2368,6 +2398,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class CommandPool { public: @@ -2496,6 +2532,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class CommandBuffer { public: @@ -3002,6 +3044,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class CommandBuffers : public std::vector { public: @@ -3148,6 +3196,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class DescriptorPool { public: @@ -3272,6 +3326,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class DescriptorSet { public: @@ -3379,6 +3439,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class DescriptorSets : public std::vector { public: @@ -3525,6 +3591,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class DeviceMemory { public: @@ -3654,6 +3726,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class DisplayKHR { public: @@ -3780,6 +3858,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class DisplayKHRs : public std::vector { public: @@ -3913,6 +3997,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class Event { public: @@ -4040,6 +4130,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class Fence { public: @@ -4182,6 +4278,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class Framebuffer { public: @@ -4301,6 +4403,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class Image { public: @@ -4433,6 +4541,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class ImageView { public: @@ -4552,6 +4666,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class PipelineCache { public: @@ -4696,6 +4816,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class Pipeline { public: @@ -4839,6 +4965,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class Pipelines : public std::vector { public: @@ -4997,6 +5129,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class PrivateDataSlot { public: @@ -5117,6 +5255,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class QueryPool { public: @@ -5257,6 +5401,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class Queue { public: @@ -5388,6 +5538,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class RenderPass { public: @@ -5520,6 +5676,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class Sampler { public: @@ -5639,6 +5801,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class SamplerYcbcrConversion { public: @@ -5759,6 +5927,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class Semaphore { public: @@ -5882,6 +6056,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + # if defined( VK_USE_PLATFORM_SCI ) class SemaphoreSciSyncPoolNV { @@ -6002,6 +6182,13 @@ namespace VULKAN_HPP_NAMESPACE const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + # endif /*VK_USE_PLATFORM_SCI*/ class ShaderModule @@ -6123,6 +6310,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class SurfaceKHR { public: @@ -6251,6 +6444,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class SwapchainKHR { public: @@ -6387,6 +6586,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; + template <> + struct isVulkanRAIIHandleType + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; + }; + class SwapchainKHRs : public std::vector { public: @@ -6414,6 +6619,57 @@ namespace VULKAN_HPP_NAMESPACE } }; + // operators to compare vk::raii-handles +# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) + template ::value, bool>::type = 0> + auto operator<=>( T const & a, T const & b ) VULKAN_HPP_NOEXCEPT + { + return *a <=> *b; + } +# else + template ::value, bool>::type = 0> + bool operator==( T const & a, T const & b ) VULKAN_HPP_NOEXCEPT + { + return *a == *b; + } + + template ::value, bool>::type = 0> + bool operator!=( T const & a, T const & b ) VULKAN_HPP_NOEXCEPT + { + return *a != *b; + } + + template ::value, bool>::type = 0> + bool operator<( T const & a, T const & b ) VULKAN_HPP_NOEXCEPT + { + return *a < *b; + } +# endif + + template ::value, bool>::type = 0> + bool operator==( const T & v, std::nullptr_t ) VULKAN_HPP_NOEXCEPT + { + return !*v; + } + + template ::value, bool>::type = 0> + bool operator==( std::nullptr_t, const T & v ) VULKAN_HPP_NOEXCEPT + { + return !*v; + } + + template ::value, bool>::type = 0> + bool operator!=( const T & v, std::nullptr_t ) VULKAN_HPP_NOEXCEPT + { + return *v; + } + + template ::value, bool>::type = 0> + bool operator!=( std::nullptr_t, const T & v ) VULKAN_HPP_NOEXCEPT + { + return *v; + } + //=========================== //=== COMMAND Definitions === //===========================