cae  0.0.0
Cross-API graphics engine
Loading...
Searching...
No Matches
cae::SPIRV Class Referencefinal

Class for the SPIR-V IR plugin. More...

#include <SPIRV.hpp>

+ Inheritance diagram for cae::SPIRV:
+ Collaboration diagram for cae::SPIRV:

Public Member Functions

 SPIRV ()=default
 
 ~SPIRV () override=default
 
 SPIRV (const SPIRV &)=delete
 
SPIRVoperator= (const SPIRV &)=delete
 
 SPIRV (SPIRV &&)=delete
 
SPIRVoperator= (SPIRV &&)=delete
 
std::string getName () const override
 Get the name of the plugin.
 
utl::PluginType getType () const override
 Get the type of the plugin.
 
utl::PluginPlatform getPlatform () const override
 Get the handled platform of the plugin.
 
ShaderSourceType irType () const override
 Get the IR type this processor handles.
 
ShaderIRModule process (const ShaderIRModule &module) override
 Transform or validate a shader IR module.
 
void optimize (std::span< ShaderIRModule > modules) override
 Optional: optimize a batch of IR modules.
 
ShaderIRModule crossCompile (const ShaderIRModule &module, const ShaderSourceType targetType) override
 Optional: cross-compile from one IR to another (SPIR-V -> MSL, etc.)
 
- Public Member Functions inherited from cae::AShaderIR
 ~AShaderIR () override=default
 
- Public Member Functions inherited from cae::IShaderIR
 ~IShaderIR () override=default
 
- Public Member Functions inherited from utl::IPlugin
virtual ~IPlugin ()=default
 

Detailed Description

Class for the SPIR-V IR plugin.

Definition at line 19 of file SPIRV.hpp.

Constructor & Destructor Documentation

◆ SPIRV() [1/3]

cae::SPIRV::SPIRV ( )
default

◆ ~SPIRV()

cae::SPIRV::~SPIRV ( )
overridedefault

◆ SPIRV() [2/3]

cae::SPIRV::SPIRV ( const SPIRV & )
delete

◆ SPIRV() [3/3]

cae::SPIRV::SPIRV ( SPIRV && )
delete

Member Function Documentation

◆ crossCompile()

ShaderIRModule cae::SPIRV::crossCompile ( const ShaderIRModule & module,
const ShaderSourceType targetType )
inlineoverridevirtual

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

Implements cae::IShaderIR.

Definition at line 44 of file SPIRV.hpp.

References cae::MSL.

◆ getName()

std::string cae::SPIRV::getName ( ) const
inlinenodiscardoverridevirtual

Get the name of the plugin.

Returns
The name of the plugin

Implements utl::IPlugin.

Definition at line 30 of file SPIRV.hpp.

◆ getPlatform()

utl::PluginPlatform cae::SPIRV::getPlatform ( ) const
inlinenodiscardoverridevirtual

Get the handled platform of the plugin.

Returns
The handled platform of the plugin

Implements utl::IPlugin.

Definition at line 32 of file SPIRV.hpp.

References utl::ALL.

◆ getType()

utl::PluginType cae::SPIRV::getType ( ) const
inlinenodiscardoverridevirtual

Get the type of the plugin.

Returns
The type of the plugin

Implements utl::IPlugin.

Definition at line 31 of file SPIRV.hpp.

References utl::SHADER_IR.

◆ irType()

ShaderSourceType cae::SPIRV::irType ( ) const
inlinenodiscardoverridevirtual

Get the IR type this processor handles.

Returns
The IR type this processor handles

Implements cae::IShaderIR.

Definition at line 34 of file SPIRV.hpp.

References cae::SPIRV.

◆ operator=() [1/2]

SPIRV & cae::SPIRV::operator= ( const SPIRV & )
delete

◆ operator=() [2/2]

SPIRV & cae::SPIRV::operator= ( SPIRV && )
delete

◆ optimize()

void cae::SPIRV::optimize ( std::span< ShaderIRModule > modules)
inlineoverridevirtual

Optional: optimize a batch of IR modules.

Implements cae::IShaderIR.

Definition at line 42 of file SPIRV.hpp.

◆ process()

ShaderIRModule cae::SPIRV::process ( const ShaderIRModule & module)
inlineoverridevirtual

Transform or validate a shader IR module.

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

Implements cae::IShaderIR.

Definition at line 36 of file SPIRV.hpp.


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