summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/compiler/brw_nir.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c
index ef5034d1e1e..a906a026042 100644
--- a/src/intel/compiler/brw_nir.c
+++ b/src/intel/compiler/brw_nir.c
@@ -597,6 +597,11 @@ brw_nir_optimize(nir_shader *nir, const struct brw_compiler *compiler,
OPT(nir_lower_pack);
} while (progress);
+ /* Workaround Gfxbench unused local sampler variable which will trigger an
+ * assert in the opt_large_constants pass.
+ */
+ OPT(nir_remove_dead_variables, nir_var_local);
+
return nir;
}