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

Author: Mike Blumenkrantz <[email protected]>
Date:   Tue Feb 28 05:57:18 2023 -0500

zink: eliminate internal qbo copy barrier

the values written here will never overlap, so no barrier is necessary

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

---

 src/gallium/drivers/zink/zink_query.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/zink/zink_query.c 
b/src/gallium/drivers/zink/zink_query.c
index 7f307731ecd..0c3636f5687 100644
--- a/src/gallium/drivers/zink/zink_query.c
+++ b/src/gallium/drivers/zink/zink_query.c
@@ -765,7 +765,8 @@ copy_pool_results_to_buffer(struct zink_context *ctx, 
struct zink_query *query,
    zink_batch_no_rp(ctx);
    /* if it's a single query that doesn't need special handling, we can copy 
it and be done */
    zink_batch_reference_resource_rw(batch, res, true);
-   zink_screen(ctx->base.screen)->buffer_barrier(ctx, res, 
VK_ACCESS_TRANSFER_WRITE_BIT, 0);
+   res->obj->access = VK_ACCESS_TRANSFER_WRITE_BIT;
+   res->obj->access_stage = VK_PIPELINE_STAGE_TRANSFER_BIT;
    util_range_add(&res->base.b, &res->valid_buffer_range, offset, offset + 
result_size);
    assert(query_id < NUM_QUERIES);
    res->obj->unordered_read = res->obj->unordered_write = false;

Reply via email to