Definition Converter.hpp:29
Vector< StatementPtr > * mStatementList
Definition Converter.hpp:32
StatementScopeHandler & operator=(const StatementScopeHandler &)=default
StatementScopeHandler(StatementPtr &statement)
std::size_t mIdx
Definition Converter.hpp:33
StatementScopeHandler(const StatementScopeHandler &)=default
StatementScopeHandler(Vector< StatementPtr > &statements)
StatementPtr * mStatement
Definition Converter.hpp:31
void ensureStatementList()
void insertStatementAt(const StatementPtr &statement, std::size_t pos)
void insertStatementBefore(const StatementPtr &statement)
void insertStatementAfter(const StatementPtr &statement)
GLSL AST converter.
Definition Converter.hpp:26
UInt32 mObfuscationCounter
Definition Converter.hpp:67
void removeDeadCode(Vector< StatementPtr > &statements)
bool fetch(const String &ident) const
void visitScopedStatementsFromHandler(const StatementScopeHandler &handler, void *args)
bool isGlobalInOutVarDeclaration(const VarDeclaration *varDeclaration) const
void renameIdentOfInOutVarDeclarations(const Vector< VarDeclaration * > &varDeclarations, bool input, bool useSemanticOnly=false)
void labelAnonymousDeclaration(Declaration *declarationObj)
bool fetchFromCurrentScope(const String &ident) const
virtual void convertASTPrimary(Program &program, const ShaderInput &inputDesc, const ShaderOutput &outputDesc)=0
void insertStatementAfter(const StatementPtr &statement, bool globalScope=false)
void renameIdentOf(Declaration *obj)
Program * mProgram
Definition Converter.hpp:57
Program * getProgram() const
Definition Converter.hpp:145
const NameMangling & getNameMangling() const
Definition Converter.hpp:148
bool isSamplerStateTypeDenoter(const TypeDenoterPtr &typeDenoter) const
void visitScopedStatement(StatementPtr &statement, void *args=nullptr)
void renameIdentObfuscated(Identifier &ident)
void pushSelfParameter(VarDeclaration *parameter)
UInt32 mAnonymCounter
Definition Converter.hpp:66
StatementScopeHandler * mStatementScopeHandlerGlobalRef
Definition Converter.hpp:64
Vector< VarDeclaration * > mSelfParamStack
Definition Converter.hpp:61
UInt32 mTempVarCounter
Definition Converter.hpp:68
void insertStatementBefore(const StatementPtr &statement, bool globalScope=false)
StatementScopeHandler & getActiveStatementScopeHandler()
void moveNestedStructDeclarations(Vector< StatementPtr > &localStatements, bool globalScope=false)
void visitScopedStatementList(Vector< StatementPtr > &statementList, void *args=nullptr)
void renameIdent(Identifier &ident)
SymbolTable< bool > mSymTable
Definition Converter.hpp:55
void register_(const String &ident)
String makeTempVarIdent()
NameMangling mNameMangling
Definition Converter.hpp:58
Stack< StatementScopeHandler > mStatementScopeHandlerStack
Definition Converter.hpp:63
bool convertAST(Program &program, const ShaderInput &inputDesc, const ShaderOutput &outputDesc)
VarDeclaration * getActiveSelfParameter() const
Class to manage identifiers that can be renamed (maybe several times), to keep track of the original ...
Definition Identifier.hpp:18
Definition SymbolTable.hpp:43
Definition VisitorTracker.hpp:18
SPtr< Statement > StatementPtr
Definition Visitor.hpp:25
SPtr< TypeDenoter > TypeDenoterPtr
Definition TypeDenoter.hpp:29
std::stack< T, Container > Stack
The Stack class is a container adapter that gives the programmer the functionality of a stack - speci...
Definition Stack.hpp:18
std::vector< T, ScopedAllocatorAdaptor< StdAllocator< T, RawAllocator > > > Vector
Vector is a sequence container that encapsulates dynamic size arrays.
Definition Vector.hpp:17
std::uint32_t UInt32
Definition DataTypes.hpp:23
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
Name mangling descriptor structure for shader input/output variables (also referred to as "varyings")...
Definition ShaderCompiler.hpp:185
Shader output descriptor structure.
Definition ShaderCompiler.hpp:293