sdlDispatchGpuCompute function
void
sdlDispatchGpuCompute(
- Pointer<
SdlGpuComputePass> computePass, - int groupcountX,
- int groupcountY,
- int groupcountZ,
Dispatches compute work.
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.
\param compute_pass a compute pass handle. \param groupcount_x number of local workgroups to dispatch in the X dimension. \param groupcount_y number of local workgroups to dispatch in the Y dimension. \param groupcount_z number of local workgroups to dispatch in the Z dimension.
\since This function is available since SDL 3.1.3.
extern SDL_DECLSPEC void SDLCALL SDL_DispatchGPUCompute( SDL_GPUComputePass *compute_pass, Uint32 groupcount_x, Uint32 groupcount_y, Uint32 groupcount_z)
Implementation
void sdlDispatchGpuCompute(Pointer<SdlGpuComputePass> computePass,
int groupcountX, int groupcountY, int groupcountZ) {
final sdlDispatchGpuComputeLookupFunction = libSdl3.lookupFunction<
Void Function(Pointer<SdlGpuComputePass> computePass, Uint32 groupcountX,
Uint32 groupcountY, Uint32 groupcountZ),
void Function(Pointer<SdlGpuComputePass> computePass, int groupcountX,
int groupcountY, int groupcountZ)>('SDL_DispatchGPUCompute');
return sdlDispatchGpuComputeLookupFunction(
computePass, groupcountX, groupcountY, groupcountZ);
}