From d9dd485c026de5ae40b7bb99f8d06d41dd917eeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 3 Jan 2025 23:48:45 -0500 Subject: [PATCH] radeonsi: re-enable non-TC-compatible HTILE for write-only Z/S It caused the Blender corruption, but the previous commit likely fixes it. The workaround regressed performance for Furmark and Plot3D with 8xMSAA. If you want to enable the workaround again in the future, just add this line back: sscreen->info.gfx_level >= GFX11 || Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_texture.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_texture.c b/src/gallium/drivers/radeonsi/si_texture.c index 0ff6f8609ea..e9932d4ff46 100644 --- a/src/gallium/drivers/radeonsi/si_texture.c +++ b/src/gallium/drivers/radeonsi/si_texture.c @@ -1148,20 +1148,17 @@ static struct si_texture *si_texture_create_object(struct pipe_screen *screen, tex->depth_clear_value[i] = 1.0; if (tex->surface.flags & RADEON_SURF_TC_COMPATIBLE_HTILE) { + assert(sscreen->info.gfx_level < GFX12); + /* On GFX8, HTILE uses different tiling depending on the TC_COMPATIBLE_HTILE * setting, so we have to enable it if we enabled it at allocation. * - * GFX11 has Z corruption if we don't enable TC-compatible HTILE, see: - * https://gitlab.freedesktop.org/mesa/mesa/-/issues/11891 - * - * GFX9 and later use the same tiling for both, so TC-compatible HTILE can be + * GFX9+ and later use the same tiling for both, so TC-compatible HTILE can be * enabled on demand. */ tex->tc_compatible_htile = sscreen->info.gfx_level == GFX8 || - sscreen->info.gfx_level >= GFX11 || /* Mipmapping always starts TC-compatible. */ (sscreen->info.gfx_level >= GFX9 && - sscreen->info.gfx_level < GFX11 && tex->buffer.b.b.last_level > 0); }