Compare commits
3 Commits
c75dcdc0bb
...
9747e68285
| Author | SHA1 | Date |
|---|---|---|
|
|
9747e68285 | |
|
|
7c480ca5aa | |
|
|
5cd5bcf6de |
|
|
@ -1710,7 +1710,7 @@ void VulkanHppGenerator::extendSpecialCommands( std::string const & name, bool d
|
||||||
cmd.insert(
|
cmd.insert(
|
||||||
pos,
|
pos,
|
||||||
R"( // wrapper function for command vkSetDebugUtilsObjectNameEXT, see https://registry.khronos.org/vulkan/specs/latest/man/html/vkSetDebugUtilsObjectNameEXT.html
|
R"( // wrapper function for command vkSetDebugUtilsObjectNameEXT, see https://registry.khronos.org/vulkan/specs/latest/man/html/vkSetDebugUtilsObjectNameEXT.html
|
||||||
template <typename HandleType, typename Dispatch>
|
template <typename HandleType, typename Dispatch, typename std::enable_if<detail::isDispatchLoader<Dispatch>::value, bool>::type>
|
||||||
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<void>::type
|
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<void>::type
|
||||||
Device::setDebugUtilsObjectNameEXT( HandleType const & handle, std::string const & name, Dispatch const & d ) const
|
Device::setDebugUtilsObjectNameEXT( HandleType const & handle, std::string const & name, Dispatch const & d ) const
|
||||||
{
|
{
|
||||||
|
|
@ -1728,7 +1728,7 @@ void VulkanHppGenerator::extendSpecialCommands( std::string const & name, bool d
|
||||||
{
|
{
|
||||||
cmd.insert( pos, R"( // wrapper function for command vkSetDebugUtilsObjectNameEXT, see
|
cmd.insert( pos, R"( // wrapper function for command vkSetDebugUtilsObjectNameEXT, see
|
||||||
// https://registry.khronos.org/vulkan/specs/latest/man/html/vkSetDebugUtilsObjectNameEXT.html
|
// https://registry.khronos.org/vulkan/specs/latest/man/html/vkSetDebugUtilsObjectNameEXT.html
|
||||||
template <typename HandleType, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
template <typename HandleType, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if<detail::isDispatchLoader<Dispatch>::value, bool>::type = true>
|
||||||
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType<void>::type
|
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType<void>::type
|
||||||
setDebugUtilsObjectNameEXT( HandleType const & handle, std::string const & name, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
setDebugUtilsObjectNameEXT( HandleType const & handle, std::string const & name, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
||||||
)" );
|
)" );
|
||||||
|
|
@ -1781,7 +1781,7 @@ void VulkanHppGenerator::extendSpecialCommands( std::string const & name, bool d
|
||||||
cmd.insert(
|
cmd.insert(
|
||||||
pos,
|
pos,
|
||||||
R"( // wrapper function for command vkSetDebugUtilsObjectTagEXT, see https://registry.khronos.org/vulkan/specs/latest/man/html/vkSetDebugUtilsObjectTagEXT.html
|
R"( // wrapper function for command vkSetDebugUtilsObjectTagEXT, see https://registry.khronos.org/vulkan/specs/latest/man/html/vkSetDebugUtilsObjectTagEXT.html
|
||||||
template <typename HandleType, typename TagType, typename Dispatch>
|
template <typename HandleType, typename TagType, typename Dispatch, typename std::enable_if<detail::isDispatchLoader<Dispatch>::value, bool>::type>
|
||||||
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<void>::type
|
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<void>::type
|
||||||
Device::setDebugUtilsObjectTagEXT( HandleType const & handle, uint64_t name, TagType const & tag, Dispatch const & d ) const
|
Device::setDebugUtilsObjectTagEXT( HandleType const & handle, uint64_t name, TagType const & tag, Dispatch const & d ) const
|
||||||
{
|
{
|
||||||
|
|
@ -1801,7 +1801,7 @@ void VulkanHppGenerator::extendSpecialCommands( std::string const & name, bool d
|
||||||
{
|
{
|
||||||
cmd.insert( pos, R"( // wrapper function for command vkSetDebugUtilsObjectTagEXT, see
|
cmd.insert( pos, R"( // wrapper function for command vkSetDebugUtilsObjectTagEXT, see
|
||||||
// https://registry.khronos.org/vulkan/specs/latest/man/html/vkSetDebugUtilsObjectTagEXT.html
|
// https://registry.khronos.org/vulkan/specs/latest/man/html/vkSetDebugUtilsObjectTagEXT.html
|
||||||
template <typename HandleType, typename TagType, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
template <typename HandleType, typename TagType, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if<detail::isDispatchLoader<Dispatch>::value, bool>::type = true>
|
||||||
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType<void>::type setDebugUtilsObjectTagEXT(
|
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType<void>::type setDebugUtilsObjectTagEXT(
|
||||||
HandleType const & handle, uint64_t name, TagType const & tag, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
HandleType const & handle, uint64_t name, TagType const & tag, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
||||||
)" );
|
)" );
|
||||||
|
|
@ -3293,7 +3293,7 @@ std::string VulkanHppGenerator::generateCommandEnhanced( std::string const &
|
||||||
|
|
||||||
std::string const functionTemplate =
|
std::string const functionTemplate =
|
||||||
R"( // wrapper function for command ${vkCommandName}, see https://registry.khronos.org/vulkan/specs/latest/man/html/${vkCommandName}.html
|
R"( // wrapper function for command ${vkCommandName}, see https://registry.khronos.org/vulkan/specs/latest/man/html/${vkCommandName}.html
|
||||||
template <${argumentTemplates}${allocatorTemplates}typename Dispatch${uniqueHandleAllocatorTemplates}${typenameCheck}>
|
template <${argumentTemplates}${allocatorTemplates}typename Dispatch${uniqueHandleAllocatorTemplates}${typenameCheck}, typename std::enable_if<detail::isDispatchLoader<Dispatch>::value, bool>::type>
|
||||||
${nodiscard}VULKAN_HPP_INLINE ${decoratedReturnType} ${className}${classSeparator}${commandName}( ${argumentList} )${const}${noexcept}
|
${nodiscard}VULKAN_HPP_INLINE ${decoratedReturnType} ${className}${classSeparator}${commandName}( ${argumentList} )${const}${noexcept}
|
||||||
{
|
{
|
||||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||||
|
|
@ -3336,7 +3336,7 @@ ${vectorSizeCheck}
|
||||||
{
|
{
|
||||||
std::string const functionTemplate =
|
std::string const functionTemplate =
|
||||||
R"( // wrapper function for command ${vkCommandName}, see https://registry.khronos.org/vulkan/specs/latest/man/html/${vkCommandName}.html
|
R"( // wrapper function for command ${vkCommandName}, see https://registry.khronos.org/vulkan/specs/latest/man/html/${vkCommandName}.html
|
||||||
template <${argumentTemplates}${allocatorTemplates}typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE${uniqueHandleAllocatorTemplates}${typenameCheck}>
|
template <${argumentTemplates}${allocatorTemplates}typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE${uniqueHandleAllocatorTemplates}${typenameCheck}, typename std::enable_if<detail::isDispatchLoader<Dispatch>::value, bool>::type = true>
|
||||||
${nodiscard}${decoratedReturnType} ${commandName}( ${argumentList} )${const}${noexcept};)";
|
${nodiscard}${decoratedReturnType} ${commandName}( ${argumentList} )${const}${noexcept};)";
|
||||||
|
|
||||||
return replaceWithMap( functionTemplate,
|
return replaceWithMap( functionTemplate,
|
||||||
|
|
@ -4487,7 +4487,7 @@ std::string
|
||||||
|
|
||||||
std::string const functionTemplate =
|
std::string const functionTemplate =
|
||||||
R"( // wrapper function for command ${vkCommandName}, see https://registry.khronos.org/vulkan/specs/latest/man/html/${vkCommandName}.html
|
R"( // wrapper function for command ${vkCommandName}, see https://registry.khronos.org/vulkan/specs/latest/man/html/${vkCommandName}.html
|
||||||
template <typename Dispatch>
|
template <typename Dispatch, typename std::enable_if<detail::isDispatchLoader<Dispatch>::value, bool>::type>
|
||||||
${nodiscard}VULKAN_HPP_INLINE ${returnType} ${className}${classSeparator}${commandName}( ${argumentList} )${const} VULKAN_HPP_NOEXCEPT
|
${nodiscard}VULKAN_HPP_INLINE ${returnType} ${className}${classSeparator}${commandName}( ${argumentList} )${const} VULKAN_HPP_NOEXCEPT
|
||||||
{
|
{
|
||||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||||
|
|
@ -4509,7 +4509,7 @@ std::string
|
||||||
{
|
{
|
||||||
std::string const functionTemplate =
|
std::string const functionTemplate =
|
||||||
R"( // wrapper function for command ${vkCommandName}, see https://registry.khronos.org/vulkan/specs/latest/man/html/${vkCommandName}.html
|
R"( // wrapper function for command ${vkCommandName}, see https://registry.khronos.org/vulkan/specs/latest/man/html/${vkCommandName}.html
|
||||||
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if<detail::isDispatchLoader<Dispatch>::value, bool>::type = true>
|
||||||
${nodiscard}${returnType} ${commandName}( ${argumentList} VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )${const} VULKAN_HPP_NOEXCEPT;)";
|
${nodiscard}${returnType} ${commandName}( ${argumentList} VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )${const} VULKAN_HPP_NOEXCEPT;)";
|
||||||
|
|
||||||
return replaceWithMap( functionTemplate,
|
return replaceWithMap( functionTemplate,
|
||||||
|
|
@ -5509,6 +5509,7 @@ std::string VulkanHppGenerator::generateCppModuleUsings() const
|
||||||
#endif /*VK_NO_PROTOTYPES*/
|
#endif /*VK_NO_PROTOTYPES*/
|
||||||
using VULKAN_HPP_NAMESPACE::detail::createResultValueType;
|
using VULKAN_HPP_NAMESPACE::detail::createResultValueType;
|
||||||
using VULKAN_HPP_NAMESPACE::detail::resultCheck;
|
using VULKAN_HPP_NAMESPACE::detail::resultCheck;
|
||||||
|
using VULKAN_HPP_NAMESAPCE::detail::isDispatchLoader;
|
||||||
}
|
}
|
||||||
#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
|
#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
|
||||||
namespace VULKAN_HPP_RAII_NAMESPACE
|
namespace VULKAN_HPP_RAII_NAMESPACE
|
||||||
|
|
@ -6799,7 +6800,14 @@ ${deviceCommandAssignments}
|
||||||
static DynamicLoader dl;
|
static DynamicLoader dl;
|
||||||
init(instance, device, dl);
|
init(instance, device, dl);
|
||||||
}
|
}
|
||||||
};)";
|
};
|
||||||
|
|
||||||
|
template <>
|
||||||
|
struct isDispatchLoader<DispatchLoaderDynamic>
|
||||||
|
{
|
||||||
|
static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true;
|
||||||
|
};
|
||||||
|
)";
|
||||||
|
|
||||||
std::string commandMembers, deviceCommandAssignments, initialCommandAssignments, instanceCommandAssignments;
|
std::string commandMembers, deviceCommandAssignments, initialCommandAssignments, instanceCommandAssignments;
|
||||||
std::set<std::string> listedCommands; // some commands are listed with more than one extension!
|
std::set<std::string> listedCommands; // some commands are listed with more than one extension!
|
||||||
|
|
@ -6902,6 +6910,12 @@ std::string VulkanHppGenerator::generateDispatchLoaderStatic() const
|
||||||
${commands}
|
${commands}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <>
|
||||||
|
struct isDispatchLoader<DispatchLoaderStatic>
|
||||||
|
{
|
||||||
|
static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true;
|
||||||
|
};
|
||||||
|
|
||||||
inline DispatchLoaderStatic & getDispatchLoaderStatic()
|
inline DispatchLoaderStatic & getDispatchLoaderStatic()
|
||||||
{
|
{
|
||||||
static DispatchLoaderStatic dls;
|
static DispatchLoaderStatic dls;
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ module;
|
||||||
#include <vulkan/${api}_shared.hpp>
|
#include <vulkan/${api}_shared.hpp>
|
||||||
|
|
||||||
export module ${api}_hpp;
|
export module ${api}_hpp;
|
||||||
export import std.compat;
|
export import std;
|
||||||
|
|
||||||
export namespace VULKAN_HPP_NAMESPACE
|
export namespace VULKAN_HPP_NAMESPACE
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -20,3 +20,10 @@
|
||||||
bool m_valid = true;
|
bool m_valid = true;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <typename Type>
|
||||||
|
struct isDispatchLoader
|
||||||
|
{
|
||||||
|
static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -317,13 +317,12 @@ namespace VULKAN_HPP_NAMESPACE
|
||||||
# pragma clang diagnostic ignored "-Wcast-function-type"
|
# pragma clang diagnostic ignored "-Wcast-function-type"
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
template <typename HandleType>
|
template <typename HandleType, typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||||
class ObjectDestroyShared
|
class ObjectDestroyShared
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
|
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
|
||||||
|
|
||||||
template <class Dispatcher>
|
|
||||||
using DestroyFunctionPointerType =
|
using DestroyFunctionPointerType =
|
||||||
typename std::conditional<HasDestructor<HandleType>::value,
|
typename std::conditional<HasDestructor<HandleType>::value,
|
||||||
void ( DestructorType::* )( HandleType, const AllocationCallbacks *, const Dispatcher & ) const,
|
void ( DestructorType::* )( HandleType, const AllocationCallbacks *, const Dispatcher & ) const,
|
||||||
|
|
@ -331,10 +330,9 @@ namespace VULKAN_HPP_NAMESPACE
|
||||||
|
|
||||||
using SelectorType = typename std::conditional<HasDestructor<HandleType>::value, DestructorType, HandleType>::type;
|
using SelectorType = typename std::conditional<HasDestructor<HandleType>::value, DestructorType, HandleType>::type;
|
||||||
|
|
||||||
template <typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
|
||||||
ObjectDestroyShared( Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ASSIGNMENT( nullptr ),
|
ObjectDestroyShared( Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ASSIGNMENT( nullptr ),
|
||||||
const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
||||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &SelectorType::destroy ) ) )
|
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType>( &SelectorType::destroy ) ) )
|
||||||
, m_dispatch( &dispatch )
|
, m_dispatch( &dispatch )
|
||||||
, m_allocationCallbacks( allocationCallbacks )
|
, m_allocationCallbacks( allocationCallbacks )
|
||||||
{
|
{
|
||||||
|
|
@ -356,24 +354,22 @@ namespace VULKAN_HPP_NAMESPACE
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
|
DestroyFunctionPointerType m_destroy = nullptr;
|
||||||
const detail::DispatchLoaderBase * m_dispatch = nullptr;
|
const Dispatcher * m_dispatch = nullptr;
|
||||||
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
|
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename HandleType>
|
template <typename HandleType, typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||||
class ObjectFreeShared
|
class ObjectFreeShared
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
|
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
|
||||||
|
|
||||||
template <class Dispatcher>
|
|
||||||
using DestroyFunctionPointerType = void ( DestructorType::* )( HandleType, const AllocationCallbacks *, const Dispatcher & ) const;
|
using DestroyFunctionPointerType = void ( DestructorType::* )( HandleType, const AllocationCallbacks *, const Dispatcher & ) const;
|
||||||
|
|
||||||
template <class Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
|
||||||
ObjectFreeShared( Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ASSIGNMENT( nullptr ),
|
ObjectFreeShared( Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ASSIGNMENT( nullptr ),
|
||||||
const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
||||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &DestructorType::free ) ) )
|
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType>( &DestructorType::free ) ) )
|
||||||
, m_dispatch( &dispatch )
|
, m_dispatch( &dispatch )
|
||||||
, m_allocationCallbacks( allocationCallbacks )
|
, m_allocationCallbacks( allocationCallbacks )
|
||||||
{
|
{
|
||||||
|
|
@ -387,23 +383,21 @@ namespace VULKAN_HPP_NAMESPACE
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
|
DestroyFunctionPointerType m_destroy = nullptr;
|
||||||
const detail::DispatchLoaderBase * m_dispatch = nullptr;
|
const Dispatcher * m_dispatch = nullptr;
|
||||||
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
|
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename HandleType>
|
template <typename HandleType, typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||||
class ObjectReleaseShared
|
class ObjectReleaseShared
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
|
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
|
||||||
|
|
||||||
template <class Dispatcher>
|
|
||||||
using DestroyFunctionPointerType = void ( DestructorType::* )( HandleType, const Dispatcher & ) const;
|
using DestroyFunctionPointerType = void ( DestructorType::* )( HandleType, const Dispatcher & ) const;
|
||||||
|
|
||||||
template <class Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
|
||||||
ObjectReleaseShared( const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
ObjectReleaseShared( const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
||||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &DestructorType::release ) ) )
|
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType>( &DestructorType::release ) ) )
|
||||||
, m_dispatch( &dispatch )
|
, m_dispatch( &dispatch )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
@ -416,11 +410,11 @@ namespace VULKAN_HPP_NAMESPACE
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
|
DestroyFunctionPointerType m_destroy = nullptr;
|
||||||
const detail::DispatchLoaderBase * m_dispatch = nullptr;
|
const Dispatcher * m_dispatch = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename HandleType, typename PoolType>
|
template <typename HandleType, typename PoolType, typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||||
class PoolFreeShared
|
class PoolFreeShared
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
@ -428,17 +422,14 @@ namespace VULKAN_HPP_NAMESPACE
|
||||||
|
|
||||||
using PoolTypeExport = PoolType;
|
using PoolTypeExport = PoolType;
|
||||||
|
|
||||||
template <class Dispatcher>
|
|
||||||
using ReturnType = decltype( std::declval<DestructorType>().free( PoolType(), 0u, nullptr, Dispatcher() ) );
|
using ReturnType = decltype( std::declval<DestructorType>().free( PoolType(), 0u, nullptr, Dispatcher() ) );
|
||||||
|
|
||||||
template <class Dispatcher>
|
using DestroyFunctionPointerType = ReturnType( DestructorType::* )( PoolType, uint32_t, const HandleType *, const Dispatcher & ) const;
|
||||||
using DestroyFunctionPointerType = ReturnType<Dispatcher> ( DestructorType::* )( PoolType, uint32_t, const HandleType *, const Dispatcher & ) const;
|
|
||||||
|
|
||||||
PoolFreeShared() = default;
|
PoolFreeShared() = default;
|
||||||
|
|
||||||
template <class Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
|
||||||
PoolFreeShared( SharedHandle<PoolType> pool, const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
PoolFreeShared( SharedHandle<PoolType> pool, const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
||||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &DestructorType::free ) ) )
|
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType>( &DestructorType::free ) ) )
|
||||||
, m_dispatch( &dispatch )
|
, m_dispatch( &dispatch )
|
||||||
, m_pool( std::move( pool ) )
|
, m_pool( std::move( pool ) )
|
||||||
{
|
{
|
||||||
|
|
@ -452,9 +443,9 @@ namespace VULKAN_HPP_NAMESPACE
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
|
DestroyFunctionPointerType m_destroy = nullptr;
|
||||||
const detail::DispatchLoaderBase * m_dispatch = nullptr;
|
const Dispatcher * m_dispatch = nullptr;
|
||||||
SharedHandle<PoolType> m_pool{};
|
SharedHandle<PoolType> m_pool{};
|
||||||
};
|
};
|
||||||
|
|
||||||
# if defined( __GNUC__ ) && !defined( __clang__ ) && !defined( __INTEL_COMPILER )
|
# if defined( __GNUC__ ) && !defined( __clang__ ) && !defined( __INTEL_COMPILER )
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
#include <vulkan/${vulkan_h}>
|
||||||
#if !defined( VULKAN_HPP_CXX_MODULE )
|
#if !defined( VULKAN_HPP_CXX_MODULE )
|
||||||
// clang-format off
|
// clang-format off
|
||||||
# include <vulkan/vulkan_hpp_macros.hpp>
|
# include <vulkan/vulkan_hpp_macros.hpp>
|
||||||
|
|
@ -27,9 +28,8 @@
|
||||||
#else
|
#else
|
||||||
# include <cassert>
|
# include <cassert>
|
||||||
# include <cstring>
|
# include <cstring>
|
||||||
import std.compat;
|
import std;
|
||||||
#endif
|
#endif
|
||||||
#include <vulkan/${vulkan_h}>
|
|
||||||
|
|
||||||
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL == 1
|
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL == 1
|
||||||
# if defined( __unix__ ) || defined( __APPLE__ ) || defined( __QNX__ ) || defined( __Fuchsia__ )
|
# if defined( __unix__ ) || defined( __APPLE__ ) || defined( __QNX__ ) || defined( __Fuchsia__ )
|
||||||
|
|
|
||||||
|
|
@ -504,6 +504,66 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||||
queue.bindSparse( bindSparseInfo, fence );
|
queue.bindSparse( bindSparseInfo, fence );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fence commands
|
||||||
|
{
|
||||||
|
vk::Device device;
|
||||||
|
vk::FenceCreateInfo fenceCreateInfo;
|
||||||
|
vk::AllocationCallbacks allocationCallbacks;
|
||||||
|
vk::Fence fence;
|
||||||
|
vk::Result result = device.createFence( &fenceCreateInfo, &allocationCallbacks, &fence );
|
||||||
|
}
|
||||||
|
{
|
||||||
|
vk::Device device;
|
||||||
|
vk::FenceCreateInfo fenceCreateInfo;
|
||||||
|
vk::Fence fence = device.createFence( fenceCreateInfo );
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
vk::Device device;
|
||||||
|
vk::Fence fence;
|
||||||
|
vk::AllocationCallbacks allocationCallbacks;
|
||||||
|
device.destroyFence( fence, &allocationCallbacks );
|
||||||
|
}
|
||||||
|
{
|
||||||
|
vk::Device device;
|
||||||
|
vk::Fence fence;
|
||||||
|
device.destroyFence( fence );
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
vk::Device device;
|
||||||
|
uint32_t fenceCount = 1;
|
||||||
|
vk::Fence fence;
|
||||||
|
vk::Result result = device.resetFences( fenceCount, &fence );
|
||||||
|
}
|
||||||
|
{
|
||||||
|
vk::Device device;
|
||||||
|
vk::Fence fence;
|
||||||
|
device.resetFences( fence );
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
vk::Device device;
|
||||||
|
vk::Fence fence;
|
||||||
|
vk::Result result = device.getFenceStatus( fence );
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
vk::Device device;
|
||||||
|
uint32_t fenceCount = 1;
|
||||||
|
vk::Fence fence;
|
||||||
|
vk::Bool32 waitAll = vk::True;
|
||||||
|
uint64_t timeout = 1000000000;
|
||||||
|
vk::Result result = device.waitForFences( fenceCount, &fence, waitAll, timeout );
|
||||||
|
}
|
||||||
|
{
|
||||||
|
vk::Device device;
|
||||||
|
vk::Fence fence;
|
||||||
|
vk::Bool32 waitAll = vk::True;
|
||||||
|
uint64_t timeout = 1000000000;
|
||||||
|
vk::Result result = device.waitForFences( fence, waitAll, timeout );
|
||||||
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
{
|
{
|
||||||
vk::PhysicalDevice physicalDevice;
|
vk::PhysicalDevice physicalDevice;
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,11 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||||
vk::DeviceCreateInfo deviceCreateInfo;
|
vk::DeviceCreateInfo deviceCreateInfo;
|
||||||
vk::raii::Device device = physicalDevice.createDevice( deviceCreateInfo );
|
vk::raii::Device device = physicalDevice.createDevice( deviceCreateInfo );
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
vk::raii::PhysicalDevice physicalDevice = nullptr;
|
||||||
|
vk::DeviceCreateInfo deviceCreateInfo;
|
||||||
|
vk::raii::Device device( physicalDevice, deviceCreateInfo );
|
||||||
|
}
|
||||||
|
|
||||||
// Extension discovery commands
|
// Extension discovery commands
|
||||||
{
|
{
|
||||||
|
|
@ -136,6 +141,12 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||||
uint32_t queueIndex = 0;
|
uint32_t queueIndex = 0;
|
||||||
vk::raii::Queue queue = device.getQueue( queueFamilyIndex, queueIndex );
|
vk::raii::Queue queue = device.getQueue( queueFamilyIndex, queueIndex );
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
vk::raii::Device device = nullptr;
|
||||||
|
uint32_t queueFamilyIndex = 0;
|
||||||
|
uint32_t queueIndex = 0;
|
||||||
|
vk::raii::Queue queue( device, queueFamilyIndex, queueIndex );
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
vk::raii::Queue queue = nullptr;
|
vk::raii::Queue queue = nullptr;
|
||||||
|
|
@ -160,6 +171,11 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||||
vk::MemoryAllocateInfo memoryAllocateInfo;
|
vk::MemoryAllocateInfo memoryAllocateInfo;
|
||||||
vk::raii::DeviceMemory deviceMemory = device.allocateMemory( memoryAllocateInfo );
|
vk::raii::DeviceMemory deviceMemory = device.allocateMemory( memoryAllocateInfo );
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
vk::raii::Device device = nullptr;
|
||||||
|
vk::MemoryAllocateInfo memoryAllocateInfo;
|
||||||
|
vk::raii::DeviceMemory deviceMemory( device, memoryAllocateInfo );
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
vk::raii::DeviceMemory deviceMemory = nullptr;
|
vk::raii::DeviceMemory deviceMemory = nullptr;
|
||||||
|
|
@ -240,5 +256,36 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||||
queue.bindSparse( bindSparseInfo, fence );
|
queue.bindSparse( bindSparseInfo, fence );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fence commands
|
||||||
|
{
|
||||||
|
vk::raii::Device device = nullptr;
|
||||||
|
vk::FenceCreateInfo fenceCreateInfo;
|
||||||
|
vk::raii::Fence fence = device.createFence( fenceCreateInfo );
|
||||||
|
}
|
||||||
|
{
|
||||||
|
vk::raii::Device device = nullptr;
|
||||||
|
vk::FenceCreateInfo fenceCreateInfo;
|
||||||
|
vk::raii::Fence fence( device, fenceCreateInfo );
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
vk::raii::Device device = nullptr;
|
||||||
|
vk::Fence fence;
|
||||||
|
device.resetFences( fence );
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
vk::raii::Fence fence = nullptr;
|
||||||
|
vk::Result result = fence.getStatus();
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
vk::raii::Device device = nullptr;
|
||||||
|
vk::Fence fence;
|
||||||
|
vk::Bool32 waitAll = vk::True;
|
||||||
|
uint64_t timeout = 1000000000;
|
||||||
|
vk::Result result = device.waitForFences( fence, waitAll, timeout );
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ VULKAN_HPP_COMPILE_WARNING( VULKAN_HPP_CXX_MODULE_EXPERIMENTAL_WARNING )
|
||||||
#include <vulkan/vulkan_shared.hpp>
|
#include <vulkan/vulkan_shared.hpp>
|
||||||
|
|
||||||
export module vulkan_hpp;
|
export module vulkan_hpp;
|
||||||
export import std.compat;
|
export import std;
|
||||||
|
|
||||||
export namespace VULKAN_HPP_NAMESPACE
|
export namespace VULKAN_HPP_NAMESPACE
|
||||||
{
|
{
|
||||||
|
|
@ -52,6 +52,7 @@ export namespace VULKAN_HPP_NAMESPACE
|
||||||
using VULKAN_HPP_NAMESPACE::detail::DispatchLoaderStatic;
|
using VULKAN_HPP_NAMESPACE::detail::DispatchLoaderStatic;
|
||||||
using VULKAN_HPP_NAMESPACE::detail::getDispatchLoaderStatic;
|
using VULKAN_HPP_NAMESPACE::detail::getDispatchLoaderStatic;
|
||||||
#endif /*VK_NO_PROTOTYPES*/
|
#endif /*VK_NO_PROTOTYPES*/
|
||||||
|
using VULKAN_HPP_NAMESAPCE::detail::isDispatchLoader;
|
||||||
using VULKAN_HPP_NAMESPACE::detail::createResultValueType;
|
using VULKAN_HPP_NAMESPACE::detail::createResultValueType;
|
||||||
using VULKAN_HPP_NAMESPACE::detail::resultCheck;
|
using VULKAN_HPP_NAMESPACE::detail::resultCheck;
|
||||||
} // namespace detail
|
} // namespace detail
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
#ifndef VULKAN_HPP
|
#ifndef VULKAN_HPP
|
||||||
#define VULKAN_HPP
|
#define VULKAN_HPP
|
||||||
|
|
||||||
|
#include <vulkan/vulkan.h>
|
||||||
#if !defined( VULKAN_HPP_CXX_MODULE )
|
#if !defined( VULKAN_HPP_CXX_MODULE )
|
||||||
// clang-format off
|
// clang-format off
|
||||||
# include <vulkan/vulkan_hpp_macros.hpp>
|
# include <vulkan/vulkan_hpp_macros.hpp>
|
||||||
|
|
@ -37,9 +38,8 @@
|
||||||
#else
|
#else
|
||||||
# include <cassert>
|
# include <cassert>
|
||||||
# include <cstring>
|
# include <cstring>
|
||||||
import std.compat;
|
import std;
|
||||||
#endif
|
#endif
|
||||||
#include <vulkan/vulkan.h>
|
|
||||||
|
|
||||||
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL == 1
|
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL == 1
|
||||||
# if defined( __unix__ ) || defined( __APPLE__ ) || defined( __QNX__ ) || defined( __Fuchsia__ )
|
# if defined( __unix__ ) || defined( __APPLE__ ) || defined( __QNX__ ) || defined( __Fuchsia__ )
|
||||||
|
|
@ -1023,6 +1023,12 @@ namespace VULKAN_HPP_NAMESPACE
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <typename Type>
|
||||||
|
struct isDispatchLoader
|
||||||
|
{
|
||||||
|
static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = false;
|
||||||
|
};
|
||||||
|
|
||||||
#if !defined( VK_NO_PROTOTYPES ) || ( defined( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC ) && ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 0 ) )
|
#if !defined( VK_NO_PROTOTYPES ) || ( defined( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC ) && ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 0 ) )
|
||||||
class DispatchLoaderStatic : public DispatchLoaderBase
|
class DispatchLoaderStatic : public DispatchLoaderBase
|
||||||
{
|
{
|
||||||
|
|
@ -6600,6 +6606,12 @@ namespace VULKAN_HPP_NAMESPACE
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <>
|
||||||
|
struct isDispatchLoader<DispatchLoaderStatic>
|
||||||
|
{
|
||||||
|
static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true;
|
||||||
|
};
|
||||||
|
|
||||||
inline DispatchLoaderStatic & getDispatchLoaderStatic()
|
inline DispatchLoaderStatic & getDispatchLoaderStatic()
|
||||||
{
|
{
|
||||||
static DispatchLoaderStatic dls;
|
static DispatchLoaderStatic dls;
|
||||||
|
|
@ -24151,6 +24163,13 @@ namespace VULKAN_HPP_NAMESPACE
|
||||||
init( instance, device, dl );
|
init( instance, device, dl );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <>
|
||||||
|
struct isDispatchLoader<DispatchLoaderDynamic>
|
||||||
|
{
|
||||||
|
static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true;
|
||||||
|
};
|
||||||
|
|
||||||
} // namespace detail
|
} // namespace detail
|
||||||
} // namespace VULKAN_HPP_NAMESPACE
|
} // namespace VULKAN_HPP_NAMESPACE
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -321,13 +321,12 @@ namespace VULKAN_HPP_NAMESPACE
|
||||||
# pragma clang diagnostic ignored "-Wcast-function-type"
|
# pragma clang diagnostic ignored "-Wcast-function-type"
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
template <typename HandleType>
|
template <typename HandleType, typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||||
class ObjectDestroyShared
|
class ObjectDestroyShared
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
|
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
|
||||||
|
|
||||||
template <class Dispatcher>
|
|
||||||
using DestroyFunctionPointerType =
|
using DestroyFunctionPointerType =
|
||||||
typename std::conditional<HasDestructor<HandleType>::value,
|
typename std::conditional<HasDestructor<HandleType>::value,
|
||||||
void ( DestructorType::* )( HandleType, const AllocationCallbacks *, const Dispatcher & ) const,
|
void ( DestructorType::* )( HandleType, const AllocationCallbacks *, const Dispatcher & ) const,
|
||||||
|
|
@ -335,10 +334,9 @@ namespace VULKAN_HPP_NAMESPACE
|
||||||
|
|
||||||
using SelectorType = typename std::conditional<HasDestructor<HandleType>::value, DestructorType, HandleType>::type;
|
using SelectorType = typename std::conditional<HasDestructor<HandleType>::value, DestructorType, HandleType>::type;
|
||||||
|
|
||||||
template <typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
|
||||||
ObjectDestroyShared( Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ASSIGNMENT( nullptr ),
|
ObjectDestroyShared( Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ASSIGNMENT( nullptr ),
|
||||||
const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
||||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &SelectorType::destroy ) ) )
|
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType>( &SelectorType::destroy ) ) )
|
||||||
, m_dispatch( &dispatch )
|
, m_dispatch( &dispatch )
|
||||||
, m_allocationCallbacks( allocationCallbacks )
|
, m_allocationCallbacks( allocationCallbacks )
|
||||||
{
|
{
|
||||||
|
|
@ -360,24 +358,22 @@ namespace VULKAN_HPP_NAMESPACE
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
|
DestroyFunctionPointerType m_destroy = nullptr;
|
||||||
const detail::DispatchLoaderBase * m_dispatch = nullptr;
|
const Dispatcher * m_dispatch = nullptr;
|
||||||
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
|
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename HandleType>
|
template <typename HandleType, typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||||
class ObjectFreeShared
|
class ObjectFreeShared
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
|
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
|
||||||
|
|
||||||
template <class Dispatcher>
|
|
||||||
using DestroyFunctionPointerType = void ( DestructorType::* )( HandleType, const AllocationCallbacks *, const Dispatcher & ) const;
|
using DestroyFunctionPointerType = void ( DestructorType::* )( HandleType, const AllocationCallbacks *, const Dispatcher & ) const;
|
||||||
|
|
||||||
template <class Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
|
||||||
ObjectFreeShared( Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ASSIGNMENT( nullptr ),
|
ObjectFreeShared( Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ASSIGNMENT( nullptr ),
|
||||||
const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
||||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &DestructorType::free ) ) )
|
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType>( &DestructorType::free ) ) )
|
||||||
, m_dispatch( &dispatch )
|
, m_dispatch( &dispatch )
|
||||||
, m_allocationCallbacks( allocationCallbacks )
|
, m_allocationCallbacks( allocationCallbacks )
|
||||||
{
|
{
|
||||||
|
|
@ -391,24 +387,21 @@ namespace VULKAN_HPP_NAMESPACE
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
|
DestroyFunctionPointerType m_destroy = nullptr;
|
||||||
const detail::DispatchLoaderBase * m_dispatch = nullptr;
|
const Dispatcher * m_dispatch = nullptr;
|
||||||
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
|
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename HandleType>
|
template <typename HandleType, typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||||
class ObjectReleaseShared
|
class ObjectReleaseShared
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
|
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
|
||||||
|
|
||||||
template <class Dispatcher>
|
|
||||||
using DestroyFunctionPointerType = void ( DestructorType::* )( HandleType, const Dispatcher & ) const;
|
using DestroyFunctionPointerType = void ( DestructorType::* )( HandleType, const Dispatcher & ) const;
|
||||||
|
|
||||||
template <class Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
|
||||||
ObjectReleaseShared( const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
ObjectReleaseShared( const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
||||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &DestructorType::release ) ) )
|
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType>( &DestructorType::release ) ) ), m_dispatch( &dispatch )
|
||||||
, m_dispatch( &dispatch )
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -420,11 +413,11 @@ namespace VULKAN_HPP_NAMESPACE
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
|
DestroyFunctionPointerType m_destroy = nullptr;
|
||||||
const detail::DispatchLoaderBase * m_dispatch = nullptr;
|
const Dispatcher * m_dispatch = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename HandleType, typename PoolType>
|
template <typename HandleType, typename PoolType, typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||||
class PoolFreeShared
|
class PoolFreeShared
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
@ -432,17 +425,14 @@ namespace VULKAN_HPP_NAMESPACE
|
||||||
|
|
||||||
using PoolTypeExport = PoolType;
|
using PoolTypeExport = PoolType;
|
||||||
|
|
||||||
template <class Dispatcher>
|
|
||||||
using ReturnType = decltype( std::declval<DestructorType>().free( PoolType(), 0u, nullptr, Dispatcher() ) );
|
using ReturnType = decltype( std::declval<DestructorType>().free( PoolType(), 0u, nullptr, Dispatcher() ) );
|
||||||
|
|
||||||
template <class Dispatcher>
|
using DestroyFunctionPointerType = ReturnType ( DestructorType::* )( PoolType, uint32_t, const HandleType *, const Dispatcher & ) const;
|
||||||
using DestroyFunctionPointerType = ReturnType<Dispatcher> ( DestructorType::* )( PoolType, uint32_t, const HandleType *, const Dispatcher & ) const;
|
|
||||||
|
|
||||||
PoolFreeShared() = default;
|
PoolFreeShared() = default;
|
||||||
|
|
||||||
template <class Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
|
||||||
PoolFreeShared( SharedHandle<PoolType> pool, const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
PoolFreeShared( SharedHandle<PoolType> pool, const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
||||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &DestructorType::free ) ) )
|
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType>( &DestructorType::free ) ) )
|
||||||
, m_dispatch( &dispatch )
|
, m_dispatch( &dispatch )
|
||||||
, m_pool( std::move( pool ) )
|
, m_pool( std::move( pool ) )
|
||||||
{
|
{
|
||||||
|
|
@ -456,9 +446,9 @@ namespace VULKAN_HPP_NAMESPACE
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
|
DestroyFunctionPointerType m_destroy = nullptr;
|
||||||
const detail::DispatchLoaderBase * m_dispatch = nullptr;
|
const Dispatcher * m_dispatch = nullptr;
|
||||||
SharedHandle<PoolType> m_pool{};
|
SharedHandle<PoolType> m_pool{};
|
||||||
};
|
};
|
||||||
|
|
||||||
# if defined( __GNUC__ ) && !defined( __clang__ ) && !defined( __INTEL_COMPILER )
|
# if defined( __GNUC__ ) && !defined( __clang__ ) && !defined( __INTEL_COMPILER )
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue