summaryrefslogtreecommitdiffstats
path: root/Source/ThirdParty/ANGLE/src/compiler/ShHandle.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/ThirdParty/ANGLE/src/compiler/ShHandle.h')
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/ShHandle.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/Source/ThirdParty/ANGLE/src/compiler/ShHandle.h b/Source/ThirdParty/ANGLE/src/compiler/ShHandle.h
index e65c1ee..91c47e7 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/ShHandle.h
+++ b/Source/ThirdParty/ANGLE/src/compiler/ShHandle.h
@@ -1,5 +1,5 @@
//
-// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@@ -16,11 +16,13 @@
#include "GLSLANG/ShaderLang.h"
+#include "compiler/BuiltInFunctionEmulator.h"
#include "compiler/ExtensionBehavior.h"
#include "compiler/InfoSink.h"
#include "compiler/SymbolTable.h"
#include "compiler/VariableInfo.h"
+class LongNameMap;
class TCompiler;
//
@@ -57,6 +59,7 @@ public:
TInfoSink& getInfoSink() { return infoSink; }
const TVariableInfoList& getAttribs() const { return attribs; }
const TVariableInfoList& getUniforms() const { return uniforms; }
+ int getMappedNameMaxLength() const;
protected:
ShShaderType getShaderType() const { return shaderType; }
@@ -65,13 +68,21 @@ protected:
bool InitBuiltInSymbolTable(const ShBuiltInResources& resources);
// Clears the results from the previous compilation.
void clearResults();
+ // Return true if function recursion is detected.
+ bool detectRecursion(TIntermNode* root);
// Returns true if the given shader does not exceed the minimum
// functionality mandated in GLSL 1.0 spec Appendix A.
bool validateLimitations(TIntermNode* root);
// Collect info for all attribs and uniforms.
void collectAttribsUniforms(TIntermNode* root);
+ // Map long variable names into shorter ones.
+ void mapLongVariableNames(TIntermNode* root);
// Translate to object code.
virtual void translate(TIntermNode* root) = 0;
+ // Get built-in extensions with default behavior.
+ const TExtensionBehavior& getExtensionBehavior() const;
+
+ const BuiltInFunctionEmulator& getBuiltInFunctionEmulator() const;
private:
ShShaderType shaderType;
@@ -83,10 +94,15 @@ private:
// Built-in extensions with default behavior.
TExtensionBehavior extensionBehavior;
+ BuiltInFunctionEmulator builtInFunctionEmulator;
+
// Results of compilation.
TInfoSink infoSink; // Output sink.
TVariableInfoList attribs; // Active attributes in the compiled shader.
TVariableInfoList uniforms; // Active uniforms in the compiled shader.
+
+ // Cached copy of the ref-counted singleton.
+ LongNameMap* longNameMap;
};
//
@@ -98,7 +114,8 @@ private:
// destroy the machine dependent objects, which contain the
// above machine independent information.
//
-TCompiler* ConstructCompiler(ShShaderType type, ShShaderSpec spec);
+TCompiler* ConstructCompiler(
+ ShShaderType type, ShShaderSpec spec, ShShaderOutput output);
void DeleteCompiler(TCompiler*);
-#endif // _SHHANDLE_INCLUDED_ \ No newline at end of file
+#endif // _SHHANDLE_INCLUDED_