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

◆ processing_function()

void MayaFlux::Buffers::FormaProcessor::processing_function ( const std::shared_ptr< Buffer > &  buffer)
overrideprotectedvirtual

The core processing function that must be implemented by derived classes.

Parameters
bufferBuffer to process

This method is where the actual transformation logic is implemented. It should contain the algorithmic details of how the buffer's data is transformed, analyzed, or processed. The implementation can utilize any backend capabilities available to the processor, including:

  • Parallel Processing: Using multi-threading or GPU compute for large datasets
  • Data Transformations: Applying mathematical operations, filters, or effects
  • Feature Extraction: Analyzing data characteristics for further processing

Derived classes must override this method to provide specific processing behavior.

Implements MayaFlux::Buffers::BufferProcessor.

Definition at line 140 of file FormaProcessor.cpp.

141{
142 if (m_texture_dirty.test(std::memory_order_acquire)) {
143 auto vk = std::dynamic_pointer_cast<VKBuffer>(buffer);
144 if (vk) {
145 if (auto rp = vk->get_render_processor()) {
146 if (m_pending_texture) {
147 rp->bind_texture(m_pending_texture->binding,
148 m_pending_texture->image);
149 }
150 m_pending_texture.reset();
151 m_texture_dirty.clear(std::memory_order_release);
152 }
153 }
154 }
155
156 if (!m_changed && !m_pending_runs)
157 return;
158
159 auto vk = std::dynamic_pointer_cast<VKBuffer>(buffer);
160 if (!vk)
161 return;
162
163 if (m_changed) {
164 m_changed = false;
166 if (auto runs = m_slices.take_runs()) {
167 m_pending_runs = std::move(runs);
168 }
169 }
170
171 if (m_pending_runs) {
172 apply_runs(vk);
173 }
174}
std::shared_ptr< NetworkGeometryBuffer > buffer
void apply_runs(const std::shared_ptr< VKBuffer > &buffer)
std::shared_ptr< VKBuffer > m_staging
std::optional< PendingTexture > m_pending_texture
std::optional< std::vector< Portal::Graphics::DrawRun > > m_pending_runs
std::optional< std::vector< Portal::Graphics::DrawRun > > take_runs()
Runs for the visible blocks in draw order, if they changed.
Definition SliceSet.cpp:138
void flush(const std::shared_ptr< VKBuffer > &target, std::shared_ptr< VKBuffer > &staging)
Upload what changed since the last flush.
Definition SliceSet.cpp:168

References apply_runs(), buffer, MayaFlux::Buffers::SliceSet::flush(), m_changed, m_pending_runs, m_pending_texture, m_slices, m_staging, m_texture_dirty, and MayaFlux::Buffers::SliceSet::take_runs().

+ Here is the call graph for this function: