freedreno/batch: always update last_fence

Not all flush paths come thru fd_context_flush(), so we should also set
last_fence in the batch flush path.  This avoids some no-op flushes just
to get a fence.  For example when pctx->flush_resource() triggers a
flush.

We should probably keep the last_fence update in fd_context_flush() as
well to handle deferred flush case.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Rob Clark 2019-07-28 10:04:25 -07:00
parent c93eae7f10
commit e439f63467
1 changed files with 2 additions and 0 deletions

View File

@ -325,6 +325,8 @@ batch_flush(struct fd_batch *batch)
batch->flushed = true;
fd_fence_ref(&batch->ctx->last_fence, batch->fence);
if (batch->ctx->screen->reorder) {
struct fd_batch *tmp = NULL;
fd_batch_reference(&tmp, batch);