CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::ShaderCompiler::Program Struct Reference

#include <CeresEngine/Material/ShaderCompiler/AST/AST.hpp>

Inheritance diagram for CeresEngine::ShaderCompiler::Program:
CeresEngine::ShaderCompiler::AST

Classes

struct  LayoutComputeShader
 
struct  LayoutFragmentShader
 
struct  LayoutGeometryShader
 
struct  LayoutTessControlShader
 
struct  LayoutTessEvaluationShader
 

Public Member Functions

 Program (const SourcePosition &astPos)
 
 Program (const SourceArea &astArea)
 
Types getType () const override
 
void visit (Visitor *visitor, void *args=nullptr) override
 
void registerIntrinsicUsage (const Intrinsic intrinsic, const Vector< DataType > &argumentDataTypes)
 
void registerIntrinsicUsage (const Intrinsic intrinsic, const Vector< ExpressionPtr > &arguments)
 
const IntrinsicUsagefetchIntrinsicUsage (const Intrinsic intrinsic) const
 
- Public Member Functions inherited from CeresEngine::ShaderCompiler::AST
virtual ~AST ()
 
template<typename T >
Tas ()
 
template<typename T >
const Tas () const
 

Public Attributes

Vector< StatementPtrglobalStatements
 Global declaration statements.
 
Vector< ASTPtrdisabledAST
 AST nodes that have been disabled for code generation (not part of the default visitor).
 
SourceCodePtr sourceCode
 Preprocessed source code.
 
FunctionDeclarationentryPointRef = nullptr
 Reference to the entry point function declaration.
 
Map< Intrinsic, IntrinsicUsageusedIntrinsics
 Set of all used intrinsic (filled by the reference analyzer).
 
Set< MatrixSubscriptUsageusedMatrixSubscripts
 Set of all used matrix subscripts (filled by the reference analyzer).
 
LayoutTessControlShader layoutTessControl
 Global program layout attributes for a tessellation-control shader.
 
LayoutTessEvaluationShader layoutTessEvaluation
 Global program layout attributes for a tessellation-evaluation shader.
 
LayoutGeometryShader layoutGeometry
 Global program layout attributes for a geometry shader.
 
LayoutFragmentShader layoutFragment
 Global program layout attributes for a fragment shader.
 
LayoutComputeShader layoutCompute
 Global program layout attributes for a compute shader.
 
- Public Attributes inherited from CeresEngine::ShaderCompiler::AST
SourceArea area
 
RawFlags flags
 

Static Public Attributes

static const Types classType = Types:: Program
 

Additional Inherited Members

- Public Types inherited from CeresEngine::ShaderCompiler::AST
enum class  Types {
  Program , CodeBlock , Attribute , SwitchCase ,
  SamplerValue , Register , PackOffset , ArrayDimension ,
  TypeSpecifier , VarDeclaration , BufferDeclaration , SamplerDeclaration ,
  StructDeclaration , AliasDeclaration , FunctionDeclaration , UniformBufferDeclaration ,
  VarDeclarationStatement , BufferDeclarationStatement , SamplerDeclarationStatement , AliasDeclarationStatement ,
  BasicDeclarationStatement , NullStatement , CodeBlockStatement , ForLoopStatement ,
  WhileLoopStatement , DoWhileLoopStatement , IfStatement , ElseStatement ,
  SwitchStatement , ExpressionStatement , ReturnStatement , CtrlTransferStatement ,
  LayoutStatement , NullExpression , SequenceExpression , LiteralExpression ,
  TypeSpecifierExpression , TernaryExpression , BinaryExpression , UnaryExpression ,
  PostUnaryExpression , CallExpression , BracketExpression , ObjectExpression ,
  AssignExpression , ArrayExpression , CastExpression , InitializerExpression
}
 
enum  : UInt32 { isReachable = (1u << ( 30 )) , isDeadCode = (1u << ( 29 )) , isBuiltin = (1u << ( 28 )) }
 
- Static Public Member Functions inherited from CeresEngine::ShaderCompiler::AST
template<typename T >
static TgetAs (AST *ast)
 
template<typename T >
static const TgetAs (const AST *ast)
 

Constructor & Destructor Documentation

◆ Program() [1/2]

CeresEngine::ShaderCompiler::Program::Program ( const SourcePosition astPos)
inlineexplicit

◆ Program() [2/2]

CeresEngine::ShaderCompiler::Program::Program ( const SourceArea astArea)
inlineexplicit

Member Function Documentation

◆ fetchIntrinsicUsage()

const IntrinsicUsage * CeresEngine::ShaderCompiler::Program::fetchIntrinsicUsage ( const Intrinsic  intrinsic) const

◆ getType()

Types CeresEngine::ShaderCompiler::Program::getType ( ) const
inlineoverridevirtual

◆ registerIntrinsicUsage() [1/2]

void CeresEngine::ShaderCompiler::Program::registerIntrinsicUsage ( const Intrinsic  intrinsic,
const Vector< DataType > &  argumentDataTypes 
)

◆ registerIntrinsicUsage() [2/2]

void CeresEngine::ShaderCompiler::Program::registerIntrinsicUsage ( const Intrinsic  intrinsic,
const Vector< ExpressionPtr > &  arguments 
)

◆ visit()

void CeresEngine::ShaderCompiler::Program::visit ( Visitor visitor,
void args = nullptr 
)
inlineoverridevirtual

Member Data Documentation

◆ classType

const Types CeresEngine::ShaderCompiler::Program::classType = Types:: Program
static

◆ disabledAST

Vector<ASTPtr> CeresEngine::ShaderCompiler::Program::disabledAST

AST nodes that have been disabled for code generation (not part of the default visitor).

◆ entryPointRef

FunctionDeclaration* CeresEngine::ShaderCompiler::Program::entryPointRef = nullptr

Reference to the entry point function declaration.

◆ globalStatements

Vector<StatementPtr> CeresEngine::ShaderCompiler::Program::globalStatements

Global declaration statements.

◆ layoutCompute

LayoutComputeShader CeresEngine::ShaderCompiler::Program::layoutCompute

Global program layout attributes for a compute shader.

◆ layoutFragment

LayoutFragmentShader CeresEngine::ShaderCompiler::Program::layoutFragment

Global program layout attributes for a fragment shader.

◆ layoutGeometry

LayoutGeometryShader CeresEngine::ShaderCompiler::Program::layoutGeometry

Global program layout attributes for a geometry shader.

◆ layoutTessControl

LayoutTessControlShader CeresEngine::ShaderCompiler::Program::layoutTessControl

Global program layout attributes for a tessellation-control shader.

◆ layoutTessEvaluation

LayoutTessEvaluationShader CeresEngine::ShaderCompiler::Program::layoutTessEvaluation

Global program layout attributes for a tessellation-evaluation shader.

◆ sourceCode

SourceCodePtr CeresEngine::ShaderCompiler::Program::sourceCode

Preprocessed source code.

◆ usedIntrinsics

Map<Intrinsic, IntrinsicUsage> CeresEngine::ShaderCompiler::Program::usedIntrinsics

Set of all used intrinsic (filled by the reference analyzer).

◆ usedMatrixSubscripts

Set<MatrixSubscriptUsage> CeresEngine::ShaderCompiler::Program::usedMatrixSubscripts

Set of all used matrix subscripts (filled by the reference analyzer).


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