|
MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
|
| void MayaFlux::Portal::Graphics::TextureLoom::download_data | ( | const std::shared_ptr< Core::VKImage > & | image, |
| void * | data, | ||
| size_t | size, | ||
| const std::shared_ptr< Buffers::VKBuffer > & | staging, | ||
| bool | deferred = false |
||
| ) |
Download pixel data from a VKImage, reusing a caller-supplied persistent staging buffer.
When staging is null, falls through to the per-call blocking path. When staging is supplied, submits under a fence (fenced, not waitIdle) so other GPU work proceeds concurrently during the wait. When deferred is true, records commands for deferred submission; the caller is responsible for flushing. Ignored when staging is null.
The staging buffer must be host-visible and at least size bytes. Allocate once with Buffers::create_image_staging_buffer(size).
| image | Source VKImage. Must be initialised. |
| data | Destination host pointer, at least size bytes. |
| size | Byte count to read. |
| staging | Persistent staging buffer, or nullptr for per-call path. |
| deferred | When true and staging is supplied, records for deferred submission rather than immediate fenced execution. |
Definition at line 449 of file TextureLoom.cpp.
References MayaFlux::Core::BackendResourceManager::download_image_data(), image, MayaFlux::Journal::ImageProcessing, is_initialized(), m_resource_manager, MF_ERROR, and MayaFlux::Journal::Portal.
Here is the call graph for this function: