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>
This commit is contained in:
Alyssa Rosenzweig 2023-03-30 11:48:56 -04:00
parent 6894548d6c
commit 657e82a72f
1 changed files with 6 additions and 0 deletions

View File

@ -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