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

◆ input() [1/2]

template<ComputeData InputType = std::vector<Kakshya::DataVariant>, ComputeData OutputType = InputType>
template<typename T >
ShaderExecutionContext & MayaFlux::Yantra::ShaderExecutionContext< InputType, OutputType >::input ( const std::vector< T > &  data,
GpuBufferBinding::ElementType  type = GpuBufferBinding::ElementType::FLOAT32 
)
inline

Add an INPUT binding, inferring the next available binding index.

Template Parameters
TElement type of the data vector.
Parameters
dataData to upload for this binding.
typeElement type hint for the shader (default: FLOAT32).
Returns
Reference to this executor for chaining.

Definition at line 84 of file ShaderExecutionContext.hpp.

86 {
87 const uint32_t idx = next_binding_index();
88 m_bindings.push_back({ .set = 0,
89 .binding = idx,
91 .element_type = type });
92 this->set_binding_data(idx, data);
93 return *this;
94 }
void set_binding_data(size_t index, std::span< const T > data)
Pre-stage typed data for a specific binding slot, bypassing the default channel-flattening path in pr...
uint32_t next_binding_index() const
Returns one past the highest binding index currently registered.