44 virtual void optimize(std::span<ShaderIRModule> modules) { }
51 throw std::runtime_error(
"Cross-compilation not implemented");
This file contains the ShaderFrontend interface.
Interface for shaders IR.
virtual ShaderIRModule crossCompile(const ShaderIRModule &module, ShaderSourceType targetType)
Optional: cross-compile from one IR to another (SPIR-V -> MSL, etc.)
virtual ShaderSourceType irType() const =0
Get the IR type this processor handles.
~IShaderIR() override=default
virtual ShaderIRModule process(const ShaderIRModule &module)=0
Transform or validate a shader IR module.
virtual void optimize(std::span< ShaderIRModule > modules)
Optional: optimize a batch of IR modules.
Struct for shader intermediate representation module.