|
| void | copyBufferToBuffer (const CopyPass *self, const SDL_GPUBufferLocation *src, const SDL_GPUBufferLocation *dst, Uint32 size, bool cycle) |
| | Copies a region of one GPU buffer to another.
|
| |
| void | copyTextureToTexture (const CopyPass *self, const SDL_GPUTextureLocation *src, const SDL_GPUTextureLocation *dst, Uint32 w, Uint32 h, Uint32 d, bool cycle) |
| | Copies a region of one GPU texture to another.
|
| |
| void | downloadBuffer (const CopyPass *self, const SDL_GPUBufferRegion *src, const SDL_GPUTransferBufferLocation *dst) |
| | Downloads a GPU buffer region to a CPU-accessible transfer buffer.
|
| |
| void | downloadTexture (const CopyPass *self, const SDL_GPUTextureRegion *src, const SDL_GPUTextureTransferInfo *dst) |
| | Downloads a GPU texture region to a CPU-accessible transfer buffer.
|
| |
| void | downloadQueryResults (const CopyPass *self, QueryPool *pool, Uint32 firstQuery, Uint32 count, const SDL_GPUTransferBufferLocation *dst) |
| | Downloads a range of query results to a CPU-accessible transfer buffer.
|
| |
| CopyPass * | init (CopyPass *self, CommandBuffer *commands, SDL_GPUCopyPass *pass) |
| | Initializes this CopyPass wrapping the given SDL copy pass.
|
| |
| void | uploadBuffer (const CopyPass *self, const SDL_GPUTransferBufferLocation *src, const SDL_GPUBufferRegion *dst, bool cycle) |
| | Uploads data from a CPU transfer buffer to a GPU buffer.
|
| |
| void | uploadData (const CopyPass *self, SDL_GPUBuffer *dst, const void *data, Uint32 size, Uint32 offset, bool cycle) |
| | Uploads raw CPU data to a GPU buffer, managing the transfer buffer internally.
|
| |
| void | uploadTexture (const CopyPass *self, const SDL_GPUTextureTransferInfo *src, const SDL_GPUTextureRegion *dst, bool cycle) |
| | Uploads data from a CPU transfer buffer to a GPU texture.
|
| |
| Class * | _CopyPass (void) |
| | The CopyPass archetype.
|
| |
A scoped copy pass for uploading CPU data and copying GPU resources.
Obtain a CopyPass from CommandBuffer::beginCopyPass. When all transfers are complete, release the pass — dealloc calls SDL_EndGPUCopyPass automatically so no explicit end is required:
release(copy);
static CopyPass * beginCopyPass(CommandBuffer *self)
Definition CommandBuffer.c:96
A scoped copy pass for uploading CPU data and copying GPU resources.
Definition CopyPass.h:55
void uploadBuffer(const CopyPass *self, const SDL_GPUTransferBufferLocation *src, const SDL_GPUBufferRegion *dst, bool cycle)
Uploads data from a CPU transfer buffer to a GPU buffer.
Definition CopyPass.c:136
| void uploadData |
( |
const CopyPass * |
self, |
|
|
SDL_GPUBuffer * |
dst, |
|
|
const void * |
data, |
|
|
Uint32 |
size, |
|
|
Uint32 |
offset, |
|
|
bool |
cycle |
|
) |
| |
Uploads raw CPU data to a GPU buffer, managing the transfer buffer internally.
Allocates a temporary transfer buffer, copies data into it, records the upload, and releases the transfer buffer — all within this call. Use this to batch multiple buffer uploads into a single copy pass without manual transfer buffer management.
- Parameters
-
| self | The CopyPass. |
| dst | The GPU buffer to upload into. |
| data | CPU pointer to the source data. |
| size | Number of bytes to upload. |
| offset | Byte offset into dst where the data is written. |
| cycle | When true, the GPU buffer is cycled to avoid pipeline stalls. |