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

◆ output() [1/2]

template<ComputeData InputType = std::vector<Kakshya::DataVariant>, ComputeData OutputType = InputType>
ShaderExecutionContext & MayaFlux::Yantra::ShaderExecutionContext< InputType, OutputType >::output ( size_t  byte_size,
GpuBufferBinding::ElementType  type = GpuBufferBinding::ElementType::FLOAT32 
)
inline

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

Parameters
byte_sizeAllocation size in bytes.
typeElement type hint for the shader (default: FLOAT32).
Returns
Reference to this executor for chaining.

Definition at line 207 of file ShaderExecutionContext.hpp.

209 {
210 const uint32_t idx = next_binding_index();
211 m_bindings.push_back({ .set = 0,
212 .binding = idx,
214 .element_type = type });
215
216 this->set_output_size(idx, byte_size);
217 return *this;
218 }
void set_output_size(size_t index, size_t byte_size)
Declare the byte capacity of an output binding independently of input data.
uint32_t next_binding_index() const
Returns one past the highest binding index currently registered.