|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
Fluent assembler producing a ShaderSpec. More...
#include <ShaderSpec.hpp>
Public Member Functions | |
| Assemble ()=default | |
| ShaderSpec | build () |
| Finalise and return the ShaderSpec. | |
| Assemble & | centred (bool c=true) |
| Subtract each window's mean from both operands of a LaggedPair before the map. | |
| Assemble & | descriptors (uint32_t n) |
| Set the rows of weights of a projecting FFT. | |
| Assemble & | function (std::string return_type, std::string name, std::string params, std::string body) |
| Declare a function emitted before main() in the generated GLSL. | |
| Assemble & | kernel (KernelSource ks) |
| Supply a user kernel via MF_KERNEL. | |
| Assemble & | map (ReductionMap m) |
| Set the pointwise map of a SegmentedReduction. | |
| Assemble & | op (KernelOp o) |
| Set the named operation the emitter will lower to SPIR-V. | |
| Assemble & | pair_map (PairMap m) |
| Set the pairwise map of a LaggedPair. | |
| Assemble & | pc (std::string name) |
| Declare a float push constant field. | |
| Assemble & | pc (std::string name, Kakshya::GpuDataFormat format) |
| Declare a push constant field with explicit format. | |
| Assemble & | points (uint32_t n) |
| Set the points per window of an FFT. | |
| Assemble & | preamble (std::string text) |
| Declare global GLSL text emitted after the push constants and before the functions. | |
| Assemble & | spectrum (SpectrumOutput s) |
| Set what an FFT writes for each window. | |
| Assemble & | ssbo (std::string name, BindingDirection direction, Kakshya::GpuDataFormat format, Kakshya::DataModality modality=Kakshya::DataModality::SCALAR_F32) |
| Declare an SSBO binding. | |
| Assemble & | start_binding (uint32_t n) |
| Assemble & | start_set (uint32_t s) |
| Assemble & | storage_image (std::string name, BindingDirection direction=BindingDirection::Output) |
| Declare a storage image binding (image2D). | |
| Assemble & | texture (std::string name) |
| Declare a sampled image binding (sampler2D). | |
| Assemble & | tmpl (KernelTemplate t) |
| Set the kernel template. | |
| Assemble & | word_op (WordPairOp o) |
| Set the operation of a WordPairMap. | |
| Assemble & | workgroup (uint32_t x, uint32_t y=1, uint32_t z=1) |
| Override workgroup size. | |
Private Attributes | |
| std::vector< BindingSlot > | m_bindings |
| bool | m_centred { false } |
| uint32_t | m_descriptors { 0 } |
| std::vector< FunctionDef > | m_functions |
| std::optional< KernelSource > | m_kernel |
| ReductionMap | m_map { ReductionMap::Identity } |
| uint32_t | m_next_binding { 0 } |
| KernelOp | m_op { KernelOp::Scale } |
| PairMap | m_pair_map { PairMap::Product } |
| std::vector< PushConstantField > | m_pc_fields |
| uint32_t | m_points { 0 } |
| std::string | m_preamble |
| uint32_t | m_set { 0 } |
| SpectrumOutput | m_spectrum { SpectrumOutput::Complex } |
| KernelTemplate | m_tmpl { KernelTemplate::Elementwise } |
| WordPairOp | m_word_op { WordPairOp::Add } |
| std::array< uint32_t, 3 > | m_workgroup { 256, 1, 1 } |
Fluent assembler producing a ShaderSpec.
Binding indices are assigned in declaration order starting at 1.
Definition at line 477 of file ShaderSpec.hpp.