From d47f521ee4079cc296e9b10e5dc632ec6139264b Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 11 Jan 2023 11:15:27 -0800 Subject: [PATCH] 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 Part-of: --- src/intel/compiler/brw_fs.cpp | 6 +++--- src/intel/compiler/brw_nir.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index 8a43516..8d2db7e 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -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); diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index faa9662..9f5d2c6 100644 --- a/src/intel/compiler/brw_nir.c +++ b/src/intel/compiler/brw_nir.c @@ -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. -- 2.7.4