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

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

Inheritance diagram for CeresEngine::ShaderCompiler::VarDeclaration:
CeresEngine::ShaderCompiler::Declaration CeresEngine::ShaderCompiler::TypedAST CeresEngine::ShaderCompiler::AST

Public Types

enum  : UInt32 {
  isShaderInput = (1u << ( 2 )) , isShaderOutput = (1u << ( 3 )) , isSystemValue = (1u << ( 4 )) , isDynamicArray = (1u << ( 5 )) ,
  isEntryPointOutput = (1u << ( 6 )) , isEntryPointLocal = (1u << ( 7 )) , IsShaderInputSv = (isShaderInput | isSystemValue) , IsShaderOutputSv = (isShaderOutput | isSystemValue)
}
 
- Public Types inherited from CeresEngine::ShaderCompiler::Declaration
enum  : UInt32 { isWrittenTo = (1u << ( 0 )) , isReadFrom = (1u << ( 1 )) }
 
- 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 )) }
 

Public Member Functions

 VarDeclaration (const SourcePosition &astPos)
 
 VarDeclaration (const SourceArea &astArea)
 
Types getType () const override
 
void visit (Visitor *visitor, void *args=nullptr) override
 
String toString () const override
 
TypeDenoterPtr deriveTypeDenoter (const TypeDenoter *expectedTypeDenoter) override
 
TypeSpecifierfetchTypeSpecifier () const override
 
VarDeclarationfetchStaticVarDeclarationRef () const
 
VarDeclarationfetchStaticVarDefRef () const
 
bool isStatic () const
 
bool isParameter () const
 
bool hasStaticConstInitializer () const
 
void setCustomTypeDenoter (const TypeDenoterPtr &typeDenoter)
 
void addFlagsRecursive (UInt32 varFlags)
 
bool accumulateAlignedVectorSize (UInt32 &size, UInt32 &padding, UInt32 *offset=nullptr)
 
- Public Member Functions inherited from CeresEngine::ShaderCompiler::Declaration
bool isAnonymous () const
 
- Public Member Functions inherited from CeresEngine::ShaderCompiler::TypedAST
const TypeDenoterPtrgetTypeDenoter (const TypeDenoter *expectedTypeDenoter=nullptr)
 
void resetTypeDenoter ()
 
- Public Member Functions inherited from CeresEngine::ShaderCompiler::AST
virtual ~AST ()
 
template<typename T >
Tas ()
 
template<typename T >
const Tas () const
 

Public Attributes

ObjectExpressionPtr namespaceExpression
 
Vector< ArrayDimensionPtrarrayDimensions
 
Vector< RegisterPtrslotRegisters
 
IndexedSemantic semantic
 
PackOffsetPtr packOffset
 
Vector< VarDeclarationStatementPtrannotations
 
ExpressionPtr initializer
 
TypeDenoterPtr customTypeDenoter
 
Variant initializerValue
 
VarDeclarationStatementdeclarationStatementRef = nullptr
 
UniformBufferDeclarationbufferDeclarationRef = nullptr
 
StructDeclarationstructDeclarationRef = nullptr
 
VarDeclarationstaticMemberVarRef = nullptr
 
- Public Attributes inherited from CeresEngine::ShaderCompiler::Declaration
Identifier ident
 
- Public Attributes inherited from CeresEngine::ShaderCompiler::AST
SourceArea area
 
RawFlags flags
 

Static Public Attributes

static const Types classType = Types:: VarDeclaration
 

Additional Inherited Members

- 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)
 

Member Enumeration Documentation

◆ anonymous enum

Enumerator
isShaderInput 
isShaderOutput 
isSystemValue 
isDynamicArray 
isEntryPointOutput 
isEntryPointLocal 
IsShaderInputSv 
IsShaderOutputSv 

Constructor & Destructor Documentation

◆ VarDeclaration() [1/2]

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

◆ VarDeclaration() [2/2]

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

Member Function Documentation

◆ accumulateAlignedVectorSize()

bool CeresEngine::ShaderCompiler::VarDeclaration::accumulateAlignedVectorSize ( UInt32 size,
UInt32 padding,
UInt32 offset = nullptr 
)

◆ addFlagsRecursive()

void CeresEngine::ShaderCompiler::VarDeclaration::addFlagsRecursive ( UInt32  varFlags)

◆ deriveTypeDenoter()

TypeDenoterPtr CeresEngine::ShaderCompiler::VarDeclaration::deriveTypeDenoter ( const TypeDenoter expectedTypeDenoter)
overridevirtual

◆ fetchStaticVarDeclarationRef()

VarDeclaration * CeresEngine::ShaderCompiler::VarDeclaration::fetchStaticVarDeclarationRef ( ) const

◆ fetchStaticVarDefRef()

VarDeclaration * CeresEngine::ShaderCompiler::VarDeclaration::fetchStaticVarDefRef ( ) const

◆ fetchTypeSpecifier()

TypeSpecifier * CeresEngine::ShaderCompiler::VarDeclaration::fetchTypeSpecifier ( ) const
overridevirtual

◆ getType()

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

◆ hasStaticConstInitializer()

bool CeresEngine::ShaderCompiler::VarDeclaration::hasStaticConstInitializer ( ) const

◆ isParameter()

bool CeresEngine::ShaderCompiler::VarDeclaration::isParameter ( ) const

◆ isStatic()

bool CeresEngine::ShaderCompiler::VarDeclaration::isStatic ( ) const

◆ setCustomTypeDenoter()

void CeresEngine::ShaderCompiler::VarDeclaration::setCustomTypeDenoter ( const TypeDenoterPtr typeDenoter)

◆ toString()

String CeresEngine::ShaderCompiler::VarDeclaration::toString ( ) const
overridevirtual

◆ visit()

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

Member Data Documentation

◆ annotations

Vector<VarDeclarationStatementPtr> CeresEngine::ShaderCompiler::VarDeclaration::annotations

◆ arrayDimensions

Vector<ArrayDimensionPtr> CeresEngine::ShaderCompiler::VarDeclaration::arrayDimensions

◆ bufferDeclarationRef

UniformBufferDeclaration* CeresEngine::ShaderCompiler::VarDeclaration::bufferDeclarationRef = nullptr

◆ classType

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

◆ customTypeDenoter

TypeDenoterPtr CeresEngine::ShaderCompiler::VarDeclaration::customTypeDenoter

◆ declarationStatementRef

VarDeclarationStatement* CeresEngine::ShaderCompiler::VarDeclaration::declarationStatementRef = nullptr

◆ initializer

ExpressionPtr CeresEngine::ShaderCompiler::VarDeclaration::initializer

◆ initializerValue

Variant CeresEngine::ShaderCompiler::VarDeclaration::initializerValue

◆ namespaceExpression

ObjectExpressionPtr CeresEngine::ShaderCompiler::VarDeclaration::namespaceExpression

◆ packOffset

PackOffsetPtr CeresEngine::ShaderCompiler::VarDeclaration::packOffset

◆ semantic

IndexedSemantic CeresEngine::ShaderCompiler::VarDeclaration::semantic

◆ slotRegisters

Vector<RegisterPtr> CeresEngine::ShaderCompiler::VarDeclaration::slotRegisters

◆ staticMemberVarRef

VarDeclaration* CeresEngine::ShaderCompiler::VarDeclaration::staticMemberVarRef = nullptr

◆ structDeclarationRef

StructDeclaration* CeresEngine::ShaderCompiler::VarDeclaration::structDeclarationRef = nullptr

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