summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/angle/src/compiler/OutputGLSLBase.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/angle/src/compiler/OutputGLSLBase.h')
-rw-r--r--src/3rdparty/angle/src/compiler/OutputGLSLBase.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/3rdparty/angle/src/compiler/OutputGLSLBase.h b/src/3rdparty/angle/src/compiler/OutputGLSLBase.h
index efd0b5fc2d..c9f72d5631 100644
--- a/src/3rdparty/angle/src/compiler/OutputGLSLBase.h
+++ b/src/3rdparty/angle/src/compiler/OutputGLSLBase.h
@@ -16,7 +16,11 @@
class TOutputGLSLBase : public TIntermTraverser
{
public:
- TOutputGLSLBase(TInfoSinkBase& objSink);
+ TOutputGLSLBase(TInfoSinkBase& objSink,
+ ShArrayIndexClampingStrategy clampingStrategy,
+ ShHashFunction64 hashFunction,
+ NameMap& nameMap,
+ TSymbolTable& symbolTable);
protected:
TInfoSinkBase& objSink() { return mObjSink; }
@@ -25,6 +29,7 @@ protected:
virtual bool writeVariablePrecision(TPrecision precision) = 0;
void writeFunctionParameters(const TIntermSequence& args);
const ConstantUnion* writeConstantUnion(const TType& type, const ConstantUnion* pConstUnion);
+ TString getTypeName(const TType& type);
virtual void visitSymbol(TIntermSymbol* node);
virtual void visitConstantUnion(TIntermConstantUnion* node);
@@ -37,6 +42,15 @@ protected:
void visitCodeBlock(TIntermNode* node);
+
+ // Return the original name if hash function pointer is NULL;
+ // otherwise return the hashed name.
+ TString hashName(const TString& name);
+ // Same as hashName(), but without hashing built-in variables.
+ TString hashVariableName(const TString& name);
+ // Same as hashName(), but without hashing built-in functions.
+ TString hashFunctionName(const TString& mangled_name);
+
private:
TInfoSinkBase& mObjSink;
bool mDeclaringVariables;
@@ -48,6 +62,15 @@ private:
DeclaredStructs mDeclaredStructs;
ForLoopUnroll mLoopUnroll;
+
+ ShArrayIndexClampingStrategy mClampingStrategy;
+
+ // name hashing.
+ ShHashFunction64 mHashFunction;
+
+ NameMap& mNameMap;
+
+ TSymbolTable& mSymbolTable;
};
#endif // CROSSCOMPILERGLSL_OUTPUTGLSLBASE_H_