From a094339d64cfcc775dcc87b1051b2d65179c0a97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 17 Mar 2024 16:28:37 -0400 Subject: [PATCH] radeonsi: add the radeonsi_optimize_io option into the shader cache key otherwise the options would be ignored if the shader cache had already cached the same shader with the option inverted. Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_state_shaders.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.cpp b/src/gallium/drivers/radeonsi/si_state_shaders.cpp index 806386147a4..770334e2e38 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.cpp +++ b/src/gallium/drivers/radeonsi/si_state_shaders.cpp @@ -143,9 +143,8 @@ void si_get_ir_cache_key(struct si_shader_selector *sel, bool ngg, bool es, shader_variant_flags |= 1 << 1; if (wave_size == 32) shader_variant_flags |= 1 << 2; - - /* bit gap */ - + if (sel->screen->options.optimize_io) + shader_variant_flags |= 1 << 3; /* use_ngg_culling disables NGG passthrough for non-culling shaders to reduce context * rolls, which can be changed with AMD_DEBUG=nonggc or AMD_DEBUG=nggc. */