diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 7bad7e2..a3576ba 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -698,6 +698,83 @@ const std::string uniqueHandleHeader = R"( )"; +const std::string deleterClassString = R"( + struct AllocationCallbacks; + + template + class ObjectDeleter + { + public: + ObjectDeleter(OwnerType owner = OwnerType(), Optional allocator = nullptr) + : m_owner(owner) + , m_allocator(allocator) + {} + + OwnerType getOwner() const { return m_owner; } + Optional getAllocator() const { return m_allocator; } + + protected: + template + void destroy(T t) + { + m_owner.destroy(t, m_allocator); + } + + private: + OwnerType m_owner; + Optional m_allocator; + }; + + class NoParent; + + template <> + class ObjectDeleter + { + public: + ObjectDeleter( Optional allocator = nullptr ) + : m_allocator( allocator ) + {} + + Optional getAllocator() const { return m_allocator; } + + protected: + template + void destroy(T t) + { + t.destroy( m_allocator ); + } + + private: + Optional m_allocator; + }; + + template + class PoolDeleter + { + public: + PoolDeleter(OwnerType owner = OwnerType(), PoolType pool = PoolType()) + : m_owner(owner) + , m_pool(pool) + {} + + OwnerType getOwner() const { return m_owner; } + PoolType getPool() const { return m_pool; } + + protected: + template + void destroy(T t) + { + m_owner.free(m_pool, t); + } + + private: + OwnerType m_owner; + PoolType m_pool; + }; + +)"; + + std::string replaceWithMap(std::string const &input, std::map replacements) { // This will match ${someVariable} and contain someVariable in match group 1 @@ -3015,175 +3092,6 @@ void VulkanHppGenerator::writeEnumsToString(std::ostream & os, EnumData const& e os << std::endl; } -void VulkanHppGenerator::writeDeleterClasses(std::ostream & os, std::pair> const& deleterTypes) -{ - // A Deleter class for each of the Unique* classes... but only if smart handles are not switched off - os << "#ifndef VULKAN_HPP_NO_SMART_HANDLE" << std::endl; - bool first = true; - - // get type and name of the parent (holder) type - std::string parentType = deleterTypes.first; - std::string parentName = parentType.empty() ? "" : startLowerCase(parentType); - - // iterate over the deleter types parented by this type - for (auto const& deleterType : deleterTypes.second) - { - std::string deleterName = startLowerCase(deleterType); - bool standardDeleter = !parentType.empty() && (deleterType != "Device"); // this detects the 'standard' case for a deleter - // if this Deleter is pooled, make such a pool the last argument, otherwise an Optional allocator - auto const& dd = m_deleters.find(deleterType); - assert(dd != m_deleters.end()); - std::string poolName = (dd->second.pool.empty() ? "" : startLowerCase(dd->second.pool)); - - if (!first) - { - os << std::endl; - } - first = false; - - os << " class " << deleterType << "Deleter" << std::endl - << " {" << std::endl - << " public:" << std::endl - << " " << deleterType << "Deleter( "; - if (standardDeleter) - { - // the standard deleter gets a parent type in the constructor - os << parentType << " " << parentName << " = " << parentType << "(), "; - } - - if (poolName.empty()) - { - os << "Optional allocator = nullptr )" << std::endl; - } - else - { - assert(!dd->second.pool.empty()); - os << dd->second.pool << " " << poolName << " = " << dd->second.pool << "() )" << std::endl; - } - - // now the initializer list of the Deleter constructor - os << " : "; - if (standardDeleter) - { - // the standard deleter has a parent type as a member - os << "m_" << parentName << "( " << parentName << " )" << std::endl - << " , "; - } - if (poolName.empty()) - { - // non-pooled deleter have an allocator as a member - os << "m_allocator( allocator )" << std::endl; - } - else - { - // pooled deleter have a pool as a member - os << "m_" << poolName << "( " << poolName << " )" << std::endl; - } - - // besides that, the constructor is empty - os << " {}" << std::endl - << std::endl; - - // getter for the parent type - if (standardDeleter) - { - os << " " << parentType << " get" << parentType << "() const { return m_" << parentName << "; }\n"; - } - - // getter for pool - if (!poolName.empty()) - { - os << " " << dd->second.pool << " get" << dd->second.pool << "() const { return m_" << poolName << "; }\n"; - } - else // getter for allocator - { - os << " Optional getAllocator() const { return m_allocator; }\n"; - } - - os << "\n"; - - // the operator() calls the delete/destroy function - os << " protected:\n" - << " void destroy( " << deleterType << " " << deleterName << " )\n" - << " {\n"; - - // the delete/destroy function is either part of the parent member of the deleter argument - if (standardDeleter) - { - os << " m_" << parentName << "."; - } - else - { - os << " " << deleterName << "."; - } - - os << dd->second.call << "( "; - - if (!poolName.empty()) - { - // pooled Deleter gets the pool as the first argument - os << "m_" << poolName << ", "; - } - - if (standardDeleter) - { - // the standard deleter gets the deleter argument as an argument - os << deleterName; - } - - // the non-pooled deleter get the allocate as an argument (potentially after the deleterName - if (poolName.empty()) - { - if (standardDeleter) - { - os << ", "; - } - os << "m_allocator"; - } - os << " );" << std::endl - << " }" << std::endl - << std::endl; - - // now the members of the Deleter class - os << " private:" << std::endl; - if (standardDeleter) - { - // the parentType for the standard deleter - os << " " << parentType << " m_" << parentName << ";" << std::endl; - } - - // the allocator for the non-pooled deleters, the pool for the pooled ones - if (poolName.empty()) - { - os << " Optional m_allocator;" << std::endl; - } - else - { - os << " " << dd->second.pool << " m_" << poolName << ";" << std::endl; - } - os << " };" << std::endl; - } - - os << "#endif /*VULKAN_HPP_NO_SMART_HANDLE*/" << std::endl - << std::endl; -} - -void VulkanHppGenerator::writeDeleterForwardDeclarations(std::ostream &os, std::pair> const& deleterTypes) -{ - // if smart handles are supported, all the Deleter classes need to be forward declared - os << "#ifndef VULKAN_HPP_NO_SMART_HANDLE" << std::endl; - bool first = true; - std::string firstName = deleterTypes.first.empty() ? "" : startLowerCase(deleterTypes.first); - for (auto const& dt : deleterTypes.second) - { - os << " class " << dt << "Deleter;" << std::endl; - os << " template <> class UniqueHandleTraits<" << dt << "> {public: using deleter = " << dt << "Deleter; };\n"; - os << " using Unique" << dt << " = UniqueHandle<" << dt << ">;" << std::endl; - } - os << "#endif /*VULKAN_HPP_NO_SMART_HANDLE*/" << std::endl - << std::endl; -} - // Intended only for `enum class Result`! void VulkanHppGenerator::writeExceptionsForEnum(std::ostream & os, EnumData const& enumData) { @@ -3256,7 +3164,7 @@ ${i} ${typeVariable}s.reserve( ${vectorSize} ); ${i} ${type}* buffer = reinterpret_cast<${type}*>( reinterpret_cast( ${typeVariable}s.data() ) + ${vectorSize} * ( sizeof( Unique${type} ) - sizeof( ${type} ) ) ); ${i} Result result = static_cast(d.vk${command}( m_device, ${arguments}, reinterpret_cast( buffer ) ) ); -${i} ${type}Deleter deleter( *this, ${deleterArg} ); +${i} ${Deleter}<${DeleterTemplate}> deleter( *this, ${deleterArg} ); ${i} for ( size_t i=0 ; i<${vectorSize} ; i++ ) ${i} { ${i} ${typeVariable}s.push_back( Unique${type}( buffer[i], deleter ) ); @@ -3282,6 +3190,8 @@ ${i} return createResultValue( result, ${typeVariable}s, "VULKAN_HPP_NAMESPACE: { "vectorSize", isCreateFunction ? "createInfos.size()" : "allocateInfo." + typeVariable + "Count" }, { "command", startUpperCase(commandData.fullName) }, { "arguments", arguments.str() }, + { "Deleter", ddit->second.pool.empty() ? "ObjectDeleter" : "PoolDeleter" }, + { "DeleterTemplate", ddit->second.pool.empty() ? type : commandData.className + "," + ddit->second.pool }, { "deleterArg", ddit->second.pool.empty() ? "allocator" : "allocateInfo." + startLowerCase(ddit->second.pool) }, { "class", commandData.className }, { "function", commandData.reducedName } @@ -3571,28 +3481,12 @@ void VulkanHppGenerator::writeFunctionBodyEnhancedReturnResultValue(std::ostream if (unique) { // the unique version needs a Deleter object for destruction of the newly created stuff - os << std::endl - << indentation << " " << type << "Deleter deleter( "; - if (m_deleters.find(commandData.className) != m_deleters.end()) - { - // if the Deleter is specific to the command's class, add '*this' to the deleter - os << "*this, "; - } - // get the DeleterData corresponding to the returned type std::map::const_iterator ddit = m_deleters.find(type); - assert(ddit != m_deleters.end()); - if (ddit->second.pool.empty()) - { - // if this type isn't pooled, use the allocator (provided as a function argument) - os << "allocator"; - } - else - { - // otherwise use the pool, which always is a member of the second argument - os << startLowerCase(strip(commandData.params[1].name, "p")) << "." << startLowerCase(ddit->second.pool); - } - os << " );" << std::endl; + assert(ddit != m_deleters.end() && ddit->second.pool.empty()); + + os << std::endl + << indentation << " ObjectDeleter<" << (commandData.className.empty() ? "NoParent" : commandData.className) << "> deleter( " << (commandData.className.empty() ? "" : "*this, ") << "allocator );" << std::endl; } // if the return type is "Result" or there is at least one success code, create the Result/Value construct to return @@ -4288,9 +4182,8 @@ void VulkanHppGenerator::writeTypeCommand(std::ostream & os, DependencyData cons auto deleterTypesIt = m_deleterTypes.find(""); assert((deleterTypesIt != m_deleterTypes.end()) && (deleterTypesIt->second.size() == 1)); - writeDeleterForwardDeclarations(os, *deleterTypesIt); + writeUniqueTypes(os, *deleterTypesIt); writeTypeCommand(os, " ", commandData, false); - writeDeleterClasses(os, *deleterTypesIt); } else { @@ -4397,7 +4290,7 @@ void VulkanHppGenerator::writeTypeHandle(std::ostream & os, DependencyData const std::map>::const_iterator deleterTypesIt = m_deleterTypes.find(dependencyData.name); if (deleterTypesIt != m_deleterTypes.end()) { - writeDeleterForwardDeclarations(os, *deleterTypesIt); + writeUniqueTypes(os, *deleterTypesIt); } const std::string memberName = startLowerCase(dependencyData.name); @@ -4475,10 +4368,17 @@ ${commands} // now list all the commands that are mapped to members of this class for (size_t i = 0; i < handleData.commands.size(); i++) { - std::string commandName = handleData.commands[i]; - std::map::const_iterator cit = m_commands.find(commandName); + std::map::const_iterator cit = m_commands.find(handleData.commands[i]); assert((cit != m_commands.end()) && !cit->second.className.empty()); writeTypeCommand(commands, " ", cit->second, false); + + // special handling for destroy functions + if (((cit->second.fullName.substr(0, 7) == "destroy") && (cit->second.reducedName != "destroy")) || (cit->second.fullName.substr(0, 4) == "free")) + { + CommandData shortenedCommand = cit->second; + shortenedCommand.reducedName = (cit->second.fullName.substr(0, 7) == "destroy") ? "destroy" : "free"; + writeTypeCommand(commands, " ", shortenedCommand, false); + } } os << replaceWithMap(templateString, { @@ -4487,13 +4387,6 @@ ${commands} { "commands", commands.str() } }); - // then the actual Deleter classes can be listed - deleterTypesIt = m_deleterTypes.find(dependencyData.name); - if (deleterTypesIt != m_deleterTypes.end()) - { - writeDeleterClasses(os, *deleterTypesIt); - } - // and finally the commands, that are member functions of this handle for (size_t i = 0; i < handleData.commands.size(); i++) { @@ -4503,6 +4396,14 @@ ${commands} std::list::const_iterator dep = std::find_if(m_dependencies.begin(), m_dependencies.end(), [commandName](DependencyData const& dd) { return dd.name == commandName; }); assert(dep != m_dependencies.end() && (dep->name == cit->second.fullName)); writeTypeCommand(os, " ", cit->second, true); + + // special handling for destroy functions + if (((cit->second.fullName.substr(0, 7) == "destroy") && (cit->second.reducedName != "destroy")) || (cit->second.fullName.substr(0, 4) == "free")) + { + CommandData shortenedCommand = cit->second; + shortenedCommand.reducedName = (cit->second.fullName.substr(0, 7) == "destroy") ? "destroy" : "free"; + writeTypeCommand(os, " ", shortenedCommand, true); + } } if (!handleData.alias.empty()) @@ -4670,6 +4571,28 @@ void VulkanHppGenerator::writeTypeStruct(std::ostream & os, DependencyData const os << std::endl; } +void VulkanHppGenerator::writeUniqueTypes(std::ostream &os, std::pair> const& deleterTypes) +{ + os << "#ifndef VULKAN_HPP_NO_SMART_HANDLE" << std::endl; + if (!deleterTypes.first.empty()) + { + os << " class " << deleterTypes.first << ";" << std::endl; + } + os << std::endl; + + bool first = true; + for (auto const& dt : deleterTypes.second) + { + auto ddit = m_deleters.find(dt); + assert(ddit != m_deleters.end()); + + os << " template <> class UniqueHandleTraits<" << dt << "> {public: using deleter = " << (ddit->second.pool.empty() ? "Object" : "Pool") << "Deleter<" << (deleterTypes.first.empty() ? "NoParent" : deleterTypes.first) << (ddit->second.pool.empty() ? "" : ", " + ddit->second.pool) << ">; };\n"; + os << " using Unique" << dt << " = UniqueHandle<" << dt << ">;" << std::endl; + } + os << "#endif /*VULKAN_HPP_NO_SMART_HANDLE*/" << std::endl + << std::endl; +} + void VulkanHppGenerator::writeTypeUnion(std::ostream & os, DependencyData const& dependencyData, std::map const& defaultValues) { std::map::const_iterator it = m_structs.find(dependencyData.name); @@ -5068,7 +4991,8 @@ int main( int argc, char **argv ) << "namespace VULKAN_HPP_NAMESPACE" << std::endl << "{" << std::endl << resultValueHeader - << createResultValueHeader; + << createResultValueHeader + << deleterClassString; generator.writeDelegationClassStatic(ofs); diff --git a/VulkanHppGenerator.hpp b/VulkanHppGenerator.hpp index 1d98add..f3af551 100644 --- a/VulkanHppGenerator.hpp +++ b/VulkanHppGenerator.hpp @@ -246,8 +246,6 @@ class VulkanHppGenerator void writeCallVectorParameter(std::ostream & os, CommandData const& commandData, bool firstCall, bool singular, std::map::const_iterator it); void writeCallVulkanTypeParameter(std::ostream & os, ParamData const& paramData); void writeEnumsToString(std::ostream & os, EnumData const& enumData); - void writeDeleterClasses(std::ostream & os, std::pair> const& deleterTypes); - void writeDeleterForwardDeclarations(std::ostream &os, std::pair> const& deleterTypes); void writeExceptionsForEnum(std::ostream & os, EnumData const& enumData); void writeFunction(std::ostream & os, std::string const& indentation, CommandData const& commandData, bool definition, bool enhanced, bool singular, bool unique, bool isStructureChain); void writeFunctionBodyEnhanced(std::ostream & os, std::string const& indentation, CommandData const& commandData, bool singular, bool unique, bool isStructureChain); @@ -280,6 +278,7 @@ class VulkanHppGenerator void writeTypeScalar(std::ostream & os, DependencyData const& dependencyData); void writeTypeStruct(std::ostream & os, DependencyData const& dependencyData, std::map const& defaultValues); void writeTypeUnion(std::ostream & os, DependencyData const& dependencyData, std::map const& defaultValues); + void writeUniqueTypes(std::ostream &os, std::pair> const& deleterTypes); #if !defined(NDEBUG) void skipVendorID(tinyxml2::XMLElement const* element); #endif diff --git a/vulkan/vulkan.hpp b/vulkan/vulkan.hpp index d4b558f..c55be23 100644 --- a/vulkan/vulkan.hpp +++ b/vulkan/vulkan.hpp @@ -972,6 +972,80 @@ namespace VULKAN_HPP_NAMESPACE } #endif + + struct AllocationCallbacks; + + template + class ObjectDeleter + { + public: + ObjectDeleter(OwnerType owner = OwnerType(), Optional allocator = nullptr) + : m_owner(owner) + , m_allocator(allocator) + {} + + OwnerType getOwner() const { return m_owner; } + Optional getAllocator() const { return m_allocator; } + + protected: + template + void destroy(T t) + { + m_owner.destroy(t, m_allocator); + } + + private: + OwnerType m_owner; + Optional m_allocator; + }; + + class NoParent; + + template <> + class ObjectDeleter + { + public: + ObjectDeleter( Optional allocator = nullptr ) + : m_allocator( allocator ) + {} + + Optional getAllocator() const { return m_allocator; } + + protected: + template + void destroy(T t) + { + t.destroy( m_allocator ); + } + + private: + Optional m_allocator; + }; + + template + class PoolDeleter + { + public: + PoolDeleter(OwnerType owner = OwnerType(), PoolType pool = PoolType()) + : m_owner(owner) + , m_pool(pool) + {} + + OwnerType getOwner() const { return m_owner; } + PoolType getPool() const { return m_pool; } + + protected: + template + void destroy(T t) + { + m_owner.free(m_pool, t); + } + + private: + OwnerType m_owner; + PoolType m_pool; + }; + class DispatchLoaderStatic { public: @@ -28205,86 +28279,61 @@ public: #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifndef VULKAN_HPP_NO_SMART_HANDLE - class BufferDeleter; - template <> class UniqueHandleTraits {public: using deleter = BufferDeleter; }; + class Device; + + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; using UniqueBuffer = UniqueHandle; - class BufferViewDeleter; - template <> class UniqueHandleTraits {public: using deleter = BufferViewDeleter; }; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; using UniqueBufferView = UniqueHandle; - class CommandBufferDeleter; - template <> class UniqueHandleTraits {public: using deleter = CommandBufferDeleter; }; + template <> class UniqueHandleTraits {public: using deleter = PoolDeleter; }; using UniqueCommandBuffer = UniqueHandle; - class CommandPoolDeleter; - template <> class UniqueHandleTraits {public: using deleter = CommandPoolDeleter; }; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; using UniqueCommandPool = UniqueHandle; - class DescriptorPoolDeleter; - template <> class UniqueHandleTraits {public: using deleter = DescriptorPoolDeleter; }; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; using UniqueDescriptorPool = UniqueHandle; - class DescriptorSetDeleter; - template <> class UniqueHandleTraits {public: using deleter = DescriptorSetDeleter; }; + template <> class UniqueHandleTraits {public: using deleter = PoolDeleter; }; using UniqueDescriptorSet = UniqueHandle; - class DescriptorSetLayoutDeleter; - template <> class UniqueHandleTraits {public: using deleter = DescriptorSetLayoutDeleter; }; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; using UniqueDescriptorSetLayout = UniqueHandle; - class DescriptorUpdateTemplateKHRDeleter; - template <> class UniqueHandleTraits {public: using deleter = DescriptorUpdateTemplateKHRDeleter; }; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; using UniqueDescriptorUpdateTemplateKHR = UniqueHandle; - class DeviceMemoryDeleter; - template <> class UniqueHandleTraits {public: using deleter = DeviceMemoryDeleter; }; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; using UniqueDeviceMemory = UniqueHandle; - class EventDeleter; - template <> class UniqueHandleTraits {public: using deleter = EventDeleter; }; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; using UniqueEvent = UniqueHandle; - class FenceDeleter; - template <> class UniqueHandleTraits {public: using deleter = FenceDeleter; }; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; using UniqueFence = UniqueHandle; - class FramebufferDeleter; - template <> class UniqueHandleTraits {public: using deleter = FramebufferDeleter; }; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; using UniqueFramebuffer = UniqueHandle; - class ImageDeleter; - template <> class UniqueHandleTraits {public: using deleter = ImageDeleter; }; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; using UniqueImage = UniqueHandle; - class ImageViewDeleter; - template <> class UniqueHandleTraits {public: using deleter = ImageViewDeleter; }; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; using UniqueImageView = UniqueHandle; - class IndirectCommandsLayoutNVXDeleter; - template <> class UniqueHandleTraits {public: using deleter = IndirectCommandsLayoutNVXDeleter; }; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; using UniqueIndirectCommandsLayoutNVX = UniqueHandle; - class ObjectTableNVXDeleter; - template <> class UniqueHandleTraits {public: using deleter = ObjectTableNVXDeleter; }; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; using UniqueObjectTableNVX = UniqueHandle; - class PipelineDeleter; - template <> class UniqueHandleTraits {public: using deleter = PipelineDeleter; }; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; using UniquePipeline = UniqueHandle; - class PipelineCacheDeleter; - template <> class UniqueHandleTraits {public: using deleter = PipelineCacheDeleter; }; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; using UniquePipelineCache = UniqueHandle; - class PipelineLayoutDeleter; - template <> class UniqueHandleTraits {public: using deleter = PipelineLayoutDeleter; }; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; using UniquePipelineLayout = UniqueHandle; - class QueryPoolDeleter; - template <> class UniqueHandleTraits {public: using deleter = QueryPoolDeleter; }; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; using UniqueQueryPool = UniqueHandle; - class RenderPassDeleter; - template <> class UniqueHandleTraits {public: using deleter = RenderPassDeleter; }; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; using UniqueRenderPass = UniqueHandle; - class SamplerDeleter; - template <> class UniqueHandleTraits {public: using deleter = SamplerDeleter; }; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; using UniqueSampler = UniqueHandle; - class SamplerYcbcrConversionKHRDeleter; - template <> class UniqueHandleTraits {public: using deleter = SamplerYcbcrConversionKHRDeleter; }; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; using UniqueSamplerYcbcrConversionKHR = UniqueHandle; - class SemaphoreDeleter; - template <> class UniqueHandleTraits {public: using deleter = SemaphoreDeleter; }; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; using UniqueSemaphore = UniqueHandle; - class ShaderModuleDeleter; - template <> class UniqueHandleTraits {public: using deleter = ShaderModuleDeleter; }; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; using UniqueShaderModule = UniqueHandle; - class SwapchainKHRDeleter; - template <> class UniqueHandleTraits {public: using deleter = SwapchainKHRDeleter; }; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; using UniqueSwapchainKHR = UniqueHandle; - class ValidationCacheEXTDeleter; - template <> class UniqueHandleTraits {public: using deleter = ValidationCacheEXTDeleter; }; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; using UniqueValidationCacheEXT = UniqueHandle; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -28379,6 +28428,13 @@ public: void freeMemory( DeviceMemory memory, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + void free( DeviceMemory memory, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void free( DeviceMemory memory, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template Result mapMemory( DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags, void** ppData, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE @@ -28465,6 +28521,13 @@ public: void destroyFence( Fence fence, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + void destroy( Fence fence, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroy( Fence fence, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template Result resetFences( uint32_t fenceCount, const Fence* pFences, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE @@ -28500,6 +28563,13 @@ public: void destroySemaphore( Semaphore semaphore, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + void destroy( Semaphore semaphore, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroy( Semaphore semaphore, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template Result createEvent( const EventCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Event* pEvent, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE @@ -28518,6 +28588,13 @@ public: void destroyEvent( Event event, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + void destroy( Event event, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroy( Event event, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template Result getEventStatus( Event event, Dispatch const &d = Dispatch() ) const; @@ -28555,6 +28632,13 @@ public: void destroyQueryPool( QueryPool queryPool, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + void destroy( QueryPool queryPool, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroy( QueryPool queryPool, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template Result getQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, DeviceSize stride, QueryResultFlags flags, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE @@ -28580,6 +28664,13 @@ public: void destroyBuffer( Buffer buffer, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + void destroy( Buffer buffer, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroy( Buffer buffer, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template Result createBufferView( const BufferViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, BufferView* pView, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE @@ -28598,6 +28689,13 @@ public: void destroyBufferView( BufferView bufferView, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + void destroy( BufferView bufferView, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroy( BufferView bufferView, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template Result createImage( const ImageCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Image* pImage, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE @@ -28616,6 +28714,13 @@ public: void destroyImage( Image image, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + void destroy( Image image, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroy( Image image, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template void getImageSubresourceLayout( Image image, const ImageSubresource* pSubresource, SubresourceLayout* pLayout, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE @@ -28641,6 +28746,13 @@ public: void destroyImageView( ImageView imageView, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + void destroy( ImageView imageView, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroy( ImageView imageView, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template Result createShaderModule( const ShaderModuleCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ShaderModule* pShaderModule, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE @@ -28659,6 +28771,13 @@ public: void destroyShaderModule( ShaderModule shaderModule, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + void destroy( ShaderModule shaderModule, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroy( ShaderModule shaderModule, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template Result createPipelineCache( const PipelineCacheCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineCache* pPipelineCache, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE @@ -28677,6 +28796,13 @@ public: void destroyPipelineCache( PipelineCache pipelineCache, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + void destroy( PipelineCache pipelineCache, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroy( PipelineCache pipelineCache, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template Result getPipelineCacheData( PipelineCache pipelineCache, size_t* pDataSize, void* pData, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE @@ -28728,6 +28854,13 @@ public: void destroyPipeline( Pipeline pipeline, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + void destroy( Pipeline pipeline, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroy( Pipeline pipeline, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template Result createPipelineLayout( const PipelineLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineLayout* pPipelineLayout, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE @@ -28746,6 +28879,13 @@ public: void destroyPipelineLayout( PipelineLayout pipelineLayout, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + void destroy( PipelineLayout pipelineLayout, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroy( PipelineLayout pipelineLayout, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template Result createSampler( const SamplerCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Sampler* pSampler, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE @@ -28764,6 +28904,13 @@ public: void destroySampler( Sampler sampler, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + void destroy( Sampler sampler, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroy( Sampler sampler, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template Result createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorSetLayout* pSetLayout, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE @@ -28782,6 +28929,13 @@ public: void destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + void destroy( DescriptorSetLayout descriptorSetLayout, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroy( DescriptorSetLayout descriptorSetLayout, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template Result createDescriptorPool( const DescriptorPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorPool* pDescriptorPool, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE @@ -28800,6 +28954,13 @@ public: void destroyDescriptorPool( DescriptorPool descriptorPool, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + void destroy( DescriptorPool descriptorPool, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroy( DescriptorPool descriptorPool, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template Result resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags = DescriptorPoolResetFlags(), Dispatch const &d = Dispatch() ) const; @@ -28826,6 +28987,13 @@ public: ResultValueType::type freeDescriptorSets( DescriptorPool descriptorPool, ArrayProxy descriptorSets, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + Result free( DescriptorPool descriptorPool, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + ResultValueType::type free( DescriptorPool descriptorPool, ArrayProxy descriptorSets, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template void updateDescriptorSets( uint32_t descriptorWriteCount, const WriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const CopyDescriptorSet* pDescriptorCopies, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE @@ -28851,6 +29019,13 @@ public: void destroyFramebuffer( Framebuffer framebuffer, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + void destroy( Framebuffer framebuffer, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroy( Framebuffer framebuffer, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template Result createRenderPass( const RenderPassCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, RenderPass* pRenderPass, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE @@ -28869,6 +29044,13 @@ public: void destroyRenderPass( RenderPass renderPass, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + void destroy( RenderPass renderPass, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroy( RenderPass renderPass, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template void getRenderAreaGranularity( RenderPass renderPass, Extent2D* pGranularity, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE @@ -28894,6 +29076,13 @@ public: void destroyCommandPool( CommandPool commandPool, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + void destroy( CommandPool commandPool, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroy( CommandPool commandPool, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template Result resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags, Dispatch const &d = Dispatch() ) const; @@ -28920,6 +29109,13 @@ public: void freeCommandBuffers( CommandPool commandPool, ArrayProxy commandBuffers, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + void free( CommandPool commandPool, uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void free( CommandPool commandPool, ArrayProxy commandBuffers, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template Result createSharedSwapchainsKHR( uint32_t swapchainCount, const SwapchainCreateInfoKHR* pCreateInfos, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchains, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE @@ -28953,6 +29149,13 @@ public: void destroySwapchainKHR( SwapchainKHR swapchain, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + void destroy( SwapchainKHR swapchain, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroy( SwapchainKHR swapchain, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template Result getSwapchainImagesKHR( SwapchainKHR swapchain, uint32_t* pSwapchainImageCount, Image* pSwapchainImages, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE @@ -29008,6 +29211,13 @@ public: void destroyIndirectCommandsLayoutNVX( IndirectCommandsLayoutNVX indirectCommandsLayout, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + void destroy( IndirectCommandsLayoutNVX indirectCommandsLayout, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroy( IndirectCommandsLayoutNVX indirectCommandsLayout, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template Result createObjectTableNVX( const ObjectTableCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, ObjectTableNVX* pObjectTable, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE @@ -29026,6 +29236,13 @@ public: void destroyObjectTableNVX( ObjectTableNVX objectTable, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + void destroy( ObjectTableNVX objectTable, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroy( ObjectTableNVX objectTable, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template Result registerObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectTableEntryNVX* const* ppObjectTableEntries, const uint32_t* pObjectIndices, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE @@ -29227,6 +29444,13 @@ public: void destroyDescriptorUpdateTemplateKHR( DescriptorUpdateTemplateKHR descriptorUpdateTemplate, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + void destroy( DescriptorUpdateTemplateKHR descriptorUpdateTemplate, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroy( DescriptorUpdateTemplateKHR descriptorUpdateTemplate, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template void updateDescriptorSetWithTemplateKHR( DescriptorSet descriptorSet, DescriptorUpdateTemplateKHR descriptorUpdateTemplate, const void* pData, Dispatch const &d = Dispatch() ) const; @@ -29297,6 +29521,13 @@ public: void destroySamplerYcbcrConversionKHR( SamplerYcbcrConversionKHR ycbcrConversion, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + void destroy( SamplerYcbcrConversionKHR ycbcrConversion, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroy( SamplerYcbcrConversionKHR ycbcrConversion, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template Result createValidationCacheEXT( const ValidationCacheCreateInfoEXT* pCreateInfo, const AllocationCallbacks* pAllocator, ValidationCacheEXT* pValidationCache, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE @@ -29315,6 +29546,13 @@ public: void destroyValidationCacheEXT( ValidationCacheEXT validationCache, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + void destroy( ValidationCacheEXT validationCache, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroy( ValidationCacheEXT validationCache, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template Result getValidationCacheDataEXT( ValidationCacheEXT validationCache, size_t* pDataSize, void* pData, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE @@ -29366,602 +29604,6 @@ public: static_assert( sizeof( Device ) == sizeof( VkDevice ), "handle and wrapper have different size!" ); -#ifndef VULKAN_HPP_NO_SMART_HANDLE - class BufferDeleter - { - public: - BufferDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - Device getDevice() const { return m_device; } - Optional getAllocator() const { return m_allocator; } - - protected: - void destroy( Buffer buffer ) - { - m_device.destroyBuffer( buffer, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class BufferViewDeleter - { - public: - BufferViewDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - Device getDevice() const { return m_device; } - Optional getAllocator() const { return m_allocator; } - - protected: - void destroy( BufferView bufferView ) - { - m_device.destroyBufferView( bufferView, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class CommandBufferDeleter - { - public: - CommandBufferDeleter( Device device = Device(), CommandPool commandPool = CommandPool() ) - : m_device( device ) - , m_commandPool( commandPool ) - {} - - Device getDevice() const { return m_device; } - CommandPool getCommandPool() const { return m_commandPool; } - - protected: - void destroy( CommandBuffer commandBuffer ) - { - m_device.freeCommandBuffers( m_commandPool, commandBuffer ); - } - - private: - Device m_device; - CommandPool m_commandPool; - }; - - class CommandPoolDeleter - { - public: - CommandPoolDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - Device getDevice() const { return m_device; } - Optional getAllocator() const { return m_allocator; } - - protected: - void destroy( CommandPool commandPool ) - { - m_device.destroyCommandPool( commandPool, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class DescriptorPoolDeleter - { - public: - DescriptorPoolDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - Device getDevice() const { return m_device; } - Optional getAllocator() const { return m_allocator; } - - protected: - void destroy( DescriptorPool descriptorPool ) - { - m_device.destroyDescriptorPool( descriptorPool, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class DescriptorSetDeleter - { - public: - DescriptorSetDeleter( Device device = Device(), DescriptorPool descriptorPool = DescriptorPool() ) - : m_device( device ) - , m_descriptorPool( descriptorPool ) - {} - - Device getDevice() const { return m_device; } - DescriptorPool getDescriptorPool() const { return m_descriptorPool; } - - protected: - void destroy( DescriptorSet descriptorSet ) - { - m_device.freeDescriptorSets( m_descriptorPool, descriptorSet ); - } - - private: - Device m_device; - DescriptorPool m_descriptorPool; - }; - - class DescriptorSetLayoutDeleter - { - public: - DescriptorSetLayoutDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - Device getDevice() const { return m_device; } - Optional getAllocator() const { return m_allocator; } - - protected: - void destroy( DescriptorSetLayout descriptorSetLayout ) - { - m_device.destroyDescriptorSetLayout( descriptorSetLayout, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class DescriptorUpdateTemplateKHRDeleter - { - public: - DescriptorUpdateTemplateKHRDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - Device getDevice() const { return m_device; } - Optional getAllocator() const { return m_allocator; } - - protected: - void destroy( DescriptorUpdateTemplateKHR descriptorUpdateTemplateKHR ) - { - m_device.destroyDescriptorUpdateTemplateKHR( descriptorUpdateTemplateKHR, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class DeviceMemoryDeleter - { - public: - DeviceMemoryDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - Device getDevice() const { return m_device; } - Optional getAllocator() const { return m_allocator; } - - protected: - void destroy( DeviceMemory deviceMemory ) - { - m_device.freeMemory( deviceMemory, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class EventDeleter - { - public: - EventDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - Device getDevice() const { return m_device; } - Optional getAllocator() const { return m_allocator; } - - protected: - void destroy( Event event ) - { - m_device.destroyEvent( event, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class FenceDeleter - { - public: - FenceDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - Device getDevice() const { return m_device; } - Optional getAllocator() const { return m_allocator; } - - protected: - void destroy( Fence fence ) - { - m_device.destroyFence( fence, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class FramebufferDeleter - { - public: - FramebufferDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - Device getDevice() const { return m_device; } - Optional getAllocator() const { return m_allocator; } - - protected: - void destroy( Framebuffer framebuffer ) - { - m_device.destroyFramebuffer( framebuffer, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class ImageDeleter - { - public: - ImageDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - Device getDevice() const { return m_device; } - Optional getAllocator() const { return m_allocator; } - - protected: - void destroy( Image image ) - { - m_device.destroyImage( image, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class ImageViewDeleter - { - public: - ImageViewDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - Device getDevice() const { return m_device; } - Optional getAllocator() const { return m_allocator; } - - protected: - void destroy( ImageView imageView ) - { - m_device.destroyImageView( imageView, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class IndirectCommandsLayoutNVXDeleter - { - public: - IndirectCommandsLayoutNVXDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - Device getDevice() const { return m_device; } - Optional getAllocator() const { return m_allocator; } - - protected: - void destroy( IndirectCommandsLayoutNVX indirectCommandsLayoutNVX ) - { - m_device.destroyIndirectCommandsLayoutNVX( indirectCommandsLayoutNVX, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class ObjectTableNVXDeleter - { - public: - ObjectTableNVXDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - Device getDevice() const { return m_device; } - Optional getAllocator() const { return m_allocator; } - - protected: - void destroy( ObjectTableNVX objectTableNVX ) - { - m_device.destroyObjectTableNVX( objectTableNVX, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class PipelineDeleter - { - public: - PipelineDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - Device getDevice() const { return m_device; } - Optional getAllocator() const { return m_allocator; } - - protected: - void destroy( Pipeline pipeline ) - { - m_device.destroyPipeline( pipeline, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class PipelineCacheDeleter - { - public: - PipelineCacheDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - Device getDevice() const { return m_device; } - Optional getAllocator() const { return m_allocator; } - - protected: - void destroy( PipelineCache pipelineCache ) - { - m_device.destroyPipelineCache( pipelineCache, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class PipelineLayoutDeleter - { - public: - PipelineLayoutDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - Device getDevice() const { return m_device; } - Optional getAllocator() const { return m_allocator; } - - protected: - void destroy( PipelineLayout pipelineLayout ) - { - m_device.destroyPipelineLayout( pipelineLayout, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class QueryPoolDeleter - { - public: - QueryPoolDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - Device getDevice() const { return m_device; } - Optional getAllocator() const { return m_allocator; } - - protected: - void destroy( QueryPool queryPool ) - { - m_device.destroyQueryPool( queryPool, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class RenderPassDeleter - { - public: - RenderPassDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - Device getDevice() const { return m_device; } - Optional getAllocator() const { return m_allocator; } - - protected: - void destroy( RenderPass renderPass ) - { - m_device.destroyRenderPass( renderPass, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class SamplerDeleter - { - public: - SamplerDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - Device getDevice() const { return m_device; } - Optional getAllocator() const { return m_allocator; } - - protected: - void destroy( Sampler sampler ) - { - m_device.destroySampler( sampler, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class SamplerYcbcrConversionKHRDeleter - { - public: - SamplerYcbcrConversionKHRDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - Device getDevice() const { return m_device; } - Optional getAllocator() const { return m_allocator; } - - protected: - void destroy( SamplerYcbcrConversionKHR samplerYcbcrConversionKHR ) - { - m_device.destroySamplerYcbcrConversionKHR( samplerYcbcrConversionKHR, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class SemaphoreDeleter - { - public: - SemaphoreDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - Device getDevice() const { return m_device; } - Optional getAllocator() const { return m_allocator; } - - protected: - void destroy( Semaphore semaphore ) - { - m_device.destroySemaphore( semaphore, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class ShaderModuleDeleter - { - public: - ShaderModuleDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - Device getDevice() const { return m_device; } - Optional getAllocator() const { return m_allocator; } - - protected: - void destroy( ShaderModule shaderModule ) - { - m_device.destroyShaderModule( shaderModule, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class SwapchainKHRDeleter - { - public: - SwapchainKHRDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - Device getDevice() const { return m_device; } - Optional getAllocator() const { return m_allocator; } - - protected: - void destroy( SwapchainKHR swapchainKHR ) - { - m_device.destroySwapchainKHR( swapchainKHR, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class ValidationCacheEXTDeleter - { - public: - ValidationCacheEXTDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - Device getDevice() const { return m_device; } - Optional getAllocator() const { return m_allocator; } - - protected: - void destroy( ValidationCacheEXT validationCacheEXT ) - { - m_device.destroyValidationCacheEXT( validationCacheEXT, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ - template VULKAN_HPP_INLINE PFN_vkVoidFunction Device::getProcAddr( const char* pName, Dispatch const &d) const { @@ -30038,7 +29680,7 @@ public: DeviceMemory memory; Result result = static_cast( d.vkAllocateMemory( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &memory ) ) ); - DeviceMemoryDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, memory, "VULKAN_HPP_NAMESPACE::Device::allocateMemoryUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -30057,6 +29699,19 @@ public: } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + VULKAN_HPP_INLINE void Device::free( DeviceMemory memory, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkFreeMemory( m_device, static_cast( memory ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::free( DeviceMemory memory, Optional allocator, Dispatch const &d ) const + { + d.vkFreeMemory( m_device, static_cast( memory ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template VULKAN_HPP_INLINE Result Device::mapMemory( DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags, void** ppData, Dispatch const &d) const { @@ -30227,7 +29882,7 @@ public: Fence fence; Result result = static_cast( d.vkCreateFence( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &fence ) ) ); - FenceDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, fence, "VULKAN_HPP_NAMESPACE::Device::createFenceUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -30246,6 +29901,19 @@ public: } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + VULKAN_HPP_INLINE void Device::destroy( Fence fence, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyFence( m_device, static_cast( fence ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroy( Fence fence, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyFence( m_device, static_cast( fence ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template VULKAN_HPP_INLINE Result Device::resetFences( uint32_t fenceCount, const Fence* pFences, Dispatch const &d) const { @@ -30309,7 +29977,7 @@ public: Semaphore semaphore; Result result = static_cast( d.vkCreateSemaphore( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &semaphore ) ) ); - SemaphoreDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, semaphore, "VULKAN_HPP_NAMESPACE::Device::createSemaphoreUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -30328,6 +29996,19 @@ public: } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + VULKAN_HPP_INLINE void Device::destroy( Semaphore semaphore, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroySemaphore( m_device, static_cast( semaphore ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroy( Semaphore semaphore, Optional allocator, Dispatch const &d ) const + { + d.vkDestroySemaphore( m_device, static_cast( semaphore ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template VULKAN_HPP_INLINE Result Device::createEvent( const EventCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Event* pEvent, Dispatch const &d) const { @@ -30348,7 +30029,7 @@ public: Event event; Result result = static_cast( d.vkCreateEvent( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &event ) ) ); - EventDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, event, "VULKAN_HPP_NAMESPACE::Device::createEventUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -30367,6 +30048,19 @@ public: } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + VULKAN_HPP_INLINE void Device::destroy( Event event, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyEvent( m_device, static_cast( event ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroy( Event event, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyEvent( m_device, static_cast( event ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE Result Device::getEventStatus( Event event, Dispatch const &d) const @@ -30432,7 +30126,7 @@ public: QueryPool queryPool; Result result = static_cast( d.vkCreateQueryPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &queryPool ) ) ); - QueryPoolDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, queryPool, "VULKAN_HPP_NAMESPACE::Device::createQueryPoolUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -30451,6 +30145,19 @@ public: } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + VULKAN_HPP_INLINE void Device::destroy( QueryPool queryPool, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyQueryPool( m_device, static_cast( queryPool ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroy( QueryPool queryPool, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyQueryPool( m_device, static_cast( queryPool ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template VULKAN_HPP_INLINE Result Device::getQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, DeviceSize stride, QueryResultFlags flags, Dispatch const &d) const { @@ -30485,7 +30192,7 @@ public: Buffer buffer; Result result = static_cast( d.vkCreateBuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &buffer ) ) ); - BufferDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, buffer, "VULKAN_HPP_NAMESPACE::Device::createBufferUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -30504,6 +30211,19 @@ public: } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + VULKAN_HPP_INLINE void Device::destroy( Buffer buffer, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyBuffer( m_device, static_cast( buffer ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroy( Buffer buffer, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyBuffer( m_device, static_cast( buffer ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template VULKAN_HPP_INLINE Result Device::createBufferView( const BufferViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, BufferView* pView, Dispatch const &d) const { @@ -30524,7 +30244,7 @@ public: BufferView view; Result result = static_cast( d.vkCreateBufferView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &view ) ) ); - BufferViewDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, view, "VULKAN_HPP_NAMESPACE::Device::createBufferViewUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -30543,6 +30263,19 @@ public: } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + VULKAN_HPP_INLINE void Device::destroy( BufferView bufferView, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyBufferView( m_device, static_cast( bufferView ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroy( BufferView bufferView, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyBufferView( m_device, static_cast( bufferView ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template VULKAN_HPP_INLINE Result Device::createImage( const ImageCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Image* pImage, Dispatch const &d) const { @@ -30563,7 +30296,7 @@ public: Image image; Result result = static_cast( d.vkCreateImage( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &image ) ) ); - ImageDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, image, "VULKAN_HPP_NAMESPACE::Device::createImageUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -30582,6 +30315,19 @@ public: } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + VULKAN_HPP_INLINE void Device::destroy( Image image, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyImage( m_device, static_cast( image ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroy( Image image, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyImage( m_device, static_cast( image ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template VULKAN_HPP_INLINE void Device::getImageSubresourceLayout( Image image, const ImageSubresource* pSubresource, SubresourceLayout* pLayout, Dispatch const &d) const { @@ -30617,7 +30363,7 @@ public: ImageView view; Result result = static_cast( d.vkCreateImageView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &view ) ) ); - ImageViewDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, view, "VULKAN_HPP_NAMESPACE::Device::createImageViewUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -30636,6 +30382,19 @@ public: } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + VULKAN_HPP_INLINE void Device::destroy( ImageView imageView, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyImageView( m_device, static_cast( imageView ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroy( ImageView imageView, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyImageView( m_device, static_cast( imageView ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template VULKAN_HPP_INLINE Result Device::createShaderModule( const ShaderModuleCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ShaderModule* pShaderModule, Dispatch const &d) const { @@ -30656,7 +30415,7 @@ public: ShaderModule shaderModule; Result result = static_cast( d.vkCreateShaderModule( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &shaderModule ) ) ); - ShaderModuleDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, shaderModule, "VULKAN_HPP_NAMESPACE::Device::createShaderModuleUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -30675,6 +30434,19 @@ public: } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + VULKAN_HPP_INLINE void Device::destroy( ShaderModule shaderModule, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyShaderModule( m_device, static_cast( shaderModule ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroy( ShaderModule shaderModule, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyShaderModule( m_device, static_cast( shaderModule ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template VULKAN_HPP_INLINE Result Device::createPipelineCache( const PipelineCacheCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineCache* pPipelineCache, Dispatch const &d) const { @@ -30695,7 +30467,7 @@ public: PipelineCache pipelineCache; Result result = static_cast( d.vkCreatePipelineCache( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipelineCache ) ) ); - PipelineCacheDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, pipelineCache, "VULKAN_HPP_NAMESPACE::Device::createPipelineCacheUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -30714,6 +30486,19 @@ public: } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + VULKAN_HPP_INLINE void Device::destroy( PipelineCache pipelineCache, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyPipelineCache( m_device, static_cast( pipelineCache ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroy( PipelineCache pipelineCache, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyPipelineCache( m_device, static_cast( pipelineCache ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template VULKAN_HPP_INLINE Result Device::getPipelineCacheData( PipelineCache pipelineCache, size_t* pDataSize, void* pData, Dispatch const &d) const { @@ -30785,7 +30570,7 @@ public: Pipeline* buffer = reinterpret_cast( reinterpret_cast( pipelines.data() ) + createInfos.size() * ( sizeof( UniquePipeline ) - sizeof( Pipeline ) ) ); Result result = static_cast(d.vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), createInfos.size() , reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( buffer ) ) ); - PipelineDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); for ( size_t i=0 ; i( d.vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), 1 , reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipeline ) ) ); - PipelineDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, pipeline, "VULKAN_HPP_NAMESPACE::Device::createGraphicsPipelineUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -30835,7 +30620,7 @@ public: Pipeline* buffer = reinterpret_cast( reinterpret_cast( pipelines.data() ) + createInfos.size() * ( sizeof( UniquePipeline ) - sizeof( Pipeline ) ) ); Result result = static_cast(d.vkCreateComputePipelines( m_device, static_cast( pipelineCache ), createInfos.size() , reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( buffer ) ) ); - PipelineDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); for ( size_t i=0 ; i( d.vkCreateComputePipelines( m_device, static_cast( pipelineCache ), 1 , reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipeline ) ) ); - PipelineDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, pipeline, "VULKAN_HPP_NAMESPACE::Device::createComputePipelineUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -30868,6 +30653,19 @@ public: } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + VULKAN_HPP_INLINE void Device::destroy( Pipeline pipeline, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyPipeline( m_device, static_cast( pipeline ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroy( Pipeline pipeline, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyPipeline( m_device, static_cast( pipeline ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template VULKAN_HPP_INLINE Result Device::createPipelineLayout( const PipelineLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineLayout* pPipelineLayout, Dispatch const &d) const { @@ -30888,7 +30686,7 @@ public: PipelineLayout pipelineLayout; Result result = static_cast( d.vkCreatePipelineLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipelineLayout ) ) ); - PipelineLayoutDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, pipelineLayout, "VULKAN_HPP_NAMESPACE::Device::createPipelineLayoutUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -30907,6 +30705,19 @@ public: } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + VULKAN_HPP_INLINE void Device::destroy( PipelineLayout pipelineLayout, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyPipelineLayout( m_device, static_cast( pipelineLayout ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroy( PipelineLayout pipelineLayout, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyPipelineLayout( m_device, static_cast( pipelineLayout ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template VULKAN_HPP_INLINE Result Device::createSampler( const SamplerCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Sampler* pSampler, Dispatch const &d) const { @@ -30927,7 +30738,7 @@ public: Sampler sampler; Result result = static_cast( d.vkCreateSampler( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &sampler ) ) ); - SamplerDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, sampler, "VULKAN_HPP_NAMESPACE::Device::createSamplerUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -30946,6 +30757,19 @@ public: } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + VULKAN_HPP_INLINE void Device::destroy( Sampler sampler, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroySampler( m_device, static_cast( sampler ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroy( Sampler sampler, Optional allocator, Dispatch const &d ) const + { + d.vkDestroySampler( m_device, static_cast( sampler ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template VULKAN_HPP_INLINE Result Device::createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorSetLayout* pSetLayout, Dispatch const &d) const { @@ -30966,7 +30790,7 @@ public: DescriptorSetLayout setLayout; Result result = static_cast( d.vkCreateDescriptorSetLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &setLayout ) ) ); - DescriptorSetLayoutDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, setLayout, "VULKAN_HPP_NAMESPACE::Device::createDescriptorSetLayoutUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -30985,6 +30809,19 @@ public: } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + VULKAN_HPP_INLINE void Device::destroy( DescriptorSetLayout descriptorSetLayout, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyDescriptorSetLayout( m_device, static_cast( descriptorSetLayout ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroy( DescriptorSetLayout descriptorSetLayout, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyDescriptorSetLayout( m_device, static_cast( descriptorSetLayout ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template VULKAN_HPP_INLINE Result Device::createDescriptorPool( const DescriptorPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorPool* pDescriptorPool, Dispatch const &d) const { @@ -31005,7 +30842,7 @@ public: DescriptorPool descriptorPool; Result result = static_cast( d.vkCreateDescriptorPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &descriptorPool ) ) ); - DescriptorPoolDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, descriptorPool, "VULKAN_HPP_NAMESPACE::Device::createDescriptorPoolUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -31024,6 +30861,19 @@ public: } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + VULKAN_HPP_INLINE void Device::destroy( DescriptorPool descriptorPool, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyDescriptorPool( m_device, static_cast( descriptorPool ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroy( DescriptorPool descriptorPool, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyDescriptorPool( m_device, static_cast( descriptorPool ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE Result Device::resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags, Dispatch const &d) const @@ -31062,7 +30912,7 @@ public: DescriptorSet* buffer = reinterpret_cast( reinterpret_cast( descriptorSets.data() ) + allocateInfo.descriptorSetCount * ( sizeof( UniqueDescriptorSet ) - sizeof( DescriptorSet ) ) ); Result result = static_cast(d.vkAllocateDescriptorSets( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( buffer ) ) ); - DescriptorSetDeleter deleter( *this, allocateInfo.descriptorPool ); + PoolDeleter deleter( *this, allocateInfo.descriptorPool ); for ( size_t i=0 ; i + VULKAN_HPP_INLINE Result Device::free( DescriptorPool descriptorPool, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets, Dispatch const &d) const + { + return static_cast( d.vkFreeDescriptorSets( m_device, static_cast( descriptorPool ), descriptorSetCount, reinterpret_cast( pDescriptorSets ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE ResultValueType::type Device::free( DescriptorPool descriptorPool, ArrayProxy descriptorSets, Dispatch const &d ) const + { + Result result = static_cast( d.vkFreeDescriptorSets( m_device, static_cast( descriptorPool ), descriptorSets.size() , reinterpret_cast( descriptorSets.data() ) ) ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::free" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template VULKAN_HPP_INLINE void Device::updateDescriptorSets( uint32_t descriptorWriteCount, const WriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const CopyDescriptorSet* pDescriptorCopies, Dispatch const &d) const { @@ -31120,7 +30984,7 @@ public: Framebuffer framebuffer; Result result = static_cast( d.vkCreateFramebuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &framebuffer ) ) ); - FramebufferDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, framebuffer, "VULKAN_HPP_NAMESPACE::Device::createFramebufferUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -31139,6 +31003,19 @@ public: } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + VULKAN_HPP_INLINE void Device::destroy( Framebuffer framebuffer, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyFramebuffer( m_device, static_cast( framebuffer ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroy( Framebuffer framebuffer, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyFramebuffer( m_device, static_cast( framebuffer ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template VULKAN_HPP_INLINE Result Device::createRenderPass( const RenderPassCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, RenderPass* pRenderPass, Dispatch const &d) const { @@ -31159,7 +31036,7 @@ public: RenderPass renderPass; Result result = static_cast( d.vkCreateRenderPass( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &renderPass ) ) ); - RenderPassDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, renderPass, "VULKAN_HPP_NAMESPACE::Device::createRenderPassUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -31178,6 +31055,19 @@ public: } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + VULKAN_HPP_INLINE void Device::destroy( RenderPass renderPass, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyRenderPass( m_device, static_cast( renderPass ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroy( RenderPass renderPass, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyRenderPass( m_device, static_cast( renderPass ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template VULKAN_HPP_INLINE void Device::getRenderAreaGranularity( RenderPass renderPass, Extent2D* pGranularity, Dispatch const &d) const { @@ -31213,7 +31103,7 @@ public: CommandPool commandPool; Result result = static_cast( d.vkCreateCommandPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &commandPool ) ) ); - CommandPoolDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, commandPool, "VULKAN_HPP_NAMESPACE::Device::createCommandPoolUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -31232,6 +31122,19 @@ public: } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + VULKAN_HPP_INLINE void Device::destroy( CommandPool commandPool, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyCommandPool( m_device, static_cast( commandPool ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroy( CommandPool commandPool, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyCommandPool( m_device, static_cast( commandPool ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE Result Device::resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags, Dispatch const &d) const @@ -31270,7 +31173,7 @@ public: CommandBuffer* buffer = reinterpret_cast( reinterpret_cast( commandBuffers.data() ) + allocateInfo.commandBufferCount * ( sizeof( UniqueCommandBuffer ) - sizeof( CommandBuffer ) ) ); Result result = static_cast(d.vkAllocateCommandBuffers( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( buffer ) ) ); - CommandBufferDeleter deleter( *this, allocateInfo.commandPool ); + PoolDeleter deleter( *this, allocateInfo.commandPool ); for ( size_t i=0 ; i + VULKAN_HPP_INLINE void Device::free( CommandPool commandPool, uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers, Dispatch const &d) const + { + d.vkFreeCommandBuffers( m_device, static_cast( commandPool ), commandBufferCount, reinterpret_cast( pCommandBuffers ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::free( CommandPool commandPool, ArrayProxy commandBuffers, Dispatch const &d ) const + { + d.vkFreeCommandBuffers( m_device, static_cast( commandPool ), commandBuffers.size() , reinterpret_cast( commandBuffers.data() ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template VULKAN_HPP_INLINE Result Device::createSharedSwapchainsKHR( uint32_t swapchainCount, const SwapchainCreateInfoKHR* pCreateInfos, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchains, Dispatch const &d) const { @@ -31324,7 +31240,7 @@ public: SwapchainKHR* buffer = reinterpret_cast( reinterpret_cast( swapchainKHRs.data() ) + createInfos.size() * ( sizeof( UniqueSwapchainKHR ) - sizeof( SwapchainKHR ) ) ); Result result = static_cast(d.vkCreateSharedSwapchainsKHR( m_device, createInfos.size() , reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( buffer ) ) ); - SwapchainKHRDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); for ( size_t i=0 ; i( d.vkCreateSharedSwapchainsKHR( m_device, 1 , reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &swapchain ) ) ); - SwapchainKHRDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, swapchain, "VULKAN_HPP_NAMESPACE::Device::createSharedSwapchainKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -31364,7 +31280,7 @@ public: SwapchainKHR swapchain; Result result = static_cast( d.vkCreateSwapchainKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &swapchain ) ) ); - SwapchainKHRDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, swapchain, "VULKAN_HPP_NAMESPACE::Device::createSwapchainKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -31383,6 +31299,19 @@ public: } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + VULKAN_HPP_INLINE void Device::destroy( SwapchainKHR swapchain, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroySwapchainKHR( m_device, static_cast( swapchain ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroy( SwapchainKHR swapchain, Optional allocator, Dispatch const &d ) const + { + d.vkDestroySwapchainKHR( m_device, static_cast( swapchain ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template VULKAN_HPP_INLINE Result Device::getSwapchainImagesKHR( SwapchainKHR swapchain, uint32_t* pSwapchainImageCount, Image* pSwapchainImages, Dispatch const &d) const { @@ -31490,7 +31419,7 @@ public: IndirectCommandsLayoutNVX indirectCommandsLayout; Result result = static_cast( d.vkCreateIndirectCommandsLayoutNVX( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &indirectCommandsLayout ) ) ); - IndirectCommandsLayoutNVXDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, indirectCommandsLayout, "VULKAN_HPP_NAMESPACE::Device::createIndirectCommandsLayoutNVXUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -31509,6 +31438,19 @@ public: } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + VULKAN_HPP_INLINE void Device::destroy( IndirectCommandsLayoutNVX indirectCommandsLayout, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyIndirectCommandsLayoutNVX( m_device, static_cast( indirectCommandsLayout ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroy( IndirectCommandsLayoutNVX indirectCommandsLayout, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyIndirectCommandsLayoutNVX( m_device, static_cast( indirectCommandsLayout ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template VULKAN_HPP_INLINE Result Device::createObjectTableNVX( const ObjectTableCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, ObjectTableNVX* pObjectTable, Dispatch const &d) const { @@ -31529,7 +31471,7 @@ public: ObjectTableNVX objectTable; Result result = static_cast( d.vkCreateObjectTableNVX( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &objectTable ) ) ); - ObjectTableNVXDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, objectTable, "VULKAN_HPP_NAMESPACE::Device::createObjectTableNVXUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -31548,6 +31490,19 @@ public: } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + VULKAN_HPP_INLINE void Device::destroy( ObjectTableNVX objectTable, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyObjectTableNVX( m_device, static_cast( objectTable ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroy( ObjectTableNVX objectTable, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyObjectTableNVX( m_device, static_cast( objectTable ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template VULKAN_HPP_INLINE Result Device::registerObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectTableEntryNVX* const* ppObjectTableEntries, const uint32_t* pObjectIndices, Dispatch const &d) const { @@ -31961,7 +31916,7 @@ public: DescriptorUpdateTemplateKHR descriptorUpdateTemplate; Result result = static_cast( d.vkCreateDescriptorUpdateTemplateKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &descriptorUpdateTemplate ) ) ); - DescriptorUpdateTemplateKHRDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, descriptorUpdateTemplate, "VULKAN_HPP_NAMESPACE::Device::createDescriptorUpdateTemplateKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -31980,6 +31935,19 @@ public: } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + VULKAN_HPP_INLINE void Device::destroy( DescriptorUpdateTemplateKHR descriptorUpdateTemplate, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyDescriptorUpdateTemplateKHR( m_device, static_cast( descriptorUpdateTemplate ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroy( DescriptorUpdateTemplateKHR descriptorUpdateTemplate, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyDescriptorUpdateTemplateKHR( m_device, static_cast( descriptorUpdateTemplate ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::updateDescriptorSetWithTemplateKHR( DescriptorSet descriptorSet, DescriptorUpdateTemplateKHR descriptorUpdateTemplate, const void* pData, Dispatch const &d) const @@ -32150,7 +32118,7 @@ public: SamplerYcbcrConversionKHR ycbcrConversion; Result result = static_cast( d.vkCreateSamplerYcbcrConversionKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &ycbcrConversion ) ) ); - SamplerYcbcrConversionKHRDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, ycbcrConversion, "VULKAN_HPP_NAMESPACE::Device::createSamplerYcbcrConversionKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -32169,6 +32137,19 @@ public: } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + VULKAN_HPP_INLINE void Device::destroy( SamplerYcbcrConversionKHR ycbcrConversion, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroySamplerYcbcrConversionKHR( m_device, static_cast( ycbcrConversion ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroy( SamplerYcbcrConversionKHR ycbcrConversion, Optional allocator, Dispatch const &d ) const + { + d.vkDestroySamplerYcbcrConversionKHR( m_device, static_cast( ycbcrConversion ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template VULKAN_HPP_INLINE Result Device::createValidationCacheEXT( const ValidationCacheCreateInfoEXT* pCreateInfo, const AllocationCallbacks* pAllocator, ValidationCacheEXT* pValidationCache, Dispatch const &d) const { @@ -32189,7 +32170,7 @@ public: ValidationCacheEXT validationCache; Result result = static_cast( d.vkCreateValidationCacheEXT( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &validationCache ) ) ); - ValidationCacheEXTDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, validationCache, "VULKAN_HPP_NAMESPACE::Device::createValidationCacheEXTUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -32208,6 +32189,19 @@ public: } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + VULKAN_HPP_INLINE void Device::destroy( ValidationCacheEXT validationCache, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyValidationCacheEXT( m_device, static_cast( validationCache ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroy( ValidationCacheEXT validationCache, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyValidationCacheEXT( m_device, static_cast( validationCache ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template VULKAN_HPP_INLINE Result Device::getValidationCacheDataEXT( ValidationCacheEXT validationCache, size_t* pDataSize, void* pData, Dispatch const &d) const { @@ -32292,8 +32286,9 @@ public: #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifndef VULKAN_HPP_NO_SMART_HANDLE - class DeviceDeleter; - template <> class UniqueHandleTraits {public: using deleter = DeviceDeleter; }; + class PhysicalDevice; + + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; using UniqueDevice = UniqueHandle; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -32702,27 +32697,6 @@ public: static_assert( sizeof( PhysicalDevice ) == sizeof( VkPhysicalDevice ), "handle and wrapper have different size!" ); -#ifndef VULKAN_HPP_NO_SMART_HANDLE - class DeviceDeleter - { - public: - DeviceDeleter( Optional allocator = nullptr ) - : m_allocator( allocator ) - {} - - Optional getAllocator() const { return m_allocator; } - - protected: - void destroy( Device device ) - { - device.destroy( m_allocator ); - } - - private: - Optional m_allocator; - }; -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ - template VULKAN_HPP_INLINE void PhysicalDevice::getProperties( PhysicalDeviceProperties* pProperties, Dispatch const &d) const { @@ -32836,7 +32810,7 @@ public: Device device; Result result = static_cast( d.vkCreateDevice( m_physicalDevice, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &device ) ) ); - DeviceDeleter deleter( allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, device, "VULKAN_HPP_NAMESPACE::PhysicalDevice::createDeviceUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -33747,11 +33721,11 @@ public: static_assert( sizeof( PhysicalDeviceGroupPropertiesKHX ) == sizeof( VkPhysicalDeviceGroupPropertiesKHX ), "struct and wrapper have different size!" ); #ifndef VULKAN_HPP_NO_SMART_HANDLE - class DebugReportCallbackEXTDeleter; - template <> class UniqueHandleTraits {public: using deleter = DebugReportCallbackEXTDeleter; }; + class Instance; + + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; using UniqueDebugReportCallbackEXT = UniqueHandle; - class SurfaceKHRDeleter; - template <> class UniqueHandleTraits {public: using deleter = SurfaceKHRDeleter; }; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; using UniqueSurfaceKHR = UniqueHandle; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -33864,6 +33838,13 @@ public: void destroySurfaceKHR( SurfaceKHR surface, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + void destroy( SurfaceKHR surface, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroy( SurfaceKHR surface, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + #ifdef VK_USE_PLATFORM_VI_NN template Result createViSurfaceNN( const ViSurfaceCreateInfoNN* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d = Dispatch() ) const; @@ -33947,6 +33928,13 @@ public: void destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + void destroy( DebugReportCallbackEXT callback, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroy( DebugReportCallbackEXT callback, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template void debugReportMessageEXT( DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE @@ -34010,52 +33998,6 @@ public: static_assert( sizeof( Instance ) == sizeof( VkInstance ), "handle and wrapper have different size!" ); -#ifndef VULKAN_HPP_NO_SMART_HANDLE - class DebugReportCallbackEXTDeleter - { - public: - DebugReportCallbackEXTDeleter( Instance instance = Instance(), Optional allocator = nullptr ) - : m_instance( instance ) - , m_allocator( allocator ) - {} - - Instance getInstance() const { return m_instance; } - Optional getAllocator() const { return m_allocator; } - - protected: - void destroy( DebugReportCallbackEXT debugReportCallbackEXT ) - { - m_instance.destroyDebugReportCallbackEXT( debugReportCallbackEXT, m_allocator ); - } - - private: - Instance m_instance; - Optional m_allocator; - }; - - class SurfaceKHRDeleter - { - public: - SurfaceKHRDeleter( Instance instance = Instance(), Optional allocator = nullptr ) - : m_instance( instance ) - , m_allocator( allocator ) - {} - - Instance getInstance() const { return m_instance; } - Optional getAllocator() const { return m_allocator; } - - protected: - void destroy( SurfaceKHR surfaceKHR ) - { - m_instance.destroySurfaceKHR( surfaceKHR, m_allocator ); - } - - private: - Instance m_instance; - Optional m_allocator; - }; -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ - template VULKAN_HPP_INLINE void Instance::destroy( const AllocationCallbacks* pAllocator, Dispatch const &d) const { @@ -34130,7 +34072,7 @@ public: SurfaceKHR surface; Result result = static_cast( d.vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - SurfaceKHRDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createAndroidSurfaceKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -34157,7 +34099,7 @@ public: SurfaceKHR surface; Result result = static_cast( d.vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - SurfaceKHRDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createDisplayPlaneSurfaceKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -34184,7 +34126,7 @@ public: SurfaceKHR surface; Result result = static_cast( d.vkCreateMirSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - SurfaceKHRDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createMirSurfaceKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -34204,6 +34146,19 @@ public: } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + VULKAN_HPP_INLINE void Instance::destroy( SurfaceKHR surface, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroySurfaceKHR( m_instance, static_cast( surface ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Instance::destroy( SurfaceKHR surface, Optional allocator, Dispatch const &d ) const + { + d.vkDestroySurfaceKHR( m_instance, static_cast( surface ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + #ifdef VK_USE_PLATFORM_VI_NN template VULKAN_HPP_INLINE Result Instance::createViSurfaceNN( const ViSurfaceCreateInfoNN* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d) const @@ -34225,7 +34180,7 @@ public: SurfaceKHR surface; Result result = static_cast( d.vkCreateViSurfaceNN( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - SurfaceKHRDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createViSurfaceNNUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -34253,7 +34208,7 @@ public: SurfaceKHR surface; Result result = static_cast( d.vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - SurfaceKHRDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createWaylandSurfaceKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -34281,7 +34236,7 @@ public: SurfaceKHR surface; Result result = static_cast( d.vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - SurfaceKHRDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createWin32SurfaceKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -34309,7 +34264,7 @@ public: SurfaceKHR surface; Result result = static_cast( d.vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - SurfaceKHRDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createXlibSurfaceKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -34337,7 +34292,7 @@ public: SurfaceKHR surface; Result result = static_cast( d.vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - SurfaceKHRDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createXcbSurfaceKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -34364,7 +34319,7 @@ public: DebugReportCallbackEXT callback; Result result = static_cast( d.vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &callback ) ) ); - DebugReportCallbackEXTDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, callback, "VULKAN_HPP_NAMESPACE::Instance::createDebugReportCallbackEXTUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -34383,6 +34338,19 @@ public: } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + VULKAN_HPP_INLINE void Instance::destroy( DebugReportCallbackEXT callback, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyDebugReportCallbackEXT( m_instance, static_cast( callback ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Instance::destroy( DebugReportCallbackEXT callback, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyDebugReportCallbackEXT( m_instance, static_cast( callback ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template VULKAN_HPP_INLINE void Instance::debugReportMessageEXT( DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage, Dispatch const &d) const { @@ -34452,7 +34420,7 @@ public: SurfaceKHR surface; Result result = static_cast( d.vkCreateIOSSurfaceMVK( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - SurfaceKHRDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createIOSSurfaceMVKUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -34480,7 +34448,7 @@ public: SurfaceKHR surface; Result result = static_cast( d.vkCreateMacOSSurfaceMVK( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - SurfaceKHRDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createMacOSSurfaceMVKUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -34552,8 +34520,8 @@ public: static_assert( sizeof( DeviceGroupDeviceCreateInfoKHX ) == sizeof( VkDeviceGroupDeviceCreateInfoKHX ), "struct and wrapper have different size!" ); #ifndef VULKAN_HPP_NO_SMART_HANDLE - class InstanceDeleter; - template <> class UniqueHandleTraits {public: using deleter = InstanceDeleter; }; + + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; using UniqueInstance = UniqueHandle; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -34568,27 +34536,6 @@ public: #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifndef VULKAN_HPP_NO_SMART_HANDLE - class InstanceDeleter - { - public: - InstanceDeleter( Optional allocator = nullptr ) - : m_allocator( allocator ) - {} - - Optional getAllocator() const { return m_allocator; } - - protected: - void destroy( Instance instance ) - { - instance.destroy( m_allocator ); - } - - private: - Optional m_allocator; - }; -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ - template VULKAN_HPP_INLINE Result createInstance( const InstanceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Instance* pInstance, Dispatch const &d) { @@ -34609,7 +34556,7 @@ public: Instance instance; Result result = static_cast( d.vkCreateInstance( reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &instance ) ) ); - InstanceDeleter deleter( allocator ); + ObjectDeleter deleter( allocator ); return createResultValue( result, instance, "VULKAN_HPP_NAMESPACE::createInstanceUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/