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

◆ download_back_buffer()

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

Download a raw back_buffers slot to host memory.

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

Reads slot.mapped_ptr directly when present (host-visible slot, no transfer). Otherwise records a fenced copy into staging exactly as download_from_gpu_async does, using slot.buffer as the copy source.

Definition at line 364 of file StagingUtils.cpp.

369{
370 auto handle = download_back_buffer_async(slot, size, staging);
371 resolve_back_buffer_read(handle, slot, data, size, staging);
372}
bool size
void resolve_back_buffer_read(TransferHandle &handle, const VKBufferResources::GenerationSlot &slot, void *data, size_t size, std::shared_ptr< VKBuffer > &staging, size_t staging_offset)
Wait for a recorded download, then copy it out of staging.
TransferHandle download_back_buffer_async(const VKBufferResources::GenerationSlot &slot, size_t size, std::shared_ptr< VKBuffer > &staging, size_t staging_offset)
Record a slot-to-staging copy without waiting for completion.

References download_back_buffer_async(), resolve_back_buffer_read(), and size.

Referenced by MayaFlux::Buffers::BufferDownloadProcessor::download_back_buffers(), MayaFlux::Buffers::ClaimAccumulateProcessor::processing_function(), MayaFlux::Buffers::VolumeGridBuffer::read_field(), and MayaFlux::Buffers::RelaxationStepProcessor::serve_snapshot().

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