iris: Update NIR_PASS_V to NIR_PASS

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35889>
This commit is contained in:
jhananit
2025-06-24 19:31:32 +00:00
committed by Marge Bot
parent 6dee0c3dae
commit 1a050a57e4
2 changed files with 21 additions and 21 deletions
+8 -8
View File
@@ -798,10 +798,10 @@ iris_lower_storage_image_derefs_instr(nir_builder *b,
}
}
static void
static bool
iris_lower_storage_image_derefs(nir_shader *nir)
{
nir_shader_intrinsics_pass(nir, iris_lower_storage_image_derefs_instr,
return nir_shader_intrinsics_pass(nir, iris_lower_storage_image_derefs_instr,
nir_metadata_control_flow,
NULL);
}
@@ -3011,10 +3011,10 @@ iris_compile_cs(struct iris_screen *screen,
const struct iris_cs_prog_key *const key = &shader->key.cs;
if (screen->brw)
NIR_PASS_V(nir, brw_nir_lower_cs_intrinsics, devinfo, NULL);
NIR_PASS(_, nir, brw_nir_lower_cs_intrinsics, devinfo, NULL);
else
#ifdef INTEL_USE_ELK
NIR_PASS_V(nir, elk_nir_lower_cs_intrinsics, devinfo, NULL);
NIR_PASS(_, nir, elk_nir_lower_cs_intrinsics, devinfo, NULL);
#else
unreachable("no elk support");
#endif
@@ -3774,13 +3774,13 @@ iris_finalize_nir(struct pipe_screen *_screen, struct nir_shader *nir)
{
struct iris_screen *screen = (struct iris_screen *)_screen;
NIR_PASS_V(nir, iris_fix_edge_flags);
NIR_PASS(_, nir, iris_fix_edge_flags);
if (screen->brw) {
struct brw_nir_compiler_opts opts = {};
brw_preprocess_nir(screen->brw, nir, &opts);
NIR_PASS_V(nir, brw_nir_lower_storage_image,
NIR_PASS(_, nir, brw_nir_lower_storage_image,
screen->brw,
&(struct brw_nir_lower_storage_image_opts) {
.lower_loads = true,
@@ -3794,7 +3794,7 @@ iris_finalize_nir(struct pipe_screen *_screen, struct nir_shader *nir)
struct elk_nir_compiler_opts opts = {};
elk_preprocess_nir(screen->elk, nir, &opts);
NIR_PASS_V(nir, elk_nir_lower_storage_image,
NIR_PASS(_, nir, elk_nir_lower_storage_image,
&(struct elk_nir_lower_storage_image_opts) {
.devinfo = devinfo,
.lower_loads = true,
@@ -3810,7 +3810,7 @@ iris_finalize_nir(struct pipe_screen *_screen, struct nir_shader *nir)
#endif
}
NIR_PASS_V(nir, iris_lower_storage_image_derefs);
NIR_PASS(_, nir, iris_lower_storage_image_derefs);
nir_sweep(nir);
+13 -13
View File
@@ -388,19 +388,19 @@ iris_ensure_indirect_generation_shader(struct iris_batch *batch)
nir_shader *nir = b.shader;
NIR_PASS_V(nir, nir_lower_vars_to_ssa);
NIR_PASS_V(nir, nir_opt_cse);
NIR_PASS_V(nir, nir_opt_gcm, true);
NIR_PASS(_, nir, nir_lower_vars_to_ssa);
NIR_PASS(_, nir, nir_opt_cse);
NIR_PASS(_, nir, nir_opt_gcm, true);
nir_opt_peephole_select_options peephole_select_options = {
.limit = 1,
};
NIR_PASS_V(nir, nir_opt_peephole_select, &peephole_select_options);
NIR_PASS(_, nir, nir_opt_peephole_select, &peephole_select_options);
NIR_PASS_V(nir, nir_lower_variable_initializers, ~0);
NIR_PASS(_, nir, nir_lower_variable_initializers, ~0);
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);
if (screen->brw) {
struct brw_nir_compiler_opts opts = {};
@@ -415,9 +415,9 @@ iris_ensure_indirect_generation_shader(struct iris_batch *batch)
#endif
}
NIR_PASS_V(nir, nir_propagate_invariant, false);
NIR_PASS(_, nir, nir_propagate_invariant, false);
NIR_PASS_V(nir, nir_lower_input_attachments,
NIR_PASS(_, nir, nir_lower_input_attachments,
&(nir_input_attachment_options) {
.use_fragcoord_sysval = true,
.use_layer_id_sysval = true,
@@ -429,9 +429,9 @@ iris_ensure_indirect_generation_shader(struct iris_batch *batch)
nir->info.shared_size = 0;
nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir));
NIR_PASS_V(nir, nir_copy_prop);
NIR_PASS_V(nir, nir_opt_constant_folding);
NIR_PASS_V(nir, nir_opt_dce);
NIR_PASS(_, nir, nir_copy_prop);
NIR_PASS(_, nir, nir_opt_constant_folding);
NIR_PASS(_, nir, nir_opt_dce);
/* Do vectorizing here. For some reason when trying to do it in the back
* this just isn't working.
@@ -441,7 +441,7 @@ iris_ensure_indirect_generation_shader(struct iris_batch *batch)
.callback = brw_nir_should_vectorize_mem,
.robust_modes = (nir_variable_mode)0,
};
NIR_PASS_V(nir, nir_opt_load_store_vectorize, &options);
NIR_PASS(_, nir, nir_opt_load_store_vectorize, &options);
nir->num_uniforms = uniform_size;