SDL_BindGPUC...orageTextures(3)
π SDL_BindGPUComputeStorageTextures π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the man pages, where we make your GPU do the most β¨
π NAME π
SDL_BindGPUComputeStorageTextures β binds storage textures as readonly for use on the compute pipeline. yes, the whole function name. it's long. it's giving "my parents named me after the entire alphabet". we love her anyway π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_gpu.h>
void SDL_BindGPUComputeStorageTextures(
SDL_GPUComputePass *compute_pass,
Uint32 first_slot,
SDL_GPUTexture *const *storage_textures,
Uint32 num_bindings);
π¦ DESCRIPTION π¦
so here's the tea, bestie π these textures you're binding? they must have been created with SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ. like, non-negotiable. that's their whole job, that's their main character arc, that's the vibe check they passed at creation time.
the textures being bound also have to have a matching type declared in the shader β 2D, 3D, 2DMS, etc. no mismatches allowed, that's not the energy we're on today π
and fr fr, be sure your shader is set up according to the requirements documented in SDL_CreateGPUComputePipeline(). go read that one. i'll wait. π«Ά
π FUNCTION PARAMETERS π
compute_passβ a compute pass handle. the lil guy you're doing all this binding inside of β¨first_slotβ the compute storage texture slot to begin binding from. like, where do we start? right here, bestie πstorage_texturesβ an array of storage textures. the whole squad πnum_bindingsβ the number of storage textures to bind from the array. how many of the squad are actually coming to the party π
πΈ AVAILABILITY πΈ
this function is available since SDL 3.2.0. iconic behavior, honestly. periodt. π
π SEE ALSO π
SDL_CreateGPUComputePipeline(3)β the one you need to read for the shader setup requirements. it's giving prerequisites, and honestly? respect.
okay that's the whole page, you ate that π no cap. go forth and bind responsibly, bestie π§
reminder: SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ β if your texture wasn't made with this, it's not invited. sorry not sorry π
Simple Directmedia Layer Β· SDL 3.4.18 β mwah, love u, see u in the next man page πβ¨π
π¦ 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