Skip to main content

SDL_BindGPUComputeStorageBuffers

Function SDL_BindGPUComputeStorageBuffers 

Source
pub unsafe extern "C" fn SDL_BindGPUComputeStorageBuffers(
    compute_pass: *mut SDL_GPUComputePass,
    first_slot: Uint32,
    storage_buffers: *const *mut SDL_GPUBuffer,
    num_bindings: Uint32,
)
Expand description

Binds storage buffers as readonly for use on the compute pipeline.

These buffers must have been created with SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ.

Be sure your shader is set up according to the requirements documented in SDL_CreateGPUComputePipeline().

Parameter: compute_pass a compute pass handle. Parameter: first_slot the compute storage buffer slot to begin binding from. Parameter: storage_buffers an array of storage buffer binding structs. Parameter: num_bindings the number of storage buffers to bind from the array.

Available Since: This function is available since SDL 3.2.0.

See Also: SDL_CreateGPUComputePipeline