brw: Fold constants after nir_lower_io for VS/GS/TES outputs

brw_nir_lower_deferred_urb_writes assumes that constant offsets will be
properly folded.  In brw itself we call the big optimization loop which
takes care of this, but jay doesn't do that in-between.

At any rate, nir_lower_io generates a lot of address math that really
ought to get cleaned up, so it seems like a good point to call it here.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41821>
This commit is contained in:
Kenneth Graunke 2026-05-26 20:09:26 -07:00 committed by Marge Bot
parent fb99a109e4
commit 9c8f7c481f

View file

@ -1754,6 +1754,9 @@ brw_nir_lower_vue_outputs(nir_shader *nir)
nir_lower_io_lower_64bit_to_32);
NIR_PASS(_, nir, brw_nir_lower_16bit_io, nir_var_shader_out);
/* Fold constant offset srcs for IO. */
NIR_PASS(_, nir, nir_opt_constant_folding);
}
void