freedreno: add debug option to dirty state after draw
authorRob Clark <robclark@freedesktop.org>
Thu, 15 Oct 2015 20:28:17 +0000 (16:28 -0400)
committerRob Clark <robclark@freedesktop.org>
Thu, 15 Oct 2015 22:04:18 +0000 (18:04 -0400)
Similar to "dclear", "ddraw" will mark all state dirty after each draw.

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

index 6831a58749cbc5a6fa3a6e1aa6c924f550976db9..7bf3343f43a229b60731fe16ba4304725e3785cc 100644 (file)
@@ -187,6 +187,9 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info)
        for (i = 0; i < ctx->streamout.num_targets; i++)
                ctx->streamout.offsets[i] += prims;
 
+       if (fd_mesa_debug & FD_DBG_DDRAW)
+               ctx->dirty = 0xffffffff;
+
        /* if an app (or, well, piglit test) does many thousands of draws
         * without flush (or anything which implicitly flushes, like
         * changing render targets), we can exceed the ringbuffer size.
index 0d0100590d66f4f0356fb5224b5c1eccf5e46a11..b64f78ca32b699045dedc6ad7156b5ba0f20eb3b 100644 (file)
@@ -61,7 +61,7 @@ static const struct debug_named_value debug_options[] = {
                {"msgs",      FD_DBG_MSGS,   "Print debug messages"},
                {"disasm",    FD_DBG_DISASM, "Dump TGSI and adreno shader disassembly"},
                {"dclear",    FD_DBG_DCLEAR, "Mark all state dirty after clear"},
-               {"flush",     FD_DBG_FLUSH,  "Force flush after every draw"},
+               {"ddraw",     FD_DBG_DDRAW,  "Mark all state dirty after draw"},
                {"noscis",    FD_DBG_NOSCIS, "Disable scissor optimization"},
                {"direct",    FD_DBG_DIRECT, "Force inline (SS_DIRECT) state loads"},
                {"nobypass",  FD_DBG_NOBYPASS, "Disable GMEM bypass"},
@@ -70,6 +70,7 @@ static const struct debug_named_value debug_options[] = {
                {"optmsgs",   FD_DBG_OPTMSGS,"Enable optimizer debug messages"},
                {"glsl120",   FD_DBG_GLSL120,"Temporary flag to force GLSL 1.20 (rather than 1.30) on a3xx+"},
                {"shaderdb",  FD_DBG_SHADERDB, "Enable shaderdb output"},
+               {"flush",     FD_DBG_FLUSH,  "Force flush after every draw"},
                DEBUG_NAMED_VALUE_END
 };
 
index 7129a1bddd1e1cd9caf145810e6d2ea544c9d93d..0d2418e1e00c6fe3dce05243a9348616c84380c3 100644 (file)
@@ -63,7 +63,7 @@ enum adreno_stencil_op fd_stencil_op(unsigned op);
 #define FD_DBG_MSGS     0x0001
 #define FD_DBG_DISASM   0x0002
 #define FD_DBG_DCLEAR   0x0004
-#define FD_DBG_FLUSH    0x0008
+#define FD_DBG_DDRAW    0x0008
 #define FD_DBG_NOSCIS   0x0010
 #define FD_DBG_DIRECT   0x0020
 #define FD_DBG_NOBYPASS 0x0040
@@ -72,6 +72,7 @@ enum adreno_stencil_op fd_stencil_op(unsigned op);
 #define FD_DBG_OPTMSGS  0x0200
 #define FD_DBG_GLSL120  0x0400
 #define FD_DBG_SHADERDB 0x0800
+#define FD_DBG_FLUSH    0x1000
 
 extern int fd_mesa_debug;
 extern bool fd_binning_enabled;