GPU: shaders, pipelines & buffersSDL 3.2
SDL_UnmapGPUTransferBuffer
Ends CPU access to a mapped transfer buffer. Required before copying from it.
Signature
void SDL_UnmapGPUTransferBuffer(SDL_GPUDevice *device, SDL_GPUTransferBuffer *transfer_buffer);
How it works
After this the pointer from SDL_MapGPUTransferBuffer is invalid. Upload commands recorded while the buffer is still mapped are an error.
Parameters
deviceSDL_GPUDevice *
The device.
transfer_bufferSDL_GPUTransferBuffer *
The mapped transfer buffer.
Example
example.cpp
1SDL_UnmapGPUTransferBuffer(device, staging);
2SDL_GPUCopyPass* copy = SDL_BeginGPUCopyPass(cmd);