Module: Mesa
Branch: master
Commit: e439f63467419d73e74bcefe07fd6094f34d7ae5
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e439f63467419d73e74bcefe07fd6094f34d7ae5

Author: Rob Clark <robdcl...@chromium.org>
Date:   Sun Jul 28 10:04:25 2019 -0700

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 <robdcl...@chromium.org>
Reviewed-by: Eric Anholt <e...@anholt.net>

---

 src/gallium/drivers/freedreno/freedreno_batch.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/drivers/freedreno/freedreno_batch.c 
b/src/gallium/drivers/freedreno/freedreno_batch.c
index 35a88dfe1e2..6bab243453d 100644
--- a/src/gallium/drivers/freedreno/freedreno_batch.c
+++ b/src/gallium/drivers/freedreno/freedreno_batch.c
@@ -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);

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to