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:
@@ -7481,11 +7481,11 @@ brw_compile_fs(const struct brw_compiler *compiler,
|
|||||||
* offset to determine render target 0 store instruction in
|
* offset to determine render target 0 store instruction in
|
||||||
* emit_alpha_to_coverage pass.
|
* emit_alpha_to_coverage pass.
|
||||||
*/
|
*/
|
||||||
NIR_PASS_V(nir, nir_opt_constant_folding);
|
NIR_PASS(_, nir, nir_opt_constant_folding);
|
||||||
NIR_PASS_V(nir, brw_nir_lower_alpha_to_coverage, key, prog_data);
|
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,
|
brw_postprocess_nir(nir, compiler, true, debug_enabled,
|
||||||
key->base.robust_buffer_access);
|
key->base.robust_buffer_access);
|
||||||
|
|
||||||
|
@@ -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_move, nir_move_comparisons);
|
||||||
OPT(nir_opt_dead_cf);
|
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);
|
NIR_PASS_V(nir, nir_divergence_analysis);
|
||||||
|
|
||||||
/* TODO: Enable nir_opt_uniform_atomics on Gfx7.x too.
|
/* TODO: Enable nir_opt_uniform_atomics on Gfx7.x too.
|
||||||
|
Reference in New Issue
Block a user