diff options
author | Alyssa Rosenzweig <alyssa@collabora.com> | 2023-03-30 11:48:56 -0400 |
---|---|---|
committer | Alyssa Rosenzweig <alyssa@collabora.com> | 2023-04-07 18:16:27 -0400 |
commit | 657e82a72f7aaccc45542b713f2fc16100a78fdc (patch) | |
tree | 10692557e63d9a7f337f29d43a4ec48a93e83e5b /src/vulkan | |
parent | 6894548d6c4062d047cef871383c5ea1bee9c0d4 (diff) | |
download | mesa-657e82a72f7aaccc45542b713f2fc16100a78fdc.tar.gz mesa-657e82a72f7aaccc45542b713f2fc16100a78fdc.tar.bz2 mesa-657e82a72f7aaccc45542b713f2fc16100a78fdc.zip |
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 <alyssa@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22217>
Diffstat (limited to 'src/vulkan')
-rw-r--r-- | src/vulkan/util/gen_enum_to_str.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vulkan/util/gen_enum_to_str.py b/src/vulkan/util/gen_enum_to_str.py index f633f978f91..fabba6f39f5 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 |