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

◆ in_out() [1/4]

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

Add an INPUT_OUTPUT 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 125 of file ShaderExecutionContext.hpp.

127 {
128 const uint32_t idx = next_binding_index();
129 m_bindings.push_back({ .set = 0,
130 .binding = idx,
132 .element_type = type });
133
134 this->set_binding_data(idx, data);
135 return *this;
136 }
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.