MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ upload_back_buffer()

MAYAFLUX_API void MayaFlux::Buffers::upload_back_buffer ( const VKBufferResources::GenerationSlot slot,
const void *  data,
size_t  size,
std::shared_ptr< VKBuffer > &  staging 
)

Upload host memory into a raw back_buffers slot.

Parameters
slotDestination slot, typically from VKBuffer::get_back_buffer().
dataSource pointer, at least size bytes.
sizeByte count to copy.
stagingPersistent staging buffer for device-local slots. Ignored, and may be null, when slot.mapped_ptr is already valid.

Writes through slot.mapped_ptr directly when present (host-visible slot, no transfer). Otherwise copies into staging and records a fenced device-to-device copy into slot.buffer, mirroring download_back_buffer with the direction reversed.

Definition at line 123 of file StagingUtils.cpp.

128{
129 auto handle = upload_back_buffer_async(slot, data, size, staging);
130 resolve_transfer(handle);
131}
void resolve_transfer(TransferHandle &handle)
Wait for a transfer and release its resources.
TransferHandle upload_back_buffer_async(const VKBufferResources::GenerationSlot &slot, const void *data, size_t size, std::shared_ptr< VKBuffer > &staging)
Upload to a back_buffers slot without waiting for completion.

References resolve_transfer(), and upload_back_buffer_async().

Referenced by MayaFlux::Buffers::NetworkGeometryBuffer::ensure_cluster_ids(), MayaFlux::Buffers::ClaimAccumulateProcessor::processing_function(), and MayaFlux::Buffers::NetworkGeometryBuffer::wire_field_operators().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: