Only store innermost array offset in VariableLocation

Separate entries will be generated for each innermost array of arrays
of arrays in the variable tables. Because of this VariableLocation
actually only needs to store the innermost array index.

BUG=angleproject:2125
TEST=angle_end2end_tests

Change-Id: Id1ee35b3cecfc011d96b58e43cf0b1cccbfed408
Reviewed-on: https://chromium-review.googlesource.com/741742
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/Program.h b/src/libANGLE/Program.h
index 99f3959..d0dbfb7 100644
--- a/src/libANGLE/Program.h
+++ b/src/libANGLE/Program.h
@@ -147,18 +147,12 @@
     void markUnused() { index = kUnused; }
     void markIgnored() { ignored = true; }
 
-    bool areAllArrayIndicesZero() const;
-
-    // The "arrayIndices" vector stores indices for the GLSL array. "index" is an index of the
-    // location.
-    std::vector<unsigned int> arrayIndices;  // Outermost array indices are in the back.
+    // "arrayIndex" stores the index of the innermost GLSL array. It's zero for non-arrays.
+    unsigned int arrayIndex;
+    // "index" is an index of the variable. The variable contains the indices for other than the
+    // innermost GLSL arrays.
     unsigned int index;
 
-    unsigned int flattenedArrayOffset;  // For non-nested arrays this is the same as the array
-                                        // index. For arrays of arrays, the indices are converted to
-                                        // a single offset inside a one-dimensional array made up of
-                                        // the elements of the innermost arrays.
-
     // If this location was bound to an unreferenced uniform.  Setting data on this uniform is a
     // no-op.
     bool ignored;