From: Kenneth Graunke Date: Sat, 23 Nov 2019 05:41:58 +0000 (-0800) Subject: iris: Disable ASTC 5x5 support on Gen9 for now. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e858321f091ffadf0558386ac62b80fb2bde3e35;p=mesa.git iris: Disable ASTC 5x5 support on Gen9 for now. 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 --- 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; }