zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TCompiler Class Referenceabstract

#include <ShHandle.h>

Inherits TShHandleBase.

Inherited by TranslatorESSL, TranslatorGLSL, and TranslatorHLSL.

Public Member Functions

 TCompiler (ShShaderType type, ShShaderSpec spec)
 
virtual ~TCompiler ()
 
bool compile (const char *const shaderStrings[], size_t numStrings, int compileOptions)
 
virtual TCompilergetAsCompiler ()
 
const TVariableInfoListgetAttribs () const
 
ShHashFunction64 getHashFunction () const
 
TInfoSinkgetInfoSink ()
 
int getMappedNameMaxLength () const
 
NameMapgetNameMap ()
 
TSymbolTablegetSymbolTable ()
 
const TVariableInfoListgetUniforms () const
 
bool Init (const ShBuiltInResources &resources)
 
- Public Member Functions inherited from TShHandleBase
 TShHandleBase ()
 
virtual ~TShHandleBase ()
 
virtual TranslatorHLSLgetAsTranslatorHLSL ()
 

Protected Member Functions

void clearResults ()
 
void collectAttribsUniforms (TIntermNode *root)
 
bool detectCallDepth (TIntermNode *root, TInfoSink &infoSink, bool limitCallStackDepth)
 
bool enforceFragmentShaderTimingRestrictions (const TDependencyGraph &graph)
 
bool enforcePackingRestrictions ()
 
bool enforceTimingRestrictions (TIntermNode *root, bool outputGraph)
 
bool enforceVertexShaderTimingRestrictions (TIntermNode *root)
 
const ArrayBoundsClampergetArrayBoundsClamper () const
 
ShArrayIndexClampingStrategy getArrayIndexClampingStrategy () const
 
const BuiltInFunctionEmulatorgetBuiltInFunctionEmulator () const
 
const TExtensionBehaviorgetExtensionBehavior () const
 
const ShBuiltInResourcesgetResources () const
 
ShShaderSpec getShaderSpec () const
 
ShShaderType getShaderType () const
 
bool InitBuiltInSymbolTable (const ShBuiltInResources &resources)
 
bool limitExpressionComplexity (TIntermNode *root)
 
void mapLongVariableNames (TIntermNode *root)
 
void rewriteCSSShader (TIntermNode *root)
 
virtual void translate (TIntermNode *root)=0
 
bool validateLimitations (TIntermNode *root)
 

Additional Inherited Members

- Protected Attributes inherited from TShHandleBase
TPoolAllocator allocator
 

Detailed Description

Definition at line 58 of file ShHandle.h.

Constructor & Destructor Documentation

TCompiler::TCompiler ( ShShaderType  type,
ShShaderSpec  spec 
)

Definition at line 58 of file Compiler.cpp.

References LongNameMap::GetInstance().

TCompiler::~TCompiler ( )
virtual

Definition at line 71 of file Compiler.cpp.

References ASSERT, and LongNameMap::Release().

Member Function Documentation

void TCompiler::clearResults ( )
protected
void TCompiler::collectAttribsUniforms ( TIntermNode root)
protected

Definition at line 361 of file Compiler.cpp.

References TIntermNode::traverse().

Referenced by compile().

bool TCompiler::enforceFragmentShaderTimingRestrictions ( const TDependencyGraph graph)
protected
bool TCompiler::enforcePackingRestrictions ( )
protected

Definition at line 367 of file Compiler.cpp.

References VariablePacker::CheckVariablesWithinPackingLimits().

Referenced by compile().

bool TCompiler::enforceTimingRestrictions ( TIntermNode root,
bool  outputGraph 
)
protected
bool TCompiler::enforceVertexShaderTimingRestrictions ( TIntermNode root)
protected
const ArrayBoundsClamper & TCompiler::getArrayBoundsClamper ( ) const
protected

Definition at line 395 of file Compiler.cpp.

Referenced by TranslatorESSL::translate(), and TranslatorGLSL::translate().

ShArrayIndexClampingStrategy TCompiler::getArrayIndexClampingStrategy ( ) const
protected

Definition at line 400 of file Compiler.cpp.

Referenced by TranslatorESSL::translate(), and TranslatorGLSL::translate().

virtual TCompiler* TCompiler::getAsCompiler ( )
inlinevirtual

Reimplemented from TShHandleBase.

Definition at line 62 of file ShHandle.h.

const TVariableInfoList& TCompiler::getAttribs ( ) const
inline

Definition at line 71 of file ShHandle.h.

Referenced by getVariableInfo(), and ShGetInfo().

const BuiltInFunctionEmulator & TCompiler::getBuiltInFunctionEmulator ( ) const
protected

Definition at line 405 of file Compiler.cpp.

Referenced by TranslatorESSL::translate(), and TranslatorGLSL::translate().

const TExtensionBehavior & TCompiler::getExtensionBehavior ( ) const
protected

Definition at line 385 of file Compiler.cpp.

ShHashFunction64 TCompiler::getHashFunction ( ) const
inline

Definition at line 75 of file ShHandle.h.

Referenced by ShGetInfo(), TranslatorGLSL::translate(), and TranslatorESSL::translate().

TInfoSink& TCompiler::getInfoSink ( )
inline
int TCompiler::getMappedNameMaxLength ( ) const

Definition at line 380 of file Compiler.cpp.

References MAX_SHORTENED_IDENTIFIER_SIZE.

NameMap& TCompiler::getNameMap ( )
inline
const ShBuiltInResources & TCompiler::getResources ( ) const
protected

Definition at line 390 of file Compiler.cpp.

Referenced by TranslatorHLSL::translate().

ShShaderSpec TCompiler::getShaderSpec ( ) const
inlineprotected

Definition at line 81 of file ShHandle.h.

ShShaderType TCompiler::getShaderType ( ) const
inlineprotected

Definition at line 80 of file ShHandle.h.

Referenced by TranslatorESSL::translate(), and TranslatorGLSL::translate().

TSymbolTable& TCompiler::getSymbolTable ( )
inline

Definition at line 77 of file ShHandle.h.

Referenced by TranslatorESSL::translate(), and TranslatorGLSL::translate().

const TVariableInfoList& TCompiler::getUniforms ( ) const
inline

Definition at line 72 of file ShHandle.h.

Referenced by getVariableInfo(), and ShGetInfo().

void TCompiler::mapLongVariableNames ( TIntermNode root)
protected

Definition at line 373 of file Compiler.cpp.

References ASSERT, map, and TIntermNode::traverse().

Referenced by compile().

void TCompiler::rewriteCSSShader ( TIntermNode root)
protected

Definition at line 287 of file Compiler.cpp.

References TIntermNode::traverse().

Referenced by compile().

virtual void TCompiler::translate ( TIntermNode root)
protectedpure virtual

Implemented in TranslatorHLSL, TranslatorESSL, and TranslatorGLSL.

Referenced by compile().

bool TCompiler::validateLimitations ( TIntermNode root)
protected

Definition at line 293 of file Compiler.cpp.

References TInfoSink::info, ValidateLimitations::numErrors(), and TIntermNode::traverse().

Referenced by compile().


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