Skip to main content

create_dispatch_indirect_buffer

Function create_dispatch_indirect_buffer 

Source
pub fn create_dispatch_indirect_buffer(
    device: &Device,
    workgroups: [u32; 3],
    label: &str,
) -> Buffer
Expand description

Create an indirect dispatch buffer (3 × u32: workgroups_x, workgroups_y, workgroups_z).

The buffer has INDIRECT | STORAGE | COPY_DST usage, allowing it to be written by compute shaders or the CPU, then used for dispatch_workgroups_indirect.