intel/compiler: Use NIR_PASS instead of NIR_PASS_V

Reduce debug log spam by only logging the shader if a pass made some
changes. This can also elide some nir_validate calls in debug builds.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22299>
This commit is contained in:
Ian Romanick
2023-01-11 11:15:27 -08:00
committed by Marge Bot
parent fb950a9edf
commit d47f521ee4
2 changed files with 4 additions and 4 deletions

View File

@@ -7481,11 +7481,11 @@ brw_compile_fs(const struct brw_compiler *compiler,
* offset to determine render target 0 store instruction in
* emit_alpha_to_coverage pass.
*/
NIR_PASS_V(nir, nir_opt_constant_folding);
NIR_PASS_V(nir, brw_nir_lower_alpha_to_coverage, key, prog_data);
NIR_PASS(_, nir, nir_opt_constant_folding);
NIR_PASS(_, nir, brw_nir_lower_alpha_to_coverage, key, prog_data);
}
NIR_PASS_V(nir, brw_nir_move_interpolation_to_top);
NIR_PASS(_, nir, brw_nir_move_interpolation_to_top);
brw_postprocess_nir(nir, compiler, true, debug_enabled,
key->base.robust_buffer_access);

View File

@@ -1649,7 +1649,7 @@ brw_postprocess_nir(nir_shader *nir, const struct brw_compiler *compiler,
OPT(nir_opt_move, nir_move_comparisons);
OPT(nir_opt_dead_cf);
NIR_PASS_V(nir, nir_convert_to_lcssa, true, true);
NIR_PASS(_, nir, nir_convert_to_lcssa, true, true);
NIR_PASS_V(nir, nir_divergence_analysis);
/* TODO: Enable nir_opt_uniform_atomics on Gfx7.x too.