From 0ec495e3c969db6da79a712a7668ba01189d56cc Mon Sep 17 00:00:00 2001 From: Danylo Piliaiev Date: Fri, 2 Apr 2021 21:40:07 +0300 Subject: [PATCH] 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 Part-of: --- src/freedreno/vulkan/tu_image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedreno/vulkan/tu_image.c b/src/freedreno/vulkan/tu_image.c index 7769cb86ed6..c98df7cada8 100644 --- a/src/freedreno/vulkan/tu_image.c +++ b/src/freedreno/vulkan/tu_image.c @@ -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; }