summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_gmem.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2018-09-06 08:44:52 -0400
committerRob Clark <[email protected]>2018-09-27 15:26:32 -0400
commit5bb96bf73a1b2a9978c4cb766477e453610345f1 (patch)
tree2152e6961738d0f21c51d78b739b915e0251dc32 /src/gallium/drivers/freedreno/freedreno_gmem.c
parenta7fa44cd33378c6058b8069e6edcae1963c96bd3 (diff)
freedreno: simplify pctx->clear()
This is defined to always clear the entire surface(s) specified, regardless of scissor state.. mesa/st will turn scissored clears into a draw. So rip about a bunch of unnecessary machinery. Also remove a comment that was obsolete since using u_blitter to turn clear into draw (for the cases where there isn't a hw blitter fast-path). Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_gmem.c')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_gmem.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_gmem.c b/src/gallium/drivers/freedreno/freedreno_gmem.c
index 981ab0cf763..92c719392c8 100644
--- a/src/gallium/drivers/freedreno/freedreno_gmem.c
+++ b/src/gallium/drivers/freedreno/freedreno_gmem.c
@@ -442,20 +442,6 @@ fd_gmem_render_tiles(struct fd_batch *batch)
flush_ring(batch);
}
-/* tile needs restore if it isn't completely contained within the
- * cleared scissor:
- */
-static bool
-skip_restore(struct pipe_scissor_state *scissor, struct fd_tile *tile)
-{
- unsigned minx = tile->xoff;
- unsigned maxx = tile->xoff + tile->bin_w;
- unsigned miny = tile->yoff;
- unsigned maxy = tile->yoff + tile->bin_h;
- return (minx >= scissor->minx) && (maxx <= scissor->maxx) &&
- (miny >= scissor->miny) && (maxy <= scissor->maxy);
-}
-
/* When deciding whether a tile needs mem2gmem, we need to take into
* account the scissor rect(s) that were cleared. To simplify we only
* consider the last scissor rect for each buffer, since the common
@@ -468,21 +454,5 @@ fd_gmem_needs_restore(struct fd_batch *batch, struct fd_tile *tile,
if (!(batch->restore & buffers))
return false;
- /* if buffers partially cleared, then slow-path to figure out
- * if this particular tile needs restoring:
- */
- if ((buffers & FD_BUFFER_COLOR) &&
- (batch->partial_cleared & FD_BUFFER_COLOR) &&
- skip_restore(&batch->cleared_scissor.color, tile))
- return false;
- if ((buffers & FD_BUFFER_DEPTH) &&
- (batch->partial_cleared & FD_BUFFER_DEPTH) &&
- skip_restore(&batch->cleared_scissor.depth, tile))
- return false;
- if ((buffers & FD_BUFFER_STENCIL) &&
- (batch->partial_cleared & FD_BUFFER_STENCIL) &&
- skip_restore(&batch->cleared_scissor.stencil, tile))
- return false;
-
return true;
}