zenilib
0.5.3.0
|
#include <OutputGLSLBase.h>
Inherits TIntermTraverser.
Inherited by TOutputESSL, and TOutputGLSL.
Public Member Functions | |
TOutputGLSLBase (TInfoSinkBase &objSink, ShArrayIndexClampingStrategy clampingStrategy, ShHashFunction64 hashFunction, NameMap &nameMap, TSymbolTable &symbolTable) | |
![]() | |
TIntermTraverser (bool preVisit=true, bool inVisit=false, bool postVisit=false, bool rightToLeft=false) | |
virtual | ~TIntermTraverser () |
void | decrementDepth () |
int | getMaxDepth () const |
void | incrementDepth () |
POOL_ALLOCATOR_NEW_DELETE () | |
Additional Inherited Members | |
![]() | |
static TString | hash (const TString &name, ShHashFunction64 hashFunction) |
![]() | |
const bool | inVisit |
const bool | postVisit |
const bool | preVisit |
const bool | rightToLeft |
![]() | |
int | depth |
int | maxDepth |
Definition at line 16 of file OutputGLSLBase.h.
TOutputGLSLBase::TOutputGLSLBase | ( | TInfoSinkBase & | objSink, |
ShArrayIndexClampingStrategy | clampingStrategy, | ||
ShHashFunction64 | hashFunction, | ||
NameMap & | nameMap, | ||
TSymbolTable & | symbolTable | ||
) |
Definition at line 42 of file OutputGLSLBase.cpp.
Definition at line 737 of file OutputGLSLBase.cpp.
References TInfoSinkBase::c_str(), EbtBool, EbtFloat, EbtInt, EbtStruct, TType::getBasicString(), TType::getBasicType(), TType::getNominalSize(), TType::getStruct(), hashName(), TType::isMatrix(), TType::isVector(), TStructure::name(), and UNREACHABLE.
Referenced by writeConstantUnion(), and writeVariableType().
Definition at line 785 of file OutputGLSLBase.cpp.
References TSymbolTable::findBuiltIn(), hashName(), NULL, and TFunction::unmangleName().
Referenced by visitAggregate().
Definition at line 766 of file OutputGLSLBase.cpp.
References TIntermTraverser::hash(), and NULL.
Referenced by getTypeName(), hashFunctionName(), hashVariableName(), visitAggregate(), visitBinary(), writeConstantUnion(), and writeFunctionParameters().
Definition at line 778 of file OutputGLSLBase.cpp.
References TSymbolTable::findBuiltIn(), hashName(), and NULL.
Referenced by visitSymbol().
|
inlineprotected |
Definition at line 26 of file OutputGLSLBase.h.
Referenced by visitAggregate(), visitBinary(), visitCodeBlock(), visitLoop(), visitSelection(), TOutputGLSL::visitSymbol(), visitSymbol(), writeConstantUnion(), writeFunctionParameters(), writeTriplet(), TOutputESSL::writeVariablePrecision(), and writeVariableType().
|
protectedvirtual |
Reimplemented from TIntermTraverser.
Definition at line 451 of file OutputGLSLBase.cpp.
References ASSERT, TIntermTraverser::decrementDepth(), EbtStruct, EOpAtan, EOpClamp, EOpComma, EOpConstructBool, EOpConstructBVec2, EOpConstructBVec3, EOpConstructBVec4, EOpConstructFloat, EOpConstructInt, EOpConstructIVec2, EOpConstructIVec3, EOpConstructIVec4, EOpConstructMat2, EOpConstructMat3, EOpConstructMat4, EOpConstructStruct, EOpConstructVec2, EOpConstructVec3, EOpConstructVec4, EOpCross, EOpDeclaration, EOpDistance, EOpDot, EOpFaceForward, EOpFunction, EOpFunctionCall, EOpGreaterThan, EOpGreaterThanEqual, EOpLessThan, EOpLessThanEqual, EOpMax, EOpMin, EOpMix, EOpMod, EOpMul, EOpParameters, EOpPow, EOpPrototype, EOpReflect, EOpRefract, EOpSequence, EOpSmoothStep, EOpStep, EOpVectorEqual, EOpVectorNotEqual, TIntermAggregate::getAsAggregate(), TType::getBasicType(), BuiltInFunctionEmulator::GetEmulatedFunctionName(), TIntermAggregate::getName(), TIntermOperator::getOp(), TIntermAggregate::getSequence(), TType::getStruct(), TIntermTyped::getType(), TIntermAggregate::getUseEmulatedFunction(), hashFunctionName(), hashName(), TIntermTraverser::incrementDepth(), InVisit, TStructure::name(), NULL, objSink(), PreVisit, TIntermNode::traverse(), TIntermAggregate::traverse(), UNREACHABLE, visitCodeBlock(), writeFunctionParameters(), writeTriplet(), and writeVariableType().
|
protectedvirtual |
Reimplemented from TIntermTraverser.
Definition at line 176 of file OutputGLSLBase.cpp.
References ASSERT, EbtInt, EOpAdd, EOpAddAssign, EOpAssign, EOpDiv, EOpDivAssign, EOpEqual, EOpGreaterThan, EOpGreaterThanEqual, EOpIndexDirect, EOpIndexDirectStruct, EOpIndexIndirect, EOpInitialize, EOpLessThan, EOpLessThanEqual, EOpLogicalAnd, EOpLogicalOr, EOpLogicalXor, EOpMatrixTimesMatrix, EOpMatrixTimesMatrixAssign, EOpMatrixTimesScalar, EOpMatrixTimesScalarAssign, EOpMatrixTimesVector, EOpMod, EOpMul, EOpMulAssign, EOpNotEqual, EOpSub, EOpSubAssign, EOpVectorSwizzle, EOpVectorTimesMatrix, EOpVectorTimesMatrixAssign, EOpVectorTimesScalar, EOpVectorTimesScalarAssign, TStructure::fields(), TSymbolTable::findBuiltIn(), TIntermBinary::getAddIndexClamp(), TType::getArraySize(), TIntermNode::getAsAggregate(), TIntermNode::getAsConstantUnion(), TIntermConstantUnion::getAsConstantUnion(), TIntermTyped::getBasicType(), TIntermConstantUnion::getIConst(), TIntermBinary::getLeft(), TType::getNominalSize(), TIntermTyped::getNominalSize(), TIntermOperator::getOp(), TIntermBinary::getRight(), TIntermAggregate::getSequence(), TType::getStruct(), TIntermTyped::getType(), TIntermConstantUnion::getUnionArrayPointer(), hashName(), InVisit, TIntermTyped::isArray(), TField::name(), TStructure::name(), NULL, objSink(), PostVisit, SH_CLAMP_WITH_CLAMP_INTRINSIC, UNIMPLEMENTED, UNREACHABLE, and writeTriplet().
|
protectedvirtual |
Reimplemented from TIntermTraverser.
Definition at line 707 of file OutputGLSLBase.cpp.
References EOpBreak, EOpContinue, EOpKill, EOpReturn, TIntermBranch::getFlowOp(), NULL, UNREACHABLE, and writeTriplet().
|
protected |
Definition at line 721 of file OutputGLSLBase.cpp.
References NULL, objSink(), and TIntermNode::traverse().
Referenced by visitAggregate(), visitLoop(), and visitSelection().
|
protectedvirtual |
Reimplemented from TIntermTraverser.
Definition at line 171 of file OutputGLSLBase.cpp.
References TIntermTyped::getType(), TIntermConstantUnion::getUnionArrayPointer(), and writeConstantUnion().
|
protectedvirtual |
Reimplemented from TIntermTraverser.
Definition at line 637 of file OutputGLSLBase.cpp.
References ASSERT, TIntermTraverser::decrementDepth(), ELoopDoWhile, ELoopFor, ELoopWhile, ForLoopUnroll::FillLoopIndexInfo(), TIntermLoop::getBody(), TIntermLoop::getCondition(), TIntermLoop::getExpression(), TIntermLoop::getInit(), TIntermLoop::getType(), TIntermLoop::getUnrollFlag(), TIntermTraverser::incrementDepth(), NULL, objSink(), ForLoopUnroll::Pop(), ForLoopUnroll::Push(), ForLoopUnroll::SatisfiesLoopCondition(), ForLoopUnroll::Step(), TIntermNode::traverse(), and visitCodeBlock().
|
protectedvirtual |
Reimplemented from TIntermTraverser.
Definition at line 414 of file OutputGLSLBase.cpp.
References TIntermTraverser::decrementDepth(), TIntermSelection::getCondition(), TIntermSelection::getFalseBlock(), TIntermSelection::getTrueBlock(), TIntermTraverser::incrementDepth(), objSink(), TIntermNode::traverse(), TIntermSelection::usesTernaryOperator(), and visitCodeBlock().
|
protectedvirtual |
Reimplemented from TIntermTraverser.
Reimplemented in TOutputGLSL.
Definition at line 159 of file OutputGLSLBase.cpp.
References arrayBrackets(), ForLoopUnroll::GetLoopIndexValue(), TIntermSymbol::getSymbol(), TIntermTyped::getType(), hashVariableName(), TType::isArray(), ForLoopUnroll::NeedsToReplaceSymbolWithValue(), and objSink().
Referenced by TOutputGLSL::visitSymbol().
|
protectedvirtual |
Reimplemented from TIntermTraverser.
Definition at line 322 of file OutputGLSLBase.cpp.
References EOpAbs, EOpAcos, EOpAll, EOpAny, EOpAsin, EOpAtan, EOpCeil, EOpConvBoolToFloat, EOpConvBoolToInt, EOpConvFloatToBool, EOpConvFloatToInt, EOpConvIntToBool, EOpConvIntToFloat, EOpCos, EOpDegrees, EOpDFdx, EOpDFdy, EOpExp, EOpExp2, EOpFloor, EOpFract, EOpFwidth, EOpInverseSqrt, EOpLength, EOpLog, EOpLog2, EOpLogicalNot, EOpNegative, EOpNormalize, EOpPostDecrement, EOpPostIncrement, EOpPreDecrement, EOpPreIncrement, EOpRadians, EOpSign, EOpSin, EOpSqrt, EOpTan, EOpVectorLogicalNot, BuiltInFunctionEmulator::GetEmulatedFunctionName(), TType::getNominalSize(), TIntermOperator::getOp(), TIntermUnary::getOperand(), TIntermTyped::getType(), TIntermUnary::getUseEmulatedFunction(), NULL, PreVisit, UNREACHABLE, and writeTriplet().
|
protected |
Definition at line 118 of file OutputGLSLBase.cpp.
References ASSERT, EbtBool, EbtFloat, EbtInt, EbtStruct, TStructure::fields(), TType::getBasicType(), ConstantUnion::getBConst(), ConstantUnion::getFConst(), ConstantUnion::getIConst(), TType::getObjectSize(), TType::getStruct(), ConstantUnion::getType(), getTypeName(), hashName(), i, max, min, TStructure::name(), NULL, objSink(), and UNREACHABLE.
Referenced by visitConstantUnion().
|
protected |
Definition at line 94 of file OutputGLSLBase.cpp.
References arrayBrackets(), ASSERT, TIntermSymbol::getAsSymbolNode(), TIntermSymbol::getSymbol(), TIntermTyped::getType(), hashName(), TType::isArray(), NULL, objSink(), and writeVariableType().
Referenced by visitAggregate().
|
protected |
Definition at line 57 of file OutputGLSLBase.cpp.
References InVisit, objSink(), PostVisit, and PreVisit.
Referenced by visitAggregate(), visitBinary(), visitBranch(), and visitUnary().
|
protectedpure virtual |
Implemented in TOutputESSL, and TOutputGLSL.
Referenced by writeVariableType().
Definition at line 74 of file OutputGLSLBase.cpp.
References EbtStruct, EvqGlobal, EvqTemporary, TType::getBasicType(), TType::getPrecision(), TType::getQualifier(), TType::getQualifierString(), TType::getStruct(), getTypeName(), objSink(), and writeVariablePrecision().
Referenced by visitAggregate(), and writeFunctionParameters().