|
MayaFlux 1.0.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, |
||
| vk::ImageLayout | restore_layout = vk::ImageLayout::eShaderReadOnlyOptimal, |
||
| vk::PipelineStageFlags | restore_stage = vk::PipelineStageFlagBits::eFragmentShader |
||
| ) |
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. |
| restore_layout | Layout the image is left in. The default matches the layout the download previously always restored. |
| restore_stage | Pipeline stage that consumes the image after restore. |
Definition at line 618 of file TextureLoom.cpp.
References MayaFlux::Core::BackendResourceManager::download_image_data(), image, MayaFlux::Journal::ImageProcessing, is_initialized(), m_resource_manager, MF_ERROR, MayaFlux::Journal::Portal, and size.
Referenced by MayaFlux::Kakshya::DynamicVideoStream::append_frame(), download_image(), MayaFlux::Kakshya::TextureContainer::ensure_cpu(), MayaFlux::Kakshya::TextureContainer::from_image(), MayaFlux::Kakshya::TextureContainer::from_image(), MayaFlux::Kakshya::TextureContainer::from_image_array(), and MayaFlux::Kakshya::TextureContainer::from_image_array().
Here is the call graph for this function:
Here is the caller graph for this function: