20#ifndef RHI_UPLOAD_COMMANDS_H
21#define RHI_UPLOAD_COMMANDS_H
69 auto held = std::make_shared<std::vector<uint8_t>>(
70 static_cast<const uint8_t*
>( aSrc ),
static_cast<const uint8_t*
>( aSrc ) + aBytes );
83 auto held = std::make_shared<std::vector<T>>( std::move( aVector ) );
RHI_HANDLE< RHI_TAG_TEXTURE > RHI_TextureHandle
RHI_HANDLE< RHI_TAG_BUFFER > RHI_BufferHandle
std::variant< RHI_GEOMETRY_UPLOAD, RHI_TEXTURE_UPLOAD, RHI_BUFFER_CREATE, RHI_TEXTURE_CREATE, RHI_BUFFER_DESTROY, RHI_TEXTURE_DESTROY > RHI_UPLOAD_COMMAND
One entry in the render thread upload queue.
void RhiUploadAdoptStaging(RHI_STAGING &aUpload, std::vector< T > &&aVector)
Move the vector into the upload without a copy, for data the producer does not read after queuing.
void RhiUploadCopyStaging(RHI_STAGING &aUpload, const void *aSrc, size_t aBytes)
Copy the source into the upload, for data the producer keeps using after queuing.
Create the GPU buffer for a handle the UI thread already reserved, so only the render thread writes t...
Destroy a buffer the UI thread created, queued so it runs after the handle's create and uploads.
RHI_BufferHandle targetBuffer
Staging data owned by the upload command, so the UI thread can reuse its source at once without racin...
std::shared_ptr< const void > stagingOwner
Texture counterpart of RHI_BUFFER_CREATE.
Texture counterpart of RHI_BUFFER_DESTROY.
RHI_TextureHandle targetTexture