From ee0f2ed24143d281d94fa66622a0f3a4b0dd2eed Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Tue, 22 Jul 2025 18:09:49 +0200 Subject: [PATCH] gallivm: use NIR_PASS(_, ...) instead of NIR_PASS_V Reviewed-by: Emma Anholt Reviewed-by: Konstantin Seurer Part-of: --- src/gallium/auxiliary/gallivm/lp_bld_nir.c | 18 +++++++++--------- src/gallium/auxiliary/gallivm/lp_bld_nir_aos.c | 14 +++++++------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir.c b/src/gallium/auxiliary/gallivm/lp_bld_nir.c index 38b8b2884dc..208c82d4376 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_nir.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_nir.c @@ -51,12 +51,12 @@ lp_build_opt_nir(struct nir_shader *nir) .lower_txp = ~0u, .lower_invalid_implicit_lod = true, }; - NIR_PASS_V(nir, nir_lower_tex, &lower_tex_options); - NIR_PASS_V(nir, nir_lower_frexp); + NIR_PASS(_, nir, nir_lower_tex, &lower_tex_options); + NIR_PASS(_, nir, nir_lower_frexp); if (nir->info.stage == MESA_SHADER_TASK) { nir_lower_task_shader_options ts_opts = { 0 }; - NIR_PASS_V(nir, nir_lower_task_shader, ts_opts); + NIR_PASS(_, nir, nir_lower_task_shader, ts_opts); } if (nir->info.stage == MESA_SHADER_FRAGMENT) { @@ -69,8 +69,8 @@ lp_build_opt_nir(struct nir_shader *nir) } } - NIR_PASS_V(nir, nir_lower_flrp, 16|32|64, true); - NIR_PASS_V(nir, nir_lower_fp16_casts, nir_lower_fp16_all | nir_lower_fp16_split_fp64); + NIR_PASS(_, nir, nir_lower_flrp, 16|32|64, true); + NIR_PASS(_, nir, nir_lower_fp16_casts, nir_lower_fp16_all | nir_lower_fp16_split_fp64); NIR_PASS(_, nir, nir_lower_alu); @@ -81,7 +81,7 @@ lp_build_opt_nir(struct nir_shader *nir) NIR_PASS(progress, nir, nir_lower_pack); nir_lower_tex_options options = { .lower_invalid_implicit_lod = true, }; - NIR_PASS_V(nir, nir_lower_tex, &options); + NIR_PASS(_, nir, nir_lower_tex, &options); const nir_lower_subgroups_options subgroups_options = { .subgroup_size = lp_native_vector_width / 32, @@ -99,9 +99,9 @@ lp_build_opt_nir(struct nir_shader *nir) progress = false; NIR_PASS(progress, nir, nir_opt_algebraic_late); if (progress) { - NIR_PASS_V(nir, nir_copy_prop); - NIR_PASS_V(nir, nir_opt_dce); - NIR_PASS_V(nir, nir_opt_cse); + NIR_PASS(_, nir, nir_copy_prop); + NIR_PASS(_, nir, nir_opt_dce); + NIR_PASS(_, nir, nir_opt_cse); } } while (progress); } diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_nir_aos.c index f1df04cb442..c163d6522d7 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_nir_aos.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_nir_aos.c @@ -890,13 +890,13 @@ lp_build_nir_aos(struct gallivm_state *gallivm, bld.outputs = outputs; bld.consts_ptr = consts_ptr; - NIR_PASS_V(shader, nir_convert_to_lcssa, true, true); - NIR_PASS_V(shader, nir_convert_from_ssa, true, false); - NIR_PASS_V(shader, nir_lower_locals_to_regs, 32); - NIR_PASS_V(shader, nir_remove_dead_derefs); - NIR_PASS_V(shader, nir_remove_dead_variables, nir_var_function_temp, NULL); - NIR_PASS_V(shader, nir_move_vec_src_uses_to_dest, false); - NIR_PASS_V(shader, nir_lower_vec_to_regs, NULL, NULL); + NIR_PASS(_, shader, nir_convert_to_lcssa, true, true); + NIR_PASS(_, shader, nir_convert_from_ssa, true, false); + NIR_PASS(_, shader, nir_lower_locals_to_regs, 32); + NIR_PASS(_, shader, nir_remove_dead_derefs); + NIR_PASS(_, shader, nir_remove_dead_variables, nir_var_function_temp, NULL); + NIR_PASS(_, shader, nir_move_vec_src_uses_to_dest, false); + NIR_PASS(_, shader, nir_lower_vec_to_regs, NULL, NULL); nir_foreach_shader_out_variable(variable, shader) emit_var_decl(&bld, variable);