tu: Use vk_features2_to_features
authorAlyssa Rosenzweig <alyssa@collabora.com>
Thu, 30 Mar 2023 15:56:57 +0000 (11:56 -0400)
committerAlyssa Rosenzweig <alyssa@collabora.com>
Fri, 7 Apr 2023 22:16:43 +0000 (18:16 -0400)
commitfd9c69218ae2967f8bbc91cf84c86556881363c1
tree696a0873fef833f1589b857155c0833017e5af20
parent4fa2924610c7aa69bcfd6a8f47e528606aac846c
tu: Use vk_features2_to_features

Sanitizes properties returned through GetPhysicalDeviceFormatProperties2.

Bit-31 is not valid to return in the original
vkGetPhysicalDeviceFormatProperties{2,}. Sanitize the bit returned from the
internal to ensure invalid bits aren't return to the application.

Falls in line with the other vulkan drivers.

Based on original commit by Ryan Houdek.

Closes: #8733
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22217>
src/freedreno/vulkan/tu_formats.cc