Incorporated patch from haixia@ changing the default implementation of
array index clamping to use the clamp intrinsic. This works more
reliably on pure OpenGL ES devices and on Windows.
Added a mechanism in ShBuiltInResources to choose the strategy for
array index clamping.
BUG=none
TEST=various out-of-bounds array indexing tests and various WebGL content
Review URL: https://codereview.appspot.com/7194051
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1798 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/compiler/OutputGLSLBase.h b/src/compiler/OutputGLSLBase.h
index 01e9d4a..c9f72d5 100644
--- a/src/compiler/OutputGLSLBase.h
+++ b/src/compiler/OutputGLSLBase.h
@@ -17,6 +17,7 @@
{
public:
TOutputGLSLBase(TInfoSinkBase& objSink,
+ ShArrayIndexClampingStrategy clampingStrategy,
ShHashFunction64 hashFunction,
NameMap& nameMap,
TSymbolTable& symbolTable);
@@ -62,8 +63,11 @@
ForLoopUnroll mLoopUnroll;
+ ShArrayIndexClampingStrategy mClampingStrategy;
+
// name hashing.
ShHashFunction64 mHashFunction;
+
NameMap& mNameMap;
TSymbolTable& mSymbolTable;