Mesa (master): zink: reset all fences when waiting on batch state

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Mar 29 01:47:32 UTC 2021


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

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Fri Nov 27 09:47:10 2020 -0500

zink: reset all fences when waiting on batch state

at this point we know all the states are available, so we can shortcut
future state-finding

Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9787>

---

 src/gallium/drivers/zink/zink_context.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c
index 317b9b1ef10..2d4c8b111dc 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -1837,8 +1837,10 @@ zink_fence_wait(struct pipe_context *pctx)
 
    if (ctx->batch.has_work)
       pctx->flush(pctx, NULL, PIPE_FLUSH_HINT_FINISH);
-   if (ctx->last_fence)
+   if (ctx->last_fence) {
       zink_fence_finish(zink_screen(pctx->screen), pctx, ctx->last_fence, PIPE_TIMEOUT_INFINITE);
+      zink_batch_reset_all(ctx);
+   }
 }
 
 void



More information about the mesa-commit mailing list