From 657e82a72f7aaccc45542b713f2fc16100a78fdc Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 30 Mar 2023 11:48:56 -0400 Subject: [PATCH] vulkan: Add common features2_to_features Needed to correctly implement GetPhysicalDeviceFormatProperties2. Cc stable so the turnip patch can get backported cleanly. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Samuel Pitoiset Reviewed-by: Faith Ekstrand Cc: mesa-stable Part-of: --- src/vulkan/util/gen_enum_to_str.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/vulkan/util/gen_enum_to_str.py b/src/vulkan/util/gen_enum_to_str.py index f633f97..fabba6f 100644 --- a/src/vulkan/util/gen_enum_to_str.py +++ b/src/vulkan/util/gen_enum_to_str.py @@ -243,6 +243,12 @@ H_DEFINE_TEMPLATE = Template(textwrap.dedent(u"""\ % endif % endfor + static inline VkFormatFeatureFlags + vk_format_features2_to_features(VkFormatFeatureFlags2 features2) + { + return features2 & VK_ALL_FORMAT_FEATURE_FLAG_BITS; + } + #ifdef __cplusplus } /* extern "C" */ #endif -- 2.7.4