Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/commit/
37a8b2d12ea97775b725172d1f89c1bd59fc98cf
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>
}
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) {