From ed675272f439cc5e7d76ae364b707f2695a4eec4 Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Mon, 3 Feb 2025 17:01:52 +0100 Subject: [PATCH] nir/lower_poly_line_smooth: use intrinsics_pass MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Samuel Pitoiset Reviewed-by: Marek Olšák Acked-by: Erik Faye-Lund Part-of: --- src/compiler/nir/nir_lower_poly_line_smooth.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/compiler/nir/nir_lower_poly_line_smooth.c b/src/compiler/nir/nir_lower_poly_line_smooth.c index 077a40c5355..2b8c77d18ed 100644 --- a/src/compiler/nir/nir_lower_poly_line_smooth.c +++ b/src/compiler/nir/nir_lower_poly_line_smooth.c @@ -30,15 +30,10 @@ */ static bool -lower_polylinesmooth(nir_builder *b, nir_instr *instr, void *data) +lower_polylinesmooth(nir_builder *b, nir_intrinsic_instr *intr, void *data) { unsigned *num_smooth_aa_sample = data; - if (instr->type != nir_instr_type_intrinsic) - return false; - - nir_intrinsic_instr *intr = nir_instr_as_intrinsic(instr); - if (intr->intrinsic != nir_intrinsic_store_output) return false; @@ -73,7 +68,7 @@ bool nir_lower_poly_line_smooth(nir_shader *shader, unsigned num_smooth_aa_sample) { assert(shader->info.stage == MESA_SHADER_FRAGMENT); - return nir_shader_instructions_pass(shader, lower_polylinesmooth, - nir_metadata_control_flow, - &num_smooth_aa_sample); + return nir_shader_intrinsics_pass(shader, lower_polylinesmooth, + nir_metadata_control_flow, + &num_smooth_aa_sample); }