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@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13381>
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