From 73276f2c26f275ec0d79b4d7b0877b878a242617 Mon Sep 17 00:00:00 2001 From: asuessenbach Date: Mon, 14 Nov 2022 12:28:20 +0100 Subject: [PATCH] Remove outdated conditions around two init functions of the DispatchLoaderDynamic. --- VulkanHppGenerator.cpp | 42 ++++++++++++++++++--------------------- vulkan/vulkan.hpp | 42 ++++++++++++++++++--------------------- vulkan/vulkan_enums.hpp | 6 +++--- vulkan/vulkan_structs.hpp | 18 ++++++++--------- 4 files changed, 50 insertions(+), 58 deletions(-) diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 599ff61..c65ca88 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -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 - 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("vkGetInstanceProcAddr"); - PFN_vkGetDeviceProcAddr getDeviceProcAddr = dl.template getProcAddress("vkGetDeviceProcAddr"); - init(static_cast(instance), getInstanceProcAddr, static_cast(device), device ? getDeviceProcAddr : nullptr); - } - - // This interface is designed to be used for per-device function pointers in combination with a linked vulkan library. - template - 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 + 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("vkGetInstanceProcAddr"); + PFN_vkGetDeviceProcAddr getDeviceProcAddr = dl.template getProcAddress("vkGetDeviceProcAddr"); + init(static_cast(instance), getInstanceProcAddr, static_cast(device), device ? getDeviceProcAddr : nullptr); + } + + template + 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; diff --git a/vulkan/vulkan.hpp b/vulkan/vulkan.hpp index 80f7930..75e1261 100644 --- a/vulkan/vulkan.hpp +++ b/vulkan/vulkan.hpp @@ -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 - 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( "vkGetInstanceProcAddr" ); - PFN_vkGetDeviceProcAddr getDeviceProcAddr = dl.template getProcAddress( "vkGetDeviceProcAddr" ); - init( static_cast( instance ), getInstanceProcAddr, static_cast( device ), device ? getDeviceProcAddr : nullptr ); - } - - // This interface is designed to be used for per-device function pointers in combination with a linked vulkan library. - template - 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 + 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( "vkGetInstanceProcAddr" ); + PFN_vkGetDeviceProcAddr getDeviceProcAddr = dl.template getProcAddress( "vkGetDeviceProcAddr" ); + init( static_cast( instance ), getInstanceProcAddr, static_cast( device ), device ? getDeviceProcAddr : nullptr ); + } + + template + 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 diff --git a/vulkan/vulkan_enums.hpp b/vulkan/vulkan_enums.hpp index a56958e..4f66d9a 100644 --- a/vulkan/vulkan_enums.hpp +++ b/vulkan/vulkan_enums.hpp @@ -1694,9 +1694,9 @@ namespace VULKAN_HPP_NAMESPACE static VULKAN_HPP_CONST_OR_CONSTEXPR QueueFlags allFlags = QueueFlagBits::eGraphics | QueueFlagBits::eCompute | QueueFlagBits::eTransfer | QueueFlagBits::eSparseBinding | QueueFlagBits::eProtected #if defined( VK_ENABLE_BETA_EXTENSIONS ) - | QueueFlagBits::eVideoDecodeKHR | QueueFlagBits::eVideoEncodeKHR + | QueueFlagBits::eVideoDecodeKHR | QueueFlagBits::eVideoEncodeKHR #endif /*VK_ENABLE_BETA_EXTENSIONS*/ - | QueueFlagBits::eOpticalFlowNV; + | QueueFlagBits::eOpticalFlowNV; }; enum class SampleCountFlagBits : VkSampleCountFlags @@ -1970,7 +1970,7 @@ namespace VULKAN_HPP_NAMESPACE static VULKAN_HPP_CONST_OR_CONSTEXPR QueryResultFlags allFlags = QueryResultFlagBits::e64 | QueryResultFlagBits::eWait | QueryResultFlagBits::eWithAvailability | QueryResultFlagBits::ePartial #if defined( VK_ENABLE_BETA_EXTENSIONS ) - | QueryResultFlagBits::eWithStatusKHR + | QueryResultFlagBits::eWithStatusKHR #endif /*VK_ENABLE_BETA_EXTENSIONS*/ ; }; diff --git a/vulkan/vulkan_structs.hpp b/vulkan/vulkan_structs.hpp index 9daee99..a260814 100644 --- a/vulkan/vulkan_structs.hpp +++ b/vulkan/vulkan_structs.hpp @@ -2516,10 +2516,10 @@ namespace VULKAN_HPP_NAMESPACE public: VULKAN_HPP_NAMESPACE::TransformMatrixKHR transform = {}; - uint32_t instanceCustomIndex : 24; - uint32_t mask : 8; + uint32_t instanceCustomIndex : 24; + uint32_t mask : 8; uint32_t instanceShaderBindingTableRecordOffset : 24; - VkGeometryInstanceFlagsKHR flags : 8; + VkGeometryInstanceFlagsKHR flags : 8; uint64_t accelerationStructureReference = {}; }; using AccelerationStructureInstanceNV = AccelerationStructureInstanceKHR; @@ -2662,10 +2662,10 @@ namespace VULKAN_HPP_NAMESPACE public: VULKAN_HPP_NAMESPACE::TransformMatrixKHR transformT0 = {}; VULKAN_HPP_NAMESPACE::TransformMatrixKHR transformT1 = {}; - uint32_t instanceCustomIndex : 24; - uint32_t mask : 8; + uint32_t instanceCustomIndex : 24; + uint32_t mask : 8; uint32_t instanceShaderBindingTableRecordOffset : 24; - VkGeometryInstanceFlagsKHR flags : 8; + VkGeometryInstanceFlagsKHR flags : 8; uint64_t accelerationStructureReference = {}; }; @@ -3256,10 +3256,10 @@ namespace VULKAN_HPP_NAMESPACE public: VULKAN_HPP_NAMESPACE::SRTDataNV transformT0 = {}; VULKAN_HPP_NAMESPACE::SRTDataNV transformT1 = {}; - uint32_t instanceCustomIndex : 24; - uint32_t mask : 8; + uint32_t instanceCustomIndex : 24; + uint32_t mask : 8; uint32_t instanceShaderBindingTableRecordOffset : 24; - VkGeometryInstanceFlagsKHR flags : 8; + VkGeometryInstanceFlagsKHR flags : 8; uint64_t accelerationStructureReference = {}; };