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/a2xx | |
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/a2xx')
-rw-r--r-- | src/gallium/drivers/freedreno/a2xx/fd2_gmem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c b/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c index 274b6145fde..e0aae1c7865 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c +++ b/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c @@ -317,10 +317,10 @@ fd2_emit_tile_mem2gmem(struct fd_context *ctx, struct fd_tile *tile) OUT_RING(ring, CP_REG(REG_A2XX_PA_CL_CLIP_CNTL)); OUT_RING(ring, 0x00000000); - 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, bin_w * bin_h, pfb->zsbuf); - if (ctx->restore & FD_BUFFER_COLOR) + if (fd_gmem_needs_restore(ctx, tile, FD_BUFFER_COLOR)) emit_mem2gmem_surf(ctx, 0, pfb->cbufs[0]); /* TODO blob driver seems to toss in a CACHE_FLUSH after each DRAW_INDX.. */ |