Skip to content

SDL_GPUComputePass

A compute pass for dispatching compute pipelines. Freed after end() or GC.

dispatch(x, y, z) function

Dispatch the compute pipeline with the specified threadgroup counts.

x: Number of groups in X dimension

y: Number of groups in Y dimension

z: Number of groups in Z dimension

Returns: None

end() function

End this compute pass.

Returns: None

pipeline(computePipeline) function

Bind a compute pipeline in this pass.

computePipeline: The SDL_GPUComputePipeline

Returns: None

samplers(arrayOfSamplerBindings, firstSlot) function

Bind a set of texture/sampler pairs for compute usage.

arrayOfSamplerBindings: e.g. [ {texture, sampler}, ...]

firstSlot: The starting sampler slot.

Returns: None

storage_buffers(arrayOfBuffers, firstSlot) function

Bind an array of storage buffers for the compute shader.

arrayOfBuffers: The buffers

firstSlot: Starting binding slot.

Returns: None

storage_textures(arrayOfTextures, firstSlot) function

Bind an array of storage textures for the compute shader.

arrayOfTextures: The textures

firstSlot: Starting binding slot

Returns: None