20 :
NodeContext(result.primary.empty() ? 0.0 : static_cast<double>(result.primary[0]))
76 bool continuous =
false);
94 return m_pending_fence != Portal::Graphics::INVALID_FENCE;
102 [[nodiscard]]
bool is_ready()
const {
return m_ready; }
129 void compute_frame()
override;
138 void update_context(
double value)
override;
143 return *m_context_storage;
146 void notify_tick(
double value)
override;
151 std::shared_ptr<Yantra::ShaderExecutionContext<>>
m_executor;
152 bool m_continuous {
false };
153 bool m_dirty {
false };
154 bool m_ready {
false };
const Yantra::GpuChannelResult & gpu_result
Reference to the full dispatch result. Valid during callback only.
GpuComputeContext(const Yantra::GpuChannelResult &result)
Context delivered to on_complete callbacks when a dispatch completes.
std::shared_ptr< Yantra::ShaderExecutionContext<> > m_executor
void set_dirty()
Arm a dispatch on the next compute_frame() call.
void restore_state() override
Restores the node's state from the last save Recursively cascades through all connected modulator nod...
Yantra::GpuChannelResult m_last_result
bool is_pending() const
Returns true if a dispatch has been submitted and not yet completed.
~GpuComputeNode() override=default
std::unique_ptr< GpuComputeContext > m_context_storage
void save_state() override
Saves the node's current state for later restoration Recursively cascades through all connected modul...
NodeContext & get_last_context() override
Retrieves the last created context object.
bool is_ready() const
Returns true if the last dispatch completed and callbacks have fired.
void clear_gpu_update_flag() override
Clear the "needs update" flag after GPU binding.
std::vector< TypedHook< GpuComputeContext > > m_complete_callbacks
bool needs_gpu_update() const override
Mark if this node needs GPU binding update.
GpuSync node that owns a ShaderExecutionContext and dispatches it asynchronously, polling for complet...
Base context class for node callbacks.
Concrete GpuExecutionContext for a single fixed shader with fixed bindings.
std::function< void(ContextT &)> TypedHook
Callback function type for node processing events, parameterised on context type.
Erased output of a GPU dispatch: reconstructed float data plus any raw auxiliary outputs keyed by bin...