pan/bi: Add BIFROST_MESA_DEBUG=nosb option
authorAlyssa Rosenzweig <alyssa@collabora.com>
Fri, 18 Feb 2022 21:41:24 +0000 (16:41 -0500)
committerMarge Bot <emma+marge@anholt.net>
Tue, 22 Feb 2022 16:57:30 +0000 (16:57 +0000)
To disable the new scoreboarding optimizations when debugging.

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

src/panfrost/bifrost/bi_scoreboard.c
src/panfrost/bifrost/bifrost.h
src/panfrost/bifrost/bifrost_compile.c

index dd5054d..27895a8 100644 (file)
 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.
index 8af51ed..c04b8a6 100644 (file)
@@ -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;
 
index 32b8fd8..42cb082 100644 (file)
@@ -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
 };