diff options
Diffstat (limited to 'src/intel/compiler/brw_nir.c')
-rw-r--r-- | src/intel/compiler/brw_nir.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index a057f286ea8..9a4afb4b778 100644 --- a/src/intel/compiler/brw_nir.c +++ b/src/intel/compiler/brw_nir.c @@ -912,7 +912,22 @@ brw_postprocess_nir(nir_shader *nir, const struct brw_compiler *compiler, compiler->devinfo->gen >= 6); } - OPT(nir_opt_algebraic_late); + do { + progress = false; + if (OPT(nir_opt_algebraic_late)) { + /* At this late stage, anything that makes more constants will wreak + * havok on the vec4 backend. The handling of constants in the vec4 + * backend is not good. + */ + if (is_scalar) { + OPT(nir_opt_constant_folding); + OPT(nir_copy_prop); + } + OPT(nir_opt_dce); + OPT(nir_opt_cse); + } + } while (progress); + OPT(brw_nir_lower_conversions); |