SDL_CopyGPUBufferToBuffer(3)
π SDL_CopyGPUBufferToBuffer π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, and today's main character is SDL_CopyGPUBufferToBuffer β she does exactly what her name says and she does it flawlessly. no notes. β¨
πΈ NAME πΈ
SDL_CopyGPUBufferToBuffer β Performs a buffer-to-buffer copy.
likeβ¦ literally that. buffer goes in, buffer comes out. it's giving copy-paste but make it GPU. π
π SYNOPSIS π
#include <SDL3/SDL_gpu.h>
void SDL_CopyGPUBufferToBuffer(
SDL_GPUCopyPass *copy_pass,
const SDL_GPUBufferLocation *source,
const SDL_GPUBufferLocation *destination,
Uint32 size,
bool cycle);
look at her. five arguments, returns nothing, zero drama. π¦
β¨ DESCRIPTION β¨
This copy occurs on the GPU timeline. You may assume the copy has finished in subsequent commands.
fr fr β that's the important part. you don't gotta sit around waiting or syncing anything, because on the GPU timeline it's already done done by the time the next commands roll around. no cap. ππ
π§ FUNCTION PARAMETERS π§
copy_passβ a copy pass handle. your backstage pass to the whole operation, bestie. ποΈsourceβ the buffer and offset to copy from. where the tea is coming from. πdestinationβ the buffer and offset to copy to. where the tea is going. βsizeβ the length of the buffer to copy. how much of the tea we're pouring. measure twice, copy once. πcycleβ iftrue, cycles the destination buffer if it is already bound, otherwise overwrites the data. so likeβ¦ cycle = true means she politely rotates that buffer if it's already claimed, and cycle = false means she just steamrolls over whatever's there. choose wisely, queen. π
β AVAILABILITY β
This function is available since SDL 3.2.0. so if you're on something olderβ¦ girl, update. π
β οΈ quick vibe check: this is avoidfunction β no return value, no error code, nothing to check. it just does the thing. butcyclebeingfalseon an already-bound destination buffer means an overwrite, so don't come crying to me when your data's gone. i warned you. π
and that's the whole page, bestie!! π«Ά this was pulled straight from the Simple Directmedia Layer manual, SDL 3.4.18 edition β stan a stable release. π mwah, go copy some buffers. ππ
π¦ 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