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

◆ configure_back_buffers()

void MayaFlux::Buffers::BufferUploadProcessor::configure_back_buffers ( const std::shared_ptr< Buffer > &  target,
std::vector< std::shared_ptr< Buffer > >  sources 
)

Configure sources to upload into every entry in a VKBuffer's back_buffers, re-read every processing cycle.

Parameters
targetVKBuffer whose back_buffers is being written in full.
sourcesCPU-side buffers to read from, one per back_buffers entry, in order.

back_buffers.size() is read fresh each call. If sources.size() does not match at process time, the call is skipped with an error rather than partially applied. Direct memcpy per entry; entries without a mapped_ptr are unsupported and logged as an error rather than silently skipped.

Definition at line 166 of file BufferUploadProcessor.cpp.

169{
170 if (!std::dynamic_pointer_cast<VKBuffer>(target)) {
171 error<std::runtime_error>(
174 std::source_location::current(),
175 "Target must be a VKBuffer");
176 }
177
178 m_back_buffers_source_map[target] = std::move(sources);
179
181 "Configured back_buffers upload sources for target buffer");
182}
#define MF_INFO(comp, ctx,...)
std::unordered_map< std::shared_ptr< Buffer >, std::vector< std::shared_ptr< Buffer > > > m_back_buffers_source_map
Maps target VKBuffer -> vector of source Buffers for back_buffers.
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Buffers
Buffers, Managers, processors and processing chains.

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