From 5a2b919c2758aeb871d11b1f711349e57f6a42e1 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Thu, 19 Mar 2026 09:15:59 -0400 Subject: [PATCH] pan/bi: Drop lower_sample_mask_writes pan_nir_lower_fs_outputs() already does this so there's no need to have it in a separate pass. Reviewed-by: Lars-Ivar Hesselberg Simonsen Reviewed-by: Lorenzo Rossi Part-of: --- .../compiler/bifrost/bifrost_compile.c | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/src/panfrost/compiler/bifrost/bifrost_compile.c b/src/panfrost/compiler/bifrost/bifrost_compile.c index aa382da45bc..d424eab0f50 100644 --- a/src/panfrost/compiler/bifrost/bifrost_compile.c +++ b/src/panfrost/compiler/bifrost/bifrost_compile.c @@ -6014,25 +6014,6 @@ bi_fp32_varying_mask(nir_shader *nir) return mask; } -static bool -bi_lower_sample_mask_writes(nir_builder *b, nir_intrinsic_instr *intr, - void *data) -{ - if (intr->intrinsic != nir_intrinsic_store_output) - return false; - - assert(b->shader->info.stage == MESA_SHADER_FRAGMENT); - if (nir_intrinsic_io_semantics(intr).location != FRAG_RESULT_SAMPLE_MASK) - return false; - - b->cursor = nir_before_instr(&intr->instr); - - nir_def *orig = nir_load_sample_mask(b); - - nir_src_rewrite(&intr->src[0], nir_iand(b, orig, intr->src[0].ssa)); - return true; -} - static bool bi_lower_load_output(nir_builder *b, nir_intrinsic_instr *intr, UNUSED void *data) @@ -6261,9 +6242,6 @@ bifrost_postprocess_nir(nir_shader *nir, unsigned gpu_id) nir_var_shader_in | nir_var_shader_out, ~bi_fp32_varying_mask(nir), false); - NIR_PASS(_, nir, nir_shader_intrinsics_pass, bi_lower_sample_mask_writes, - nir_metadata_control_flow, NULL); - NIR_PASS(_, nir, bifrost_nir_lower_load_output); } else if (nir->info.stage == MESA_SHADER_VERTEX) { NIR_PASS(_, nir, nir_lower_viewport_transform);