turnip: handle format list for compressed formats

Compressed formats may have compatible formats, however they could
only be sampled, so we should not call tu6_format_color with them.

tu6_format_texture should have the same behaviour for checking swap
so use it for all cases.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10009>
This commit is contained in:
Danylo Piliaiev 2021-04-02 21:40:07 +03:00 committed by Marge Bot
parent e4e476c9a5
commit 0ec495e3c9
1 changed files with 1 additions and 1 deletions

View File

@ -591,7 +591,7 @@ tu_CreateImage(VkDevice _device,
if (fmt_list) {
may_be_swapped = false;
for (uint32_t i = 0; i < fmt_list->viewFormatCount; i++) {
if (tu6_format_color(fmt_list->pViewFormats[i], TILE6_LINEAR).swap) {
if (tu6_format_texture(fmt_list->pViewFormats[i], TILE6_LINEAR).swap) {
may_be_swapped = true;
break;
}