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

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jun 4 17:25:38 UTC 2021


Module: Mesa
Branch: main
Commit: 2ee030e45c32e15db7cea5669a8e3504d26bde13
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2ee030e45c32e15db7cea5669a8e3504d26bde13

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Fri Jun  4 10:02:52 2021 -0400

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

This reverts commit 9ff54d408ba872da44158869f363f73cddbb0f63.

this is fine now that tc unbinds are fixed

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11187>

---

 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 799ba1a4cf4..d81d295a8ed 100644
--- a/src/gallium/drivers/zink/zink_batch.c
+++ b/src/gallium/drivers/zink/zink_batch.c
@@ -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;
diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c
index 93e25e5b554..96b34e8f45b 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -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;



More information about the mesa-commit mailing list