Revert "Revert "zink: call tc_driver_internal_flush_notify() on flush""

This reverts commit 9ff54d408b.

this is fine now that tc unbinds are fixed

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11187>
This commit is contained in:
Mike Blumenkrantz 2021-06-04 10:02:52 -04:00 committed by Marge Bot
parent 535a5a9dfe
commit 2ee030e45c
2 changed files with 4 additions and 1 deletions

View File

@ -489,6 +489,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;

View File

@ -2343,6 +2343,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)
@ -3442,7 +3443,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;