From 3a1d6cbcab3a1aa57648e2d85389dbfb088bb8cc Mon Sep 17 00:00:00 2001 From: Michael Ferrari Date: Wed, 3 May 2023 12:03:28 +0200 Subject: [PATCH] Expose the dispatch member of deleters (#1569) --- snippets/ObjectDestroy.hpp | 2 ++ snippets/ObjectFree.hpp | 5 +++++ snippets/ObjectRelease.hpp | 5 +++++ snippets/PoolFree.hpp | 1 + 4 files changed, 13 insertions(+) diff --git a/snippets/ObjectDestroy.hpp b/snippets/ObjectDestroy.hpp index 885fbd1..2029d4e 100644 --- a/snippets/ObjectDestroy.hpp +++ b/snippets/ObjectDestroy.hpp @@ -17,6 +17,7 @@ OwnerType getOwner() const VULKAN_HPP_NOEXCEPT { return m_owner; } Optional getAllocator() const VULKAN_HPP_NOEXCEPT { return m_allocationCallbacks; } + Dispatch const & getDispatch() const VULKAN_HPP_NOEXCEPT { return *m_dispatch; } protected: template @@ -47,6 +48,7 @@ {} Optional getAllocator() const VULKAN_HPP_NOEXCEPT { return m_allocationCallbacks; } + Dispatch const & getDispatch() const VULKAN_HPP_NOEXCEPT { return *m_dispatch; } protected: template diff --git a/snippets/ObjectFree.hpp b/snippets/ObjectFree.hpp index 0cdcc89..2044edf 100644 --- a/snippets/ObjectFree.hpp +++ b/snippets/ObjectFree.hpp @@ -22,6 +22,11 @@ return m_allocationCallbacks; } + Dispatch const & getDispatch() const VULKAN_HPP_NOEXCEPT + { + return *m_dispatch; + } + protected: template void destroy( T t ) VULKAN_HPP_NOEXCEPT diff --git a/snippets/ObjectRelease.hpp b/snippets/ObjectRelease.hpp index 344e41f..b357ccf 100644 --- a/snippets/ObjectRelease.hpp +++ b/snippets/ObjectRelease.hpp @@ -15,6 +15,11 @@ return m_owner; } + Dispatch const & getDispatch() const VULKAN_HPP_NOEXCEPT + { + return *m_dispatch; + } + protected: template void destroy( T t ) VULKAN_HPP_NOEXCEPT diff --git a/snippets/PoolFree.hpp b/snippets/PoolFree.hpp index dba1249..16a6324 100644 --- a/snippets/PoolFree.hpp +++ b/snippets/PoolFree.hpp @@ -14,6 +14,7 @@ OwnerType getOwner() const VULKAN_HPP_NOEXCEPT { return m_owner; } PoolType getPool() const VULKAN_HPP_NOEXCEPT { return m_pool; } + Dispatch const & getDispatch() const VULKAN_HPP_NOEXCEPT { return *m_dispatch; } protected: template