tu: Be more consistent with using vk_format helpers

We've been using a mixture of util_format and vk_format helpers.
Always use the vk_format ones when available.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31304>
This commit is contained in:
Valentine Burley 2024-09-01 13:03:11 +00:00 committed by Marge Bot
parent c5d180a0bb
commit 913d452dc5

View file

@ -171,8 +171,8 @@ tu_physical_device_get_format_properties(
* to use, which means two channels and not something weird like
* luminance-alpha.
*/
if (util_format_is_float(format) &&
desc->nr_channels == 2 && desc->swizzle[0] == PIPE_SWIZZLE_X &&
if (vk_format_is_float(vk_format) && desc->nr_channels == 2 &&
desc->swizzle[0] == PIPE_SWIZZLE_X &&
desc->swizzle[1] == PIPE_SWIZZLE_Y) {
optimal |= VK_FORMAT_FEATURE_FRAGMENT_DENSITY_MAP_BIT_EXT;
}
@ -198,7 +198,7 @@ tu_physical_device_get_format_properties(
buffer |= VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT;
}
if (!util_format_is_pure_integer(format))
if (!vk_format_is_int(vk_format))
optimal |= VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT;
}