From 35c7fefc8fad497d52cc5c23ef5a708158c932c8 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 25 May 2021 13:52:56 -0400 Subject: [PATCH] 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 Part-of: --- src/panfrost/bifrost/bifrost_compile.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index 4ac5a98975c..0c39f5cad5d 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -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. */