Module: Mesa
Branch: staging/22.1
Commit: cfc3827890cf5ebab84501e32dc47be336a5019d
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=cfc3827890cf5ebab84501e32dc47be336a5019d

Author: Mike Blumenkrantz <[email protected]>
Date:   Wed Apr 20 15:53:35 2022 -0400

zink: add synchronization for buffer clears

cc: mesa-stable

Reviewed-by: Erik Faye-Lund <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16098>
(cherry picked from commit fbece25a451bb7915891851ee5c72724974ae5e2)

---

 .pick_status.json                     | 2 +-
 src/gallium/drivers/zink/zink_clear.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index b65b3db9620..bbaf13591a3 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -4,7 +4,7 @@
         "description": "zink: add synchronization for buffer clears",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/gallium/drivers/zink/zink_clear.c 
b/src/gallium/drivers/zink/zink_clear.c
index 5a7701ca049..c4ffae210b4 100644
--- a/src/gallium/drivers/zink/zink_clear.c
+++ b/src/gallium/drivers/zink/zink_clear.c
@@ -474,6 +474,7 @@ zink_clear_buffer(struct pipe_context *pctx,
       zink_batch_no_rp(ctx);
       zink_batch_reference_resource_rw(batch, res, true);
       util_range_add(&res->base.b, &res->valid_buffer_range, offset, offset + 
size);
+      zink_resource_buffer_barrier(ctx, res, VK_ACCESS_TRANSFER_WRITE_BIT, 
VK_PIPELINE_STAGE_TRANSFER_BIT);
       VKCTX(CmdFillBuffer)(batch->state->cmdbuf, res->obj->buffer, offset, 
size, *(uint32_t*)clear_value);
       return;
    }

Reply via email to