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

◆ execute()

template<ComputeData InputType = std::vector<Kakshya::DataVariant>, ComputeData OutputType = InputType>
output_type MayaFlux::Yantra::ShaderExecutionContext< InputType, OutputType >::execute ( const input_type input,
const ExecutionContext ctx 
)
inlineoverrideprotectedvirtual

Injects multipass configuration into the context before dispatch when set_multipass() has been called.

Reimplemented from MayaFlux::Yantra::GpuExecutionContext< InputType, OutputType >.

Definition at line 331 of file ShaderExecutionContext.hpp.

332 {
334 ExecutionContext chained = ctx;
335 chained.mode = ExecutionMode::CHAINED;
336 chained.execution_metadata["pass_count"] = m_multipass_count;
337 chained.execution_metadata["pc_updater"] = m_multipass_updater;
339 }
341 }
virtual output_type execute(const input_type &input, const ExecutionContext &ctx)
Dispatch to GPU and reconstruct a typed output Datum.
ShaderExecutionContext & input(const std::vector< T > &data, GpuBufferBinding::ElementType type=GpuBufferBinding::ElementType::FLOAT32)
Add an INPUT binding, inferring the next available binding index.
std::function< void(uint32_t, void *)> m_multipass_updater
@ CHAINED
Part of a sequential chain.

References MayaFlux::Yantra::ExecutionContext::execution_metadata, and MayaFlux::Yantra::ExecutionContext::mode.