mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Merge pull request #1448 from asuessenbach/condition
Remove outdated conditions around two init functions of the DispatchLoaderDynamic.
This commit is contained in:
commit
f461105d14
@ -4622,29 +4622,6 @@ ${commandMembers}
|
||||
DispatchLoaderDynamic() VULKAN_HPP_NOEXCEPT = default;
|
||||
DispatchLoaderDynamic( DispatchLoaderDynamic const & rhs ) VULKAN_HPP_NOEXCEPT = default;
|
||||
|
||||
#if !defined( VK_NO_PROTOTYPES )
|
||||
// This interface is designed to be used for per-device function pointers in combination with a linked vulkan library.
|
||||
template <typename DynamicLoader>
|
||||
void init(VULKAN_HPP_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::Device const & device, DynamicLoader const & dl) VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
PFN_vkGetInstanceProcAddr getInstanceProcAddr = dl.template getProcAddress<PFN_vkGetInstanceProcAddr>("vkGetInstanceProcAddr");
|
||||
PFN_vkGetDeviceProcAddr getDeviceProcAddr = dl.template getProcAddress<PFN_vkGetDeviceProcAddr>("vkGetDeviceProcAddr");
|
||||
init(static_cast<VkInstance>(instance), getInstanceProcAddr, static_cast<VkDevice>(device), device ? getDeviceProcAddr : nullptr);
|
||||
}
|
||||
|
||||
// This interface is designed to be used for per-device function pointers in combination with a linked vulkan library.
|
||||
template <typename DynamicLoader
|
||||
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL
|
||||
= VULKAN_HPP_NAMESPACE::DynamicLoader
|
||||
#endif
|
||||
>
|
||||
void init(VULKAN_HPP_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::Device const & device) VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
static DynamicLoader dl;
|
||||
init(instance, device, dl);
|
||||
}
|
||||
#endif // !defined( VK_NO_PROTOTYPES )
|
||||
|
||||
DispatchLoaderDynamic(PFN_vkGetInstanceProcAddr getInstanceProcAddr) VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
init(getInstanceProcAddr);
|
||||
@ -4695,6 +4672,25 @@ ${instanceCommandAssignments}
|
||||
|
||||
${deviceCommandAssignments}
|
||||
}
|
||||
|
||||
template <typename DynamicLoader>
|
||||
void init(VULKAN_HPP_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::Device const & device, DynamicLoader const & dl) VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
PFN_vkGetInstanceProcAddr getInstanceProcAddr = dl.template getProcAddress<PFN_vkGetInstanceProcAddr>("vkGetInstanceProcAddr");
|
||||
PFN_vkGetDeviceProcAddr getDeviceProcAddr = dl.template getProcAddress<PFN_vkGetDeviceProcAddr>("vkGetDeviceProcAddr");
|
||||
init(static_cast<VkInstance>(instance), getInstanceProcAddr, static_cast<VkDevice>(device), device ? getDeviceProcAddr : nullptr);
|
||||
}
|
||||
|
||||
template <typename DynamicLoader
|
||||
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL
|
||||
= VULKAN_HPP_NAMESPACE::DynamicLoader
|
||||
#endif
|
||||
>
|
||||
void init(VULKAN_HPP_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::Device const & device) VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
static DynamicLoader dl;
|
||||
init(instance, device, dl);
|
||||
}
|
||||
};)";
|
||||
|
||||
std::string commandMembers, deviceCommandAssignments, initialCommandAssignments, instanceCommandAssignments;
|
||||
|
@ -13245,29 +13245,6 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
DispatchLoaderDynamic() VULKAN_HPP_NOEXCEPT = default;
|
||||
DispatchLoaderDynamic( DispatchLoaderDynamic const & rhs ) VULKAN_HPP_NOEXCEPT = default;
|
||||
|
||||
#if !defined( VK_NO_PROTOTYPES )
|
||||
// This interface is designed to be used for per-device function pointers in combination with a linked vulkan library.
|
||||
template <typename DynamicLoader>
|
||||
void init( VULKAN_HPP_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::Device const & device, DynamicLoader const & dl ) VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
PFN_vkGetInstanceProcAddr getInstanceProcAddr = dl.template getProcAddress<PFN_vkGetInstanceProcAddr>( "vkGetInstanceProcAddr" );
|
||||
PFN_vkGetDeviceProcAddr getDeviceProcAddr = dl.template getProcAddress<PFN_vkGetDeviceProcAddr>( "vkGetDeviceProcAddr" );
|
||||
init( static_cast<VkInstance>( instance ), getInstanceProcAddr, static_cast<VkDevice>( device ), device ? getDeviceProcAddr : nullptr );
|
||||
}
|
||||
|
||||
// This interface is designed to be used for per-device function pointers in combination with a linked vulkan library.
|
||||
template <typename DynamicLoader
|
||||
# if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL
|
||||
= VULKAN_HPP_NAMESPACE::DynamicLoader
|
||||
# endif
|
||||
>
|
||||
void init( VULKAN_HPP_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::Device const & device ) VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
static DynamicLoader dl;
|
||||
init( instance, device, dl );
|
||||
}
|
||||
#endif // !defined( VK_NO_PROTOTYPES )
|
||||
|
||||
DispatchLoaderDynamic( PFN_vkGetInstanceProcAddr getInstanceProcAddr ) VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
init( getInstanceProcAddr );
|
||||
@ -15438,6 +15415,25 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
vkGetDynamicRenderingTilePropertiesQCOM =
|
||||
PFN_vkGetDynamicRenderingTilePropertiesQCOM( vkGetDeviceProcAddr( device, "vkGetDynamicRenderingTilePropertiesQCOM" ) );
|
||||
}
|
||||
|
||||
template <typename DynamicLoader>
|
||||
void init( VULKAN_HPP_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::Device const & device, DynamicLoader const & dl ) VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
PFN_vkGetInstanceProcAddr getInstanceProcAddr = dl.template getProcAddress<PFN_vkGetInstanceProcAddr>( "vkGetInstanceProcAddr" );
|
||||
PFN_vkGetDeviceProcAddr getDeviceProcAddr = dl.template getProcAddress<PFN_vkGetDeviceProcAddr>( "vkGetDeviceProcAddr" );
|
||||
init( static_cast<VkInstance>( instance ), getInstanceProcAddr, static_cast<VkDevice>( device ), device ? getDeviceProcAddr : nullptr );
|
||||
}
|
||||
|
||||
template <typename DynamicLoader
|
||||
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL
|
||||
= VULKAN_HPP_NAMESPACE::DynamicLoader
|
||||
#endif
|
||||
>
|
||||
void init( VULKAN_HPP_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::Device const & device ) VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
static DynamicLoader dl;
|
||||
init( instance, device, dl );
|
||||
}
|
||||
};
|
||||
} // namespace VULKAN_HPP_NAMESPACE
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user