pan/mdg: call nir_lower_is_helper_invocation

needed to avoid regression from the next patch.

backported because the next patch is too

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Cc: mesa-stable
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33939>
(cherry picked from commit e90ccf91a3)
This commit is contained in:
Alyssa Rosenzweig 2025-03-07 09:55:48 -05:00 committed by Eric Engestrom
parent f2a8804927
commit cd9dae9931
2 changed files with 6 additions and 4 deletions

View file

@ -3094,7 +3094,7 @@
"description": "pan/mdg: call nir_lower_is_helper_invocation",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -456,11 +456,13 @@ midgard_preprocess_nir(nir_shader *nir, unsigned gpu_id)
/* Midgard image ops coordinates are 16-bit instead of 32-bit */
NIR_PASS(_, nir, midgard_nir_lower_image_bitsize);
if (nir->info.stage == MESA_SHADER_FRAGMENT)
if (nir->info.stage == MESA_SHADER_FRAGMENT) {
NIR_PASS(_, nir, nir_lower_helper_writes, true);
NIR_PASS(_, nir, nir_lower_is_helper_invocation);
NIR_PASS(_, nir, pan_lower_helper_invocation);
NIR_PASS(_, nir, pan_lower_sample_pos);
}
NIR_PASS(_, nir, pan_lower_helper_invocation);
NIR_PASS(_, nir, pan_lower_sample_pos);
NIR_PASS(_, nir, midgard_nir_lower_algebraic_early);
NIR_PASS(_, nir, nir_lower_alu_to_scalar, mdg_should_scalarize, NULL);
NIR_PASS(_, nir, nir_lower_flrp, 16 | 32 | 64, false /* always_precise */);