sdlxDownloadFromGpuBuffer function gpu
void
sdlxDownloadFromGpuBuffer(
- Pointer<
SdlGpuCopyPass> copyPass, - SdlxGpuBufferRegion source,
- SdlxGpuTransferBufferLocation destination
Copies data from a buffer to a transfer buffer on the GPU timeline.
This data is not guaranteed to be copied until the command buffer fence is signaled.
\param copy_pass a copy pass handle. \param source the source buffer with offset and size. \param destination the destination transfer buffer with offset.
\since This function is available since SDL 3.2.0.
extern SDL_DECLSPEC void SDLCALL SDL_DownloadFromGPUBuffer( SDL_GPUCopyPass *copy_pass, const SDL_GPUBufferRegion *source, const SDL_GPUTransferBufferLocation *destination)
Implementation
void sdlxDownloadFromGpuBuffer(
Pointer<SdlGpuCopyPass> copyPass,
SdlxGpuBufferRegion source,
SdlxGpuTransferBufferLocation destination,
) {
final sourcePointer = source.calloc();
final destinationPointer = destination.calloc();
sdlDownloadFromGpuBuffer(copyPass, sourcePointer, destinationPointer);
sourcePointer.callocFree();
destinationPointer.callocFree();
}