Mesa (master): panfrost: Update Bifrost fields in mali_shader_meta

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri May 1 15:27:09 UTC 2020


Module: Mesa
Branch: master
Commit: d6588b87bf72fc47a9028b1d03d7ed4c93452193
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d6588b87bf72fc47a9028b1d03d7ed4c93452193

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Thu Apr 30 10:32:11 2020 +0200

panfrost: Update Bifrost fields in mali_shader_meta

Not much is known currently about these fields and their values, but
this gets things going in the scenarios we have been testing with so
far.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4832>

---

 src/gallium/drivers/panfrost/pan_cmdstream.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c
index f1e690c72eb..02e15d6c8e5 100644
--- a/src/gallium/drivers/panfrost/pan_cmdstream.c
+++ b/src/gallium/drivers/panfrost/pan_cmdstream.c
@@ -327,9 +327,19 @@ panfrost_shader_meta_init(struct panfrost_context *ctx,
         meta->sampler_count = ctx->sampler_count[st];
 
         if (dev->quirks & IS_BIFROST) {
-                meta->bifrost1.unk1 = 0x800200;
+                if (st == PIPE_SHADER_VERTEX)
+                        meta->bifrost1.unk1 = 0x800000;
+                else {
+                        /* First clause ATEST |= 0x4000000.
+                         * Less than 32 regs |= 0x200 */
+                        meta->bifrost1.unk1 = 0x958020;
+                }
+
                 meta->bifrost1.uniform_buffer_count = panfrost_ubo_count(ctx, st);
-                meta->bifrost2.preload_regs = 0xC0;
+                if (st == PIPE_SHADER_VERTEX)
+                        meta->bifrost2.preload_regs = 0xC0;
+                else
+                        meta->bifrost2.preload_regs = 0x1;
                 meta->bifrost2.uniform_count = MIN2(ss->uniform_count,
                                                     ss->uniform_cutoff);
         } else {
@@ -340,7 +350,6 @@ panfrost_shader_meta_init(struct panfrost_context *ctx,
                 meta->midgard1.flags_lo = 0x220;
                 meta->midgard1.uniform_buffer_count = panfrost_ubo_count(ctx, st);
         }
-
 }
 
 static unsigned



More information about the mesa-commit mailing list