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

◆ processing_function()

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

Run one cycle: evaluate the predicate, write the state descriptors, run the parent, then swap and serve a snapshot if a dispatch was recorded.

The descriptor write must precede the parent's bind_descriptor_sets. A write from on_before_execute lands on a set already bound into the open command buffer, which the driver has consumed by then, freezing the bindings at whatever on_descriptors_created wrote.

Implements MayaFlux::Buffers::BufferProcessor.

Definition at line 48 of file RelaxationStepProcessor.cpp.

49{
51 return;
52 }
53
54 m_dispatched = false;
55
58 }
59
61
62 if (!m_dispatched || !m_grid) {
63 return;
64 }
65
66 m_grid->swap_generation();
67
70 }
71}
std::shared_ptr< NetworkGeometryBuffer > buffer
virtual void processing_function(const std::shared_ptr< Buffer > &buffer)=0
The core processing function that must be implemented by derived classes.
void write_state_descriptors(const std::shared_ptr< RelaxationGridBuffer > &grid)
Issue direct ShaderFoundry descriptor writes for state_in and state_out against the grid's current fr...
StepPredicate m_step_predicate
Optional gate deciding whether a given cycle advances a generation.
std::shared_ptr< RelaxationGridBuffer > m_grid
The attached RelaxationGridBuffer, cached for descriptor writes and snapshot reads.
void serve_snapshot()
Copy the front state buffer to the host and signal RelaxationGridBuffer::snapshot_source(),...
bool m_dispatched
True when the current cycle recorded a dispatch.
bool is_deferred_submission() const
Whether this processor submits asynchronously.
bool are_descriptors_ready() const
Check if descriptors are initialized.

References MayaFlux::Buffers::ShaderProcessor::are_descriptors_ready(), buffer, MayaFlux::Buffers::ShaderProcessor::is_deferred_submission(), m_dispatched, m_grid, m_step_predicate, MayaFlux::Buffers::BufferProcessor::processing_function(), serve_snapshot(), and write_state_descriptors().

+ Here is the call graph for this function: