From e858321f091ffadf0558386ac62b80fb2bde3e35 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 22 Nov 2019 21:41:58 -0800 Subject: [PATCH] iris: Disable ASTC 5x5 support on Gen9 for now. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Intel Gen9 hardware has some nasty restrictions where ASTC 5x5 formats and color compression can't both live in the sampler cache at the same time. To properly support it, we have to track which of those exist in the cache and flush ASTC out or resolve away compression. As far as I'm aware, very little uses ASTC 5x5 textures, so instead of replicating all that for iris, we simply turn it off and rely on the Gallium fallback mechanism to fake it via uncompressed RGBA. This should avoid GPU hangs any time people use ASTC 5x5 with CCS. Reviewed-by: Tapani Pälli --- src/gallium/drivers/iris/iris_formats.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gallium/drivers/iris/iris_formats.c b/src/gallium/drivers/iris/iris_formats.c index 351172787ef..f6344cc7543 100644 --- a/src/gallium/drivers/iris/iris_formats.c +++ b/src/gallium/drivers/iris/iris_formats.c @@ -503,6 +503,14 @@ iris_is_format_supported(struct pipe_screen *pscreen, format == ISL_FORMAT_R32_UINT; } + /* TODO: Support ASTC 5x5 on Gen9 properly. This means implementing + * a complex sampler workaround (see i965's gen9_apply_astc5x5_wa_flush). + * Without it, st/mesa will emulate ASTC 5x5 via uncompressed textures. + */ + if (devinfo->gen == 9 && (format == ISL_FORMAT_ASTC_LDR_2D_5X5_FLT16 || + format == ISL_FORMAT_ASTC_LDR_2D_5X5_U8SRGB)) + return false; + return supported; } -- 2.30.2