MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Portal::Graphics::ShaderSpec::Assemble Class Reference

Fluent assembler producing a ShaderSpec. More...

#include <ShaderSpec.hpp>

+ Collaboration diagram for MayaFlux::Portal::Graphics::ShaderSpec::Assemble:

Public Member Functions

 Assemble ()=default
 
ShaderSpec build ()
 Finalise and return the ShaderSpec.
 
Assemblekernel (KernelSource ks)
 Supply a user kernel via MF_KERNEL.
 
Assembleop (KernelOp o)
 Set the named operation the emitter will lower to SPIR-V.
 
Assemblepc (std::string name)
 Declare a float push constant field.
 
Assemblepc (std::string name, Kakshya::GpuDataFormat format)
 Declare a push constant field with explicit format.
 
Assemblessbo (std::string name, BindingDirection direction, Kakshya::GpuDataFormat format, Kakshya::DataModality modality=Kakshya::DataModality::SCALAR_F32)
 Declare an SSBO binding.
 
Assemblestart_binding (uint32_t n)
 
Assemblestart_set (uint32_t s)
 
Assemblestorage_image (std::string name, BindingDirection direction=BindingDirection::Output)
 Declare a storage image binding (image2D).
 
Assembletexture (std::string name)
 Declare a sampled image binding (sampler2D).
 
Assembletmpl (KernelTemplate t)
 Set the kernel template.
 
Assembleworkgroup (uint32_t x, uint32_t y=1, uint32_t z=1)
 Override workgroup size.
 

Private Attributes

std::vector< BindingSlotm_bindings
 
std::optional< KernelSourcem_kernel
 
uint32_t m_next_binding { 0 }
 
KernelOp m_op { KernelOp::Scale }
 
std::vector< PushConstantFieldm_pc_fields
 
uint32_t m_set { 0 }
 
KernelTemplate m_tmpl { KernelTemplate::Elementwise }
 
std::array< uint32_t, 3 > m_workgroup { 256, 1, 1 }
 

Detailed Description

Fluent assembler producing a ShaderSpec.

Binding indices are assigned in declaration order starting at 1.

Definition at line 345 of file ShaderSpec.hpp.


The documentation for this class was generated from the following file: