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

Author: Mike Blumenkrantz <michael.blumenkra...@gmail.com>
Date:   Tue Jan  9 15:10:51 2024 -0500

zink: ignore tc buffer replacement info

without tc tracking cross-context buffer usage, this is intensely broken

Fixes: 96cf4531e11 ("Revert "gallium/u_threaded: buffer sharedness tracking"")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26959>

---

 src/gallium/drivers/zink/ci/zink-anv-tgl-fails.txt | 3 ---
 src/gallium/drivers/zink/zink_context.c            | 5 +++++
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/zink/ci/zink-anv-tgl-fails.txt 
b/src/gallium/drivers/zink/ci/zink-anv-tgl-fails.txt
index 8e0b646ca38..8b8b34e3f26 100644
--- a/src/gallium/drivers/zink/ci/zink-anv-tgl-fails.txt
+++ b/src/gallium/drivers/zink/ci/zink-anv-tgl-fails.txt
@@ -692,6 +692,3 @@ KHR-GL46.sparse_texture_tests.SparseTextureCommitment,Crash
 # Assertion `size % ZINK_SPARSE_BUFFER_PAGE_SIZE == 0 || offset + size == 
bo->base.size' failed.
 spec@arb_sparse_buffer@basic,Crash
 spec@arb_sparse_buffer@buffer-data,Crash
-
-# re-enable farm mesa!26900
-glx@glx-multithread-buffer,Crash
diff --git a/src/gallium/drivers/zink/zink_context.c 
b/src/gallium/drivers/zink/zink_context.c
index b7fe7224da1..d9b6c0bc8db 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -4961,6 +4961,11 @@ zink_context_replace_buffer_storage(struct pipe_context 
*pctx, struct pipe_resou
    zink_resource_copies_reset(d);
    /* force counter buffer reset */
    d->so_valid = false;
+   /* FIXME: tc buffer sharedness tracking */
+   if (!num_rebinds) {
+      num_rebinds = d->bind_count[0] + d->bind_count[1];
+      rebind_mask = 0;
+   }
    if (num_rebinds && rebind_buffer(ctx, d, rebind_mask, num_rebinds) < 
num_rebinds)
       ctx->buffer_rebind_counter = 
p_atomic_inc_return(&screen->buffer_rebind_counter);
 }

Reply via email to