vulkan/runtime: Don't use deprecated NIR_PASS_V macro.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
This commit is contained in:
Timur Kristóf 2025-02-18 17:28:50 +01:00
parent 093e68b518
commit 91d9dfe123

View file

@ -162,11 +162,11 @@ vk_spirv_to_nir(struct vk_device *device,
* inline functions. That way they get properly initialized at the top
* of the function and not at the top of its caller.
*/
NIR_PASS_V(nir, nir_lower_variable_initializers, nir_var_function_temp);
NIR_PASS_V(nir, nir_lower_returns);
NIR_PASS_V(nir, nir_inline_functions);
NIR_PASS_V(nir, nir_copy_prop);
NIR_PASS_V(nir, nir_opt_deref);
NIR_PASS(_, nir, nir_lower_variable_initializers, nir_var_function_temp);
NIR_PASS(_, nir, nir_lower_returns);
NIR_PASS(_, nir, nir_inline_functions);
NIR_PASS(_, nir, nir_copy_prop);
NIR_PASS(_, nir, nir_opt_deref);
/* Pick off the single entrypoint that we want */
nir_remove_non_entrypoints(nir);
@ -176,18 +176,18 @@ vk_spirv_to_nir(struct vk_device *device,
* nir_remove_dead_variables and split_per_member_structs below see the
* corresponding stores.
*/
NIR_PASS_V(nir, nir_lower_variable_initializers, ~0);
NIR_PASS(_, nir, nir_lower_variable_initializers, ~0);
/* Split member structs. We do this before lower_io_to_temporaries so that
* it doesn't lower system values to temporaries by accident.
*/
NIR_PASS_V(nir, nir_split_var_copies);
NIR_PASS_V(nir, nir_split_per_member_structs);
NIR_PASS(_, nir, nir_split_var_copies);
NIR_PASS(_, nir, nir_split_per_member_structs);
nir_remove_dead_variables_options dead_vars_opts = {
.can_remove_var = nir_vk_is_not_xfb_output,
};
NIR_PASS_V(nir, nir_remove_dead_variables,
NIR_PASS(_, nir, nir_remove_dead_variables,
nir_var_shader_in | nir_var_shader_out | nir_var_system_value |
nir_var_shader_call_data | nir_var_ray_hit_attrib,
&dead_vars_opts);
@ -196,14 +196,14 @@ vk_spirv_to_nir(struct vk_device *device,
* insert dead clip/cull vars and we don't want to clip/cull based on
* uninitialized garbage.
*/
NIR_PASS_V(nir, nir_lower_clip_cull_distance_arrays);
NIR_PASS(_, nir, nir_lower_clip_cull_distance_arrays);
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_PASS_V(nir, nir_propagate_invariant, false);
NIR_PASS(_, nir, nir_propagate_invariant, false);
return nir;
}