diff options
author | Rob Clark <[email protected]> | 2014-10-21 10:30:49 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2014-10-21 20:08:49 -0400 |
commit | 01b757e2b0fb97a146b0ef278b449cecab0d15e8 (patch) | |
tree | a2b0089ba5f796a23ecb558f88ab72ba17daaede /src/gallium/drivers/freedreno/a3xx | |
parent | 1ab6543431b5a4eaf589cdabf2227088dd62ce6f (diff) |
freedreno: clear vs scissor
The optimization of avoiding restore (mem2gmem) if there was a clear
falls down a bit if you don't have a fullscreen scissor. We need to
make the decision logic a bit more clever to keep track of *what* was
cleared, so that we can (a) completely skip mem2gmem if entire buffer
was cleared, or (b) skip mem2gmem on a per-tile basis for tiles that
were completely cleared.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a3xx')
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_gmem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c b/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c index 2eefa9119dc..f454db28a5e 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c @@ -566,10 +566,10 @@ fd3_emit_tile_mem2gmem(struct fd_context *ctx, struct fd_tile *tile) bin_w = gmem->bin_w; bin_h = gmem->bin_h; - if (ctx->restore & (FD_BUFFER_DEPTH | FD_BUFFER_STENCIL)) + if (fd_gmem_needs_restore(ctx, tile, FD_BUFFER_DEPTH | FD_BUFFER_STENCIL)) emit_mem2gmem_surf(ctx, depth_base(ctx), pfb->zsbuf, bin_w); - if (ctx->restore & FD_BUFFER_COLOR) + if (fd_gmem_needs_restore(ctx, tile, FD_BUFFER_COLOR)) emit_mem2gmem_surf(ctx, 0, pfb->cbufs[0], bin_w); OUT_PKT0(ring, REG_A3XX_GRAS_SC_CONTROL, 1); |