summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <alyssa@collabora.com>2022-02-18 16:41:24 -0500
committerMarge Bot <emma+marge@anholt.net>2022-02-22 16:57:30 +0000
commit2e8676737098082787f2225687f9af5686aff16f (patch)
treea4c49e59e19d2dff85b3c6a707d7c93494eb693f
parentc81c022e666d13ff5a38895295f068f1469a4b62 (diff)
pan/bi: Add BIFROST_MESA_DEBUG=nosb option
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>
-rw-r--r--src/panfrost/bifrost/bi_scoreboard.c4
-rw-r--r--src/panfrost/bifrost/bifrost.h1
-rw-r--r--src/panfrost/bifrost/bifrost_compile.c1
3 files changed, 6 insertions, 0 deletions
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
};