intel/brw: Run intel_nir_lower_conversions only after brw_nir_optimize

Without this, the next commit tiggers assertions.

v2: Unconditionally do the lowering after brw_nir_optimize. Suggested by
Caio.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> [v1]
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30251>
This commit is contained in:
Ian Romanick
2024-08-26 10:27:48 -07:00
committed by Marge Bot
parent 572e00dd66
commit 65eb7ed5fc
+6 -2
View File
@@ -1763,8 +1763,6 @@ brw_postprocess_nir(nir_shader *nir, const struct brw_compiler *compiler,
}
}
OPT(intel_nir_lower_conversions);
OPT(nir_lower_alu_to_scalar, NULL, NULL);
while (OPT(nir_opt_algebraic_distribute_src_mods)) {
@@ -1814,6 +1812,12 @@ brw_postprocess_nir(nir_shader *nir, const struct brw_compiler *compiler,
OPT(nir_lower_subgroups, &subgroups_options);
}
/* Run intel_nir_lower_conversions only after the last tiem
* brw_nir_optimize is called. Various optimizations invoked there can
* rematerialize the conversions that the lowering pass eliminates.
*/
OPT(intel_nir_lower_conversions);
/* Do this only after the last opt_gcm. GCM will undo this lowering. */
if (nir->info.stage == MESA_SHADER_FRAGMENT) {
if (divergence_analysis_dirty) {