cae  0.0.0
Cross-API graphics engine
Loading...
Searching...
No Matches
cae::IShaderIR Interface Referenceabstract

Interface for shaders IR. More...

#include <IShaderIR.hpp>

+ Inheritance diagram for cae::IShaderIR:
+ Collaboration diagram for cae::IShaderIR:

Public Member Functions

 ~IShaderIR () override=default
 
virtual ShaderSourceType irType () const =0
 Get the IR type this processor handles.
 
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.
 
virtual ShaderIRModule crossCompile (const ShaderIRModule &module, ShaderSourceType targetType)
 Optional: cross-compile from one IR to another (SPIR-V -> MSL, etc.)
 
- Public Member Functions inherited from utl::IPlugin
virtual ~IPlugin ()=default
 
virtual std::string getName () const =0
 Get the name of the plugin.
 
virtual PluginType getType () const =0
 Get the type of the plugin.
 
virtual PluginPlatform getPlatform () const =0
 Get the handled platform of the plugin.
 

Detailed Description

Interface for shaders IR.

Definition at line 22 of file IShaderIR.hpp.

Constructor & Destructor Documentation

◆ ~IShaderIR()

cae::IShaderIR::~IShaderIR ( )
overridedefault

Member Function Documentation

◆ crossCompile()

virtual ShaderIRModule cae::IShaderIR::crossCompile ( const ShaderIRModule & module,
ShaderSourceType targetType )
inlinevirtual

Optional: cross-compile from one IR to another (SPIR-V -> MSL, etc.)

Implemented in cae::SPIRV.

Definition at line 49 of file IShaderIR.hpp.

◆ irType()

virtual ShaderSourceType cae::IShaderIR::irType ( ) const
pure virtual

Get the IR type this processor handles.

Returns
The IR type this processor handles

Implemented in cae::SPIRV.

◆ optimize()

virtual void cae::IShaderIR::optimize ( std::span< ShaderIRModule > modules)
inlinevirtual

Optional: optimize a batch of IR modules.

Implemented in cae::SPIRV.

Definition at line 44 of file IShaderIR.hpp.

◆ process()

virtual ShaderIRModule cae::IShaderIR::process ( const ShaderIRModule & module)
pure virtual

Transform or validate a shader IR module.

Parameters
moduleThe input IR module
Returns
Transformed IR module ready for the backend

Implemented in cae::SPIRV.


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