tu: Re-enable tiled non-ubwc R8G8 images

This effectively reverts a70b197741 ("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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32619>
This commit is contained in:
Connor Abbott 2024-12-12 17:50:05 -05:00 committed by Marge Bot
parent c0404da1e5
commit 9e8824371b

View file

@ -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;
}