SDL_BINDGPUCOMPUTESTORAGEBUFFERS(3)

πŸ’– SDL_BindGPUComputeStorageBuffers πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS section of the SDL3 docs, and today we are binding storage buffers for the compute pipeline. it's giving low-level graphics, it's giving main character energy, let's go 🫢


✨ NAME ✨

SDL_BindGPUComputeStorageBuffers β€” binds storage buffers as readonly for use on the compute pipeline. no cap, that's the whole job.


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_gpu.h>

void SDL_BindGPUComputeStorageBuffers(
    SDL_GPUComputePass *compute_pass,
    Uint32 first_slot,
    SDL_GPUBuffer *const *storage_buffers,
    Uint32 num_bindings);

she's a void, she takes four args, she does not return anything because she's above that πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: these buffers must have been created with SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ. like, that's not optional, that's not a suggestion, that's the vibe check and if your buffer didn't pass it, it doesn't get to sit with us πŸ’€

also, and this is important β€” be sure your shader is set up according to the requirements documented in SDL_CreateGPUComputePipeline(). the shader has to match, bestie. it's a whole coordinated outfit situation.


πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • compute_pass β€” a compute pass handle. this is the moment, this is the pass we're binding into ✨
  • first_slot β€” the compute storage buffer slot to begin binding from. like, where do we start? right here, queen πŸ‘‘
  • storage_buffers β€” an array of storage buffer binding structs. the whole lineup 🌈
  • num_bindings β€” the number of storage buffers to bind from the array. how many of the girlies are we actually bringing in πŸ’œ

⭐ AVAILABILITY ⭐

this function is available since SDL 3.2.0. so if you're on anything older, no she's not there, sorry babe 😭


🌟 SEE ALSO 🌟


and that's the whole page, bestie!! every flag, every param, every requirement, preserved, slayed, periodt. πŸ’–

kisses from the Simple Directmedia Layer girlies β€” this is SDL 3.4.18 energy, SDL_BindGPUComputeStorageBuffers(3) forever, mwah πŸŽ€πŸ’…βœ¨

πŸ“¦ where this page comes from