![]() |
XII Release 0.1.0
|
#include <ShaderCompiler.h>
Public Member Functions | |
| virtual void | GetSupportedPlatforms (xiiHybridArray< xiiString, 4 > &out_platforms)=0 |
| virtual xiiResult | ModifyShaderSource (xiiGALShaderProgramData &inout_data, xiiLogInterface *pLog)=0 |
| virtual xiiResult | Compile (xiiGALShaderProgramData &inout_data, xiiLogInterface *pLog)=0 |
| Public Member Functions inherited from xiiReflectedClass | |
| virtual const xiiRTTI * | GetDynamicRTTI () const |
| bool | IsInstanceOf (const xiiRTTI *pType) const |
| Returns whether the type of this instance is of the given type or derived from it. | |
| template<typename T> | |
| XII_ALWAYS_INLINE bool | IsInstanceOf () const |
| Returns whether the type of this instance is of the given type or derived from it. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from xiiNoBase | |
| static const xiiRTTI * | GetStaticRTTI () |
Shader compiler interface. Custom shader compilers need to derive from this class and implement the pure virtual interface functions. Instances are created via reflection, so each implementation must be properly reflected.
|
pure virtual |
Compiles the shader comprised of multiple stages defined in inout_data.
| inout_data | The state of the shader compiler. m_Resources and m_ByteCode should be written to on successful return code. |
| pLog | Logging interface to be used when outputting any errors. |
Implemented in xiiShaderCompilerDXIL, and xiiShaderCompilerSPIRV.
|
pure virtual |
Returns the platforms that this shader compiler supports.
| out_platforms | Filled with the platforms this compiler supports. |
Implemented in xiiShaderCompilerDXIL, and xiiShaderCompilerSPIRV.
|
pure virtual |
Allows the shader compiler to modify the shader source before hashing and compiling. This allows it to implement custom features by injecting code before the compile process. Mostly used to define resource bindings that do not cause conflicts across shader stages.
| inout_data | The state of the shader compiler. Only m_sShaderSource should be modified by the implementation. |
| pLog | Logging interface to be used when outputting any errors. |
Implemented in xiiShaderCompilerDXIL, and xiiShaderCompilerSPIRV.