SDL_DISPATCHGPUCOMPUTEINDIRECT(3)
π NAME π
SDL_DispatchGPUComputeIndirect β the way you dispatch compute work when the parameters are chillin' inside a buffer instead of passed as arguments, periodt β¨
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_gpu.h>
void SDL_DispatchGPUComputeIndirect(
SDL_GPUComputePass *compute_pass,
SDL_GPUBuffer *buffer,
Uint32 offset);
π¦ DESCRIPTION π¦
okay so bestie, lowkey this one is the β¨indirectβ¨ version of dispatching compute β instead of you handing over the numbers yourself, the numbers are sitting in a buffer and the GPU goes and reads them. so iconic of it π
The buffer layout should match the layout of SDL_GPUIndirectDispatchCommand, no cap. And listen β you must not call this function before binding a compute pipeline. Like, bind first. Don't be that girl π
π¨ 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. ngl that's chaos energy and we do not stan π If the write order matters, you MUST end the compute pass and begin another one. literally non-negotiable, bestie π
π FUNCTION PARAMETERS π
compute_passβ a compute pass handle πbufferβ a buffer containing dispatch parameters πoffsetβ the offset to start reading from the dispatch buffer π§
β AVAILABILITY β
This function is available since SDL 3.2.0 β so if you're on anything older, sorry babe, it's giving outdated π
and that's the whole page, bestie! this lil' cutie lives in the Simple Directmedia Layer docs, straight from the SDL 3.4.18 era β she ate and left no crumbs ππ mwah π«Ά
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms