Move all the dispatcher related classes into namespace detail (#1983)

This commit is contained in:
Andreas Süßenbach 2024-10-29 08:13:51 +01:00 committed by GitHub
parent 24dee1ce75
commit ed3cf7ac51
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
22 changed files with 16186 additions and 16039 deletions

View File

@ -458,27 +458,30 @@ ${defines}
namespace VULKAN_HPP_NAMESPACE namespace VULKAN_HPP_NAMESPACE
{ {
${ArrayWrapper1D} ${ArrayWrapper1D}
${ArrayWrapper2D} ${ArrayWrapper2D}
#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) #if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
${ArrayProxy} ${ArrayProxy}
${ArrayProxyNoTemporaries} ${ArrayProxyNoTemporaries}
${StridedArrayProxy} ${StridedArrayProxy}
${Optional} ${Optional}
${StructureChain} ${StructureChain}
${UniqueHandle} ${UniqueHandle}
#endif // VULKAN_HPP_DISABLE_ENHANCED_MODE #endif // VULKAN_HPP_DISABLE_ENHANCED_MODE
${DispatchLoaderBase} namespace detail
${DispatchLoaderStatic} {
${Exchange} ${DispatchLoaderBase}
${DispatchLoaderStatic}
}
${Exchange}
#if !defined( VULKAN_HPP_NO_SMART_HANDLE ) #if !defined( VULKAN_HPP_NO_SMART_HANDLE )
${ObjectDestroy} ${ObjectDestroy}
${ObjectFree} ${ObjectFree}
${ObjectRelease} ${ObjectRelease}
${PoolFree} ${PoolFree}
#endif // !VULKAN_HPP_NO_SMART_HANDLE #endif // !VULKAN_HPP_NO_SMART_HANDLE
${baseTypes} ${baseTypes}
template <typename Type, Type value = Type{}> template <typename Type, Type value = Type{}>
struct CppType struct CppType
@ -522,11 +525,14 @@ ${constexprDefines}
namespace VULKAN_HPP_NAMESPACE namespace VULKAN_HPP_NAMESPACE
{ {
#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) #if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
${structExtendsStructs} ${structExtendsStructs}
#endif // VULKAN_HPP_DISABLE_ENHANCED_MODE #endif // VULKAN_HPP_DISABLE_ENHANCED_MODE
${DynamicLoader} namespace detail
${DispatchLoaderDynamic} {
${DynamicLoader}
${DispatchLoaderDynamic}
}
} // namespace VULKAN_HPP_NAMESPACE } // namespace VULKAN_HPP_NAMESPACE
#endif #endif
)"; )";
@ -611,20 +617,26 @@ namespace VULKAN_HPP_NAMESPACE
{ {
namespace VULKAN_HPP_RAII_NAMESPACE namespace VULKAN_HPP_RAII_NAMESPACE
{ {
template <class T> namespace detail
class CreateReturnType
{ {
public: template <class T>
class CreateReturnType
{
public:
#if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) #if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS )
using Type = VULKAN_HPP_EXPECTED<T, VULKAN_HPP_NAMESPACE::Result>; using Type = VULKAN_HPP_EXPECTED<T, VULKAN_HPP_NAMESPACE::Result>;
#else #else
using Type = T; using Type = T;
#endif #endif
}; };
${RAIIDispatchers} using PFN_dummy = void ( * )();
${RAIIHandles}
${RAIICommandDefinitions} ${RAIIDispatchers}
}
${RAIIHandles}
${RAIICommandDefinitions}
//==================== //====================
//=== RAII Helpers === //=== RAII Helpers ===
@ -5905,7 +5917,6 @@ std::string VulkanHppGenerator::generateCppModuleUsings() const
auto const usingTemplate = std::string{ R"( using VULKAN_HPP_NAMESPACE::${className}; auto const usingTemplate = std::string{ R"( using VULKAN_HPP_NAMESPACE::${className};
)" }; )" };
auto const hardCodedTypes = std::array{ "ArrayWrapper1D", "ArrayWrapper2D", "FlagTraits", "Flags", "DispatchLoaderBase", "DispatchLoaderDynamic" };
auto const hardCodedEnhancedModeTypes = std::array{ "ArrayProxy", "ArrayProxyNoTemporaries", "StridedArrayProxy", "Optional", "StructureChain" }; auto const hardCodedEnhancedModeTypes = std::array{ "ArrayProxy", "ArrayProxyNoTemporaries", "StridedArrayProxy", "Optional", "StructureChain" };
auto const hardCodedSmartHandleTypes = std::array{ "ObjectDestroy", "ObjectFree", "ObjectRelease", "PoolFree", "ObjectDestroyShared", auto const hardCodedSmartHandleTypes = std::array{ "ObjectDestroy", "ObjectFree", "ObjectRelease", "PoolFree", "ObjectDestroyShared",
"ObjectFreeShared", "ObjectReleaseShared", "PoolFreeShared", "SharedHandle", "UniqueHandle" }; "ObjectFreeShared", "ObjectReleaseShared", "PoolFreeShared", "SharedHandle", "UniqueHandle" };
@ -5914,15 +5925,19 @@ std::string VulkanHppGenerator::generateCppModuleUsings() const
auto usings = std::string{ R"( //===================================== auto usings = std::string{ R"( //=====================================
//=== HARDCODED TYPEs AND FUNCTIONs === //=== HARDCODED TYPEs AND FUNCTIONs ===
//===================================== //=====================================
)" }; using VULKAN_HPP_NAMESPACE::ArrayWrapper1D;
using VULKAN_HPP_NAMESPACE::ArrayWrapper2D;
for ( auto const & className : hardCodedTypes ) using VULKAN_HPP_NAMESPACE::Flags;
using VULKAN_HPP_NAMESPACE::FlagTraits;
namespace detail
{ {
usings += replaceWithMap( usingTemplate, { { "className", className } } ); using VULKAN_HPP_NAMESPACE::detail::DispatchLoaderBase;
using VULKAN_HPP_NAMESPACE::detail::DispatchLoaderDynamic;
#if !defined( VK_NO_PROTOTYPES )
using VULKAN_HPP_NAMESPACE::detail::DispatchLoaderStatic;
#endif /*VK_NO_PROTOTYPES*/
} }
)" };
auto const & [noPrototypesEnter, noPrototypesLeave] = generateProtection( "VK_NO_PROTOTYPES", false );
usings += "\n" + noPrototypesEnter + replaceWithMap( usingTemplate, { { "className", "DispatchLoaderStatic" } } ) + noPrototypesLeave + "\n";
// insert the Flags bitwise operators // insert the Flags bitwise operators
auto const flagsBitWiseOperatorsUsings = std::array{ "operator&", "operator|", "operator^", "operator~" }; auto const flagsBitWiseOperatorsUsings = std::array{ "operator&", "operator|", "operator^", "operator~" };
@ -6050,7 +6065,10 @@ std::string VulkanHppGenerator::generateCppModuleUsings() const
usings += "\n" + enterDisableEnhanced + replaceWithMap( usingTemplate, { { "className", "StructExtends" } } ) + leaveDisableEnhanced + "\n"; usings += "\n" + enterDisableEnhanced + replaceWithMap( usingTemplate, { { "className", "StructExtends" } } ) + leaveDisableEnhanced + "\n";
auto const dynamicLoaderUsing = std::string{ R"(#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL auto const dynamicLoaderUsing = std::string{ R"(#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL
using VULKAN_HPP_NAMESPACE::DynamicLoader; namespace detail
{
using VULKAN_HPP_NAMESPACE::detail::DynamicLoader;
}
#endif /*VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL*/ #endif /*VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL*/
)" }; )" };
usings += dynamicLoaderUsing; usings += dynamicLoaderUsing;
@ -6070,9 +6088,12 @@ std::string VulkanHppGenerator::generateCppModuleRaiiUsings() const
//====================== //======================
using VULKAN_HPP_RAII_NAMESPACE::Context; using VULKAN_HPP_RAII_NAMESPACE::Context;
using VULKAN_HPP_RAII_NAMESPACE::ContextDispatcher; namespace detail
using VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher; {
using VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher; using VULKAN_HPP_RAII_NAMESPACE::detail::ContextDispatcher;
using VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher;
using VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher;
}
//==================== //====================
//=== RAII HANDLEs === //=== RAII HANDLEs ===
@ -6718,7 +6739,7 @@ ${commandMembers}
template <typename DynamicLoader template <typename DynamicLoader
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL #if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL
= VULKAN_HPP_NAMESPACE::DynamicLoader = VULKAN_HPP_NAMESPACE::detail::DynamicLoader
#endif #endif
> >
void init() void init()
@ -6782,7 +6803,7 @@ ${deviceCommandAssignments}
template <typename DynamicLoader template <typename DynamicLoader
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL #if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL
= VULKAN_HPP_NAMESPACE::DynamicLoader = VULKAN_HPP_NAMESPACE::detail::DynamicLoader
#endif #endif
> >
void init(VULKAN_HPP_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::Device const & device) VULKAN_HPP_NOEXCEPT void init(VULKAN_HPP_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::Device const & device) VULKAN_HPP_NOEXCEPT
@ -6822,9 +6843,9 @@ std::string VulkanHppGenerator::generateDispatchLoaderStatic() const
${commands} ${commands}
}; };
inline ::VULKAN_HPP_NAMESPACE::DispatchLoaderStatic & getDispatchLoaderStatic() inline DispatchLoaderStatic & getDispatchLoaderStatic()
{ {
static ::VULKAN_HPP_NAMESPACE::DispatchLoaderStatic dls; static DispatchLoaderStatic dls;
return dls; return dls;
} }
#endif #endif
@ -8701,7 +8722,7 @@ std::string VulkanHppGenerator::generateRAIIDispatchers() const
} }
std::string contextDispatcherTemplate = R"( std::string contextDispatcherTemplate = R"(
class ContextDispatcher : public DispatchLoaderBase class ContextDispatcher : public ::VULKAN_HPP_NAMESPACE::detail::DispatchLoaderBase
{ {
public: public:
ContextDispatcher( PFN_vkGetInstanceProcAddr getProcAddr ) ContextDispatcher( PFN_vkGetInstanceProcAddr getProcAddr )
@ -8717,7 +8738,7 @@ ${contextMembers}
std::string str = replaceWithMap( contextDispatcherTemplate, { { "contextInitializers", contextInitializers }, { "contextMembers", contextMembers } } ); std::string str = replaceWithMap( contextDispatcherTemplate, { { "contextInitializers", contextInitializers }, { "contextMembers", contextMembers } } );
std::string instanceDispatcherTemplate = R"( std::string instanceDispatcherTemplate = R"(
class InstanceDispatcher : public DispatchLoaderBase class InstanceDispatcher : public ::VULKAN_HPP_NAMESPACE::detail::DispatchLoaderBase
{ {
public: public:
InstanceDispatcher( PFN_vkGetInstanceProcAddr getProcAddr, VkInstance instance ) InstanceDispatcher( PFN_vkGetInstanceProcAddr getProcAddr, VkInstance instance )
@ -8737,7 +8758,7 @@ ${instanceMembers}
str += replaceWithMap( instanceDispatcherTemplate, { { "instanceAssignments", instanceAssignments }, { "instanceMembers", instanceMembers } } ); str += replaceWithMap( instanceDispatcherTemplate, { { "instanceAssignments", instanceAssignments }, { "instanceMembers", instanceMembers } } );
std::string deviceDispatcherTemplate = R"( std::string deviceDispatcherTemplate = R"(
class DeviceDispatcher : public DispatchLoaderBase class DeviceDispatcher : public ::VULKAN_HPP_NAMESPACE::detail::DispatchLoaderBase
{ {
public: public:
DeviceDispatcher( PFN_vkGetDeviceProcAddr getProcAddr, VkDevice device ) : vkGetDeviceProcAddr( getProcAddr ) DeviceDispatcher( PFN_vkGetDeviceProcAddr getProcAddr, VkDevice device ) : vkGetDeviceProcAddr( getProcAddr )
@ -8836,8 +8857,8 @@ std::string VulkanHppGenerator::generateRAIIHandle( std::pair<std::string, Handl
std::string debugReportObjectType = contains( enumIt->second.values, valueName ) ? generateEnumValueName( enumIt->first, valueName, false ) : "eUnknown"; std::string debugReportObjectType = contains( enumIt->second.values, valueName ) ? generateEnumValueName( enumIt->first, valueName, false ) : "eUnknown";
std::string dispatcherType = ( ( handle.first == "VkDevice" ) || ( handle.second.constructorIts.front()->second.params.front().type.type == "VkDevice" ) ) std::string dispatcherType = ( ( handle.first == "VkDevice" ) || ( handle.second.constructorIts.front()->second.params.front().type.type == "VkDevice" ) )
? "VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher" ? "VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher"
: "VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher"; : "VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher";
std::string getParent; std::string getParent;
if ( ( handle.first != "VkInstance" ) && ( handle.first != "VkDevice" ) && ( handle.second.destructorIt != m_commands.end() ) ) if ( ( handle.first != "VkInstance" ) && ( handle.first != "VkDevice" ) && ( handle.second.destructorIt != m_commands.end() ) )
@ -9306,7 +9327,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandFactory( std::string co
std::string const definitionTemplate = std::string const definitionTemplate =
R"( R"(
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType<${returnType}>::Type ${className}::${commandName}( ${argumentList} ) const ${noexcept} VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType<${returnType}>::Type ${className}::${commandName}( ${argumentList} ) const ${noexcept}
{ {
${specialAssertion} ${specialAssertion}
${dataDeclarations} ${dataDeclarations}
@ -9332,7 +9353,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandFactory( std::string co
{ {
std::string const declarationTemplate = std::string const declarationTemplate =
R"( R"(
VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType<${returnType}>::Type ${commandName}( ${argumentList} ) const ${noexcept}; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType<${returnType}>::Type ${commandName}( ${argumentList} ) const ${noexcept};
)"; )";
return replaceWithMap( declarationTemplate, return replaceWithMap( declarationTemplate,
@ -9965,7 +9986,7 @@ std::string VulkanHppGenerator::generateRAIIHandleConstructorTakeOwnership( std:
std::string dispatcherInit; std::string dispatcherInit;
if ( ( handle.first == "VkDevice" ) || ( handle.first == "VkInstance" ) ) if ( ( handle.first == "VkDevice" ) || ( handle.first == "VkInstance" ) )
{ {
dispatcherInit = "\n m_dispatcher.reset( new VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::" + handleType + "Dispatcher( " + parentName + dispatcherInit = "\n m_dispatcher.reset( new VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::" + handleType + "Dispatcher( " + parentName +
".getDispatcher()->vkGet" + handleType + "ProcAddr, static_cast<" + handle.first + ">( m_" + startLowerCase( handleType ) + " ) ) );"; ".getDispatcher()->vkGet" + handleType + "ProcAddr, static_cast<" + handle.first + ">( m_" + startLowerCase( handleType ) + " ) ) );";
} }
@ -10012,11 +10033,11 @@ std::string VulkanHppGenerator::generateRAIIHandleContext( std::pair<std::string
public: public:
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL #if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL
Context() Context()
: m_dispatcher( new VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::ContextDispatcher( : m_dispatcher( new VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::ContextDispatcher(
m_dynamicLoader.getProcAddress<PFN_vkGetInstanceProcAddr>( "vkGetInstanceProcAddr" ) ) ) m_dynamicLoader.getProcAddress<PFN_vkGetInstanceProcAddr>( "vkGetInstanceProcAddr" ) ) )
#else #else
Context( PFN_vkGetInstanceProcAddr getInstanceProcAddr ) Context( PFN_vkGetInstanceProcAddr getInstanceProcAddr )
: m_dispatcher( new VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::ContextDispatcher( getInstanceProcAddr ) ) : m_dispatcher( new VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::ContextDispatcher( getInstanceProcAddr ) )
#endif #endif
{} {}
@ -10044,7 +10065,7 @@ std::string VulkanHppGenerator::generateRAIIHandleContext( std::pair<std::string
return *this; return *this;
} }
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::ContextDispatcher const * getDispatcher() const VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::ContextDispatcher const * getDispatcher() const
{ {
VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return &*m_dispatcher; return &*m_dispatcher;
@ -10062,9 +10083,9 @@ ${memberFunctionDeclarations}
private: private:
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL #if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL
VULKAN_HPP_NAMESPACE::DynamicLoader m_dynamicLoader; VULKAN_HPP_NAMESPACE::detail::DynamicLoader m_dynamicLoader;
#endif #endif
std::unique_ptr<VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::ContextDispatcher> m_dispatcher; std::unique_ptr<VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::ContextDispatcher> m_dispatcher;
}; };
)"; )";
@ -10231,19 +10252,19 @@ std::tuple<std::string, std::string, std::string, std::string, std::string, std:
if ( handle.first == "VkInstance" ) if ( handle.first == "VkInstance" )
{ {
memberVariables += "\n std::unique_ptr<VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher> m_dispatcher;"; memberVariables += "\n std::unique_ptr<VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher> m_dispatcher;";
} }
else if ( handle.first == "VkDevice" ) else if ( handle.first == "VkDevice" )
{ {
memberVariables += "\n std::unique_ptr<VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher> m_dispatcher;"; memberVariables += "\n std::unique_ptr<VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher> m_dispatcher;";
} }
else if ( handle.second.constructorIts.front()->second.params.front().type.type == "VkDevice" ) else if ( handle.second.constructorIts.front()->second.params.front().type.type == "VkDevice" )
{ {
memberVariables += "\n VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr;"; memberVariables += "\n VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr;";
} }
else else
{ {
memberVariables += "\n VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * m_dispatcher = nullptr;"; memberVariables += "\n VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher const * m_dispatcher = nullptr;";
} }
clearMembers += "\n m_dispatcher = nullptr;"; clearMembers += "\n m_dispatcher = nullptr;";
swapMembers += "\n std::swap( m_dispatcher, rhs.m_dispatcher );"; swapMembers += "\n std::swap( m_dispatcher, rhs.m_dispatcher );";

View File

@ -1,69 +0,0 @@
class DispatchLoaderDynamic;
#if !defined(VULKAN_HPP_DISPATCH_LOADER_DYNAMIC)
# if defined( VK_NO_PROTOTYPES )
# define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 1
# else
# define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 0
# endif
#endif
#if !defined( VULKAN_HPP_STORAGE_API )
# if defined( VULKAN_HPP_STORAGE_SHARED )
# if defined( _MSC_VER )
# if defined( VULKAN_HPP_STORAGE_SHARED_EXPORT )
# define VULKAN_HPP_STORAGE_API __declspec( dllexport )
# else
# define VULKAN_HPP_STORAGE_API __declspec( dllimport )
# endif
# elif defined( __clang__ ) || defined( __GNUC__ )
# if defined( VULKAN_HPP_STORAGE_SHARED_EXPORT )
# define VULKAN_HPP_STORAGE_API __attribute__( ( visibility( "default" ) ) )
# else
# define VULKAN_HPP_STORAGE_API
# endif
# else
# define VULKAN_HPP_STORAGE_API
# pragma warning Unknown import / export semantics
# endif
# else
# define VULKAN_HPP_STORAGE_API
# endif
#endif
#if !defined( VULKAN_HPP_DEFAULT_DISPATCHER )
# if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1
# define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::defaultDispatchLoaderDynamic
# define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE \
namespace VULKAN_HPP_NAMESPACE \
{ \
VULKAN_HPP_STORAGE_API DispatchLoaderDynamic defaultDispatchLoaderDynamic; \
}
extern VULKAN_HPP_STORAGE_API DispatchLoaderDynamic defaultDispatchLoaderDynamic;
# else
inline ::VULKAN_HPP_NAMESPACE::DispatchLoaderStatic & getDispatchLoaderStatic()
{
static ::VULKAN_HPP_NAMESPACE::DispatchLoaderStatic dls;
return dls;
}
# define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::getDispatchLoaderStatic()
# define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE
# endif
#endif
#if !defined( VULKAN_HPP_DEFAULT_DISPATCHER_TYPE )
# if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1
# define VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ::VULKAN_HPP_NAMESPACE::DispatchLoaderDynamic
# else
# define VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ::VULKAN_HPP_NAMESPACE::DispatchLoaderStatic
# endif
#endif
#if defined( VULKAN_HPP_NO_DEFAULT_DISPATCHER )
# define VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT
# define VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT
# define VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT
#else
# define VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT = {}
# define VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT = nullptr
# define VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT = VULKAN_HPP_DEFAULT_DISPATCHER
#endif

View File

@ -46,9 +46,9 @@ public:
} }
private: private:
DestroyFunctionPointerType<DispatchLoaderBase> m_destroy = nullptr; DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
const DispatchLoaderBase * m_dispatch = nullptr; const detail::DispatchLoaderBase * m_dispatch = nullptr;
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr; Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
}; };
template <typename HandleType> template <typename HandleType>
@ -77,9 +77,9 @@ public:
} }
private: private:
DestroyFunctionPointerType<DispatchLoaderBase> m_destroy = nullptr; DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
const DispatchLoaderBase * m_dispatch = nullptr; const detail::DispatchLoaderBase * m_dispatch = nullptr;
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr; Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
}; };
template <typename HandleType> template <typename HandleType>
@ -106,8 +106,8 @@ public:
} }
private: private:
DestroyFunctionPointerType<DispatchLoaderBase> m_destroy = nullptr; DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
const DispatchLoaderBase * m_dispatch = nullptr; const detail::DispatchLoaderBase * m_dispatch = nullptr;
}; };
template <typename HandleType, typename PoolType> template <typename HandleType, typename PoolType>
@ -142,9 +142,9 @@ public:
} }
private: private:
DestroyFunctionPointerType<DispatchLoaderBase> m_destroy = nullptr; DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
const DispatchLoaderBase * m_dispatch = nullptr; const detail::DispatchLoaderBase * 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 )

View File

@ -240,33 +240,40 @@ ${vulkan_64_bit_ptr_defines}
namespace VULKAN_HPP_NAMESPACE namespace VULKAN_HPP_NAMESPACE
{ {
class DispatchLoaderDynamic; namespace detail
{
class DispatchLoaderDynamic;
#if !defined( VULKAN_HPP_DEFAULT_DISPATCHER )
# if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1
extern VULKAN_HPP_STORAGE_API DispatchLoaderDynamic defaultDispatchLoaderDynamic;
# endif
#endif
} // namespace detail
} // namespace VULKAN_HPP_NAMESPACE } // namespace VULKAN_HPP_NAMESPACE
#if !defined( VULKAN_HPP_DEFAULT_DISPATCHER ) #if !defined( VULKAN_HPP_DEFAULT_DISPATCHER )
# if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 # if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1
# define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::defaultDispatchLoaderDynamic # define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::detail::defaultDispatchLoaderDynamic
# define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE \ # define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE \
namespace VULKAN_HPP_NAMESPACE \ namespace VULKAN_HPP_NAMESPACE \
{ \ { \
VULKAN_HPP_STORAGE_API ::VULKAN_HPP_NAMESPACE::DispatchLoaderDynamic defaultDispatchLoaderDynamic; \ namespace detail \
{ \
VULKAN_HPP_STORAGE_API DispatchLoaderDynamic defaultDispatchLoaderDynamic; \
} \
} }
namespace VULKAN_HPP_NAMESPACE
{
extern VULKAN_HPP_STORAGE_API VULKAN_HPP_NAMESPACE::DispatchLoaderDynamic defaultDispatchLoaderDynamic;
} // namespace VULKAN_HPP_NAMESPACE
# else # else
# define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::getDispatchLoaderStatic() # define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::detail::getDispatchLoaderStatic()
# define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE # define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE
# endif # endif
#endif #endif
#if !defined( VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ) #if !defined( VULKAN_HPP_DEFAULT_DISPATCHER_TYPE )
# if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 # if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1
# define VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ::VULKAN_HPP_NAMESPACE::DispatchLoaderDynamic # define VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ::VULKAN_HPP_NAMESPACE::detail::DispatchLoaderDynamic
# else # else
# define VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ::VULKAN_HPP_NAMESPACE::DispatchLoaderStatic # define VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ::VULKAN_HPP_NAMESPACE::detail::DispatchLoaderStatic
# endif # endif
#endif #endif

View File

@ -39,9 +39,6 @@ int main( int /*argc*/, char ** /*argv*/ )
{ {
try try
{ {
// to prevent a warning on unreferenced function vk::getDispatchLoaderStatic, use just one arbitrary vk-function
(void)vk::enumerateInstanceVersion();
// nullptr_t // nullptr_t
fct( nullptr ); fct( nullptr );
fctc( nullptr ); fctc( nullptr );

View File

@ -49,9 +49,6 @@ MyVulkanTest::MyVulkanTest()
int main( int /*argc*/, char ** /*argv*/ ) int main( int /*argc*/, char ** /*argv*/ )
{ {
// to prevent a warning on unreferenced function vk::getDispatchLoaderStatic, use just one arbitrary vk-function
(void)vk::enumerateInstanceVersion();
char const * appName = "DesignatedInitializers"; char const * appName = "DesignatedInitializers";
uint32_t appVersion = 1; uint32_t appVersion = 1;
char const * engineName = "Vulkan.hpp"; char const * engineName = "Vulkan.hpp";

View File

@ -60,16 +60,16 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::DeviceQueueCreateInfo deviceQueueCreateInfo( vk::DeviceQueueCreateFlags(), static_cast<uint32_t>( graphicsQueueFamilyIndex ), 1, &queuePriority ); vk::DeviceQueueCreateInfo deviceQueueCreateInfo( vk::DeviceQueueCreateFlags(), static_cast<uint32_t>( graphicsQueueFamilyIndex ), 1, &queuePriority );
vk::UniqueDevice device = physicalDevice.createDeviceUnique( vk::DeviceCreateInfo( vk::DeviceCreateFlags(), deviceQueueCreateInfo ) ); vk::UniqueDevice device = physicalDevice.createDeviceUnique( vk::DeviceCreateInfo( vk::DeviceCreateFlags(), deviceQueueCreateInfo ) );
uint64_t handle = device->getAccelerationStructureHandleNV<uint8_t>( {}, vk::DispatchLoaderDynamic() ); uint64_t handle = device->getAccelerationStructureHandleNV<uint8_t>( {}, vk::detail::DispatchLoaderDynamic() );
std::vector<vk::UniqueCommandBuffer>::allocator_type vectorAllocator; std::vector<vk::UniqueCommandBuffer>::allocator_type vectorAllocator;
vk::UniqueCommandBuffer commandBuffer = std::move( device->allocateCommandBuffersUnique( {}, vectorAllocator, vk::DispatchLoaderStatic() ).front() ); vk::UniqueCommandBuffer commandBuffer = std::move( device->allocateCommandBuffersUnique( {}, vectorAllocator, vk::detail::DispatchLoaderStatic() ).front() );
commandBuffer->begin( vk::CommandBufferBeginInfo() ); commandBuffer->begin( vk::CommandBufferBeginInfo() );
std::vector<vk::UniqueHandle<vk::CommandBuffer, vk::DispatchLoaderDynamic>>::allocator_type dynamicVectorAllocator; std::vector<vk::UniqueHandle<vk::CommandBuffer, vk::detail::DispatchLoaderDynamic>>::allocator_type dynamicVectorAllocator;
vk::UniqueHandle<vk::CommandBuffer, vk::DispatchLoaderDynamic> dynamicCommandBuffer = vk::UniqueHandle<vk::CommandBuffer, vk::detail::DispatchLoaderDynamic> dynamicCommandBuffer =
std::move( device->allocateCommandBuffersUnique( {}, dynamicVectorAllocator, vk::DispatchLoaderDynamic() ).front() ); std::move( device->allocateCommandBuffersUnique( {}, dynamicVectorAllocator, vk::detail::DispatchLoaderDynamic() ).front() );
vk::Buffer buffer = device->createBuffer( {} ); vk::Buffer buffer = device->createBuffer( {} );
vk::UniqueBuffer uniqueBuffer = vk::UniqueBuffer( buffer, *device ); vk::UniqueBuffer uniqueBuffer = vk::UniqueBuffer( buffer, *device );

View File

@ -33,7 +33,7 @@ int main( int /*argc*/, char ** /*argv*/ )
VULKAN_HPP_DEFAULT_DISPATCHER.init(); VULKAN_HPP_DEFAULT_DISPATCHER.init();
// the same initialization, now with explicitly providing a DynamicLoader // the same initialization, now with explicitly providing a DynamicLoader
vk::DynamicLoader dl; vk::detail::DynamicLoader dl;
VULKAN_HPP_DEFAULT_DISPATCHER.init( dl ); VULKAN_HPP_DEFAULT_DISPATCHER.init( dl );
// the same initialization, now with explicitly providing the initial function pointer // the same initialization, now with explicitly providing the initial function pointer

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// //
// VulkanHpp Samples : DispatchLoaderDynamic // VulkanHpp Samples : DispatchLoaderDynamicSharedLibrary
// Compile test on DispatchLoaderDynamic functions // Compile test on DispatchLoaderDynamic functions
#include <vulkan/vulkan.hpp> #include <vulkan/vulkan.hpp>

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// //
// VulkanHpp Samples : DispatchLoaderDynamic // VulkanHpp Samples : DispatchLoaderDynamicSharedLibraryClient
// Compile test on DispatchLoaderDynamic functions // Compile test on DispatchLoaderDynamic functions
#include <iostream> #include <iostream>

View File

@ -39,9 +39,6 @@ int main( int /*argc*/, char ** /*argv*/ )
{ {
try try
{ {
// to prevent a warning on unreferenced function vk::getDispatchLoaderStatic, use just one arbitrary vk-function
// (void)vk::enumerateInstanceVersion();
// nullptr_t // nullptr_t
fct( nullptr ); fct( nullptr );
fctc( nullptr ); fctc( nullptr );

View File

@ -358,11 +358,11 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::UniquePipeline graphicsPipeline = device->createGraphicsPipelineUnique( *pipelineCache, graphicsPipelineCreateInfo ).value; vk::UniquePipeline graphicsPipeline = device->createGraphicsPipelineUnique( *pipelineCache, graphicsPipelineCreateInfo ).value;
vk::UniquePipeline graphicsPipeline2 = vk::UniquePipeline graphicsPipeline2 =
std::move( device->createGraphicsPipelinesUnique<vk::DispatchLoaderDynamic, MyAllocator<vk::UniquePipeline>>( *pipelineCache, graphicsPipelineCreateInfo ) std::move( device->createGraphicsPipelinesUnique<vk::detail::DispatchLoaderDynamic, MyAllocator<vk::UniquePipeline>>( *pipelineCache, graphicsPipelineCreateInfo )
.value[0] ); .value[0] );
vk::UniquePipeline graphicsPipeline3 = vk::UniquePipeline graphicsPipeline3 =
std::move( device->createGraphicsPipelinesUnique<vk::DispatchLoaderDynamic>( *pipelineCache, graphicsPipelineCreateInfo ).value[0] ); std::move( device->createGraphicsPipelinesUnique<vk::detail::DispatchLoaderDynamic>( *pipelineCache, graphicsPipelineCreateInfo ).value[0] );
vk::DescriptorPoolSize poolSize( vk::DescriptorType::eUniformBuffer, 1 ); vk::DescriptorPoolSize poolSize( vk::DescriptorType::eUniformBuffer, 1 );
vk::UniqueDescriptorPool descriptorPool = device->createDescriptorPoolUnique( { vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet, 1, poolSize } ); vk::UniqueDescriptorPool descriptorPool = device->createDescriptorPoolUnique( { vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet, 1, poolSize } );

View File

@ -32,14 +32,17 @@ export namespace VULKAN_HPP_NAMESPACE
//===================================== //=====================================
using VULKAN_HPP_NAMESPACE::ArrayWrapper1D; using VULKAN_HPP_NAMESPACE::ArrayWrapper1D;
using VULKAN_HPP_NAMESPACE::ArrayWrapper2D; using VULKAN_HPP_NAMESPACE::ArrayWrapper2D;
using VULKAN_HPP_NAMESPACE::DispatchLoaderBase;
using VULKAN_HPP_NAMESPACE::DispatchLoaderDynamic;
using VULKAN_HPP_NAMESPACE::Flags; using VULKAN_HPP_NAMESPACE::Flags;
using VULKAN_HPP_NAMESPACE::FlagTraits; using VULKAN_HPP_NAMESPACE::FlagTraits;
namespace detail
{
using VULKAN_HPP_NAMESPACE::detail::DispatchLoaderBase;
using VULKAN_HPP_NAMESPACE::detail::DispatchLoaderDynamic;
#if !defined( VK_NO_PROTOTYPES ) #if !defined( VK_NO_PROTOTYPES )
using VULKAN_HPP_NAMESPACE::DispatchLoaderStatic; using VULKAN_HPP_NAMESPACE::detail::DispatchLoaderStatic;
#endif /*VK_NO_PROTOTYPES*/ #endif /*VK_NO_PROTOTYPES*/
} // namespace detail
using VULKAN_HPP_NAMESPACE::operator&; using VULKAN_HPP_NAMESPACE::operator&;
using VULKAN_HPP_NAMESPACE::operator|; using VULKAN_HPP_NAMESPACE::operator|;
@ -4883,7 +4886,10 @@ export namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL #if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL
using VULKAN_HPP_NAMESPACE::DynamicLoader; namespace detail
{
using VULKAN_HPP_NAMESPACE::detail::DynamicLoader;
} // namespace detail
#endif /*VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL*/ #endif /*VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL*/
//===================== //=====================
@ -4933,9 +4939,13 @@ export namespace VULKAN_HPP_NAMESPACE
//====================== //======================
using VULKAN_HPP_RAII_NAMESPACE::Context; using VULKAN_HPP_RAII_NAMESPACE::Context;
using VULKAN_HPP_RAII_NAMESPACE::ContextDispatcher;
using VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher; namespace detail
using VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher; {
using VULKAN_HPP_RAII_NAMESPACE::detail::ContextDispatcher;
using VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher;
using VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher;
} // namespace detail
//==================== //====================
//=== RAII HANDLEs === //=== RAII HANDLEs ===

File diff suppressed because it is too large Load Diff

View File

@ -257,33 +257,40 @@
namespace VULKAN_HPP_NAMESPACE namespace VULKAN_HPP_NAMESPACE
{ {
class DispatchLoaderDynamic; namespace detail
{
class DispatchLoaderDynamic;
#if !defined( VULKAN_HPP_DEFAULT_DISPATCHER )
# if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1
extern VULKAN_HPP_STORAGE_API DispatchLoaderDynamic defaultDispatchLoaderDynamic;
# endif
#endif
} // namespace detail
} // namespace VULKAN_HPP_NAMESPACE } // namespace VULKAN_HPP_NAMESPACE
#if !defined( VULKAN_HPP_DEFAULT_DISPATCHER ) #if !defined( VULKAN_HPP_DEFAULT_DISPATCHER )
# if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 # if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1
# define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::defaultDispatchLoaderDynamic # define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::detail::defaultDispatchLoaderDynamic
# define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE \ # define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE \
namespace VULKAN_HPP_NAMESPACE \ namespace VULKAN_HPP_NAMESPACE \
{ \ { \
VULKAN_HPP_STORAGE_API ::VULKAN_HPP_NAMESPACE::DispatchLoaderDynamic defaultDispatchLoaderDynamic; \ namespace detail \
{ \
VULKAN_HPP_STORAGE_API DispatchLoaderDynamic defaultDispatchLoaderDynamic; \
} \
} }
namespace VULKAN_HPP_NAMESPACE
{
extern VULKAN_HPP_STORAGE_API VULKAN_HPP_NAMESPACE::DispatchLoaderDynamic defaultDispatchLoaderDynamic;
} // namespace VULKAN_HPP_NAMESPACE
# else # else
# define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::getDispatchLoaderStatic() # define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::detail::getDispatchLoaderStatic()
# define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE # define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE
# endif # endif
#endif #endif
#if !defined( VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ) #if !defined( VULKAN_HPP_DEFAULT_DISPATCHER_TYPE )
# if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 # if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1
# define VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ::VULKAN_HPP_NAMESPACE::DispatchLoaderDynamic # define VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ::VULKAN_HPP_NAMESPACE::detail::DispatchLoaderDynamic
# else # else
# define VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ::VULKAN_HPP_NAMESPACE::DispatchLoaderStatic # define VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ::VULKAN_HPP_NAMESPACE::detail::DispatchLoaderStatic
# endif # endif
#endif #endif

File diff suppressed because it is too large Load Diff

View File

@ -356,9 +356,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
private: private:
DestroyFunctionPointerType<DispatchLoaderBase> m_destroy = nullptr; DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
const DispatchLoaderBase * m_dispatch = nullptr; const detail::DispatchLoaderBase * m_dispatch = nullptr;
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr; Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
}; };
template <typename HandleType> template <typename HandleType>
@ -387,9 +387,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
private: private:
DestroyFunctionPointerType<DispatchLoaderBase> m_destroy = nullptr; DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
const DispatchLoaderBase * m_dispatch = nullptr; const detail::DispatchLoaderBase * m_dispatch = nullptr;
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr; Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
}; };
template <typename HandleType> template <typename HandleType>
@ -416,8 +416,8 @@ namespace VULKAN_HPP_NAMESPACE
} }
private: private:
DestroyFunctionPointerType<DispatchLoaderBase> m_destroy = nullptr; DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
const DispatchLoaderBase * m_dispatch = nullptr; const detail::DispatchLoaderBase * m_dispatch = nullptr;
}; };
template <typename HandleType, typename PoolType> template <typename HandleType, typename PoolType>
@ -452,9 +452,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
private: private:
DestroyFunctionPointerType<DispatchLoaderBase> m_destroy = nullptr; DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
const DispatchLoaderBase * m_dispatch = nullptr; const detail::DispatchLoaderBase * 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 )

View File

@ -32,14 +32,17 @@ export namespace VULKAN_HPP_NAMESPACE
//===================================== //=====================================
using VULKAN_HPP_NAMESPACE::ArrayWrapper1D; using VULKAN_HPP_NAMESPACE::ArrayWrapper1D;
using VULKAN_HPP_NAMESPACE::ArrayWrapper2D; using VULKAN_HPP_NAMESPACE::ArrayWrapper2D;
using VULKAN_HPP_NAMESPACE::DispatchLoaderBase;
using VULKAN_HPP_NAMESPACE::DispatchLoaderDynamic;
using VULKAN_HPP_NAMESPACE::Flags; using VULKAN_HPP_NAMESPACE::Flags;
using VULKAN_HPP_NAMESPACE::FlagTraits; using VULKAN_HPP_NAMESPACE::FlagTraits;
namespace detail
{
using VULKAN_HPP_NAMESPACE::detail::DispatchLoaderBase;
using VULKAN_HPP_NAMESPACE::detail::DispatchLoaderDynamic;
#if !defined( VK_NO_PROTOTYPES ) #if !defined( VK_NO_PROTOTYPES )
using VULKAN_HPP_NAMESPACE::DispatchLoaderStatic; using VULKAN_HPP_NAMESPACE::detail::DispatchLoaderStatic;
#endif /*VK_NO_PROTOTYPES*/ #endif /*VK_NO_PROTOTYPES*/
} // namespace detail
using VULKAN_HPP_NAMESPACE::operator&; using VULKAN_HPP_NAMESPACE::operator&;
using VULKAN_HPP_NAMESPACE::operator|; using VULKAN_HPP_NAMESPACE::operator|;
@ -1797,7 +1800,10 @@ export namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL #if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL
using VULKAN_HPP_NAMESPACE::DynamicLoader; namespace detail
{
using VULKAN_HPP_NAMESPACE::detail::DynamicLoader;
} // namespace detail
#endif /*VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL*/ #endif /*VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL*/
//===================== //=====================
@ -1847,9 +1853,13 @@ export namespace VULKAN_HPP_NAMESPACE
//====================== //======================
using VULKAN_HPP_RAII_NAMESPACE::Context; using VULKAN_HPP_RAII_NAMESPACE::Context;
using VULKAN_HPP_RAII_NAMESPACE::ContextDispatcher;
using VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher; namespace detail
using VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher; {
using VULKAN_HPP_RAII_NAMESPACE::detail::ContextDispatcher;
using VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher;
using VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher;
} // namespace detail
//==================== //====================
//=== RAII HANDLEs === //=== RAII HANDLEs ===

File diff suppressed because it is too large Load Diff

View File

@ -257,33 +257,40 @@
namespace VULKAN_HPP_NAMESPACE namespace VULKAN_HPP_NAMESPACE
{ {
class DispatchLoaderDynamic; namespace detail
{
class DispatchLoaderDynamic;
#if !defined( VULKAN_HPP_DEFAULT_DISPATCHER )
# if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1
extern VULKAN_HPP_STORAGE_API DispatchLoaderDynamic defaultDispatchLoaderDynamic;
# endif
#endif
} // namespace detail
} // namespace VULKAN_HPP_NAMESPACE } // namespace VULKAN_HPP_NAMESPACE
#if !defined( VULKAN_HPP_DEFAULT_DISPATCHER ) #if !defined( VULKAN_HPP_DEFAULT_DISPATCHER )
# if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 # if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1
# define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::defaultDispatchLoaderDynamic # define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::detail::defaultDispatchLoaderDynamic
# define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE \ # define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE \
namespace VULKAN_HPP_NAMESPACE \ namespace VULKAN_HPP_NAMESPACE \
{ \ { \
VULKAN_HPP_STORAGE_API ::VULKAN_HPP_NAMESPACE::DispatchLoaderDynamic defaultDispatchLoaderDynamic; \ namespace detail \
{ \
VULKAN_HPP_STORAGE_API DispatchLoaderDynamic defaultDispatchLoaderDynamic; \
} \
} }
namespace VULKAN_HPP_NAMESPACE
{
extern VULKAN_HPP_STORAGE_API VULKAN_HPP_NAMESPACE::DispatchLoaderDynamic defaultDispatchLoaderDynamic;
} // namespace VULKAN_HPP_NAMESPACE
# else # else
# define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::getDispatchLoaderStatic() # define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::detail::getDispatchLoaderStatic()
# define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE # define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE
# endif # endif
#endif #endif
#if !defined( VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ) #if !defined( VULKAN_HPP_DEFAULT_DISPATCHER_TYPE )
# if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 # if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1
# define VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ::VULKAN_HPP_NAMESPACE::DispatchLoaderDynamic # define VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ::VULKAN_HPP_NAMESPACE::detail::DispatchLoaderDynamic
# else # else
# define VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ::VULKAN_HPP_NAMESPACE::DispatchLoaderStatic # define VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ::VULKAN_HPP_NAMESPACE::detail::DispatchLoaderStatic
# endif # endif
#endif #endif

File diff suppressed because it is too large Load Diff

View File

@ -356,9 +356,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
private: private:
DestroyFunctionPointerType<DispatchLoaderBase> m_destroy = nullptr; DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
const DispatchLoaderBase * m_dispatch = nullptr; const detail::DispatchLoaderBase * m_dispatch = nullptr;
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr; Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
}; };
template <typename HandleType> template <typename HandleType>
@ -387,9 +387,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
private: private:
DestroyFunctionPointerType<DispatchLoaderBase> m_destroy = nullptr; DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
const DispatchLoaderBase * m_dispatch = nullptr; const detail::DispatchLoaderBase * m_dispatch = nullptr;
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr; Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
}; };
template <typename HandleType> template <typename HandleType>
@ -416,8 +416,8 @@ namespace VULKAN_HPP_NAMESPACE
} }
private: private:
DestroyFunctionPointerType<DispatchLoaderBase> m_destroy = nullptr; DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
const DispatchLoaderBase * m_dispatch = nullptr; const detail::DispatchLoaderBase * m_dispatch = nullptr;
}; };
template <typename HandleType, typename PoolType> template <typename HandleType, typename PoolType>
@ -452,9 +452,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
private: private:
DestroyFunctionPointerType<DispatchLoaderBase> m_destroy = nullptr; DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
const DispatchLoaderBase * m_dispatch = nullptr; const detail::DispatchLoaderBase * 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 )