gallivm: use NIR_PASS(_, ...) instead of NIR_PASS_V

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36291>
This commit is contained in:
Georg Lehmann
2025-07-22 18:09:49 +02:00
committed by Marge Bot
parent a43a26ad2b
commit ee0f2ed241
2 changed files with 16 additions and 16 deletions
+9 -9
View File
@@ -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);
}
@@ -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);