freedreno: add debug option to disable GMEM bypass
authorRob Clark <robclark@freedesktop.org>
Tue, 10 Sep 2013 15:35:58 +0000 (11:35 -0400)
committerRob Clark <robclark@freedesktop.org>
Sat, 14 Sep 2013 17:31:58 +0000 (13:31 -0400)
Useful for debugging.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/freedreno_gmem.c
src/gallium/drivers/freedreno/freedreno_screen.c
src/gallium/drivers/freedreno/freedreno_util.h

index 3d959c65dc759cb539e59a8a906831c4d9eb93e6..8455b73ccbed752f4ee73ecc3902f26dcea0e74c 100644 (file)
@@ -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;
                }
        }
index eada1af9892483037f6ff66f33670ca633732f1b..a038a779029d839ba9e7228850b0b497b0c2dcf9 100644 (file)
@@ -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
 };
 
index 4c7c78b955d0551c57df12988c7876cda5a3c5e9..a189e1aba5e382fe2b69be804b32634ff2e1ad6f 100644 (file)
@@ -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, ...) \