diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2021-12-07 09:36:34 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2021-12-11 00:09:54 +0000 |
commit | f7abaa498134e5bccf45f6ab67525d803b00aaac (patch) | |
tree | 7fa93601189f218f1326822a07f7710d43877f34 /graphics/vulkan-headers/files/patch-include_vulkan_vulkan.hpp | |
parent | 311bf443f107c37d4043ea691435d4de1e7b0559 (diff) | |
download | ports-f7abaa498134e5bccf45f6ab67525d803b00aaac.tar.gz ports-f7abaa498134e5bccf45f6ab67525d803b00aaac.zip |
graphics/vulkan-headers: update to 1.2.202
Force rebuild vulkan-loader to make sure vulkaninfo shows the new version.
Changes: https://github.com/KhronosGroup/Vulkan-Headers/compare/v1.2.201...v1.2.202
Reported by: Repology
Diffstat (limited to 'graphics/vulkan-headers/files/patch-include_vulkan_vulkan.hpp')
-rw-r--r-- | graphics/vulkan-headers/files/patch-include_vulkan_vulkan.hpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/graphics/vulkan-headers/files/patch-include_vulkan_vulkan.hpp b/graphics/vulkan-headers/files/patch-include_vulkan_vulkan.hpp new file mode 100644 index 000000000000..edb4a98c9d2e --- /dev/null +++ b/graphics/vulkan-headers/files/patch-include_vulkan_vulkan.hpp @@ -0,0 +1,30 @@ +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 |