From 9e8824371bf066fc3bfda5ff9da2cae04b2b24dd Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Thu, 12 Dec 2024 17:50:05 -0500 Subject: [PATCH] tu: Re-enable tiled non-ubwc R8G8 images This effectively reverts a70b197741f ("turnip: Force linear mode for non-ubwc R8G8 formats"), except that in the meantime we added HIC support without supporting R8G8 so we still have to force linear tiling in that case. The previous commit is a better fix. Tiled uncompressed images will be used for sparse residency support, it's not valid to arbitarily not support sparse texturing on R8G8, the blob does use a tiled uncompressed image in that case, and we will have to also. Part-of: --- src/freedreno/vulkan/tu_image.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/freedreno/vulkan/tu_image.cc b/src/freedreno/vulkan/tu_image.cc index 51fdd19856c..8e831914ea6 100644 --- a/src/freedreno/vulkan/tu_image.cc +++ b/src/freedreno/vulkan/tu_image.cc @@ -506,12 +506,11 @@ tu_image_update_layout(struct tu_device *device, struct tu_image *image, image->ubwc_enabled = true; } - /* Non-UBWC tiled R8G8 is probably buggy since media formats are always - * either linear or UBWC. There is no simple test to reproduce the bug. - * However it was observed in the wild leading to an unrecoverable hang - * on a650/a660. + /* R8G8 images have a special tiled layout which we don't implement yet in + * fdl6_memcpy, fall back to linear. */ - if (has_r8g8 && tile_mode == TILE6_3 && !image->ubwc_enabled) { + if (has_r8g8 && tile_mode == TILE6_3 && + (image->vk.usage & VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT)) { tile_mode = TILE6_LINEAR; }