Add support for GL_OES_texture_compression_astc

This extension adds 3D compressed texture formats, something ANGLE has
not seen before.  This requires tracking a compressed block depth for
validation and image size computations.

Update the ldr and hdr extension checks to be in line with the spec.
HDR requires LDR and is not detectable by texture formats alone.

Expose all of the ASTC extensions on the GL backend.

BUG=angleproject:3675

Change-Id: Id04c7c8ef8541e9556579536cdba899b64303caf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1695923
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
diff --git a/src/libANGLE/validationES2.cpp b/src/libANGLE/validationES2.cpp
index 49ee47d..3bc0970 100644
--- a/src/libANGLE/validationES2.cpp
+++ b/src/libANGLE/validationES2.cpp
@@ -1310,9 +1310,10 @@
                 return false;
             }
 
-            if (!ValidCompressedSubImageSize(context, actualInternalFormat, xoffset, yoffset, width,
-                                             height, texture->getWidth(target, level),
-                                             texture->getHeight(target, level)))
+            if (!ValidCompressedSubImageSize(context, actualInternalFormat, xoffset, yoffset, 0,
+                                             width, height, 1, texture->getWidth(target, level),
+                                             texture->getHeight(target, level),
+                                             texture->getDepth(target, level)))
             {
                 context->validationError(GL_INVALID_OPERATION, kInvalidCompressedImageSize);
                 return false;
@@ -1326,7 +1327,7 @@
         }
         else
         {
-            if (!ValidCompressedImageSize(context, actualInternalFormat, level, width, height))
+            if (!ValidCompressedImageSize(context, actualInternalFormat, level, width, height, 1))
             {
                 context->validationError(GL_INVALID_OPERATION, kInvalidCompressedImageSize);
                 return false;