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

◆ configure_back_buffers()

void MayaFlux::Buffers::BufferDownloadProcessor::configure_back_buffers ( const std::shared_ptr< Buffer > &  source,
std::vector< std::shared_ptr< Buffer > >  targets 
)

Configure targets to receive downloads of every entry in a VKBuffer's back_buffers, re-read every processing cycle.

Parameters
sourceVKBuffer whose back_buffers is being downloaded in full.
targetsCPU-side buffers to write into, one per back_buffers entry, in order.

back_buffers.size() is read fresh each call. If targets.size() does not match at process time, the call is skipped with an error rather than partially applied. Interpretation of individual entries (which one is "current", "front", or otherwise meaningful) is the calling code's concern; this call only moves bytes.

Definition at line 182 of file BufferDownloadProcessor.cpp.

185{
186 if (!std::dynamic_pointer_cast<VKBuffer>(source)) {
187 error<std::runtime_error>(
190 std::source_location::current(),
191 "Source must be a VKBuffer");
192 }
193
194 m_back_buffers_target_map[source] = std::move(targets);
195
197 "Configured back_buffers download targets for source buffer");
198}
#define MF_INFO(comp, ctx,...)
std::unordered_map< std::shared_ptr< Buffer >, std::vector< std::shared_ptr< Buffer > > > m_back_buffers_target_map
Maps source VKBuffer -> vector of target Buffers for back_buffers.
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Buffers
Buffers, Managers, processors and processing chains.
Source source()
Begin a Source chain.
Definition Plot.hpp:128

References MayaFlux::Journal::BufferProcessing, MayaFlux::Journal::Buffers, m_back_buffers_target_map, and MF_INFO.