From 06118be1b14fb959e50081718b7ef2507991c30f Mon Sep 17 00:00:00 2001 From: dwbrite Date: Mon, 11 Oct 2021 20:31:15 -0400 Subject: [PATCH] Docs: add structure for indirect dispatch args --- wgpu/src/lib.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/wgpu/src/lib.rs b/wgpu/src/lib.rs index ffadabf29..3a2da91c7 100644 --- a/wgpu/src/lib.rs +++ b/wgpu/src/lib.rs @@ -2871,6 +2871,18 @@ impl<'a> ComputePass<'a> { } /// Dispatches compute work operations, based on the contents of the `indirect_buffer`. + /// + /// The structure expected in `indirect_buffer` is the following: + /// + /// ```rust + /// // x, y and z denote the number of work groups to dispatch in each dimension. + /// #[repr(C)] + /// struct DispatchIndirect { + /// x: u32, + /// y: u32, + /// z: u32, + /// } + /// ``` pub fn dispatch_indirect( &mut self, indirect_buffer: &'a Buffer,