Fix using wrong value for array size in 2D array storage.

We were incorrectly calling Texture::getBaseLevelDepth() which was
correctly reporting the number of 3D slices of the texture (1).

Also rename Texture2DArray::getDepth to getLayers for clarity.

Change-Id: I1968cbcb0a3528bb76ec3e4ea4148e5dc0f302c7
Reviewed-on: https://chromium-review.googlesource.com/181553
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libGLESv2/validationES3.cpp b/src/libGLESv2/validationES3.cpp
index 0a37894..a47ff2d 100644
--- a/src/libGLESv2/validationES3.cpp
+++ b/src/libGLESv2/validationES3.cpp
@@ -134,7 +134,7 @@
                   textureInternalFormat = texture2darray->getInternalFormat(level);
                   textureLevelWidth = texture2darray->getWidth(level);
                   textureLevelHeight = texture2darray->getHeight(level);
-                  textureLevelDepth = texture2darray->getDepth(level);
+                  textureLevelDepth = texture2darray->getLayers(level);
                   texture = texture2darray;
               }
           }
@@ -372,7 +372,7 @@
                 textureIsDepth = texture2dArray->isDepth(level);
                 textureLevelWidth = texture2dArray->getWidth(level);
                 textureLevelHeight = texture2dArray->getHeight(level);
-                textureLevelDepth = texture2dArray->getDepth(level);
+                textureLevelDepth = texture2dArray->getLayers(level);
                 texture = texture2dArray;
             }
         }