Mesa (main): pan/bi: Add BIFROST_MESA_DEBUG=nosb option

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Feb 22 17:10:15 UTC 2022


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

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Fri Feb 18 16:41:24 2022 -0500

pan/bi: Add BIFROST_MESA_DEBUG=nosb option

To disable the new scoreboarding optimizations when debugging.

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

---

 src/panfrost/bifrost/bi_scoreboard.c   | 4 ++++
 src/panfrost/bifrost/bifrost.h         | 1 +
 src/panfrost/bifrost/bifrost_compile.c | 1 +
 3 files changed, 6 insertions(+)

diff --git a/src/panfrost/bifrost/bi_scoreboard.c b/src/panfrost/bifrost/bi_scoreboard.c
index dd5054d776d..27895a8b8a1 100644
--- a/src/panfrost/bifrost/bi_scoreboard.c
+++ b/src/panfrost/bifrost/bi_scoreboard.c
@@ -65,6 +65,10 @@
 static bool
 bi_should_serialize(bi_instr *I)
 {
+        /* For debug, serialize everything to disable scoreboard opts */
+        if (bifrost_debug & BIFROST_DBG_NOSB)
+                return true;
+
         /* Although nominally on the attribute unit, image loads have the same
          * coherency requirements as general memory loads. Serialize them for
          * now until we can do something more clever.
diff --git a/src/panfrost/bifrost/bifrost.h b/src/panfrost/bifrost/bifrost.h
index 8af51ed8be7..c04b8a61ad4 100644
--- a/src/panfrost/bifrost/bifrost.h
+++ b/src/panfrost/bifrost/bifrost.h
@@ -45,6 +45,7 @@ extern "C" {
 #define BIFROST_DBG_NOVALIDATE  0x0080
 #define BIFROST_DBG_NOOPT       0x0100
 #define BIFROST_DBG_NOIDVS      0x0200
+#define BIFROST_DBG_NOSB        0x0400
 
 extern int bifrost_debug;
 
diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c
index 32b8fd83898..42cb08248a5 100644
--- a/src/panfrost/bifrost/bifrost_compile.c
+++ b/src/panfrost/bifrost/bifrost_compile.c
@@ -47,6 +47,7 @@ static const struct debug_named_value bifrost_debug_options[] = {
         {"novalidate",BIFROST_DBG_NOVALIDATE,   "Skip IR validation"},
         {"noopt",     BIFROST_DBG_NOOPT,        "Skip optimization passes"},
         {"noidvs",    BIFROST_DBG_NOIDVS,       "Disable IDVS"},
+        {"nosb",      BIFROST_DBG_NOSB,         "Disable scoreboarding"},
         DEBUG_NAMED_VALUE_END
 };
 



More information about the mesa-commit mailing list