25 .
tmpl(KernelTemplate::Stencil)
32 .
op(KernelOp::WeightedBlend)
51 .
op(KernelOp::CompareGE)
69 .
op(KernelOp::ScaleOffset)
Assemble & op(KernelOp o)
Set the named operation the emitter will lower to SPIR-V.
ShaderSpec build()
Finalise and return the ShaderSpec.
Assemble & pc(std::string name, Kakshya::GpuDataFormat format)
Declare a push constant field with explicit format.
Assemble & ssbo(std::string name, BindingDirection direction, Kakshya::GpuDataFormat format, Kakshya::DataModality modality=Kakshya::DataModality::SCALAR_F32)
Declare an SSBO binding.
Assemble & workgroup(uint32_t x, uint32_t y=1, uint32_t z=1)
Override workgroup size.
Assemble & tmpl(KernelTemplate t)
Set the kernel template.
Fluent assembler producing a ShaderSpec.
Portal::Graphics::ShaderSpec emit_binary()
Binary state-to-vertex emit: nonzero state draws at full scale, zero state degenerates to a zero-scal...
Portal::Graphics::ShaderSpec jacobi_diffusion(float rate=0.2F)
Jacobi-style diffusion rule: each cell blends toward the average of its 8 Moore neighbors at the give...
Portal::Graphics::ShaderSpec emit_scalar_ramp()
Scalar-ramp state-to-vertex emit: float state value scaled and offset into a visible output range.
KernelTemplate
Structural shape of the generated compute kernel.
BindingDirection
Data flow direction for a shader binding slot.
KernelOp
Named operation the SPIR-V emitter knows how to lower to opcodes.
Complete declarative description of a generated compute shader.