diff options
author | Rob Clark <[email protected]> | 2017-05-12 14:24:33 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2017-05-13 13:12:36 -0400 |
commit | 3ab072d3c8643c66d8e07e63df970b792728bac6 (patch) | |
tree | 11b28174d77d765360bedde13e4be3fea4668276 | |
parent | 840f6beb81a5b51d782d54e9064af0ba193b221a (diff) |
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 <[email protected]>
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_gmem.c | 5 |
1 files changed, 4 insertions, 1 deletions
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)) { |