From b741e270cd9f89d21ebaf949f7da5f0432af4d76 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 27 Nov 2020 09:47:10 -0500 Subject: [PATCH] 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 Part-of: --- 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