Date: Mon, 13 Dec 2021 12:20:34 GMT From: Jan Beich <jbeich@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: db70f7d7b329 - main - graphics/vulkan-headers: replace std::hash workaround with upstream fix Message-ID: <202112131220.1BDCKYaa015815@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by jbeich: URL: https://cgit.FreeBSD.org/ports/commit/?id=db70f7d7b329c1b429363e3541204ae3096ce8ce commit db70f7d7b329c1b429363e3541204ae3096ce8ce Author: Jan Beich <jbeich@FreeBSD.org> AuthorDate: 2021-12-13 12:10:13 +0000 Commit: Jan Beich <jbeich@FreeBSD.org> CommitDate: 2021-12-13 12:20:14 +0000 graphics/vulkan-headers: replace std::hash workaround with upstream fix --- .../warzone2100/files/patch-vulkan-headers-1.2.202 | 30 - graphics/vulkan-headers/Makefile | 1 + .../files/patch-include_vulkan_vulkan.hpp | 30 - graphics/vulkan-headers/files/patch-vulkan-hpp | 35141 +++++++++++++++++++ graphics/vulkan-headers/pkg-plist | 1 + 5 files changed, 35143 insertions(+), 60 deletions(-) diff --git a/games/warzone2100/files/patch-vulkan-headers-1.2.202 b/games/warzone2100/files/patch-vulkan-headers-1.2.202 deleted file mode 100644 index 94c67b83349f..000000000000 --- a/games/warzone2100/files/patch-vulkan-headers-1.2.202 +++ /dev/null @@ -1,30 +0,0 @@ -In file included from warzone2100-4.0.1/lib/ivis_opengl/gfx_api_vk.cpp:42: -lib/ivis_opengl/gfx_api_vk.h:123:9: error: redefinition of 'hash<vk::DescriptorBufferInfo>' - struct hash<vk::DescriptorBufferInfo> - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -/usr/local/include/vulkan/vulkan_structs.hpp:20333:13: note: previous definition is here -struct std::hash<VULKAN_HPP_NAMESPACE::DescriptorBufferInfo> - ^ - ---- lib/ivis_opengl/gfx_api_vk.h.orig 2021-04-18 18:28:41 UTC -+++ lib/ivis_opengl/gfx_api_vk.h -@@ -118,19 +118,6 @@ inline void hash_combine(std::size_t& seed, const T& v - #endif - hash_combine(seed, rest...); - } --namespace std { -- template <> -- struct hash<vk::DescriptorBufferInfo> -- { -- std::size_t operator()(const vk::DescriptorBufferInfo& k) const -- { -- std::size_t h = 0; -- hash_combine(h, static_cast<VkBuffer>(k.buffer), k.offset, k.range); -- return h; -- } -- }; --} -- - struct BlockBufferAllocator - { - BlockBufferAllocator(VmaAllocator allocator, uint32_t minimumBlockSize, const vk::BufferUsageFlags& usageFlags, const VmaAllocationCreateInfo& allocInfo, bool autoMap = false); diff --git a/graphics/vulkan-headers/Makefile b/graphics/vulkan-headers/Makefile index 5d89bac9c1ec..c1e5ac8d11ad 100644 --- a/graphics/vulkan-headers/Makefile +++ b/graphics/vulkan-headers/Makefile @@ -1,6 +1,7 @@ PORTNAME= vulkan-headers DISTVERSIONPREFIX= v DISTVERSION= 1.2.202 +PORTREVISION= 1 CATEGORIES= graphics MAINTAINER= jbeich@FreeBSD.org diff --git a/graphics/vulkan-headers/files/patch-include_vulkan_vulkan.hpp b/graphics/vulkan-headers/files/patch-include_vulkan_vulkan.hpp deleted file mode 100644 index edb4a98c9d2e..000000000000 --- a/graphics/vulkan-headers/files/patch-include_vulkan_vulkan.hpp +++ /dev/null @@ -1,30 +0,0 @@ -https://github.com/KhronosGroup/Vulkan-Hpp/issues/1161 - ---- include/vulkan/vulkan.hpp.orig 2021-12-07 09:36:34 UTC -+++ include/vulkan/vulkan.hpp -@@ -234,9 +234,23 @@ static_assert( VK_HEADER_VERSION == 202, "Wrong VK_HEA - # define VULKAN_HPP_NAMESPACE vk - #endif - -+template <typename T, typename = typename std::is_enum<T>::type> -+struct safe_underlying_type -+{ -+ using type = T; -+}; -+ -+template <typename T> -+struct safe_underlying_type<T, std::true_type> -+{ -+ using type = typename std::underlying_type<T>::type; -+}; -+ - #if !defined( VULKAN_HPP_HASH_COMBINE ) --# define VULKAN_HPP_HASH_COMBINE( valueType, seed, value ) \ -- seed ^= std::hash<std::remove_const<valueType>::type>{}( value ) + 0x9e3779b9 + ( seed << 6 ) + ( seed >> 2 ) -+# define VULKAN_HPP_HASH_COMBINE( valueType, seed, value ) \ -+ seed ^= std::hash<std::remove_const<safe_underlying_type<valueType>::type>::type>{}( \ -+ static_cast<safe_underlying_type<valueType>::type>( value ) ) + \ -+ 0x9e3779b9 + ( seed << 6 ) + ( seed >> 2 ) - #endif - - #define VULKAN_HPP_STRINGIFY2( text ) #text diff --git a/graphics/vulkan-headers/files/patch-vulkan-hpp b/graphics/vulkan-headers/files/patch-vulkan-hpp new file mode 100644 index 000000000000..8f4e9dcc5507 --- /dev/null +++ b/graphics/vulkan-headers/files/patch-vulkan-hpp @@ -0,0 +1,35141 @@ +https://github.com/KhronosGroup/Vulkan-Hpp/pull/1165 (c7751f7725a4) + +--- include/vulkan/vulkan.hpp.orig 2021-12-07 09:36:34 UTC ++++ include/vulkan/vulkan.hpp +@@ -234,11 +234,6 @@ static_assert( VK_HEADER_VERSION == 202, "Wrong VK_HEA + # define VULKAN_HPP_NAMESPACE vk + #endif + +-#if !defined( VULKAN_HPP_HASH_COMBINE ) +-# define VULKAN_HPP_HASH_COMBINE( valueType, seed, value ) \ +- seed ^= std::hash<std::remove_const<valueType>::type>{}( value ) + 0x9e3779b9 + ( seed << 6 ) + ( seed >> 2 ) +-#endif +- + #define VULKAN_HPP_STRINGIFY2( text ) #text + #define VULKAN_HPP_STRINGIFY( text ) VULKAN_HPP_STRINGIFY2( text ) + #define VULKAN_HPP_NAMESPACE_STRING VULKAN_HPP_STRINGIFY( VULKAN_HPP_NAMESPACE ) +@@ -818,20 +813,7 @@ namespace VULKAN_HPP_NAMESPACE + { + return flags.operator^( bit ); + } +-} // namespace VULKAN_HPP_NAMESPACE + +-template <typename BitType> +-struct std::hash<VULKAN_HPP_NAMESPACE::Flags<BitType>> +-{ +- std::size_t operator()( VULKAN_HPP_NAMESPACE::Flags<BitType> const & flags ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<typename std::underlying_type<BitType>::type>{}( +- static_cast<typename std::underlying_type<BitType>::type>( flags ) ); +- } +-}; +- +-namespace VULKAN_HPP_NAMESPACE +-{ + template <typename RefType> + class Optional + { +--- include/vulkan/vulkan_handles.hpp.orig 2021-12-07 09:36:34 UTC ++++ include/vulkan/vulkan_handles.hpp +@@ -14531,476 +14531,4 @@ namespace VULKAN_HPP_NAMESPACE + #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + } // namespace VULKAN_HPP_NAMESPACE +- +-namespace std +-{ +- //======================= +- //=== HASH structures === +- //======================= +- +- //=== VK_VERSION_1_0 === +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::Instance> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::Instance const & instance ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkInstance>{}( static_cast<VkInstance>( instance ) ); +- } +- }; +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::PhysicalDevice> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevice const & physicalDevice ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkPhysicalDevice>{}( static_cast<VkPhysicalDevice>( physicalDevice ) ); +- } +- }; +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::Device> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::Device const & device ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkDevice>{}( static_cast<VkDevice>( device ) ); +- } +- }; +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::Queue> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::Queue const & queue ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkQueue>{}( static_cast<VkQueue>( queue ) ); +- } +- }; +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::DeviceMemory> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceMemory const & deviceMemory ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkDeviceMemory>{}( static_cast<VkDeviceMemory>( deviceMemory ) ); +- } +- }; +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::Fence> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::Fence const & fence ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkFence>{}( static_cast<VkFence>( fence ) ); +- } +- }; +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::Semaphore> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::Semaphore const & semaphore ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkSemaphore>{}( static_cast<VkSemaphore>( semaphore ) ); +- } +- }; +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::Event> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::Event const & event ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkEvent>{}( static_cast<VkEvent>( event ) ); +- } +- }; +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::QueryPool> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::QueryPool const & queryPool ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkQueryPool>{}( static_cast<VkQueryPool>( queryPool ) ); +- } +- }; +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::Buffer> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::Buffer const & buffer ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkBuffer>{}( static_cast<VkBuffer>( buffer ) ); +- } +- }; +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::BufferView> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferView const & bufferView ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkBufferView>{}( static_cast<VkBufferView>( bufferView ) ); +- } +- }; +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::Image> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::Image const & image ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkImage>{}( static_cast<VkImage>( image ) ); +- } +- }; +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::ImageView> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageView const & imageView ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkImageView>{}( static_cast<VkImageView>( imageView ) ); +- } +- }; +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::ShaderModule> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::ShaderModule const & shaderModule ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkShaderModule>{}( static_cast<VkShaderModule>( shaderModule ) ); +- } +- }; +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::PipelineCache> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineCache const & pipelineCache ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkPipelineCache>{}( static_cast<VkPipelineCache>( pipelineCache ) ); +- } +- }; +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::Pipeline> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::Pipeline const & pipeline ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkPipeline>{}( static_cast<VkPipeline>( pipeline ) ); +- } +- }; +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::PipelineLayout> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineLayout const & pipelineLayout ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkPipelineLayout>{}( static_cast<VkPipelineLayout>( pipelineLayout ) ); +- } +- }; +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::Sampler> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::Sampler const & sampler ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkSampler>{}( static_cast<VkSampler>( sampler ) ); +- } +- }; +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::DescriptorPool> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorPool const & descriptorPool ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkDescriptorPool>{}( static_cast<VkDescriptorPool>( descriptorPool ) ); +- } +- }; +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::DescriptorSet> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorSet const & descriptorSet ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkDescriptorSet>{}( static_cast<VkDescriptorSet>( descriptorSet ) ); +- } +- }; +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::DescriptorSetLayout> +- { +- std::size_t +- operator()( VULKAN_HPP_NAMESPACE::DescriptorSetLayout const & descriptorSetLayout ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkDescriptorSetLayout>{}( static_cast<VkDescriptorSetLayout>( descriptorSetLayout ) ); +- } +- }; +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::Framebuffer> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::Framebuffer const & framebuffer ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkFramebuffer>{}( static_cast<VkFramebuffer>( framebuffer ) ); +- } +- }; +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::RenderPass> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPass const & renderPass ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkRenderPass>{}( static_cast<VkRenderPass>( renderPass ) ); +- } +- }; +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::CommandPool> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandPool const & commandPool ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkCommandPool>{}( static_cast<VkCommandPool>( commandPool ) ); +- } +- }; +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::CommandBuffer> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandBuffer const & commandBuffer ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkCommandBuffer>{}( static_cast<VkCommandBuffer>( commandBuffer ) ); +- } +- }; +- +- //=== VK_VERSION_1_1 === +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion const & samplerYcbcrConversion ) const +- VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkSamplerYcbcrConversion>{}( static_cast<VkSamplerYcbcrConversion>( samplerYcbcrConversion ) ); +- } +- }; +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate const & descriptorUpdateTemplate ) const +- VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkDescriptorUpdateTemplate>{}( +- static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ) ); +- } +- }; +- +- //=== VK_KHR_surface === +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::SurfaceKHR> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::SurfaceKHR const & surfaceKHR ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkSurfaceKHR>{}( static_cast<VkSurfaceKHR>( surfaceKHR ) ); +- } +- }; +- +- //=== VK_KHR_swapchain === +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::SwapchainKHR> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::SwapchainKHR const & swapchainKHR ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkSwapchainKHR>{}( static_cast<VkSwapchainKHR>( swapchainKHR ) ); +- } +- }; +- +- //=== VK_KHR_display === +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::DisplayKHR> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayKHR const & displayKHR ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkDisplayKHR>{}( static_cast<VkDisplayKHR>( displayKHR ) ); +- } +- }; +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::DisplayModeKHR> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayModeKHR const & displayModeKHR ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkDisplayModeKHR>{}( static_cast<VkDisplayModeKHR>( displayModeKHR ) ); +- } +- }; +- +- //=== VK_EXT_debug_report === +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT const & debugReportCallbackEXT ) const +- VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkDebugReportCallbackEXT>{}( static_cast<VkDebugReportCallbackEXT>( debugReportCallbackEXT ) ); +- } +- }; +- +-#if defined( VK_ENABLE_BETA_EXTENSIONS ) +- //=== VK_KHR_video_queue === +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::VideoSessionKHR> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoSessionKHR const & videoSessionKHR ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkVideoSessionKHR>{}( static_cast<VkVideoSessionKHR>( videoSessionKHR ) ); +- } +- }; +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR const & videoSessionParametersKHR ) const +- VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkVideoSessionParametersKHR>{}( +- static_cast<VkVideoSessionParametersKHR>( videoSessionParametersKHR ) ); +- } +- }; +-#endif /*VK_ENABLE_BETA_EXTENSIONS*/ +- +- //=== VK_NVX_binary_import === +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::CuModuleNVX> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::CuModuleNVX const & cuModuleNVX ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkCuModuleNVX>{}( static_cast<VkCuModuleNVX>( cuModuleNVX ) ); +- } +- }; +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::CuFunctionNVX> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::CuFunctionNVX const & cuFunctionNVX ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkCuFunctionNVX>{}( static_cast<VkCuFunctionNVX>( cuFunctionNVX ) ); +- } +- }; +- +- //=== VK_EXT_debug_utils === +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT const & debugUtilsMessengerEXT ) const +- VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkDebugUtilsMessengerEXT>{}( static_cast<VkDebugUtilsMessengerEXT>( debugUtilsMessengerEXT ) ); +- } +- }; +- +- //=== VK_KHR_acceleration_structure === +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::AccelerationStructureKHR> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR const & accelerationStructureKHR ) const +- VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkAccelerationStructureKHR>{}( +- static_cast<VkAccelerationStructureKHR>( accelerationStructureKHR ) ); +- } +- }; +- +- //=== VK_EXT_validation_cache === +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::ValidationCacheEXT> +- { +- std::size_t +- operator()( VULKAN_HPP_NAMESPACE::ValidationCacheEXT const & validationCacheEXT ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkValidationCacheEXT>{}( static_cast<VkValidationCacheEXT>( validationCacheEXT ) ); +- } +- }; +- +- //=== VK_NV_ray_tracing === +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::AccelerationStructureNV> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureNV const & accelerationStructureNV ) const +- VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkAccelerationStructureNV>{}( +- static_cast<VkAccelerationStructureNV>( accelerationStructureNV ) ); +- } +- }; +- +- //=== VK_INTEL_performance_query === +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL const & performanceConfigurationINTEL ) +- const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkPerformanceConfigurationINTEL>{}( +- static_cast<VkPerformanceConfigurationINTEL>( performanceConfigurationINTEL ) ); +- } +- }; +- +- //=== VK_KHR_deferred_host_operations === +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::DeferredOperationKHR> +- { +- std::size_t +- operator()( VULKAN_HPP_NAMESPACE::DeferredOperationKHR const & deferredOperationKHR ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkDeferredOperationKHR>{}( static_cast<VkDeferredOperationKHR>( deferredOperationKHR ) ); +- } +- }; +- +- //=== VK_NV_device_generated_commands === +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV const & indirectCommandsLayoutNV ) const +- VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkIndirectCommandsLayoutNV>{}( +- static_cast<VkIndirectCommandsLayoutNV>( indirectCommandsLayoutNV ) ); +- } +- }; +- +- //=== VK_EXT_private_data === +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::PrivateDataSlotEXT> +- { +- std::size_t +- operator()( VULKAN_HPP_NAMESPACE::PrivateDataSlotEXT const & privateDataSlotEXT ) const VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkPrivateDataSlotEXT>{}( static_cast<VkPrivateDataSlotEXT>( privateDataSlotEXT ) ); +- } +- }; +- +-#if defined( VK_USE_PLATFORM_FUCHSIA ) +- //=== VK_FUCHSIA_buffer_collection === +- +- template <> +- struct hash<VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA> +- { +- std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA const & bufferCollectionFUCHSIA ) const +- VULKAN_HPP_NOEXCEPT +- { +- return std::hash<VkBufferCollectionFUCHSIA>{}( +- static_cast<VkBufferCollectionFUCHSIA>( bufferCollectionFUCHSIA ) ); +- } +- }; +-#endif /*VK_USE_PLATFORM_FUCHSIA*/ +- +-} // namespace std + #endif +--- include/vulkan/vulkan_hash.hpp.orig 2021-12-13 12:09:23 UTC ++++ include/vulkan/vulkan_hash.hpp +@@ -0,0 +1,12959 @@ ++// Copyright 2015-2021 The Khronos Group Inc. ++// ++// SPDX-License-Identifier: Apache-2.0 OR MIT ++// ++ ++// This header is generated from the Khronos Vulkan XML API Registry. ++ ++#ifndef VULKAN_HASH_HPP ++#define VULKAN_HASH_HPP ++ ++#include <vulkan/vulkan.hpp> ++ ++namespace std ++{ ++ //======================================= ++ //=== HASH structures for Flags types === ++ //======================================= ++ ++ template <typename BitType> ++ struct hash<VULKAN_HPP_NAMESPACE::Flags<BitType>> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::Flags<BitType> const & flags ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<typename std::underlying_type<BitType>::type>{}( ++ static_cast<typename std::underlying_type<BitType>::type>( flags ) ); ++ } ++ }; ++ ++ //=================================== ++ //=== HASH structures for handles === ++ //=================================== ++ ++ //=== VK_VERSION_1_0 === ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::Instance> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::Instance const & instance ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkInstance>{}( static_cast<VkInstance>( instance ) ); ++ } ++ }; ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::PhysicalDevice> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevice const & physicalDevice ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkPhysicalDevice>{}( static_cast<VkPhysicalDevice>( physicalDevice ) ); ++ } ++ }; ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::Device> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::Device const & device ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkDevice>{}( static_cast<VkDevice>( device ) ); ++ } ++ }; ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::Queue> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::Queue const & queue ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkQueue>{}( static_cast<VkQueue>( queue ) ); ++ } ++ }; ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::DeviceMemory> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceMemory const & deviceMemory ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkDeviceMemory>{}( static_cast<VkDeviceMemory>( deviceMemory ) ); ++ } ++ }; ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::Fence> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::Fence const & fence ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkFence>{}( static_cast<VkFence>( fence ) ); ++ } ++ }; ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::Semaphore> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::Semaphore const & semaphore ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkSemaphore>{}( static_cast<VkSemaphore>( semaphore ) ); ++ } ++ }; ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::Event> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::Event const & event ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkEvent>{}( static_cast<VkEvent>( event ) ); ++ } ++ }; ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::QueryPool> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::QueryPool const & queryPool ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkQueryPool>{}( static_cast<VkQueryPool>( queryPool ) ); ++ } ++ }; ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::Buffer> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::Buffer const & buffer ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkBuffer>{}( static_cast<VkBuffer>( buffer ) ); ++ } ++ }; ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::BufferView> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferView const & bufferView ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkBufferView>{}( static_cast<VkBufferView>( bufferView ) ); ++ } ++ }; ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::Image> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::Image const & image ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkImage>{}( static_cast<VkImage>( image ) ); ++ } ++ }; ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::ImageView> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageView const & imageView ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkImageView>{}( static_cast<VkImageView>( imageView ) ); ++ } ++ }; ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::ShaderModule> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::ShaderModule const & shaderModule ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkShaderModule>{}( static_cast<VkShaderModule>( shaderModule ) ); ++ } ++ }; ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::PipelineCache> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineCache const & pipelineCache ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkPipelineCache>{}( static_cast<VkPipelineCache>( pipelineCache ) ); ++ } ++ }; ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::Pipeline> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::Pipeline const & pipeline ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkPipeline>{}( static_cast<VkPipeline>( pipeline ) ); ++ } ++ }; ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::PipelineLayout> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineLayout const & pipelineLayout ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkPipelineLayout>{}( static_cast<VkPipelineLayout>( pipelineLayout ) ); ++ } ++ }; ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::Sampler> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::Sampler const & sampler ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkSampler>{}( static_cast<VkSampler>( sampler ) ); ++ } ++ }; ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::DescriptorPool> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorPool const & descriptorPool ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkDescriptorPool>{}( static_cast<VkDescriptorPool>( descriptorPool ) ); ++ } ++ }; ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::DescriptorSet> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorSet const & descriptorSet ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkDescriptorSet>{}( static_cast<VkDescriptorSet>( descriptorSet ) ); ++ } ++ }; ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::DescriptorSetLayout> ++ { ++ std::size_t ++ operator()( VULKAN_HPP_NAMESPACE::DescriptorSetLayout const & descriptorSetLayout ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkDescriptorSetLayout>{}( static_cast<VkDescriptorSetLayout>( descriptorSetLayout ) ); ++ } ++ }; ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::Framebuffer> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::Framebuffer const & framebuffer ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkFramebuffer>{}( static_cast<VkFramebuffer>( framebuffer ) ); ++ } ++ }; ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::RenderPass> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPass const & renderPass ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkRenderPass>{}( static_cast<VkRenderPass>( renderPass ) ); ++ } ++ }; ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::CommandPool> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandPool const & commandPool ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkCommandPool>{}( static_cast<VkCommandPool>( commandPool ) ); ++ } ++ }; ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::CommandBuffer> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandBuffer const & commandBuffer ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkCommandBuffer>{}( static_cast<VkCommandBuffer>( commandBuffer ) ); ++ } ++ }; ++ ++ //=== VK_VERSION_1_1 === ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion const & samplerYcbcrConversion ) const ++ VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkSamplerYcbcrConversion>{}( static_cast<VkSamplerYcbcrConversion>( samplerYcbcrConversion ) ); ++ } ++ }; ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate const & descriptorUpdateTemplate ) const ++ VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkDescriptorUpdateTemplate>{}( ++ static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ) ); ++ } ++ }; ++ ++ //=== VK_KHR_surface === ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::SurfaceKHR> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::SurfaceKHR const & surfaceKHR ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkSurfaceKHR>{}( static_cast<VkSurfaceKHR>( surfaceKHR ) ); ++ } ++ }; ++ ++ //=== VK_KHR_swapchain === ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::SwapchainKHR> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::SwapchainKHR const & swapchainKHR ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkSwapchainKHR>{}( static_cast<VkSwapchainKHR>( swapchainKHR ) ); ++ } ++ }; ++ ++ //=== VK_KHR_display === ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::DisplayKHR> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayKHR const & displayKHR ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkDisplayKHR>{}( static_cast<VkDisplayKHR>( displayKHR ) ); ++ } ++ }; ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::DisplayModeKHR> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayModeKHR const & displayModeKHR ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkDisplayModeKHR>{}( static_cast<VkDisplayModeKHR>( displayModeKHR ) ); ++ } ++ }; ++ ++ //=== VK_EXT_debug_report === ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT const & debugReportCallbackEXT ) const ++ VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkDebugReportCallbackEXT>{}( static_cast<VkDebugReportCallbackEXT>( debugReportCallbackEXT ) ); ++ } ++ }; ++ ++#if defined( VK_ENABLE_BETA_EXTENSIONS ) ++ //=== VK_KHR_video_queue === ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::VideoSessionKHR> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoSessionKHR const & videoSessionKHR ) const VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkVideoSessionKHR>{}( static_cast<VkVideoSessionKHR>( videoSessionKHR ) ); ++ } ++ }; ++ ++ template <> ++ struct hash<VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR> ++ { ++ std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR const & videoSessionParametersKHR ) const ++ VULKAN_HPP_NOEXCEPT ++ { ++ return std::hash<VkVideoSessionParametersKHR>{}( ++ static_cast<VkVideoSessionParametersKHR>( videoSessionParametersKHR ) ); ++ } ++ }; *** 34275 LINES SKIPPED ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202112131220.1BDCKYaa015815>