From 4d62fca0877104080d4dee8656d09c67e93c8d0e Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 19 May 2021 09:59:31 -0400 Subject: [PATCH] zink: call tc_driver_internal_flush_notify() on flush I think this is right? Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/zink/zink_batch.c | 2 ++ src/gallium/drivers/zink/zink_context.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_batch.c b/src/gallium/drivers/zink/zink_batch.c index 846a91f5424..63afd8ddd62 100644 --- a/src/gallium/drivers/zink/zink_batch.c +++ b/src/gallium/drivers/zink/zink_batch.c @@ -486,6 +486,8 @@ zink_end_batch(struct zink_context *ctx, struct zink_batch *batch) if (!ctx->queries_disabled) zink_suspend_queries(ctx, batch); + tc_driver_internal_flush_notify(ctx->tc); + if (vkEndCommandBuffer(batch->state->cmdbuf) != VK_SUCCESS) { debug_printf("vkEndCommandBuffer failed\n"); return; diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index f3e85e6fe18..c0ab856c2e5 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -2155,6 +2155,7 @@ zink_flush(struct pipe_context *pctx, check_device_lost(ctx); } } + tc_driver_internal_flush_notify(ctx->tc); } else { fence = &batch->state->fence; if (deferred && !(flags & PIPE_FLUSH_FENCE_FD) && pfence) @@ -3181,7 +3182,7 @@ zink_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags) struct threaded_context *tc = (struct threaded_context*)threaded_context_create(&ctx->base, &screen->transfer_pool, zink_context_replace_buffer_storage, zink_create_tc_fence_for_tc, - zink_context_is_resource_busy, false, &ctx->tc); + zink_context_is_resource_busy, true, &ctx->tc); if (tc && (struct zink_context*)tc != ctx) { tc->bytes_mapped_limit = screen->total_mem / 4;