From 8fff8afb1343c934b4212ee1b0517dd2045a5c8c Mon Sep 17 00:00:00 2001 From: Jonathan Marek Date: Wed, 8 Jul 2020 21:00:07 -0400 Subject: [PATCH] turnip: disable tiling for NV12/IYUV formats The last change to my previous MR to disable UBWC for the formats ended up breaking a few tests for A640 at least, because tiled-but-not-UBWC can be broken in some cases. Fixes: 1a83279da57f2e ("turnip: enable 420_UNORM formats") Signed-off-by: Jonathan Marek Part-of: --- src/freedreno/vulkan/tu_image.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/freedreno/vulkan/tu_image.c b/src/freedreno/vulkan/tu_image.c index 6bcfc91..9087806 100644 --- a/src/freedreno/vulkan/tu_image.c +++ b/src/freedreno/vulkan/tu_image.c @@ -154,10 +154,16 @@ tu_image_create(VkDevice _device, * For IYUV, the blob doesn't use UBWC, but it seems to work, but * disable it since we don't know if a special UBWC format is needed * like NV12 + * + * Disable tiling completely, because we set the TILE_ALL bit to + * match the blob, however fdl expects the TILE_ALL bit to not be + * set for non-UBWC tiled formats */ if (image->vk_format == VK_FORMAT_G8_B8R8_2PLANE_420_UNORM || - image->vk_format == VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM) + image->vk_format == VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM) { + tile_mode = TILE6_LINEAR; ubwc_enabled = false; + } /* don't use UBWC with compressed formats */ if (vk_format_is_compressed(image->vk_format)) -- 2.7.4