diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index d68901e..087b9fa 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -4047,12 +4047,14 @@ std::string VulkanHppGenerator::constructCommandResultGetHandleUnique( std::stri std::string objectDeleter, allocator; if ( ( name.find( "Acquire" ) != std::string::npos ) || ( name.find( "Get" ) != std::string::npos ) ) { - if( ( name == "vkAcquirePerformanceConfigurationINTEL" ) || ( name == "vkGetRandROutputDisplayEXT" ) ) { + if ( ( name == "vkAcquirePerformanceConfigurationINTEL" ) || ( name == "vkGetRandROutputDisplayEXT" ) || + ( name == "vkGetWinrtDisplayNV" ) ) + { objectDeleter = "ObjectRelease"; - } else if ( (name == "vkAcquireWinrtDisplayNV") || (name == "vkGetWinrtDisplayNV") ) { - objectDeleter = "ObjectReleaseExt"; - } else { - throw std::runtime_error( "Found " + name + " which requires special handling for the object deleter"); + } + else + { + throw std::runtime_error( "Found " + name + " which requires special handling for the object deleter" ); } } else if ( name.find( "Allocate" ) != std::string::npos ) @@ -6623,12 +6625,13 @@ void VulkanHppGenerator::checkCorrectness() if ( objectTypeValue.vkValue != "eUnknown" ) { warn( std::find_if( m_handles.begin(), - m_handles.end(), - [&objectTypeValue]( std::pair const & hd ) { - return hd.second.objTypeEnum == objectTypeValue.vulkanValue; - } ) != m_handles.end(), - objectTypeValue.xmlLine, - "VkObjectType value <" + objectTypeValue.vulkanValue + "> not specified as \"objtypeenum\" for any handle" ); + m_handles.end(), + [&objectTypeValue]( std::pair const & hd ) { + return hd.second.objTypeEnum == objectTypeValue.vulkanValue; + } ) != m_handles.end(), + objectTypeValue.xmlLine, + "VkObjectType value <" + objectTypeValue.vulkanValue + + "> not specified as \"objtypeenum\" for any handle" ); } } @@ -10427,36 +10430,6 @@ int main( int argc, char ** argv ) OwnerType m_owner = {}; Dispatch const * m_dispatch = nullptr; }; - - template - class ObjectReleaseExt - { - public: - ObjectReleaseExt() = default; - - ObjectReleaseExt( OwnerType owner, Dispatch const & dispatch = VULKAN_HPP_DEFAULT_DISPATCHER ) VULKAN_HPP_NOEXCEPT - : m_owner( owner ) - , m_dispatch( &dispatch ) - {} - - OwnerType getOwner() const VULKAN_HPP_NOEXCEPT - { - return m_owner; - } - - protected: - template - void destroy( T t ) VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( m_owner && m_dispatch ); - m_owner.releaseExt( t, *m_dispatch ); - } - - private: - OwnerType m_owner = {}; - Dispatch const * m_dispatch = nullptr; - }; - )"; static const std::string classOptional = R"( diff --git a/vulkan/vulkan.hpp b/vulkan/vulkan.hpp index 527db10..bb90dea 100644 --- a/vulkan/vulkan.hpp +++ b/vulkan/vulkan.hpp @@ -5017,35 +5017,6 @@ namespace VULKAN_HPP_NAMESPACE Dispatch const * m_dispatch = nullptr; }; - template - class ObjectReleaseExt - { - public: - ObjectReleaseExt() = default; - - ObjectReleaseExt( OwnerType owner, Dispatch const & dispatch = VULKAN_HPP_DEFAULT_DISPATCHER ) VULKAN_HPP_NOEXCEPT - : m_owner( owner ) - , m_dispatch( &dispatch ) - {} - - OwnerType getOwner() const VULKAN_HPP_NOEXCEPT - { - return m_owner; - } - - protected: - template - void destroy( T t ) VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( m_owner && m_dispatch ); - m_owner.releaseExt( t, *m_dispatch ); - } - - private: - OwnerType m_owner = {}; - Dispatch const * m_dispatch = nullptr; - }; - template class PoolFree {