From e90ccf91a322a84f508796ca5d13f4702cd1e9e6 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 7 Mar 2025 09:55:48 -0500 Subject: [PATCH] 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 Cc: mesa-stable Reviewed-by: Mary Guillemard Part-of: --- src/panfrost/midgard/midgard_compile.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c index 39c50038c88..2c71048a7c3 100644 --- a/src/panfrost/midgard/midgard_compile.c +++ b/src/panfrost/midgard/midgard_compile.c @@ -478,11 +478,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 */);