brw: constant fold u2u16 conversion on MCS messages

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: bddfbe7fb1 ("brw/blorp: lower MCS fetching in NIR")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37963>
This commit is contained in:
Lionel Landwerlin 2025-10-20 22:39:02 +03:00
parent f8745b3af3
commit f48c9c3a37

View file

@ -2186,7 +2186,11 @@ brw_postprocess_nir_opts(nir_shader *nir, const struct brw_compiler *compiler,
if (OPT(nir_lower_tex, &tex_options))
OPT(nir_lower_tex, &tex_options);
OPT(brw_nir_lower_mcs_fetch, devinfo);
/* MCS lowering can introduce u2u16 conversions. We need to lower those to
* make constant offsets detectable by brw_nir_texture_backend_opcode().
*/
if (OPT(brw_nir_lower_mcs_fetch, devinfo))
OPT(nir_opt_constant_folding);
OPT(intel_nir_lower_sparse_intrinsics);