From 714755915633f5ca66c14b9746f6793c96f18f3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timur=20Krist=C3=B3f?= Date: Mon, 17 Feb 2025 23:33:38 +0100 Subject: [PATCH] radv: Stop using deprecated NIR_PASS_V with core NIR passes. Reviewed-by: Alyssa Rosenzweig Part-of: --- src/amd/vulkan/nir/radv_nir_lower_io.c | 4 ++-- src/amd/vulkan/nir/radv_nir_rt_shader.c | 8 ++++---- src/amd/vulkan/radv_pipeline_graphics.c | 6 +++--- src/amd/vulkan/radv_shader.c | 8 ++++---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/amd/vulkan/nir/radv_nir_lower_io.c b/src/amd/vulkan/nir/radv_nir_lower_io.c index aa8a722aa9e..1499c6f5830 100644 --- a/src/amd/vulkan/nir/radv_nir_lower_io.c +++ b/src/amd/vulkan/nir/radv_nir_lower_io.c @@ -182,8 +182,8 @@ radv_nir_lower_io(struct radv_device *device, nir_shader *nir) radv_recompute_fs_input_bases(nir); } - NIR_PASS_V(nir, nir_opt_dce); - NIR_PASS_V(nir, nir_remove_dead_variables, nir_var_shader_in | nir_var_shader_out, NULL); + NIR_PASS(_, nir, nir_opt_dce); + NIR_PASS(_, nir, nir_remove_dead_variables, nir_var_shader_in | nir_var_shader_out, NULL); } /* IO slot layout for stages that aren't linked. */ diff --git a/src/amd/vulkan/nir/radv_nir_rt_shader.c b/src/amd/vulkan/nir/radv_nir_rt_shader.c index 444dc54a473..72fc01a94a0 100644 --- a/src/amd/vulkan/nir/radv_nir_rt_shader.c +++ b/src/amd/vulkan/nir/radv_nir_rt_shader.c @@ -1742,8 +1742,8 @@ radv_build_traversal_shader(struct radv_device *device, struct radv_ray_tracing_ nir_metadata_preserve(nir_shader_get_entrypoint(b.shader), nir_metadata_none); /* Lower and cleanup variables */ - NIR_PASS_V(b.shader, nir_lower_global_vars_to_local); - NIR_PASS_V(b.shader, nir_lower_vars_to_ssa); + NIR_PASS(_, b.shader, nir_lower_global_vars_to_local); + NIR_PASS(_, b.shader, nir_lower_vars_to_ssa); return b.shader; } @@ -2070,8 +2070,8 @@ radv_nir_lower_rt_abi(nir_shader *shader, const VkRayTracingPipelineCreateInfoKH nir_metadata_preserve(impl, nir_metadata_none); /* cleanup passes */ - NIR_PASS_V(shader, nir_lower_global_vars_to_local); - NIR_PASS_V(shader, nir_lower_vars_to_ssa); + NIR_PASS(_, shader, nir_lower_global_vars_to_local); + NIR_PASS(_, shader, nir_lower_vars_to_ssa); if (shader->info.stage == MESA_SHADER_CLOSEST_HIT || shader->info.stage == MESA_SHADER_INTERSECTION) NIR_PASS_V(shader, lower_hit_attribs, NULL, info->wave_size); } diff --git a/src/amd/vulkan/radv_pipeline_graphics.c b/src/amd/vulkan/radv_pipeline_graphics.c index 0953736f531..f21e68562ee 100644 --- a/src/amd/vulkan/radv_pipeline_graphics.c +++ b/src/amd/vulkan/radv_pipeline_graphics.c @@ -1065,7 +1065,7 @@ radv_remove_point_size(const struct radv_graphics_state_key *gfx_state, nir_shad var->data.mode = nir_var_shader_temp; producer->info.outputs_written &= ~VARYING_BIT_PSIZ; - NIR_PASS_V(producer, nir_fixup_deref_modes); + NIR_PASS(_, producer, nir_fixup_deref_modes); NIR_PASS(_, producer, nir_remove_dead_variables, nir_var_shader_temp, NULL); NIR_PASS(_, producer, nir_opt_dce); } @@ -1108,7 +1108,7 @@ radv_remove_color_exports(const struct radv_graphics_state_key *gfx_state, nir_s } if (fixup_derefs) { - NIR_PASS_V(nir, nir_fixup_deref_modes); + NIR_PASS(_, nir, nir_fixup_deref_modes); NIR_PASS(_, nir, nir_remove_dead_variables, nir_var_shader_temp, NULL); NIR_PASS(_, nir, nir_opt_dce); } @@ -1411,7 +1411,7 @@ radv_remove_varyings(nir_shader *nir) } if (fixup_derefs) { - NIR_PASS_V(nir, nir_fixup_deref_modes); + NIR_PASS(_, nir, nir_fixup_deref_modes); NIR_PASS(_, nir, nir_remove_dead_variables, nir_var_shader_temp, NULL); NIR_PASS(_, nir, nir_opt_dce); } diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index e5d588ac438..d76c002fece 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -403,7 +403,7 @@ radv_shader_spirv_to_nir(struct radv_device *device, const struct radv_shader_st const struct nir_lower_sysvals_to_varyings_options sysvals_to_varyings = { .point_coord = true, }; - NIR_PASS_V(nir, nir_lower_sysvals_to_varyings, &sysvals_to_varyings); + NIR_PASS(_, nir, nir_lower_sysvals_to_varyings, &sysvals_to_varyings); /* We have to lower away local constant initializers right before we * inline functions. That way they get properly initialized at the top @@ -468,7 +468,7 @@ radv_shader_spirv_to_nir(struct radv_device *device, const struct radv_shader_st if (nir->info.stage == MESA_SHADER_VERTEX || nir->info.stage == MESA_SHADER_TESS_EVAL || nir->info.stage == MESA_SHADER_GEOMETRY) - NIR_PASS_V(nir, nir_shader_gather_xfb_info); + nir_shader_gather_xfb_info(nir); nir_lower_doubles_options lower_doubles = nir->options->lower_doubles_options; @@ -544,9 +544,9 @@ radv_shader_spirv_to_nir(struct radv_device *device, const struct radv_shader_st if (nir->info.stage == MESA_SHADER_VERTEX || nir->info.stage == MESA_SHADER_GEOMETRY || nir->info.stage == MESA_SHADER_FRAGMENT) { - NIR_PASS_V(nir, nir_lower_io_to_temporaries, nir_shader_get_entrypoint(nir), true, true); + NIR_PASS(_, nir, nir_lower_io_to_temporaries, nir_shader_get_entrypoint(nir), true, true); } else if (nir->info.stage == MESA_SHADER_TESS_EVAL) { - NIR_PASS_V(nir, nir_lower_io_to_temporaries, nir_shader_get_entrypoint(nir), true, false); + NIR_PASS(_, nir, nir_lower_io_to_temporaries, nir_shader_get_entrypoint(nir), true, false); } NIR_PASS(_, nir, nir_split_var_copies);