From de79787457d6625f96a57ef947acfe51f6f0705b Mon Sep 17 00:00:00 2001 From: asuessenbach Date: Mon, 7 Dec 2020 09:26:48 +0100 Subject: [PATCH] Fix issue on name construction for objtypeenum attribute --- VulkanHppGenerator.cpp | 2 +- vulkan/vulkan.hpp | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 9b7355c..d68901e 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -2828,7 +2828,7 @@ ${CppTypeFromDebugReportObjectTypeEXT} { "debugReportObjectType", debugReportObjectType }, { "enter", enter }, { "memberName", startLowerCase( stripPrefix( handleData.first, "Vk" ) ) }, - { "objTypeEnum", valueIt->vkValue } } ); + { "objTypeEnum", objTypeEnum } } ); if ( !handleData.second.alias.empty() ) { diff --git a/vulkan/vulkan.hpp b/vulkan/vulkan.hpp index bb90dea..527db10 100644 --- a/vulkan/vulkan.hpp +++ b/vulkan/vulkan.hpp @@ -5017,6 +5017,35 @@ 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 {