SDL Wiki
(This is the documentation for SDL3, which is under heavy development and the API is changing! SDL2 is the current stable version!)

SDL_DispatchGPUCompute

Dispatches compute work.

Header File

Defined in <SDL3/SDL_gpu.h>

Syntax

void SDL_DispatchGPUCompute(
    SDL_GPUComputePass *compute_pass,
    Uint32 groupcount_x,
    Uint32 groupcount_y,
    Uint32 groupcount_z);

Function Parameters

SDL_GPUComputePass * compute_pass a compute pass handle.
Uint32 groupcount_x number of local workgroups to dispatch in the X dimension.
Uint32 groupcount_y number of local workgroups to dispatch in the Y dimension.
Uint32 groupcount_z number of local workgroups to dispatch in the Z dimension.

Remarks

You must not call this function before binding a compute pipeline.

A VERY IMPORTANT NOTE If you dispatch multiple times in a compute pass, and the dispatches write to the same resource region as each other, there is no guarantee of which order the writes will occur. If the write order matters, you MUST end the compute pass and begin another one.

Version

This function is available since SDL 3.0.0.


CategoryAPI, CategoryAPIFunction, CategoryGPU


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.