From 0276d0766d4b62d28097d74a049808b1e10c1f9b Mon Sep 17 00:00:00 2001 From: "Kristian H. Kristensen" Date: Thu, 31 Oct 2019 14:21:32 -0700 Subject: [PATCH] freedreno: Add nogmem debug option to force bypass rendering Signed-off-by: Kristian H. Kristensen Acked-by: Eric Anholt Reviewed-by: Rob Clark --- src/gallium/drivers/freedreno/freedreno_gmem.c | 3 +++ src/gallium/drivers/freedreno/freedreno_screen.c | 1 + src/gallium/drivers/freedreno/freedreno_util.h | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/freedreno/freedreno_gmem.c b/src/gallium/drivers/freedreno/freedreno_gmem.c index d7f4465ff51..65ae8b5a825 100644 --- a/src/gallium/drivers/freedreno/freedreno_gmem.c +++ b/src/gallium/drivers/freedreno/freedreno_gmem.c @@ -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]; diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c index 3ee73c2c496..6b175c89324 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.c +++ b/src/gallium/drivers/freedreno/freedreno_screen.c @@ -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"}, diff --git a/src/gallium/drivers/freedreno/freedreno_util.h b/src/gallium/drivers/freedreno/freedreno_util.h index 4a971d93e7c..eb2e5fd3efd 100644 --- a/src/gallium/drivers/freedreno/freedreno_util.h +++ b/src/gallium/drivers/freedreno/freedreno_util.h @@ -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 -- 2.30.2