diff options
Diffstat (limited to 'include/vulkan/vulkan_raii.hpp')
-rw-r--r-- | include/vulkan/vulkan_raii.hpp | 1704 |
1 files changed, 1133 insertions, 571 deletions
diff --git a/include/vulkan/vulkan_raii.hpp b/include/vulkan/vulkan_raii.hpp index a530430..81c146a 100644 --- a/include/vulkan/vulkan_raii.hpp +++ b/include/vulkan/vulkan_raii.hpp @@ -2517,6 +2517,20 @@ namespace VULKAN_HPP_NAMESPACE return *this; } + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::ContextDispatcher const * getDispatcher() const + { + VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); + return &*m_dispatcher; + } + + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Context & rhs ) + { +# if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL + std::swap( m_dynamicLoader, rhs.m_dynamicLoader ); +# endif + m_dispatcher.swap( rhs.m_dispatcher ); + } + //=== VK_VERSION_1_0 === VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Instance createInstance( @@ -2532,12 +2546,6 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD uint32_t enumerateInstanceVersion() const; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::ContextDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return &*m_dispatcher; - } - private: # if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL VULKAN_HPP_NAMESPACE::DynamicLoader m_dynamicLoader; @@ -2587,11 +2595,7 @@ namespace VULKAN_HPP_NAMESPACE ~Instance() { - if ( m_instance ) - { - getDispatcher()->vkDestroyInstance( static_cast<VkInstance>( m_instance ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } Instance() = delete; @@ -2606,11 +2610,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_instance ) - { - getDispatcher()->vkDestroyInstance( static_cast<VkInstance>( m_instance ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_instance = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_instance, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); m_dispatcher.reset( rhs.m_dispatcher.release() ); @@ -2623,12 +2623,31 @@ namespace VULKAN_HPP_NAMESPACE return m_instance; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_instance ) + { + getDispatcher()->vkDestroyInstance( static_cast<VkInstance>( m_instance ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_instance = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return &*m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_instance, rhs.m_instance ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + //=== VK_VERSION_1_0 === VULKAN_HPP_NODISCARD std::vector<VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice> enumeratePhysicalDevices() const; @@ -2788,7 +2807,7 @@ namespace VULKAN_HPP_NAMESPACE private: VULKAN_HPP_NAMESPACE::Instance m_instance = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; std::unique_ptr<VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher> m_dispatcher; }; @@ -2810,6 +2829,11 @@ namespace VULKAN_HPP_NAMESPACE PhysicalDevice( std::nullptr_t ) {} + ~PhysicalDevice() + { + clear(); + } + PhysicalDevice() = delete; PhysicalDevice( PhysicalDevice const & ) = delete; PhysicalDevice( PhysicalDevice && rhs ) VULKAN_HPP_NOEXCEPT @@ -2832,12 +2856,24 @@ namespace VULKAN_HPP_NAMESPACE return m_physicalDevice; } + void clear() VULKAN_HPP_NOEXCEPT + { + m_physicalDevice = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_physicalDevice, rhs.m_physicalDevice ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + //=== VK_VERSION_1_0 === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures getFeatures() const VULKAN_HPP_NOEXCEPT; @@ -3223,6 +3259,8 @@ namespace VULKAN_HPP_NAMESPACE } } + PhysicalDevices( std::nullptr_t ) {} + PhysicalDevices() = delete; PhysicalDevices( PhysicalDevices const & ) = delete; PhysicalDevices( PhysicalDevices && rhs ) = default; @@ -3273,11 +3311,7 @@ namespace VULKAN_HPP_NAMESPACE ~Device() { - if ( m_device ) - { - getDispatcher()->vkDestroyDevice( static_cast<VkDevice>( m_device ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } Device() = delete; @@ -3292,11 +3326,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_device ) - { - getDispatcher()->vkDestroyDevice( static_cast<VkDevice>( m_device ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); m_dispatcher.reset( rhs.m_dispatcher.release() ); @@ -3309,12 +3339,31 @@ namespace VULKAN_HPP_NAMESPACE return m_device; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_device ) + { + getDispatcher()->vkDestroyDevice( static_cast<VkDevice>( m_device ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return &*m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + //=== VK_VERSION_1_0 === VULKAN_HPP_NODISCARD PFN_vkVoidFunction getProcAddr( const std::string & name ) const VULKAN_HPP_NOEXCEPT; @@ -4033,7 +4082,7 @@ namespace VULKAN_HPP_NAMESPACE private: VULKAN_HPP_NAMESPACE::Device m_device = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; std::unique_ptr<VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher> m_dispatcher; }; @@ -4082,13 +4131,7 @@ namespace VULKAN_HPP_NAMESPACE ~AccelerationStructureKHR() { - if ( m_accelerationStructure ) - { - getDispatcher()->vkDestroyAccelerationStructureKHR( - static_cast<VkDevice>( m_device ), - static_cast<VkAccelerationStructureKHR>( m_accelerationStructure ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } AccelerationStructureKHR() = delete; @@ -4105,13 +4148,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_accelerationStructure ) - { - getDispatcher()->vkDestroyAccelerationStructureKHR( - static_cast<VkDevice>( m_device ), - static_cast<VkAccelerationStructureKHR>( m_accelerationStructure ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_accelerationStructure = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_accelerationStructure, {} ); @@ -4126,6 +4163,21 @@ namespace VULKAN_HPP_NAMESPACE return m_accelerationStructure; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_accelerationStructure ) + { + getDispatcher()->vkDestroyAccelerationStructureKHR( + static_cast<VkDevice>( m_device ), + static_cast<VkAccelerationStructureKHR>( m_accelerationStructure ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_accelerationStructure = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -4137,10 +4189,18 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::AccelerationStructureKHR & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_accelerationStructure, rhs.m_accelerationStructure ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::AccelerationStructureKHR m_accelerationStructure = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -4189,13 +4249,7 @@ namespace VULKAN_HPP_NAMESPACE ~AccelerationStructureNV() { - if ( m_accelerationStructure ) - { - getDispatcher()->vkDestroyAccelerationStructureNV( - static_cast<VkDevice>( m_device ), - static_cast<VkAccelerationStructureNV>( m_accelerationStructure ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } AccelerationStructureNV() = delete; @@ -4212,13 +4266,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_accelerationStructure ) - { - getDispatcher()->vkDestroyAccelerationStructureNV( - static_cast<VkDevice>( m_device ), - static_cast<VkAccelerationStructureNV>( m_accelerationStructure ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_accelerationStructure = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_accelerationStructure, {} ); @@ -4233,6 +4281,21 @@ namespace VULKAN_HPP_NAMESPACE return m_accelerationStructure; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_accelerationStructure ) + { + getDispatcher()->vkDestroyAccelerationStructureNV( + static_cast<VkDevice>( m_device ), + static_cast<VkAccelerationStructureNV>( m_accelerationStructure ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_accelerationStructure = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -4244,6 +4307,14 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::AccelerationStructureNV & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_accelerationStructure, rhs.m_accelerationStructure ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + //=== VK_NV_ray_tracing === template <typename DataType> @@ -4255,7 +4326,7 @@ namespace VULKAN_HPP_NAMESPACE private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::AccelerationStructureNV m_accelerationStructure = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -4301,12 +4372,7 @@ namespace VULKAN_HPP_NAMESPACE ~Buffer() { - if ( m_buffer ) - { - getDispatcher()->vkDestroyBuffer( static_cast<VkDevice>( m_device ), - static_cast<VkBuffer>( m_buffer ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } Buffer() = delete; @@ -4322,12 +4388,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_buffer ) - { - getDispatcher()->vkDestroyBuffer( static_cast<VkDevice>( m_device ), - static_cast<VkBuffer>( m_buffer ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_buffer = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_buffer, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); @@ -4341,6 +4402,20 @@ namespace VULKAN_HPP_NAMESPACE return m_buffer; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_buffer ) + { + getDispatcher()->vkDestroyBuffer( static_cast<VkDevice>( m_device ), + static_cast<VkBuffer>( m_buffer ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_buffer = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -4352,6 +4427,14 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Buffer & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_buffer, rhs.m_buffer ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + //=== VK_VERSION_1_0 === void bindMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset ) const; @@ -4361,7 +4444,7 @@ namespace VULKAN_HPP_NAMESPACE private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::Buffer m_buffer = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -4411,13 +4494,7 @@ namespace VULKAN_HPP_NAMESPACE ~BufferCollectionFUCHSIA() { - if ( m_collection ) - { - getDispatcher()->vkDestroyBufferCollectionFUCHSIA( - static_cast<VkDevice>( m_device ), - static_cast<VkBufferCollectionFUCHSIA>( m_collection ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } BufferCollectionFUCHSIA() = delete; @@ -4433,13 +4510,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_collection ) - { - getDispatcher()->vkDestroyBufferCollectionFUCHSIA( - static_cast<VkDevice>( m_device ), - static_cast<VkBufferCollectionFUCHSIA>( m_collection ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_collection = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_collection, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); @@ -4453,6 +4524,21 @@ namespace VULKAN_HPP_NAMESPACE return m_collection; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_collection ) + { + getDispatcher()->vkDestroyBufferCollectionFUCHSIA( + static_cast<VkDevice>( m_device ), + static_cast<VkBufferCollectionFUCHSIA>( m_collection ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_collection = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -4464,6 +4550,14 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::BufferCollectionFUCHSIA & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_collection, rhs.m_collection ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + //=== VK_FUCHSIA_buffer_collection === void setImageConstraints( const VULKAN_HPP_NAMESPACE::ImageConstraintsInfoFUCHSIA & imageConstraintsInfo ) const; @@ -4476,7 +4570,7 @@ namespace VULKAN_HPP_NAMESPACE private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA m_collection = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; # endif /*VK_USE_PLATFORM_FUCHSIA*/ @@ -4523,12 +4617,7 @@ namespace VULKAN_HPP_NAMESPACE ~BufferView() { - if ( m_bufferView ) - { - getDispatcher()->vkDestroyBufferView( static_cast<VkDevice>( m_device ), - static_cast<VkBufferView>( m_bufferView ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } BufferView() = delete; @@ -4544,12 +4633,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_bufferView ) - { - getDispatcher()->vkDestroyBufferView( static_cast<VkDevice>( m_device ), - static_cast<VkBufferView>( m_bufferView ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_bufferView = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_bufferView, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); @@ -4563,6 +4647,20 @@ namespace VULKAN_HPP_NAMESPACE return m_bufferView; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_bufferView ) + { + getDispatcher()->vkDestroyBufferView( static_cast<VkDevice>( m_device ), + static_cast<VkBufferView>( m_bufferView ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_bufferView = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -4574,10 +4672,18 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::BufferView & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_bufferView, rhs.m_bufferView ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::BufferView m_bufferView = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -4623,12 +4729,7 @@ namespace VULKAN_HPP_NAMESPACE ~CommandPool() { - if ( m_commandPool ) - { - getDispatcher()->vkDestroyCommandPool( static_cast<VkDevice>( m_device ), - static_cast<VkCommandPool>( m_commandPool ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } CommandPool() = delete; @@ -4644,12 +4745,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_commandPool ) - { - getDispatcher()->vkDestroyCommandPool( static_cast<VkDevice>( m_device ), - static_cast<VkCommandPool>( m_commandPool ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_commandPool = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_commandPool, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); @@ -4663,6 +4759,20 @@ namespace VULKAN_HPP_NAMESPACE return m_commandPool; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_commandPool ) + { + getDispatcher()->vkDestroyCommandPool( static_cast<VkDevice>( m_device ), + static_cast<VkCommandPool>( m_commandPool ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_commandPool = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -4674,6 +4784,14 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CommandPool & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_commandPool, rhs.m_commandPool ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + //=== VK_VERSION_1_0 === void reset( VULKAN_HPP_NAMESPACE::CommandPoolResetFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const; @@ -4691,7 +4809,7 @@ namespace VULKAN_HPP_NAMESPACE private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::CommandPool m_commandPool = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -4719,13 +4837,7 @@ namespace VULKAN_HPP_NAMESPACE ~CommandBuffer() { - if ( m_commandBuffer ) - { - getDispatcher()->vkFreeCommandBuffers( static_cast<VkDevice>( m_device ), - static_cast<VkCommandPool>( m_commandPool ), - 1, - reinterpret_cast<VkCommandBuffer const *>( &m_commandBuffer ) ); - } + clear(); } CommandBuffer() = delete; @@ -4741,13 +4853,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_commandBuffer ) - { - getDispatcher()->vkFreeCommandBuffers( static_cast<VkDevice>( m_device ), - static_cast<VkCommandPool>( m_commandPool ), - 1, - reinterpret_cast<VkCommandBuffer const *>( &m_commandBuffer ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_commandPool = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_commandPool, {} ); m_commandBuffer = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_commandBuffer, {} ); @@ -4761,6 +4867,21 @@ namespace VULKAN_HPP_NAMESPACE return m_commandBuffer; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_commandBuffer ) + { + getDispatcher()->vkFreeCommandBuffers( static_cast<VkDevice>( m_device ), + static_cast<VkCommandPool>( m_commandPool ), + 1, + reinterpret_cast<VkCommandBuffer const *>( &m_commandBuffer ) ); + } + m_device = nullptr; + m_commandPool = nullptr; + m_commandBuffer = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -4772,6 +4893,14 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CommandBuffer & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_commandPool, rhs.m_commandPool ); + std::swap( m_commandBuffer, rhs.m_commandBuffer ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + //=== VK_VERSION_1_0 === void begin( const VULKAN_HPP_NAMESPACE::CommandBufferBeginInfo & beginInfo ) const; @@ -5606,6 +5735,8 @@ namespace VULKAN_HPP_NAMESPACE } } + CommandBuffers( std::nullptr_t ) {} + CommandBuffers() = delete; CommandBuffers( CommandBuffers const & ) = delete; CommandBuffers( CommandBuffers && rhs ) = default; @@ -5658,12 +5789,7 @@ namespace VULKAN_HPP_NAMESPACE ~CuFunctionNVX() { - if ( m_function ) - { - getDispatcher()->vkDestroyCuFunctionNVX( static_cast<VkDevice>( m_device ), - static_cast<VkCuFunctionNVX>( m_function ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } CuFunctionNVX() = delete; @@ -5679,12 +5805,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_function ) - { - getDispatcher()->vkDestroyCuFunctionNVX( static_cast<VkDevice>( m_device ), - static_cast<VkCuFunctionNVX>( m_function ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_function = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_function, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); @@ -5698,6 +5819,20 @@ namespace VULKAN_HPP_NAMESPACE return m_function; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_function ) + { + getDispatcher()->vkDestroyCuFunctionNVX( static_cast<VkDevice>( m_device ), + static_cast<VkCuFunctionNVX>( m_function ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_function = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -5709,10 +5844,18 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CuFunctionNVX & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_function, rhs.m_function ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::CuFunctionNVX m_function = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -5758,12 +5901,7 @@ namespace VULKAN_HPP_NAMESPACE ~CuModuleNVX() { - if ( m_module ) - { - getDispatcher()->vkDestroyCuModuleNVX( static_cast<VkDevice>( m_device ), - static_cast<VkCuModuleNVX>( m_module ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } CuModuleNVX() = delete; @@ -5779,12 +5917,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_module ) - { - getDispatcher()->vkDestroyCuModuleNVX( static_cast<VkDevice>( m_device ), - static_cast<VkCuModuleNVX>( m_module ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_module = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_module, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); @@ -5798,6 +5931,20 @@ namespace VULKAN_HPP_NAMESPACE return m_module; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_module ) + { + getDispatcher()->vkDestroyCuModuleNVX( static_cast<VkDevice>( m_device ), + static_cast<VkCuModuleNVX>( m_module ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_module = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -5809,10 +5956,18 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CuModuleNVX & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_module, rhs.m_module ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::CuModuleNVX m_module = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -5861,13 +6016,7 @@ namespace VULKAN_HPP_NAMESPACE ~DebugReportCallbackEXT() { - if ( m_callback ) - { - getDispatcher()->vkDestroyDebugReportCallbackEXT( - static_cast<VkInstance>( m_instance ), - static_cast<VkDebugReportCallbackEXT>( m_callback ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } DebugReportCallbackEXT() = delete; @@ -5883,13 +6032,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_callback ) - { - getDispatcher()->vkDestroyDebugReportCallbackEXT( - static_cast<VkInstance>( m_instance ), - static_cast<VkDebugReportCallbackEXT>( m_callback ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_instance = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_instance, {} ); m_callback = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_callback, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); @@ -5903,6 +6046,21 @@ namespace VULKAN_HPP_NAMESPACE return m_callback; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_callback ) + { + getDispatcher()->vkDestroyDebugReportCallbackEXT( + static_cast<VkInstance>( m_instance ), + static_cast<VkDebugReportCallbackEXT>( m_callback ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_instance = nullptr; + m_callback = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Instance getInstance() const { return m_instance; @@ -5914,10 +6072,18 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DebugReportCallbackEXT & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_instance, rhs.m_instance ); + std::swap( m_callback, rhs.m_callback ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + private: VULKAN_HPP_NAMESPACE::Instance m_instance = {}; VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT m_callback = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * m_dispatcher = nullptr; }; @@ -5966,13 +6132,7 @@ namespace VULKAN_HPP_NAMESPACE ~DebugUtilsMessengerEXT() { - if ( m_messenger ) - { - getDispatcher()->vkDestroyDebugUtilsMessengerEXT( - static_cast<VkInstance>( m_instance ), - static_cast<VkDebugUtilsMessengerEXT>( m_messenger ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } DebugUtilsMessengerEXT() = delete; @@ -5988,13 +6148,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_messenger ) - { - getDispatcher()->vkDestroyDebugUtilsMessengerEXT( - static_cast<VkInstance>( m_instance ), - static_cast<VkDebugUtilsMessengerEXT>( m_messenger ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_instance = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_instance, {} ); m_messenger = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_messenger, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); @@ -6008,6 +6162,21 @@ namespace VULKAN_HPP_NAMESPACE return m_messenger; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_messenger ) + { + getDispatcher()->vkDestroyDebugUtilsMessengerEXT( + static_cast<VkInstance>( m_instance ), + static_cast<VkDebugUtilsMessengerEXT>( m_messenger ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_instance = nullptr; + m_messenger = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Instance getInstance() const { return m_instance; @@ -6019,10 +6188,18 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DebugUtilsMessengerEXT & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_instance, rhs.m_instance ); + std::swap( m_messenger, rhs.m_messenger ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + private: VULKAN_HPP_NAMESPACE::Instance m_instance = {}; VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT m_messenger = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * m_dispatcher = nullptr; }; @@ -6069,13 +6246,7 @@ namespace VULKAN_HPP_NAMESPACE ~DeferredOperationKHR() { - if ( m_operation ) - { - getDispatcher()->vkDestroyDeferredOperationKHR( - static_cast<VkDevice>( m_device ), - static_cast<VkDeferredOperationKHR>( m_operation ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } DeferredOperationKHR() = delete; @@ -6091,13 +6262,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_operation ) - { - getDispatcher()->vkDestroyDeferredOperationKHR( - static_cast<VkDevice>( m_device ), - static_cast<VkDeferredOperationKHR>( m_operation ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_operation = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_operation, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); @@ -6111,6 +6276,21 @@ namespace VULKAN_HPP_NAMESPACE return m_operation; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_operation ) + { + getDispatcher()->vkDestroyDeferredOperationKHR( + static_cast<VkDevice>( m_device ), + static_cast<VkDeferredOperationKHR>( m_operation ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_operation = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -6122,6 +6302,14 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeferredOperationKHR & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_operation, rhs.m_operation ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + //=== VK_KHR_deferred_host_operations === VULKAN_HPP_NODISCARD uint32_t getMaxConcurrency() const VULKAN_HPP_NOEXCEPT; @@ -6133,7 +6321,7 @@ namespace VULKAN_HPP_NAMESPACE private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::DeferredOperationKHR m_operation = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -6182,12 +6370,7 @@ namespace VULKAN_HPP_NAMESPACE ~DescriptorPool() { - if ( m_descriptorPool ) - { - getDispatcher()->vkDestroyDescriptorPool( static_cast<VkDevice>( m_device ), - static_cast<VkDescriptorPool>( m_descriptorPool ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } DescriptorPool() = delete; @@ -6203,12 +6386,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_descriptorPool ) - { - getDispatcher()->vkDestroyDescriptorPool( static_cast<VkDevice>( m_device ), - static_cast<VkDescriptorPool>( m_descriptorPool ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_descriptorPool = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorPool, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); @@ -6222,6 +6400,20 @@ namespace VULKAN_HPP_NAMESPACE return m_descriptorPool; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_descriptorPool ) + { + getDispatcher()->vkDestroyDescriptorPool( static_cast<VkDevice>( m_device ), + static_cast<VkDescriptorPool>( m_descriptorPool ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_descriptorPool = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -6233,6 +6425,14 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DescriptorPool & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_descriptorPool, rhs.m_descriptorPool ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + //=== VK_VERSION_1_0 === void reset( VULKAN_HPP_NAMESPACE::DescriptorPoolResetFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const @@ -6241,7 +6441,7 @@ namespace VULKAN_HPP_NAMESPACE private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::DescriptorPool m_descriptorPool = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -6269,13 +6469,7 @@ namespace VULKAN_HPP_NAMESPACE ~DescriptorSet() { - if ( m_descriptorSet ) - { - getDispatcher()->vkFreeDescriptorSets( static_cast<VkDevice>( m_device ), - static_cast<VkDescriptorPool>( m_descriptorPool ), - 1, - reinterpret_cast<VkDescriptorSet const *>( &m_descriptorSet ) ); - } + clear(); } DescriptorSet() = delete; @@ -6291,13 +6485,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_descriptorSet ) - { - getDispatcher()->vkFreeDescriptorSets( static_cast<VkDevice>( m_device ), - static_cast<VkDescriptorPool>( m_descriptorPool ), - 1, - reinterpret_cast<VkDescriptorSet const *>( &m_descriptorSet ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_descriptorPool = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorPool, {} ); m_descriptorSet = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorSet, {} ); @@ -6311,6 +6499,21 @@ namespace VULKAN_HPP_NAMESPACE return m_descriptorSet; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_descriptorSet ) + { + getDispatcher()->vkFreeDescriptorSets( static_cast<VkDevice>( m_device ), + static_cast<VkDescriptorPool>( m_descriptorPool ), + 1, + reinterpret_cast<VkDescriptorSet const *>( &m_descriptorSet ) ); + } + m_device = nullptr; + m_descriptorPool = nullptr; + m_descriptorSet = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -6322,6 +6525,14 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DescriptorSet & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_descriptorPool, rhs.m_descriptorPool ); + std::swap( m_descriptorSet, rhs.m_descriptorSet ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + //=== VK_VERSION_1_1 === template <typename DataType> @@ -6367,6 +6578,8 @@ namespace VULKAN_HPP_NAMESPACE } } + DescriptorSets( std::nullptr_t ) {} + DescriptorSets() = delete; DescriptorSets( DescriptorSets const & ) = delete; DescriptorSets( DescriptorSets && rhs ) = default; @@ -6419,13 +6632,7 @@ namespace VULKAN_HPP_NAMESPACE ~DescriptorSetLayout() { - if ( m_descriptorSetLayout ) - { - getDispatcher()->vkDestroyDescriptorSetLayout( - static_cast<VkDevice>( m_device ), - static_cast<VkDescriptorSetLayout>( m_descriptorSetLayout ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } DescriptorSetLayout() = delete; @@ -6442,13 +6649,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_descriptorSetLayout ) - { - getDispatcher()->vkDestroyDescriptorSetLayout( - static_cast<VkDevice>( m_device ), - static_cast<VkDescriptorSetLayout>( m_descriptorSetLayout ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_descriptorSetLayout = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorSetLayout, {} ); @@ -6463,6 +6664,21 @@ namespace VULKAN_HPP_NAMESPACE return m_descriptorSetLayout; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_descriptorSetLayout ) + { + getDispatcher()->vkDestroyDescriptorSetLayout( + static_cast<VkDevice>( m_device ), + static_cast<VkDescriptorSetLayout>( m_descriptorSetLayout ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_descriptorSetLayout = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -6474,10 +6690,18 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DescriptorSetLayout & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_descriptorSetLayout, rhs.m_descriptorSetLayout ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::DescriptorSetLayout m_descriptorSetLayout = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -6526,13 +6750,7 @@ namespace VULKAN_HPP_NAMESPACE ~DescriptorUpdateTemplate() { - if ( m_descriptorUpdateTemplate ) - { - getDispatcher()->vkDestroyDescriptorUpdateTemplate( - static_cast<VkDevice>( m_device ), - static_cast<VkDescriptorUpdateTemplate>( m_descriptorUpdateTemplate ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } DescriptorUpdateTemplate() = delete; @@ -6549,13 +6767,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_descriptorUpdateTemplate ) - { - getDispatcher()->vkDestroyDescriptorUpdateTemplate( - static_cast<VkDevice>( m_device ), - static_cast<VkDescriptorUpdateTemplate>( m_descriptorUpdateTemplate ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_descriptorUpdateTemplate = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorUpdateTemplate, {} ); @@ -6570,6 +6782,21 @@ namespace VULKAN_HPP_NAMESPACE return m_descriptorUpdateTemplate; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_descriptorUpdateTemplate ) + { + getDispatcher()->vkDestroyDescriptorUpdateTemplate( + static_cast<VkDevice>( m_device ), + static_cast<VkDescriptorUpdateTemplate>( m_descriptorUpdateTemplate ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_descriptorUpdateTemplate = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -6581,10 +6808,18 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DescriptorUpdateTemplate & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_descriptorUpdateTemplate, rhs.m_descriptorUpdateTemplate ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate m_descriptorUpdateTemplate = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -6632,12 +6867,7 @@ namespace VULKAN_HPP_NAMESPACE ~DeviceMemory() { - if ( m_memory ) - { - getDispatcher()->vkFreeMemory( static_cast<VkDevice>( m_device ), - static_cast<VkDeviceMemory>( m_memory ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } DeviceMemory() = delete; @@ -6653,12 +6883,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_memory ) - { - getDispatcher()->vkFreeMemory( static_cast<VkDevice>( m_device ), - static_cast<VkDeviceMemory>( m_memory ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_memory = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_memory, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); @@ -6672,6 +6897,20 @@ namespace VULKAN_HPP_NAMESPACE return m_memory; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_memory ) + { + getDispatcher()->vkFreeMemory( static_cast<VkDevice>( m_device ), + static_cast<VkDeviceMemory>( m_memory ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_memory = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -6683,6 +6922,14 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceMemory & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_memory, rhs.m_memory ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + //=== VK_VERSION_1_0 === VULKAN_HPP_NODISCARD void * @@ -6708,7 +6955,7 @@ namespace VULKAN_HPP_NAMESPACE private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::DeviceMemory m_memory = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -6783,11 +7030,7 @@ namespace VULKAN_HPP_NAMESPACE ~DisplayKHR() { - if ( m_display ) - { - getDispatcher()->vkReleaseDisplayEXT( static_cast<VkPhysicalDevice>( m_physicalDevice ), - static_cast<VkDisplayKHR>( m_display ) ); - } + clear(); } DisplayKHR() = delete; @@ -6802,11 +7045,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_display ) - { - getDispatcher()->vkReleaseDisplayEXT( static_cast<VkPhysicalDevice>( m_physicalDevice ), - static_cast<VkDisplayKHR>( m_display ) ); - } + clear(); m_physicalDevice = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_physicalDevice, {} ); m_display = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_display, {} ); m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); @@ -6819,6 +7058,18 @@ namespace VULKAN_HPP_NAMESPACE return m_display; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_display ) + { + getDispatcher()->vkReleaseDisplayEXT( static_cast<VkPhysicalDevice>( m_physicalDevice ), + static_cast<VkDisplayKHR>( m_display ) ); + } + m_physicalDevice = nullptr; + m_display = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::PhysicalDevice getPhysicalDevice() const { return m_physicalDevice; @@ -6830,6 +7081,13 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_physicalDevice, rhs.m_physicalDevice ); + std::swap( m_display, rhs.m_display ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + //=== VK_KHR_display === VULKAN_HPP_NODISCARD std::vector<VULKAN_HPP_NAMESPACE::DisplayModePropertiesKHR> getModeProperties() const; @@ -6891,6 +7149,8 @@ namespace VULKAN_HPP_NAMESPACE } } + DisplayKHRs( std::nullptr_t ) {} + DisplayKHRs() = delete; DisplayKHRs( DisplayKHRs const & ) = delete; DisplayKHRs( DisplayKHRs && rhs ) = default; @@ -6938,6 +7198,11 @@ namespace VULKAN_HPP_NAMESPACE DisplayModeKHR( std::nullptr_t ) {} + ~DisplayModeKHR() + { + clear(); + } + DisplayModeKHR() = delete; DisplayModeKHR( DisplayModeKHR const & ) = delete; DisplayModeKHR( DisplayModeKHR && rhs ) VULKAN_HPP_NOEXCEPT @@ -6962,12 +7227,26 @@ namespace VULKAN_HPP_NAMESPACE return m_displayModeKHR; } + void clear() VULKAN_HPP_NOEXCEPT + { + m_physicalDevice = nullptr; + m_displayModeKHR = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayModeKHR & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_physicalDevice, rhs.m_physicalDevice ); + std::swap( m_displayModeKHR, rhs.m_displayModeKHR ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + //=== VK_KHR_display === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR @@ -7021,12 +7300,7 @@ namespace VULKAN_HPP_NAMESPACE ~Event() { - if ( m_event ) - { - getDispatcher()->vkDestroyEvent( static_cast<VkDevice>( m_device ), - static_cast<VkEvent>( m_event ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } Event() = delete; @@ -7042,12 +7316,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_event ) - { - getDispatcher()->vkDestroyEvent( static_cast<VkDevice>( m_device ), - static_cast<VkEvent>( m_event ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_event = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_event, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); @@ -7061,6 +7330,20 @@ namespace VULKAN_HPP_NAMESPACE return m_event; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_event ) + { + getDispatcher()->vkDestroyEvent( static_cast<VkDevice>( m_device ), + static_cast<VkEvent>( m_event ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_event = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -7072,6 +7355,14 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Event & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_event, rhs.m_event ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + //=== VK_VERSION_1_0 === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result getStatus() const; @@ -7083,7 +7374,7 @@ namespace VULKAN_HPP_NAMESPACE private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::Event m_event = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -7169,12 +7460,7 @@ namespace VULKAN_HPP_NAMESPACE ~Fence() { - if ( m_fence ) - { - getDispatcher()->vkDestroyFence( static_cast<VkDevice>( m_device ), - static_cast<VkFence>( m_fence ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } Fence() = delete; @@ -7190,12 +7476,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_fence ) - { - getDispatcher()->vkDestroyFence( static_cast<VkDevice>( m_device ), - static_cast<VkFence>( m_fence ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_fence = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_fence, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); @@ -7209,6 +7490,20 @@ namespace VULKAN_HPP_NAMESPACE return m_fence; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_fence ) + { + getDispatcher()->vkDestroyFence( static_cast<VkDevice>( m_device ), + static_cast<VkFence>( m_fence ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_fence = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -7220,6 +7515,14 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Fence & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_fence, rhs.m_fence ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + //=== VK_VERSION_1_0 === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result getStatus() const; @@ -7227,7 +7530,7 @@ namespace VULKAN_HPP_NAMESPACE private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::Fence m_fence = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -7273,12 +7576,7 @@ namespace VULKAN_HPP_NAMESPACE ~Framebuffer() { - if ( m_framebuffer ) - { - getDispatcher()->vkDestroyFramebuffer( static_cast<VkDevice>( m_device ), - static_cast<VkFramebuffer>( m_framebuffer ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } Framebuffer() = delete; @@ -7294,12 +7592,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_framebuffer ) - { - getDispatcher()->vkDestroyFramebuffer( static_cast<VkDevice>( m_device ), - static_cast<VkFramebuffer>( m_framebuffer ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_framebuffer = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_framebuffer, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); @@ -7313,6 +7606,20 @@ namespace VULKAN_HPP_NAMESPACE return m_framebuffer; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_framebuffer ) + { + getDispatcher()->vkDestroyFramebuffer( static_cast<VkDevice>( m_device ), + static_cast<VkFramebuffer>( m_framebuffer ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_framebuffer = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -7324,10 +7631,18 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Framebuffer & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_framebuffer, rhs.m_framebuffer ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::Framebuffer m_framebuffer = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -7373,12 +7688,7 @@ namespace VULKAN_HPP_NAMESPACE ~Image() { - if ( m_image ) - { - getDispatcher()->vkDestroyImage( static_cast<VkDevice>( m_device ), - static_cast<VkImage>( m_image ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } Image() = delete; @@ -7394,12 +7704,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_image ) - { - getDispatcher()->vkDestroyImage( static_cast<VkDevice>( m_device ), - static_cast<VkImage>( m_image ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_image = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_image, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); @@ -7413,6 +7718,20 @@ namespace VULKAN_HPP_NAMESPACE return m_image; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_image ) + { + getDispatcher()->vkDestroyImage( static_cast<VkDevice>( m_device ), + static_cast<VkImage>( m_image ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_image = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -7424,6 +7743,14 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Image & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_image, rhs.m_image ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + //=== VK_VERSION_1_0 === void bindMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset ) const; @@ -7444,7 +7771,7 @@ namespace VULKAN_HPP_NAMESPACE private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::Image m_image = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -7490,12 +7817,7 @@ namespace VULKAN_HPP_NAMESPACE ~ImageView() { - if ( m_imageView ) - { - getDispatcher()->vkDestroyImageView( static_cast<VkDevice>( m_device ), - static_cast<VkImageView>( m_imageView ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } ImageView() = delete; @@ -7511,12 +7833,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_imageView ) - { - getDispatcher()->vkDestroyImageView( static_cast<VkDevice>( m_device ), - static_cast<VkImageView>( m_imageView ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_imageView = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_imageView, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); @@ -7530,6 +7847,20 @@ namespace VULKAN_HPP_NAMESPACE return m_imageView; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_imageView ) + { + getDispatcher()->vkDestroyImageView( static_cast<VkDevice>( m_device ), + static_cast<VkImageView>( m_imageView ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_imageView = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -7541,6 +7872,14 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::ImageView & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_imageView, rhs.m_imageView ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + //=== VK_NVX_image_view_handle === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ImageViewAddressPropertiesNVX getAddressNVX() const; @@ -7548,7 +7887,7 @@ namespace VULKAN_HPP_NAMESPACE private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::ImageView m_imageView = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -7597,13 +7936,7 @@ namespace VULKAN_HPP_NAMESPACE ~IndirectCommandsLayoutNV() { - if ( m_indirectCommandsLayout ) - { - getDispatcher()->vkDestroyIndirectCommandsLayoutNV( - static_cast<VkDevice>( m_device ), - static_cast<VkIndirectCommandsLayoutNV>( m_indirectCommandsLayout ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } IndirectCommandsLayoutNV() = delete; @@ -7620,13 +7953,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_indirectCommandsLayout ) - { - getDispatcher()->vkDestroyIndirectCommandsLayoutNV( - static_cast<VkDevice>( m_device ), - static_cast<VkIndirectCommandsLayoutNV>( m_indirectCommandsLayout ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_indirectCommandsLayout = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_indirectCommandsLayout, {} ); @@ -7641,6 +7968,21 @@ namespace VULKAN_HPP_NAMESPACE return m_indirectCommandsLayout; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_indirectCommandsLayout ) + { + getDispatcher()->vkDestroyIndirectCommandsLayoutNV( + static_cast<VkDevice>( m_device ), + static_cast<VkIndirectCommandsLayoutNV>( m_indirectCommandsLayout ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_indirectCommandsLayout = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -7652,10 +7994,18 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::IndirectCommandsLayoutNV & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_indirectCommandsLayout, rhs.m_indirectCommandsLayout ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV m_indirectCommandsLayout = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -7695,11 +8045,7 @@ namespace VULKAN_HPP_NAMESPACE ~PerformanceConfigurationINTEL() { - if ( m_configuration ) - { - getDispatcher()->vkReleasePerformanceConfigurationINTEL( - static_cast<VkDevice>( m_device ), static_cast<VkPerformanceConfigurationINTEL>( m_configuration ) ); - } + clear(); } PerformanceConfigurationINTEL() = delete; @@ -7714,11 +8060,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_configuration ) - { - getDispatcher()->vkReleasePerformanceConfigurationINTEL( - static_cast<VkDevice>( m_device ), static_cast<VkPerformanceConfigurationINTEL>( m_configuration ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_configuration = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_configuration, {} ); m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); @@ -7731,6 +8073,18 @@ namespace VULKAN_HPP_NAMESPACE return m_configuration; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_configuration ) + { + getDispatcher()->vkReleasePerformanceConfigurationINTEL( + static_cast<VkDevice>( m_device ), static_cast<VkPerformanceConfigurationINTEL>( m_configuration ) ); + } + m_device = nullptr; + m_configuration = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -7742,6 +8096,14 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void + swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PerformanceConfigurationINTEL & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_configuration, rhs.m_configuration ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL m_configuration = {}; @@ -7793,12 +8155,7 @@ namespace VULKAN_HPP_NAMESPACE ~PipelineCache() { - if ( m_pipelineCache ) - { - getDispatcher()->vkDestroyPipelineCache( static_cast<VkDevice>( m_device ), - static_cast<VkPipelineCache>( m_pipelineCache ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } PipelineCache() = delete; @@ -7814,12 +8171,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_pipelineCache ) - { - getDispatcher()->vkDestroyPipelineCache( static_cast<VkDevice>( m_device ), - static_cast<VkPipelineCache>( m_pipelineCache ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_pipelineCache = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_pipelineCache, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); @@ -7833,6 +8185,20 @@ namespace VULKAN_HPP_NAMESPACE return m_pipelineCache; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_pipelineCache ) + { + getDispatcher()->vkDestroyPipelineCache( static_cast<VkDevice>( m_device ), + static_cast<VkPipelineCache>( m_pipelineCache ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_pipelineCache = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -7844,6 +8210,14 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PipelineCache & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_pipelineCache, rhs.m_pipelineCache ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + //=== VK_VERSION_1_0 === VULKAN_HPP_NODISCARD std::vector<uint8_t> getData() const; @@ -7853,7 +8227,7 @@ namespace VULKAN_HPP_NAMESPACE private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::PipelineCache m_pipelineCache = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -7987,12 +8361,7 @@ namespace VULKAN_HPP_NAMESPACE ~Pipeline() { - if ( m_pipeline ) - { - getDispatcher()->vkDestroyPipeline( static_cast<VkDevice>( m_device ), - static_cast<VkPipeline>( m_pipeline ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } Pipeline() = delete; @@ -8008,12 +8377,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_pipeline ) - { - getDispatcher()->vkDestroyPipeline( static_cast<VkDevice>( m_device ), - static_cast<VkPipeline>( m_pipeline ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_pipeline = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_pipeline, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); @@ -8027,6 +8391,21 @@ namespace VULKAN_HPP_NAMESPACE return m_pipeline; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_pipeline ) + { + getDispatcher()->vkDestroyPipeline( static_cast<VkDevice>( m_device ), + static_cast<VkPipeline>( m_pipeline ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_pipeline = nullptr; + m_allocator = nullptr; + m_constructorSuccessCode = VULKAN_HPP_NAMESPACE::Result::eErrorUnknown; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Result getConstructorSuccessCode() const { return m_constructorSuccessCode; @@ -8043,6 +8422,15 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Pipeline & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_pipeline, rhs.m_pipeline ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_constructorSuccessCode, rhs.m_constructorSuccessCode ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + //=== VK_AMD_shader_info === VULKAN_HPP_NODISCARD std::vector<uint8_t> @@ -8081,10 +8469,10 @@ namespace VULKAN_HPP_NAMESPACE uint32_t group, VULKAN_HPP_NAMESPACE::ShaderGroupShaderKHR groupShader ) const VULKAN_HPP_NOEXCEPT; private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::Pipeline m_pipeline = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; - VULKAN_HPP_NAMESPACE::Result m_constructorSuccessCode; + VULKAN_HPP_NAMESPACE::Device m_device = {}; + VULKAN_HPP_NAMESPACE::Pipeline m_pipeline = {}; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; + VULKAN_HPP_NAMESPACE::Result m_constructorSuccessCode = VULKAN_HPP_NAMESPACE::Result::eErrorUnknown; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -8228,6 +8616,8 @@ namespace VULKAN_HPP_NAMESPACE } } + Pipelines( std::nullptr_t ) {} + Pipelines() = delete; Pipelines( Pipelines const & ) = delete; Pipelines( Pipelines && rhs ) = default; @@ -8280,12 +8670,7 @@ namespace VULKAN_HPP_NAMESPACE ~PipelineLayout() { - if ( m_pipelineLayout ) - { - getDispatcher()->vkDestroyPipelineLayout( static_cast<VkDevice>( m_device ), - static_cast<VkPipelineLayout>( m_pipelineLayout ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } PipelineLayout() = delete; @@ -8301,12 +8686,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_pipelineLayout ) - { - getDispatcher()->vkDestroyPipelineLayout( static_cast<VkDevice>( m_device ), - static_cast<VkPipelineLayout>( m_pipelineLayout ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_pipelineLayout = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_pipelineLayout, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); @@ -8320,6 +8700,20 @@ namespace VULKAN_HPP_NAMESPACE return m_pipelineLayout; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_pipelineLayout ) + { + getDispatcher()->vkDestroyPipelineLayout( static_cast<VkDevice>( m_device ), + static_cast<VkPipelineLayout>( m_pipelineLayout ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_pipelineLayout = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -8331,10 +8725,18 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PipelineLayout & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_pipelineLayout, rhs.m_pipelineLayout ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::PipelineLayout m_pipelineLayout = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -8383,12 +8785,7 @@ namespace VULKAN_HPP_NAMESPACE ~PrivateDataSlot() { - if ( m_privateDataSlot ) - { - getDispatcher()->vkDestroyPrivateDataSlot( static_cast<VkDevice>( m_device ), - static_cast<VkPrivateDataSlot>( m_privateDataSlot ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } PrivateDataSlot() = delete; @@ -8404,12 +8801,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_privateDataSlot ) - { - getDispatcher()->vkDestroyPrivateDataSlot( static_cast<VkDevice>( m_device ), - static_cast<VkPrivateDataSlot>( m_privateDataSlot ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_privateDataSlot = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_privateDataSlot, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); @@ -8423,6 +8815,20 @@ namespace VULKAN_HPP_NAMESPACE return m_privateDataSlot; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_privateDataSlot ) + { + getDispatcher()->vkDestroyPrivateDataSlot( static_cast<VkDevice>( m_device ), + static_cast<VkPrivateDataSlot>( m_privateDataSlot ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_privateDataSlot = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -8434,10 +8840,18 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PrivateDataSlot & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_privateDataSlot, rhs.m_privateDataSlot ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::PrivateDataSlot m_privateDataSlot = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -8483,12 +8897,7 @@ namespace VULKAN_HPP_NAMESPACE ~QueryPool() { - if ( m_queryPool ) - { - getDispatcher()->vkDestroyQueryPool( static_cast<VkDevice>( m_device ), - static_cast<VkQueryPool>( m_queryPool ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } QueryPool() = delete; @@ -8504,12 +8913,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_queryPool ) - { - getDispatcher()->vkDestroyQueryPool( static_cast<VkDevice>( m_device ), - static_cast<VkQueryPool>( m_queryPool ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_queryPool = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_queryPool, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); @@ -8523,6 +8927,20 @@ namespace VULKAN_HPP_NAMESPACE return m_queryPool; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_queryPool ) + { + getDispatcher()->vkDestroyQueryPool( static_cast<VkDevice>( m_device ), + static_cast<VkQueryPool>( m_queryPool ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_queryPool = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -8534,6 +8952,14 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::QueryPool & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_queryPool, rhs.m_queryPool ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + //=== VK_VERSION_1_0 === template <typename DataType> @@ -8562,7 +8988,7 @@ namespace VULKAN_HPP_NAMESPACE private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::QueryPool m_queryPool = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -8601,6 +9027,11 @@ namespace VULKAN_HPP_NAMESPACE Queue( std::nullptr_t ) {} + ~Queue() + { + clear(); + } + Queue() = delete; Queue( Queue const & ) = delete; Queue( Queue && rhs ) VULKAN_HPP_NOEXCEPT @@ -8623,12 +9054,24 @@ namespace VULKAN_HPP_NAMESPACE return m_queue; } + void clear() VULKAN_HPP_NOEXCEPT + { + m_queue = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Queue & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_queue, rhs.m_queue ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + //=== VK_VERSION_1_0 === void submit( ArrayProxy<const VULKAN_HPP_NAMESPACE::SubmitInfo> const & submits, @@ -8741,12 +9184,7 @@ namespace VULKAN_HPP_NAMESPACE ~RenderPass() { - if ( m_renderPass ) - { - getDispatcher()->vkDestroyRenderPass( static_cast<VkDevice>( m_device ), - static_cast<VkRenderPass>( m_renderPass ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } RenderPass() = delete; @@ -8762,12 +9200,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_renderPass ) - { - getDispatcher()->vkDestroyRenderPass( static_cast<VkDevice>( m_device ), - static_cast<VkRenderPass>( m_renderPass ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_renderPass = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_renderPass, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); @@ -8781,6 +9214,20 @@ namespace VULKAN_HPP_NAMESPACE return m_renderPass; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_renderPass ) + { + getDispatcher()->vkDestroyRenderPass( static_cast<VkDevice>( m_device ), + static_cast<VkRenderPass>( m_renderPass ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_renderPass = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -8792,6 +9239,14 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::RenderPass & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_renderPass, rhs.m_renderPass ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + //=== VK_VERSION_1_0 === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Extent2D getRenderAreaGranularity() const VULKAN_HPP_NOEXCEPT; @@ -8804,7 +9259,7 @@ namespace VULKAN_HPP_NAMESPACE private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::RenderPass m_renderPass = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -8850,12 +9305,7 @@ namespace VULKAN_HPP_NAMESPACE ~Sampler() { - if ( m_sampler ) - { - getDispatcher()->vkDestroySampler( static_cast<VkDevice>( m_device ), - static_cast<VkSampler>( m_sampler ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } Sampler() = delete; @@ -8871,12 +9321,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_sampler ) - { - getDispatcher()->vkDestroySampler( static_cast<VkDevice>( m_device ), - static_cast<VkSampler>( m_sampler ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_sampler = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_sampler, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); @@ -8890,6 +9335,20 @@ namespace VULKAN_HPP_NAMESPACE return m_sampler; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_sampler ) + { + getDispatcher()->vkDestroySampler( static_cast<VkDevice>( m_device ), + static_cast<VkSampler>( m_sampler ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_sampler = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -8901,10 +9360,18 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Sampler & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_sampler, rhs.m_sampler ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::Sampler m_sampler = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -8953,13 +9420,7 @@ namespace VULKAN_HPP_NAMESPACE ~SamplerYcbcrConversion() { - if ( m_ycbcrConversion ) - { - getDispatcher()->vkDestroySamplerYcbcrConversion( - static_cast<VkDevice>( m_device ), - static_cast<VkSamplerYcbcrConversion>( m_ycbcrConversion ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } SamplerYcbcrConversion() = delete; @@ -8975,13 +9436,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_ycbcrConversion ) - { - getDispatcher()->vkDestroySamplerYcbcrConversion( - static_cast<VkDevice>( m_device ), - static_cast<VkSamplerYcbcrConversion>( m_ycbcrConversion ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_ycbcrConversion = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_ycbcrConversion, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); @@ -8995,6 +9450,21 @@ namespace VULKAN_HPP_NAMESPACE return m_ycbcrConversion; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_ycbcrConversion ) + { + getDispatcher()->vkDestroySamplerYcbcrConversion( + static_cast<VkDevice>( m_device ), + static_cast<VkSamplerYcbcrConversion>( m_ycbcrConversion ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_ycbcrConversion = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -9006,10 +9476,18 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SamplerYcbcrConversion & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_ycbcrConversion, rhs.m_ycbcrConversion ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion m_ycbcrConversion = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -9055,12 +9533,7 @@ namespace VULKAN_HPP_NAMESPACE ~Semaphore() { - if ( m_semaphore ) - { - getDispatcher()->vkDestroySemaphore( static_cast<VkDevice>( m_device ), - static_cast<VkSemaphore>( m_semaphore ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } Semaphore() = delete; @@ -9076,12 +9549,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_semaphore ) - { - getDispatcher()->vkDestroySemaphore( static_cast<VkDevice>( m_device ), - static_cast<VkSemaphore>( m_semaphore ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_semaphore = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_semaphore, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); @@ -9095,6 +9563,20 @@ namespace VULKAN_HPP_NAMESPACE return m_semaphore; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_semaphore ) + { + getDispatcher()->vkDestroySemaphore( static_cast<VkDevice>( m_device ), + static_cast<VkSemaphore>( m_semaphore ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_semaphore = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -9106,6 +9588,14 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Semaphore & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_semaphore, rhs.m_semaphore ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + //=== VK_VERSION_1_2 === VULKAN_HPP_NODISCARD uint64_t getCounterValue() const; @@ -9117,7 +9607,7 @@ namespace VULKAN_HPP_NAMESPACE private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::Semaphore m_semaphore = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -9166,12 +9656,7 @@ namespace VULKAN_HPP_NAMESPACE ~ShaderModule() { - if ( m_shaderModule ) - { - getDispatcher()->vkDestroyShaderModule( static_cast<VkDevice>( m_device ), - static_cast<VkShaderModule>( m_shaderModule ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } ShaderModule() = delete; @@ -9187,12 +9672,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_shaderModule ) - { - getDispatcher()->vkDestroyShaderModule( static_cast<VkDevice>( m_device ), - static_cast<VkShaderModule>( m_shaderModule ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_shaderModule = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_shaderModule, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); @@ -9206,6 +9686,20 @@ namespace VULKAN_HPP_NAMESPACE return m_shaderModule; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_shaderModule ) + { + getDispatcher()->vkDestroyShaderModule( static_cast<VkDevice>( m_device ), + static_cast<VkShaderModule>( m_shaderModule ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_shaderModule = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -9217,10 +9711,18 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::ShaderModule & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_shaderModule, rhs.m_shaderModule ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::ShaderModule m_shaderModule = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -9559,12 +10061,7 @@ namespace VULKAN_HPP_NAMESPACE ~SurfaceKHR() { - if ( m_surface ) - { - getDispatcher()->vkDestroySurfaceKHR( static_cast<VkInstance>( m_instance ), - static_cast<VkSurfaceKHR>( m_surface ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } SurfaceKHR() = delete; @@ -9580,12 +10077,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_surface ) - { - getDispatcher()->vkDestroySurfaceKHR( static_cast<VkInstance>( m_instance ), - static_cast<VkSurfaceKHR>( m_surface ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_instance = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_instance, {} ); m_surface = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_surface, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); @@ -9599,6 +10091,20 @@ namespace VULKAN_HPP_NAMESPACE return m_surface; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_surface ) + { + getDispatcher()->vkDestroySurfaceKHR( static_cast<VkInstance>( m_instance ), + static_cast<VkSurfaceKHR>( m_surface ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_instance = nullptr; + m_surface = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Instance getInstance() const { return m_instance; @@ -9610,10 +10116,18 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_instance, rhs.m_instance ); + std::swap( m_surface, rhs.m_surface ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + private: VULKAN_HPP_NAMESPACE::Instance m_instance = {}; VULKAN_HPP_NAMESPACE::SurfaceKHR m_surface = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * m_dispatcher = nullptr; }; @@ -9662,12 +10176,7 @@ namespace VULKAN_HPP_NAMESPACE ~SwapchainKHR() { - if ( m_swapchain ) - { - getDispatcher()->vkDestroySwapchainKHR( static_cast<VkDevice>( m_device ), - static_cast<VkSwapchainKHR>( m_swapchain ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } SwapchainKHR() = delete; @@ -9683,12 +10192,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_swapchain ) - { - getDispatcher()->vkDestroySwapchainKHR( static_cast<VkDevice>( m_device ), - static_cast<VkSwapchainKHR>( m_swapchain ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_swapchain = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_swapchain, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); @@ -9702,6 +10206,20 @@ namespace VULKAN_HPP_NAMESPACE return m_swapchain; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_swapchain ) + { + getDispatcher()->vkDestroySwapchainKHR( static_cast<VkDevice>( m_device ), + static_cast<VkSwapchainKHR>( m_swapchain ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_swapchain = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -9713,6 +10231,14 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SwapchainKHR & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_swapchain, rhs.m_swapchain ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + //=== VK_KHR_swapchain === VULKAN_HPP_NODISCARD std::vector<VkImage> getImages() const; @@ -9756,7 +10282,7 @@ namespace VULKAN_HPP_NAMESPACE private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::SwapchainKHR m_swapchain = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -9792,6 +10318,8 @@ namespace VULKAN_HPP_NAMESPACE } } + SwapchainKHRs( std::nullptr_t ) {} + SwapchainKHRs() = delete; SwapchainKHRs( SwapchainKHRs const & ) = delete; SwapchainKHRs( SwapchainKHRs && rhs ) = default; @@ -9844,13 +10372,7 @@ namespace VULKAN_HPP_NAMESPACE ~ValidationCacheEXT() { - if ( m_validationCache ) - { - getDispatcher()->vkDestroyValidationCacheEXT( - static_cast<VkDevice>( m_device ), - static_cast<VkValidationCacheEXT>( m_validationCache ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } ValidationCacheEXT() = delete; @@ -9866,13 +10388,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_validationCache ) - { - getDispatcher()->vkDestroyValidationCacheEXT( - static_cast<VkDevice>( m_device ), - static_cast<VkValidationCacheEXT>( m_validationCache ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_validationCache = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_validationCache, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); @@ -9886,6 +10402,21 @@ namespace VULKAN_HPP_NAMESPACE return m_validationCache; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_validationCache ) + { + getDispatcher()->vkDestroyValidationCacheEXT( + static_cast<VkDevice>( m_device ), + static_cast<VkValidationCacheEXT>( m_validationCache ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_validationCache = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -9897,6 +10428,14 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::ValidationCacheEXT & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_validationCache, rhs.m_validationCache ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + //=== VK_EXT_validation_cache === void merge( ArrayProxy<const VULKAN_HPP_NAMESPACE::ValidationCacheEXT> const & srcCaches ) const; @@ -9906,7 +10445,7 @@ namespace VULKAN_HPP_NAMESPACE private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::ValidationCacheEXT m_validationCache = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -9956,12 +10495,7 @@ namespace VULKAN_HPP_NAMESPACE ~VideoSessionKHR() { - if ( m_videoSession ) - { - getDispatcher()->vkDestroyVideoSessionKHR( static_cast<VkDevice>( m_device ), - static_cast<VkVideoSessionKHR>( m_videoSession ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } VideoSessionKHR() = delete; @@ -9977,12 +10511,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_videoSession ) - { - getDispatcher()->vkDestroyVideoSessionKHR( static_cast<VkDevice>( m_device ), - static_cast<VkVideoSessionKHR>( m_videoSession ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_videoSession = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_videoSession, {} ); m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); @@ -9996,6 +10525,20 @@ namespace VULKAN_HPP_NAMESPACE return m_videoSession; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_videoSession ) + { + getDispatcher()->vkDestroyVideoSessionKHR( static_cast<VkDevice>( m_device ), + static_cast<VkVideoSessionKHR>( m_videoSession ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_videoSession = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -10007,6 +10550,14 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::VideoSessionKHR & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_videoSession, rhs.m_videoSession ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + //=== VK_KHR_video_queue === VULKAN_HPP_NODISCARD std::vector<VULKAN_HPP_NAMESPACE::VideoGetMemoryPropertiesKHR> getMemoryRequirements() const; @@ -10017,7 +10568,7 @@ namespace VULKAN_HPP_NAMESPACE private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::VideoSessionKHR m_videoSession = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ @@ -10068,13 +10619,7 @@ namespace VULKAN_HPP_NAMESPACE ~VideoSessionParametersKHR() { - if ( m_videoSessionParameters ) - { - getDispatcher()->vkDestroyVideoSessionParametersKHR( - static_cast<VkDevice>( m_device ), - static_cast<VkVideoSessionParametersKHR>( m_videoSessionParameters ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); } VideoSessionParametersKHR() = delete; @@ -10091,13 +10636,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { - if ( m_videoSessionParameters ) - { - getDispatcher()->vkDestroyVideoSessionParametersKHR( - static_cast<VkDevice>( m_device ), - static_cast<VkVideoSessionParametersKHR>( m_videoSessionParameters ), - reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); - } + clear(); m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); m_videoSessionParameters = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_videoSessionParameters, {} ); @@ -10112,6 +10651,21 @@ namespace VULKAN_HPP_NAMESPACE return m_videoSessionParameters; } + void clear() VULKAN_HPP_NOEXCEPT + { + if ( m_videoSessionParameters ) + { + getDispatcher()->vkDestroyVideoSessionParametersKHR( + static_cast<VkDevice>( m_device ), + static_cast<VkVideoSessionParametersKHR>( m_videoSessionParameters ), + reinterpret_cast<const VkAllocationCallbacks *>( m_allocator ) ); + } + m_device = nullptr; + m_videoSessionParameters = nullptr; + m_allocator = nullptr; + m_dispatcher = nullptr; + } + VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; @@ -10123,6 +10677,14 @@ namespace VULKAN_HPP_NAMESPACE return m_dispatcher; } + void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::VideoSessionParametersKHR & rhs ) VULKAN_HPP_NOEXCEPT + { + std::swap( m_device, rhs.m_device ); + std::swap( m_videoSessionParameters, rhs.m_videoSessionParameters ); + std::swap( m_allocator, rhs.m_allocator ); + std::swap( m_dispatcher, rhs.m_dispatcher ); + } + //=== VK_KHR_video_queue === void update( const VULKAN_HPP_NAMESPACE::VideoSessionParametersUpdateInfoKHR & updateInfo ) const; @@ -10130,7 +10692,7 @@ namespace VULKAN_HPP_NAMESPACE private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR m_videoSessionParameters = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = nullptr; + const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ |