[Mesa-dev] [PATCH] radeonsi/nir: remove dead local variables
Timothy Arceri
tarceri at itsqueeze.com
Thu Jan 31 01:01:02 UTC 2019
Without this we do not end up with a deterministic NIR. NIR must
be deterministic here because we use it to produce a sha for the
radeonsi backends disk cache.
This fixes the shader cache for a bunch of shaders.
---
src/gallium/drivers/radeonsi/si_shader_nir.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c
index 7554f5b9f8b..96096abe4ea 100644
--- a/src/gallium/drivers/radeonsi/si_shader_nir.c
+++ b/src/gallium/drivers/radeonsi/si_shader_nir.c
@@ -848,6 +848,9 @@ si_lower_nir(struct si_shader_selector* sel)
} while (progress);
NIR_PASS_V(sel->nir, nir_lower_bool_to_int32);
+
+ nir_variable_mode mask = nir_var_function_temp;
+ nir_remove_dead_variables(sel->nir, mask);
}
static void declare_nir_input_vs(struct si_shader_context *ctx,
--
2.20.1
More information about the mesa-dev
mailing list