From 3ab072d3c8643c66d8e07e63df970b792728bac6 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Fri, 12 May 2017 14:24:33 -0400 Subject: freedreno: use bypass if only clears Some things trigger batches that only contain a clear (like glmark2 startup). No point to use GMEM for this. Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/freedreno_gmem.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gallium/drivers/freedreno/freedreno_gmem.c b/src/gallium/drivers/freedreno/freedreno_gmem.c index d4b2e8d92fc..310a0266c93 100644 --- a/src/gallium/drivers/freedreno/freedreno_gmem.c +++ b/src/gallium/drivers/freedreno/freedreno_gmem.c @@ -390,7 +390,10 @@ fd_gmem_render_tiles(struct fd_batch *batch) bool sysmem = false; if (ctx->emit_sysmem_prep) { - if (batch->cleared || batch->gmem_reason || (batch->num_draws > 5)) { + if (batch->num_draws == 0) { + sysmem = true; + } else if (batch->cleared || batch->gmem_reason || (batch->num_draws > 5)) { + // TODO maybe consider # of draws w/ blend enabled, etc? DBG("GMEM: cleared=%x, gmem_reason=%x, num_draws=%u", batch->cleared, batch->gmem_reason, batch->num_draws); } else if (!(fd_mesa_debug & FD_DBG_NOBYPASS)) { -- cgit v1.2.3