summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2013-09-10 11:35:58 -0400
committerRob Clark <[email protected]>2013-09-14 13:31:58 -0400
commitc756a3ef70ad3f020f50950bcf30f8423470478d (patch)
tree4eeffd1207e6ada5304009a1f97e328292ebdc8b
parentcdec879e38abdce652962b5fb3b28209d729d981 (diff)
freedreno: add debug option to disable GMEM bypass
Useful for debugging. Signed-off-by: Rob Clark <[email protected]>
-rw-r--r--src/gallium/drivers/freedreno/freedreno_gmem.c2
-rw-r--r--src/gallium/drivers/freedreno/freedreno_screen.c1
-rw-r--r--src/gallium/drivers/freedreno/freedreno_util.h1
3 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_gmem.c b/src/gallium/drivers/freedreno/freedreno_gmem.c
index 3d959c65dc7..8455b73ccbe 100644
--- a/src/gallium/drivers/freedreno/freedreno_gmem.c
+++ b/src/gallium/drivers/freedreno/freedreno_gmem.c
@@ -204,7 +204,7 @@ fd_gmem_render_tiles(struct pipe_context *pctx)
if (ctx->cleared || ctx->gmem_reason || (ctx->num_draws > 5)) {
DBG("GMEM: cleared=%x, gmem_reason=%x, num_draws=%u",
ctx->cleared, ctx->gmem_reason, ctx->num_draws);
- } else {
+ } else if (!(fd_mesa_debug & FD_DBG_DBYPASS)) {
sysmem = true;
}
}
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c
index eada1af9892..a038a779029 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -62,6 +62,7 @@ static const struct debug_named_value debug_options[] = {
{"dgmem", FD_DBG_DGMEM, "Mark all state dirty after GMEM tile pass"},
{"dscis", FD_DBG_DSCIS, "Disable scissor optimization"},
{"direct", FD_DBG_DIRECT, "Force inline (SS_DIRECT) state loads"},
+ {"dbypass", FD_DBG_DBYPASS,"Disable GMEM bypass"},
DEBUG_NAMED_VALUE_END
};
diff --git a/src/gallium/drivers/freedreno/freedreno_util.h b/src/gallium/drivers/freedreno/freedreno_util.h
index 4c7c78b955d..a189e1aba5e 100644
--- a/src/gallium/drivers/freedreno/freedreno_util.h
+++ b/src/gallium/drivers/freedreno/freedreno_util.h
@@ -58,6 +58,7 @@ enum adreno_stencil_op fd_stencil_op(unsigned op);
#define FD_DBG_DGMEM 0x08
#define FD_DBG_DSCIS 0x10
#define FD_DBG_DIRECT 0x20
+#define FD_DBG_DBYPASS 0x40
extern int fd_mesa_debug;
#define DBG(fmt, ...) \