wsi: remove get_sorted_vk_formats duplication

Fixes: 37a8b2d12e
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8727

Signed-off-by: Oleksii Bozhenko oleksii.bozhenko@globallogic.com

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22337>
This commit is contained in:
Oleksii Bozhenko 2023-04-12 12:53:54 +03:00 committed by Marge Bot
parent 53106c3a4f
commit 8976d8280f
1 changed files with 4 additions and 2 deletions

View File

@ -827,10 +827,12 @@ get_sorted_vk_formats(VkIcdSurfaceBase *surface, struct wsi_device *wsi_device,
}
for (unsigned i = 0; i < ARRAY_SIZE(formats); i++) {
if (formats[i] == sorted_formats[0])
continue;
for (unsigned j = 0; j < *count; j++)
if (formats[i] == sorted_formats[j])
goto next_format;
if (rgb_component_bits_are_equal(formats[i], visual))
sorted_formats[(*count)++] = formats[i];
next_format:;
}
if (wsi_device->force_bgra8_unorm_first) {