|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
| void MayaFlux::Nodes::Network::InstanceFieldOperator::set_gpu_executor | ( | std::shared_ptr< Yantra::ShaderExecutionContext<> > | executor, |
| bool | continuous = true |
||
| ) |
Attach a GPU executor and switch to async dispatch mode.
Constructs a GpuComputeNode from the executor. On each process() call the node's compute_frame() is driven instead of the CPU field loop. The on_complete callback reads gpu_result.primary as tightly-packed mat4 rows (16 floats per slot, in slot-index order) and writes into m_slots directly.
CPU field bindings are preserved but ignored while a GPU executor is attached. Passing nullptr clears the GPU path and restores CPU evaluation.
| executor | Pre-configured ShaderExecutionContext. Output binding must be sized for slot_count * 16 * sizeof(float). nullptr clears. |
| continuous | If true the node re-arms after every completed dispatch. |
Definition at line 29 of file InstanceFieldOperator.cpp.
References MayaFlux::Nodes::GpuSync::GpuComputeContext::gpu_result, m_compute_node, m_executor, MayaFlux::Nodes::Network::InstanceOperator::m_slots, and MayaFlux::Yantra::GpuChannelResult::primary.