Mesa (main): pan/bi: Don't reorder push with no_ubo_to_push

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 8 13:56:10 UTC 2022


Module: Mesa
Branch: main
Commit: 90beea75f631e780182ca3c45cb623471f17d52b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=90beea75f631e780182ca3c45cb623471f17d52b

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Tue Jun  7 15:15:04 2022 -0400

pan/bi: Don't reorder push with no_ubo_to_push

Otherwise, load_push_constant won't work properly. This could probably be made
to work if we tried hard enough, but we still don't want reordering for internal
(meta) shaders which are layed out deliberately.

Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16916>

---

 src/panfrost/bifrost/bifrost_compile.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c
index 55024306132..5852c7acf48 100644
--- a/src/panfrost/bifrost/bifrost_compile.c
+++ b/src/panfrost/bifrost/bifrost_compile.c
@@ -5022,7 +5022,8 @@ bi_compile_variant_nir(nir_shader *nir,
                 bi_opt_dead_code_eliminate(ctx);
                 bi_opt_cse(ctx);
                 bi_opt_dead_code_eliminate(ctx);
-                bi_opt_reorder_push(ctx);
+                if (!ctx->inputs->no_ubo_to_push)
+                        bi_opt_reorder_push(ctx);
                 bi_validate(ctx, "Optimization passes");
         }
 



More information about the mesa-commit mailing list