pan/bi: Allow move/sink in blend shaders

Now that we handle precolouring we don't need to workaround anything.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123>
This commit is contained in:
Alyssa Rosenzweig 2021-05-25 13:52:56 -04:00 committed by Marge Bot
parent 3d851f3b8e
commit 35c7fefc8f

View file

@ -3041,16 +3041,13 @@ bi_optimize_nir(nir_shader *nir, unsigned gpu_id, bool is_blend)
NIR_PASS(progress, nir, nir_opt_dce);
/* Backend scheduler is purely local, so do some global optimizations
* to reduce register pressure. Skip the passes for blend shaders to
* workaround the lack of precolouring. */
* to reduce register pressure. */
nir_move_options move_all =
nir_move_const_undef | nir_move_load_ubo | nir_move_load_input |
nir_move_comparisons | nir_move_copies | nir_move_load_ssbo;
if (!is_blend) {
NIR_PASS_V(nir, nir_opt_sink, move_all);
NIR_PASS_V(nir, nir_opt_move, move_all);
}
NIR_PASS_V(nir, nir_opt_sink, move_all);
NIR_PASS_V(nir, nir_opt_move, move_all);
/* We might lower attribute, varying, and image indirects. Use the
* gathered info to skip the extra analysis in the happy path. */