freedreno: Add nogmem debug option to force bypass rendering
authorKristian H. Kristensen <hoegsberg@google.com>
Thu, 31 Oct 2019 21:21:32 +0000 (14:21 -0700)
committerKristian H. Kristensen <hoegsberg@google.com>
Fri, 8 Nov 2019 00:36:31 +0000 (16:36 -0800)
Signed-off-by: Kristian H. Kristensen <hoegsberg@google.com>
Acked-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/freedreno_gmem.c
src/gallium/drivers/freedreno/freedreno_screen.c
src/gallium/drivers/freedreno/freedreno_util.h

index d7f4465ff5117761a31cc30ad263386235d10fbc..65ae8b5a825d46814f9580c032e6d08c22046b42 100644 (file)
@@ -446,6 +446,9 @@ fd_gmem_render_tiles(struct fd_batch *batch)
                }
        }
 
+       if (fd_mesa_debug & FD_DBG_NOGMEM)
+               sysmem = true;
+
        /* Layered rendering always needs bypass. */
        for (unsigned i = 0; i < pfb->nr_cbufs; i++) {
                struct pipe_surface *psurf = pfb->cbufs[i];
index 3ee73c2c496c4ceb82d84614da2d5a25c3de1854..6b175c8932449961c8de5ae231913bcb9ccbe2fd 100644 (file)
@@ -74,6 +74,7 @@ static const struct debug_named_value debug_options[] = {
                {"nobypass",  FD_DBG_NOBYPASS, "Disable GMEM bypass"},
                {"fraghalf",  FD_DBG_FRAGHALF, "Use half-precision in fragment shader"},
                {"nobin",     FD_DBG_NOBIN,  "Disable hw binning"},
+               {"nogmem",    FD_DBG_NOGMEM,  "Disable GMEM rendering (bypass only)"},
                {"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"},
index 4a971d93e7c51880596fd298456193a2a3dce424..eb2e5fd3efde384ffd4a0aeff7036673c176fb9b 100644 (file)
@@ -70,7 +70,7 @@ enum adreno_stencil_op fd_stencil_op(unsigned op);
 #define FD_DBG_NOBYPASS 0x0040
 #define FD_DBG_FRAGHALF 0x0080
 #define FD_DBG_NOBIN    0x0100
-/* unused 0x0200 */
+#define FD_DBG_NOGMEM   0x0200
 #define FD_DBG_GLSL120  0x0400
 #define FD_DBG_SHADERDB 0x0800
 #define FD_DBG_FLUSH    0x1000