Mesa (staging/21.3): zink: add a read barrier for indirect dispatch
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Oct 19 20:59:46 UTC 2021
Module: Mesa
Branch: staging/21.3
Commit: b68b5fd634e81e28070ab2a57af9ef95b1c07319
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b68b5fd634e81e28070ab2a57af9ef95b1c07319
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Fri Oct 15 11:57:14 2021 -0400
zink: add a read barrier for indirect dispatch
using the draw stage here doesn't make much sense, but that's what the
spec says, so let's git er done
fixes dEQP-GL45.functional.compute.indirect_dispatch* on radv
Cc: mesa-stable
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13381>
(cherry picked from commit a2789fde0c7a8aa5436560692633838079e2e848)
---
.pick_status.json | 2 +-
src/gallium/drivers/zink/zink_draw.cpp | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/.pick_status.json b/.pick_status.json
index 1c8a1452baa..2eb17b3eea5 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -553,7 +553,7 @@
"description": "zink: add a read barrier for indirect dispatch",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": null
},
diff --git a/src/gallium/drivers/zink/zink_draw.cpp b/src/gallium/drivers/zink/zink_draw.cpp
index 85088770390..0a38c339ab2 100644
--- a/src/gallium/drivers/zink/zink_draw.cpp
+++ b/src/gallium/drivers/zink/zink_draw.cpp
@@ -896,6 +896,14 @@ zink_launch_grid(struct pipe_context *pctx, const struct pipe_grid_info *info)
batch->work_count++;
zink_batch_no_rp(ctx);
if (info->indirect) {
+ /*
+ VK_ACCESS_INDIRECT_COMMAND_READ_BIT specifies read access to indirect command data read as
+ part of an indirect build, trace, drawing or dispatching command. Such access occurs in the
+ VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT pipeline stage.
+
+ - Chapter 7. Synchronization and Cache Control
+ */
+ check_buffer_barrier(ctx, info->indirect, VK_ACCESS_INDIRECT_COMMAND_READ_BIT, VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT);
VKCTX(CmdDispatchIndirect)(batch->state->cmdbuf, zink_resource(info->indirect)->obj->buffer, info->indirect_offset);
zink_batch_reference_resource_rw(batch, zink_resource(info->indirect), false);
} else
More information about the mesa-commit
mailing list