Add textureGather and textureGatherOffset

The patch adds new built-ins and extends the semantic parser to add
support for textureGather and textureGatherOffset.

BUG=angleproject:1442
TEST=angle_unittests
TEST=angle_deqp_gles31_tests.exe
     --deqp-case=dEQP-GLES31.functional.texture.gather*
     --deqp-egl-display-type=angle-gl

Change-Id: Iaf98c3420fbd61193072fdec8f5a61ac4c574101
Reviewed-on: https://chromium-review.googlesource.com/660124
Commit-Queue: Martin Radev <mradev@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/compiler/translator/ParseContext.h b/src/compiler/translator/ParseContext.h
index a13e9a3..5d1a7e0 100644
--- a/src/compiler/translator/ParseContext.h
+++ b/src/compiler/translator/ParseContext.h
@@ -392,6 +392,7 @@
     TIntermBranch *addBranch(TOperator op, const TSourceLoc &loc);
     TIntermBranch *addBranch(TOperator op, TIntermTyped *expression, const TSourceLoc &loc);
 
+    void checkTextureGather(TIntermAggregate *functionCall);
     void checkTextureOffsetConst(TIntermAggregate *functionCall);
     void checkImageMemoryAccessForBuiltinFunctions(TIntermAggregate *functionCall);
     void checkImageMemoryAccessForUserDefinedFunctions(const TFunction *functionDefinition,
@@ -576,6 +577,9 @@
     int mMinProgramTexelOffset;
     int mMaxProgramTexelOffset;
 
+    int mMinProgramTextureGatherOffset;
+    int mMaxProgramTextureGatherOffset;
+
     // keep track of local group size declared in layout. It should be declared only once.
     bool mComputeShaderLocalSizeDeclared;
     sh::WorkGroupSize mComputeShaderLocalSize;