diff --git a/src/panfrost/compiler/bifrost/bifrost_compile.c b/src/panfrost/compiler/bifrost/bifrost_compile.c index 47bcde73332..c34cdb3b73e 100644 --- a/src/panfrost/compiler/bifrost/bifrost_compile.c +++ b/src/panfrost/compiler/bifrost/bifrost_compile.c @@ -6251,7 +6251,7 @@ bifrost_preprocess_nir(nir_shader *nir, unsigned gpu_id) /* Lower away all variables for smaller shaders */ NIR_PASS(_, nir, nir_lower_vars_to_ssa); - NIR_PASS(_, nir, nir_remove_dead_variables, nir_var_all, NULL); + NIR_PASS(_, nir, nir_remove_dead_variables, nir_var_function_temp, NULL); /* We assume that UBO and SSBO were lowered, let's move things around. */ nir_move_options move_all = nir_move_const_undef | nir_move_load_ubo |