Implement GL_ANGLE_texture_multisample API part

Support GL_ANGLE_texture_multisample extension.
This patch adds enums of multisampled texture and texStorage2DMultisampleANGLE
API.

TEST=angle_end2end_tests.exe --gtest_filter=TextureMultisampleTest*
TEST=angle_end2end_tests.exe --gtest_filter=NegativeTextureMultisampleTest.Negtive*

BUG=angleproject:2275

Change-Id: I2cab997edc33aa2d0be6082381545335423f64e0
Reviewed-on: https://chromium-review.googlesource.com/c/804613
Commit-Queue: Yizhou Jiang <yizhou.jiang@intel.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/compiler/translator/TranslatorGLSL.cpp b/src/compiler/translator/TranslatorGLSL.cpp
index 23141ba..047b24a 100644
--- a/src/compiler/translator/TranslatorGLSL.cpp
+++ b/src/compiler/translator/TranslatorGLSL.cpp
@@ -287,6 +287,14 @@
             // extension is requested.
             sink << "#extension GL_NV_viewport_array2 : require\n";
         }
+
+        // Support ANGLE_texture_multisample extension on GLSL300
+        if (getShaderVersion() >= 300 && iter.first == TExtension::ANGLE_texture_multisample &&
+            getOutputType() < SH_GLSL_330_CORE_OUTPUT)
+        {
+            sink << "#extension GL_ARB_texture_multisample : " << GetBehaviorString(iter.second)
+                 << "\n";
+        }
     }
 
     // GLSL ES 3 explicit location qualifiers need to use an extension before GLSL 330
diff --git a/src/libANGLE/Caps.cpp b/src/libANGLE/Caps.cpp
index a1121b9..1b495bc 100644
--- a/src/libANGLE/Caps.cpp
+++ b/src/libANGLE/Caps.cpp
@@ -256,7 +256,8 @@
       multiviewMultisample(false),
       blendFuncExtended(false),
       maxDualSourceDrawBuffers(0),
-      memorySize(false)
+      memorySize(false),
+      textureMultisample(false)
 {
 }
 
@@ -890,6 +891,7 @@
         map["GL_OES_texture_storage_multisample_2d_array"] = enableableExtension(&Extensions::textureStorageMultisample2DArray);
         map["GL_ANGLE_multiview_multisample"] = enableableExtension(&Extensions::multiviewMultisample);
         map["GL_EXT_blend_func_extended"] = enableableExtension(&Extensions::blendFuncExtended);
+        map["GL_ANGLE_texture_multisample"] = enableableExtension(&Extensions::textureMultisample);
         // GLES1 extensinos
         map["GL_OES_point_size_array"] = enableableExtension(&Extensions::pointSizeArray);
         map["GL_OES_texture_cube_map"] = enableableExtension(&Extensions::textureCubeMap);
diff --git a/src/libANGLE/Caps.h b/src/libANGLE/Caps.h
index a5c0035..e9f5c33 100644
--- a/src/libANGLE/Caps.h
+++ b/src/libANGLE/Caps.h
@@ -446,6 +446,9 @@
 
     // GL_ANGLE_memory_size
     bool memorySize;
+
+    // GL_ANGLE_texture_multisample
+    bool textureMultisample;
 };
 
 struct ExtensionInfo
diff --git a/src/libANGLE/Compiler.cpp b/src/libANGLE/Compiler.cpp
index 84f0687..fb4a723 100644
--- a/src/libANGLE/Compiler.cpp
+++ b/src/libANGLE/Compiler.cpp
@@ -85,6 +85,7 @@
     mResources.ARB_texture_rectangle           = extensions.textureRectangle;
     mResources.OES_texture_storage_multisample_2d_array =
         extensions.textureStorageMultisample2DArray;
+    mResources.ANGLE_texture_multisample = extensions.textureMultisample;
     // TODO: use shader precision caps to determine if high precision is supported?
     mResources.FragmentPrecisionHigh = 1;
     mResources.EXT_frag_depth        = extensions.fragDepth;
@@ -127,10 +128,10 @@
     mResources.MaxComputeAtomicCounterBuffers =
         caps.maxShaderAtomicCounterBuffers[ShaderType::Compute];
 
-    mResources.MaxVertexAtomicCounters         = caps.maxShaderAtomicCounters[ShaderType::Vertex];
-    mResources.MaxFragmentAtomicCounters       = caps.maxShaderAtomicCounters[ShaderType::Fragment];
-    mResources.MaxCombinedAtomicCounters       = caps.maxCombinedAtomicCounters;
-    mResources.MaxAtomicCounterBindings        = caps.maxAtomicCounterBufferBindings;
+    mResources.MaxVertexAtomicCounters   = caps.maxShaderAtomicCounters[ShaderType::Vertex];
+    mResources.MaxFragmentAtomicCounters = caps.maxShaderAtomicCounters[ShaderType::Fragment];
+    mResources.MaxCombinedAtomicCounters = caps.maxCombinedAtomicCounters;
+    mResources.MaxAtomicCounterBindings  = caps.maxAtomicCounterBufferBindings;
     mResources.MaxVertexAtomicCounterBuffers =
         caps.maxShaderAtomicCounterBuffers[ShaderType::Vertex];
     mResources.MaxFragmentAtomicCounterBuffers =
@@ -150,12 +151,12 @@
     }
 
     // Geometry Shader constants
-    mResources.EXT_geometry_shader              = extensions.geometryShader;
+    mResources.EXT_geometry_shader          = extensions.geometryShader;
     mResources.MaxGeometryUniformComponents = caps.maxShaderUniformComponents[ShaderType::Geometry];
-    mResources.MaxGeometryUniformBlocks         = caps.maxShaderUniformBlocks[ShaderType::Geometry];
-    mResources.MaxGeometryInputComponents       = caps.maxGeometryInputComponents;
-    mResources.MaxGeometryOutputComponents      = caps.maxGeometryOutputComponents;
-    mResources.MaxGeometryOutputVertices        = caps.maxGeometryOutputVertices;
+    mResources.MaxGeometryUniformBlocks     = caps.maxShaderUniformBlocks[ShaderType::Geometry];
+    mResources.MaxGeometryInputComponents   = caps.maxGeometryInputComponents;
+    mResources.MaxGeometryOutputComponents  = caps.maxGeometryOutputComponents;
+    mResources.MaxGeometryOutputVertices    = caps.maxGeometryOutputVertices;
     mResources.MaxGeometryTotalOutputComponents = caps.maxGeometryTotalOutputComponents;
     mResources.MaxGeometryTextureImageUnits = caps.maxShaderTextureImageUnits[ShaderType::Geometry];
 
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index 902d903..f9a37c8 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -417,12 +417,14 @@
         Texture *zeroTexture2DArray = new Texture(mImplementation.get(), 0, TextureType::_2DArray);
         mZeroTextures[TextureType::_2DArray].set(this, zeroTexture2DArray);
     }
-    if (getClientVersion() >= Version(3, 1))
+    if (getClientVersion() >= Version(3, 1) || mSupportedExtensions.textureMultisample)
     {
-        // TODO(http://anglebug.com/2775): These could also be enabled via extension
         Texture *zeroTexture2DMultisample =
             new Texture(mImplementation.get(), 0, TextureType::_2DMultisample);
         mZeroTextures[TextureType::_2DMultisample].set(this, zeroTexture2DMultisample);
+    }
+    if (getClientVersion() >= Version(3, 1))
+    {
         Texture *zeroTexture2DMultisampleArray =
             new Texture(mImplementation.get(), 0, TextureType::_2DMultisampleArray);
         mZeroTextures[TextureType::_2DMultisampleArray].set(this, zeroTexture2DMultisampleArray);
@@ -3183,6 +3185,7 @@
         supportedExtensions.multiview             = false;
         supportedExtensions.maxViews              = 1u;
         supportedExtensions.copyTexture3d         = false;
+        supportedExtensions.textureMultisample    = false;
     }
 
     if (getClientVersion() < ES_3_1)
@@ -7655,6 +7658,20 @@
         }
     }
 
+    if (getExtensions().textureMultisample)
+    {
+        switch (pname)
+        {
+            case GL_MAX_COLOR_TEXTURE_SAMPLES_ANGLE:
+            case GL_MAX_INTEGER_SAMPLES_ANGLE:
+            case GL_MAX_DEPTH_TEXTURE_SAMPLES_ANGLE:
+            case GL_TEXTURE_BINDING_2D_MULTISAMPLE_ANGLE:
+                *type      = GL_INT;
+                *numParams = 1;
+                return true;
+        }
+    }
+
     if (getClientVersion() < Version(3, 1))
     {
         return false;
@@ -8239,7 +8256,7 @@
     mCachedValidBindTextureTypes = {{
         true,                                                    /* _2D */
         isGLES3,                                                 /* _2DArray */
-        isGLES31,                                                /* _2DMultisample */
+        isGLES31 || exts.textureMultisample,                     /* _2DMultisample */
         exts.textureStorageMultisample2DArray,                   /* _2DMultisampleArray */
         isGLES3,                                                 /* _3D */
         exts.eglImageExternal || exts.eglStreamConsumerExternal, /* External */
diff --git a/src/libANGLE/ErrorStrings.h b/src/libANGLE/ErrorStrings.h
index efe054a..99a80d5 100644
--- a/src/libANGLE/ErrorStrings.h
+++ b/src/libANGLE/ErrorStrings.h
@@ -261,6 +261,8 @@
        "GL_TIME_ELAPSED_EXT when the number of views in the "
        "active draw framebuffer is greater than 1.");
 ERRMSG(MultisampleArrayExtensionRequired, "GL_ANGLE_texture_multisample_array not enabled.");
+ERRMSG(MultisampleTextureExtensionOrES31Required,
+       "GL_ANGLE_texture_multisample or GLES 3.1 required.");
 ERRMSG(NameBeginsWithGL, "Attributes that begin with 'gl_' are not allowed.");
 ERRMSG(NegativeAttachments, "Negative number of attachments.");
 ERRMSG(NegativeBufferSize, "Negative buffer size.");
diff --git a/src/libANGLE/State.cpp b/src/libANGLE/State.cpp
index 241aceb..7b332d0 100644
--- a/src/libANGLE/State.cpp
+++ b/src/libANGLE/State.cpp
@@ -314,10 +314,12 @@
         mSamplerTextures[TextureType::_2DArray].resize(caps.maxCombinedTextureImageUnits);
         mSamplerTextures[TextureType::_3D].resize(caps.maxCombinedTextureImageUnits);
     }
+    if (clientVersion >= Version(3, 1) || nativeExtensions.textureMultisample)
+    {
+        mSamplerTextures[TextureType::_2DMultisample].resize(caps.maxCombinedTextureImageUnits);
+    }
     if (clientVersion >= Version(3, 1))
     {
-        // TODO(http://anglebug.com/2775): These could also be enabled via extension
-        mSamplerTextures[TextureType::_2DMultisample].resize(caps.maxCombinedTextureImageUnits);
         mSamplerTextures[TextureType::_2DMultisampleArray].resize(
             caps.maxCombinedTextureImageUnits);
 
@@ -334,7 +336,7 @@
         mSamplerTextures[TextureType::External].resize(caps.maxCombinedTextureImageUnits);
     }
     mCompleteTextureBindings.reserve(caps.maxCombinedTextureImageUnits);
-    mCachedTexturesInitState = InitState::MayNeedInit;
+    mCachedTexturesInitState      = InitState::MayNeedInit;
     mCachedImageTexturesInitState = InitState::MayNeedInit;
     for (uint32_t textureIndex = 0; textureIndex < caps.maxCombinedTextureImageUnits;
          ++textureIndex)
@@ -2838,7 +2840,7 @@
 
     // Initialize to the 'Initialized' state and set to 'MayNeedInit' if any texture is not
     // initialized.
-    mCachedTexturesInitState = InitState::Initialized;
+    mCachedTexturesInitState      = InitState::Initialized;
     mCachedImageTexturesInitState = InitState::Initialized;
 
     const ActiveTextureMask &activeTextures             = mProgram->getActiveSamplersMask();
diff --git a/src/libANGLE/entry_points_enum_autogen.h b/src/libANGLE/entry_points_enum_autogen.h
index 090d279..0c7d971 100644
--- a/src/libANGLE/entry_points_enum_autogen.h
+++ b/src/libANGLE/entry_points_enum_autogen.h
@@ -546,6 +546,7 @@
     TexStorage2D,
     TexStorage2DEXT,
     TexStorage2DMultisample,
+    TexStorage2DMultisampleANGLE,
     TexStorage3D,
     TexStorage3DEXT,
     TexStorage3DMultisampleOES,
diff --git a/src/libANGLE/renderer/gl/TextureGL.cpp b/src/libANGLE/renderer/gl/TextureGL.cpp
index 9b7dd94..1ea4573 100644
--- a/src/libANGLE/renderer/gl/TextureGL.cpp
+++ b/src/libANGLE/renderer/gl/TextureGL.cpp
@@ -1037,9 +1037,21 @@
     if (nativegl::UseTexImage2D(getType()))
     {
         ASSERT(size.depth == 1);
-        functions->texStorage2DMultisample(ToGLenum(type), samples, texStorageFormat.internalFormat,
-                                           size.width, size.height,
-                                           gl::ConvertToGLBoolean(fixedSampleLocations));
+        if (functions->texStorage2DMultisample)
+        {
+            functions->texStorage2DMultisample(
+                ToGLenum(type), samples, texStorageFormat.internalFormat, size.width, size.height,
+                gl::ConvertToGLBoolean(fixedSampleLocations));
+        }
+        else
+        {
+            // texImage2DMultisample is similar to texStorage2DMultisample of es 3.1 core feature,
+            // On macos and some old drivers which doesn't support OpenGL ES 3.1, the function can
+            // be supported by ARB_texture_multisample or OpenGL 3.2 core feature.
+            functions->texImage2DMultisample(
+                ToGLenum(type), samples, texStorageFormat.internalFormat, size.width, size.height,
+                gl::ConvertToGLBoolean(fixedSampleLocations));
+        }
     }
     else if (nativegl::UseTexImage3D(getType()))
     {
diff --git a/src/libANGLE/renderer/gl/renderergl_utils.cpp b/src/libANGLE/renderer/gl/renderergl_utils.cpp
index 42539be..71c105a 100644
--- a/src/libANGLE/renderer/gl/renderergl_utils.cpp
+++ b/src/libANGLE/renderer/gl/renderergl_utils.cpp
@@ -24,9 +24,9 @@
 #include "libANGLE/renderer/gl/WorkaroundsGL.h"
 #include "libANGLE/renderer/gl/formatutilsgl.h"
 
+#include <EGL/eglext.h>
 #include <algorithm>
 #include <sstream>
-#include <EGL/eglext.h>
 
 using angle::CheckedNumeric;
 
@@ -61,7 +61,8 @@
 namespace nativegl_gl
 {
 
-static bool MeetsRequirements(const FunctionsGL *functions, const nativegl::SupportRequirement &requirements)
+static bool MeetsRequirements(const FunctionsGL *functions,
+                              const nativegl::SupportRequirement &requirements)
 {
     bool hasRequiredExtensions = false;
     for (const std::vector<std::string> &exts : requirements.requiredExtensions)
@@ -114,9 +115,11 @@
 
     gl::TextureCaps textureCaps;
 
-    const nativegl::InternalFormat &formatInfo = nativegl::GetInternalFormatInfo(internalFormat, functions->standard);
+    const nativegl::InternalFormat &formatInfo =
+        nativegl::GetInternalFormatInfo(internalFormat, functions->standard);
     textureCaps.texturable = MeetsRequirements(functions, formatInfo.texture);
-    textureCaps.filterable = textureCaps.texturable && MeetsRequirements(functions, formatInfo.filter);
+    textureCaps.filterable =
+        textureCaps.texturable && MeetsRequirements(functions, formatInfo.filter);
     textureCaps.textureAttachment = MeetsRequirements(functions, formatInfo.textureAttachment);
     textureCaps.renderbuffer      = MeetsRequirements(functions, formatInfo.renderbuffer);
 
@@ -240,7 +243,9 @@
     return result[index];
 }
 
-static gl::TypePrecision QueryTypePrecision(const FunctionsGL *functions, GLenum shaderType, GLenum precisionType)
+static gl::TypePrecision QueryTypePrecision(const FunctionsGL *functions,
+                                            GLenum shaderType,
+                                            GLenum precisionType)
 {
     gl::TypePrecision precision;
     functions->getShaderPrecisionFormat(shaderType, precisionType, precision.range.data(),
@@ -288,7 +293,8 @@
     *maxSupportedESVersion = gl::Version(3, 1);
 
     // Table 6.28, implementation dependent values
-    if (functions->isAtLeastGL(gl::Version(4, 3)) || functions->hasGLExtension("GL_ARB_ES3_compatibility") ||
+    if (functions->isAtLeastGL(gl::Version(4, 3)) ||
+        functions->hasGLExtension("GL_ARB_ES3_compatibility") ||
         functions->isAtLeastGLES(gl::Version(3, 0)))
     {
         caps->maxElementIndex = QuerySingleGLInt64(functions, GL_MAX_ELEMENT_INDEX);
@@ -299,8 +305,8 @@
         caps->maxElementIndex = static_cast<GLint64>(std::numeric_limits<unsigned int>::max());
     }
 
-    if (functions->isAtLeastGL(gl::Version(1, 2)) ||
-        functions->isAtLeastGLES(gl::Version(3, 0)) || functions->hasGLESExtension("GL_OES_texture_3D"))
+    if (functions->isAtLeastGL(gl::Version(1, 2)) || functions->isAtLeastGLES(gl::Version(3, 0)) ||
+        functions->hasGLESExtension("GL_OES_texture_3D"))
     {
         caps->max3DTextureSize = QuerySingleGLInt(functions, GL_MAX_3D_TEXTURE_SIZE);
     }
@@ -310,10 +316,12 @@
         LimitVersion(maxSupportedESVersion, gl::Version(2, 0));
     }
 
-    caps->max2DTextureSize = QuerySingleGLInt(functions, GL_MAX_TEXTURE_SIZE); // GL 1.0 / ES 2.0
-    caps->maxCubeMapTextureSize = QuerySingleGLInt(functions, GL_MAX_CUBE_MAP_TEXTURE_SIZE); // GL 1.3 / ES 2.0
+    caps->max2DTextureSize = QuerySingleGLInt(functions, GL_MAX_TEXTURE_SIZE);  // GL 1.0 / ES 2.0
+    caps->maxCubeMapTextureSize =
+        QuerySingleGLInt(functions, GL_MAX_CUBE_MAP_TEXTURE_SIZE);  // GL 1.3 / ES 2.0
 
-    if (functions->isAtLeastGL(gl::Version(3, 0)) || functions->hasGLExtension("GL_EXT_texture_array") ||
+    if (functions->isAtLeastGL(gl::Version(3, 0)) ||
+        functions->hasGLExtension("GL_EXT_texture_array") ||
         functions->isAtLeastGLES(gl::Version(3, 0)))
     {
         caps->maxArrayTextureLayers = QuerySingleGLInt(functions, GL_MAX_ARRAY_TEXTURE_LAYERS);
@@ -324,7 +332,8 @@
         LimitVersion(maxSupportedESVersion, gl::Version(2, 0));
     }
 
-    if (functions->isAtLeastGL(gl::Version(1, 5)) || functions->hasGLExtension("GL_EXT_texture_lod_bias") ||
+    if (functions->isAtLeastGL(gl::Version(1, 5)) ||
+        functions->hasGLExtension("GL_EXT_texture_lod_bias") ||
         functions->isAtLeastGLES(gl::Version(3, 0)))
     {
         caps->maxLODBias = QuerySingleGLFloat(functions, GL_MAX_TEXTURE_LOD_BIAS);
@@ -334,7 +343,8 @@
         LimitVersion(maxSupportedESVersion, gl::Version(2, 0));
     }
 
-    if (functions->isAtLeastGL(gl::Version(3, 0)) || functions->hasGLExtension("GL_EXT_framebuffer_object") ||
+    if (functions->isAtLeastGL(gl::Version(3, 0)) ||
+        functions->hasGLExtension("GL_EXT_framebuffer_object") ||
         functions->isAtLeastGLES(gl::Version(2, 0)))
     {
         caps->maxRenderbufferSize = QuerySingleGLInt(functions, GL_MAX_RENDERBUFFER_SIZE);
@@ -346,8 +356,10 @@
         LimitVersion(maxSupportedESVersion, gl::Version(0, 0));
     }
 
-    if (functions->isAtLeastGL(gl::Version(2, 0)) || functions->hasGLExtension("ARB_draw_buffers") ||
-        functions->isAtLeastGLES(gl::Version(3, 0)) || functions->hasGLESExtension("GL_EXT_draw_buffers"))
+    if (functions->isAtLeastGL(gl::Version(2, 0)) ||
+        functions->hasGLExtension("ARB_draw_buffers") ||
+        functions->isAtLeastGLES(gl::Version(3, 0)) ||
+        functions->hasGLESExtension("GL_EXT_draw_buffers"))
     {
         caps->maxDrawBuffers = QuerySingleGLInt(functions, GL_MAX_DRAW_BUFFERS);
     }
@@ -359,8 +371,10 @@
         LimitVersion(maxSupportedESVersion, gl::Version(2, 0));
     }
 
-    caps->maxViewportWidth = QueryGLIntRange(functions, GL_MAX_VIEWPORT_DIMS, 0); // GL 1.0 / ES 2.0
-    caps->maxViewportHeight = QueryGLIntRange(functions, GL_MAX_VIEWPORT_DIMS, 1); // GL 1.0 / ES 2.0
+    caps->maxViewportWidth =
+        QueryGLIntRange(functions, GL_MAX_VIEWPORT_DIMS, 0);  // GL 1.0 / ES 2.0
+    caps->maxViewportHeight =
+        QueryGLIntRange(functions, GL_MAX_VIEWPORT_DIMS, 1);  // GL 1.0 / ES 2.0
 
     if (functions->standard == STANDARD_GL_DESKTOP &&
         (functions->profile & GL_CONTEXT_CORE_PROFILE_BIT) != 0)
@@ -378,14 +392,15 @@
         caps->maxAliasedPointSize = QueryGLFloatRange(functions, GL_ALIASED_POINT_SIZE_RANGE, 1);
     }
 
-    caps->minAliasedLineWidth = QueryGLFloatRange(functions, GL_ALIASED_LINE_WIDTH_RANGE, 0); // GL 1.2 / ES 2.0
-    caps->maxAliasedLineWidth = QueryGLFloatRange(functions, GL_ALIASED_LINE_WIDTH_RANGE, 1); // GL 1.2 / ES 2.0
+    caps->minAliasedLineWidth =
+        QueryGLFloatRange(functions, GL_ALIASED_LINE_WIDTH_RANGE, 0);  // GL 1.2 / ES 2.0
+    caps->maxAliasedLineWidth =
+        QueryGLFloatRange(functions, GL_ALIASED_LINE_WIDTH_RANGE, 1);  // GL 1.2 / ES 2.0
 
     // Table 6.29, implementation dependent values (cont.)
-    if (functions->isAtLeastGL(gl::Version(1, 2)) ||
-        functions->isAtLeastGLES(gl::Version(3, 0)))
+    if (functions->isAtLeastGL(gl::Version(1, 2)) || functions->isAtLeastGLES(gl::Version(3, 0)))
     {
-        caps->maxElementsIndices = QuerySingleGLInt(functions, GL_MAX_ELEMENTS_INDICES);
+        caps->maxElementsIndices  = QuerySingleGLInt(functions, GL_MAX_ELEMENTS_INDICES);
         caps->maxElementsVertices = QuerySingleGLInt(functions, GL_MAX_ELEMENTS_VERTICES);
     }
     else
@@ -411,22 +426,25 @@
         // Doesn't impact supported version
     }
 
-    // glGetShaderPrecisionFormat is not available until desktop GL version 4.1 or GL_ARB_ES2_compatibility exists
-    if (functions->isAtLeastGL(gl::Version(4, 1)) || functions->hasGLExtension("GL_ARB_ES2_compatibility") ||
+    // glGetShaderPrecisionFormat is not available until desktop GL version 4.1 or
+    // GL_ARB_ES2_compatibility exists
+    if (functions->isAtLeastGL(gl::Version(4, 1)) ||
+        functions->hasGLExtension("GL_ARB_ES2_compatibility") ||
         functions->isAtLeastGLES(gl::Version(2, 0)))
     {
-        caps->vertexHighpFloat = QueryTypePrecision(functions, GL_VERTEX_SHADER, GL_HIGH_FLOAT);
+        caps->vertexHighpFloat   = QueryTypePrecision(functions, GL_VERTEX_SHADER, GL_HIGH_FLOAT);
         caps->vertexMediumpFloat = QueryTypePrecision(functions, GL_VERTEX_SHADER, GL_MEDIUM_FLOAT);
-        caps->vertexLowpFloat = QueryTypePrecision(functions, GL_VERTEX_SHADER, GL_LOW_FLOAT);
+        caps->vertexLowpFloat    = QueryTypePrecision(functions, GL_VERTEX_SHADER, GL_LOW_FLOAT);
         caps->fragmentHighpFloat = QueryTypePrecision(functions, GL_FRAGMENT_SHADER, GL_HIGH_FLOAT);
-        caps->fragmentMediumpFloat = QueryTypePrecision(functions, GL_FRAGMENT_SHADER, GL_MEDIUM_FLOAT);
-        caps->fragmentLowpFloat = QueryTypePrecision(functions, GL_FRAGMENT_SHADER, GL_LOW_FLOAT);
-        caps->vertexHighpInt = QueryTypePrecision(functions, GL_VERTEX_SHADER, GL_HIGH_INT);
-        caps->vertexMediumpInt = QueryTypePrecision(functions, GL_VERTEX_SHADER, GL_MEDIUM_INT);
-        caps->vertexLowpInt = QueryTypePrecision(functions, GL_VERTEX_SHADER, GL_LOW_INT);
-        caps->fragmentHighpInt = QueryTypePrecision(functions, GL_FRAGMENT_SHADER, GL_HIGH_INT);
+        caps->fragmentMediumpFloat =
+            QueryTypePrecision(functions, GL_FRAGMENT_SHADER, GL_MEDIUM_FLOAT);
+        caps->fragmentLowpFloat  = QueryTypePrecision(functions, GL_FRAGMENT_SHADER, GL_LOW_FLOAT);
+        caps->vertexHighpInt     = QueryTypePrecision(functions, GL_VERTEX_SHADER, GL_HIGH_INT);
+        caps->vertexMediumpInt   = QueryTypePrecision(functions, GL_VERTEX_SHADER, GL_MEDIUM_INT);
+        caps->vertexLowpInt      = QueryTypePrecision(functions, GL_VERTEX_SHADER, GL_LOW_INT);
+        caps->fragmentHighpInt   = QueryTypePrecision(functions, GL_FRAGMENT_SHADER, GL_HIGH_INT);
         caps->fragmentMediumpInt = QueryTypePrecision(functions, GL_FRAGMENT_SHADER, GL_MEDIUM_INT);
-        caps->fragmentLowpInt = QueryTypePrecision(functions, GL_FRAGMENT_SHADER, GL_LOW_INT);
+        caps->fragmentLowpInt    = QueryTypePrecision(functions, GL_FRAGMENT_SHADER, GL_LOW_INT);
     }
     else
     {
@@ -456,8 +474,7 @@
     }
 
     // Table 6.31, implementation dependent vertex shader limits
-    if (functions->isAtLeastGL(gl::Version(2, 0)) ||
-        functions->isAtLeastGLES(gl::Version(2, 0)))
+    if (functions->isAtLeastGL(gl::Version(2, 0)) || functions->isAtLeastGLES(gl::Version(2, 0)))
     {
         caps->maxVertexAttributes = QuerySingleGLInt(functions, GL_MAX_VERTEX_ATTRIBS);
         caps->maxShaderUniformComponents[gl::ShaderType::Vertex] =
@@ -471,7 +488,8 @@
         LimitVersion(maxSupportedESVersion, gl::Version(0, 0));
     }
 
-    if (functions->isAtLeastGL(gl::Version(4, 1)) || functions->hasGLExtension("GL_ARB_ES2_compatibility") ||
+    if (functions->isAtLeastGL(gl::Version(4, 1)) ||
+        functions->hasGLExtension("GL_ARB_ES2_compatibility") ||
         functions->isAtLeastGLES(gl::Version(2, 0)))
     {
         caps->maxVertexUniformVectors = QuerySingleGLInt(functions, GL_MAX_VERTEX_UNIFORM_VECTORS);
@@ -488,21 +506,20 @@
             caps->maxShaderUniformComponents[gl::ShaderType::Fragment] / 4;
     }
 
-    if (functions->isAtLeastGL(gl::Version(3, 2)) ||
-        functions->isAtLeastGLES(gl::Version(3, 0)))
+    if (functions->isAtLeastGL(gl::Version(3, 2)) || functions->isAtLeastGLES(gl::Version(3, 0)))
     {
-        caps->maxVertexOutputComponents = QuerySingleGLInt(functions, GL_MAX_VERTEX_OUTPUT_COMPONENTS);
+        caps->maxVertexOutputComponents =
+            QuerySingleGLInt(functions, GL_MAX_VERTEX_OUTPUT_COMPONENTS);
     }
     else
     {
-        // There doesn't seem, to be a desktop extension to add this cap, maybe it could be given a safe limit
-        // instead of limiting the supported ES version.
+        // There doesn't seem, to be a desktop extension to add this cap, maybe it could be given a
+        // safe limit instead of limiting the supported ES version.
         LimitVersion(maxSupportedESVersion, gl::Version(2, 0));
     }
 
     // Table 6.32, implementation dependent fragment shader limits
-    if (functions->isAtLeastGL(gl::Version(2, 0)) ||
-        functions->isAtLeastGLES(gl::Version(2, 0)))
+    if (functions->isAtLeastGL(gl::Version(2, 0)) || functions->isAtLeastGLES(gl::Version(2, 0)))
     {
         caps->maxShaderUniformComponents[gl::ShaderType::Fragment] =
             QuerySingleGLInt(functions, GL_MAX_FRAGMENT_UNIFORM_COMPONENTS);
@@ -515,20 +532,19 @@
         LimitVersion(maxSupportedESVersion, gl::Version(0, 0));
     }
 
-    if (functions->isAtLeastGL(gl::Version(3, 2)) ||
-        functions->isAtLeastGLES(gl::Version(3, 0)))
+    if (functions->isAtLeastGL(gl::Version(3, 2)) || functions->isAtLeastGLES(gl::Version(3, 0)))
     {
-        caps->maxFragmentInputComponents = QuerySingleGLInt(functions, GL_MAX_FRAGMENT_INPUT_COMPONENTS);
+        caps->maxFragmentInputComponents =
+            QuerySingleGLInt(functions, GL_MAX_FRAGMENT_INPUT_COMPONENTS);
     }
     else
     {
-        // There doesn't seem, to be a desktop extension to add this cap, maybe it could be given a safe limit
-        // instead of limiting the supported ES version.
+        // There doesn't seem, to be a desktop extension to add this cap, maybe it could be given a
+        // safe limit instead of limiting the supported ES version.
         LimitVersion(maxSupportedESVersion, gl::Version(2, 0));
     }
 
-    if (functions->isAtLeastGL(gl::Version(3, 0)) ||
-        functions->isAtLeastGLES(gl::Version(3, 0)))
+    if (functions->isAtLeastGL(gl::Version(3, 0)) || functions->isAtLeastGLES(gl::Version(3, 0)))
     {
         caps->minProgramTexelOffset = QuerySingleGLInt(functions, GL_MIN_PROGRAM_TEXEL_OFFSET);
         caps->maxProgramTexelOffset = QuerySingleGLInt(functions, GL_MAX_PROGRAM_TEXEL_OFFSET);
@@ -540,16 +556,19 @@
     }
 
     // Table 6.33, implementation dependent aggregate shader limits
-    if (functions->isAtLeastGL(gl::Version(3, 1)) || functions->hasGLExtension("GL_ARB_uniform_buffer_object") ||
+    if (functions->isAtLeastGL(gl::Version(3, 1)) ||
+        functions->hasGLExtension("GL_ARB_uniform_buffer_object") ||
         functions->isAtLeastGLES(gl::Version(3, 0)))
     {
         caps->maxShaderUniformBlocks[gl::ShaderType::Vertex] =
             QuerySingleGLInt(functions, GL_MAX_VERTEX_UNIFORM_BLOCKS);
         caps->maxShaderUniformBlocks[gl::ShaderType::Fragment] =
             QuerySingleGLInt(functions, GL_MAX_FRAGMENT_UNIFORM_BLOCKS);
-        caps->maxUniformBufferBindings = QuerySingleGLInt(functions, GL_MAX_UNIFORM_BUFFER_BINDINGS);
+        caps->maxUniformBufferBindings =
+            QuerySingleGLInt(functions, GL_MAX_UNIFORM_BUFFER_BINDINGS);
         caps->maxUniformBlockSize = QuerySingleGLInt64(functions, GL_MAX_UNIFORM_BLOCK_SIZE);
-        caps->uniformBufferOffsetAlignment = QuerySingleGLInt(functions, GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT);
+        caps->uniformBufferOffsetAlignment =
+            QuerySingleGLInt(functions, GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT);
 
         GLuint maxCombinedUniformBlocks =
             QuerySingleGLInt(functions, GL_MAX_COMBINED_UNIFORM_BLOCKS);
@@ -591,7 +610,8 @@
         LimitVersion(maxSupportedESVersion, gl::Version(0, 0));
     }
 
-    if (functions->isAtLeastGL(gl::Version(4, 1)) || functions->hasGLExtension("GL_ARB_ES2_compatibility") ||
+    if (functions->isAtLeastGL(gl::Version(4, 1)) ||
+        functions->hasGLExtension("GL_ARB_ES2_compatibility") ||
         functions->isAtLeastGLES(gl::Version(2, 0)))
     {
         caps->maxVaryingVectors = QuerySingleGLInt(functions, GL_MAX_VARYING_VECTORS);
@@ -603,7 +623,8 @@
     }
 
     // Determine the max combined texture image units by adding the vertex and fragment limits.  If
-    // the real cap is queried, it would contain the limits for shader types that are not available to ES.
+    // the real cap is queried, it would contain the limits for shader types that are not available
+    // to ES.
     caps->maxCombinedTextureImageUnits = caps->maxShaderTextureImageUnits[gl::ShaderType::Vertex] +
                                          caps->maxShaderTextureImageUnits[gl::ShaderType::Fragment];
 
@@ -612,9 +633,12 @@
         functions->hasGLExtension("GL_ARB_transform_feedback2") ||
         functions->isAtLeastGLES(gl::Version(3, 0)))
     {
-        caps->maxTransformFeedbackInterleavedComponents = QuerySingleGLInt(functions, GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS);
-        caps->maxTransformFeedbackSeparateAttributes = QuerySingleGLInt(functions, GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS);
-        caps->maxTransformFeedbackSeparateComponents = QuerySingleGLInt(functions, GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS);
+        caps->maxTransformFeedbackInterleavedComponents =
+            QuerySingleGLInt(functions, GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS);
+        caps->maxTransformFeedbackSeparateAttributes =
+            QuerySingleGLInt(functions, GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS);
+        caps->maxTransformFeedbackSeparateComponents =
+            QuerySingleGLInt(functions, GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS);
     }
     else
     {
@@ -623,8 +647,10 @@
     }
 
     // Table 6.35, Framebuffer Dependent Values
-    if (functions->isAtLeastGL(gl::Version(3, 0)) || functions->hasGLExtension("GL_EXT_framebuffer_multisample") ||
-        functions->isAtLeastGLES(gl::Version(3, 0)) || functions->hasGLESExtension("GL_EXT_multisampled_render_to_texture"))
+    if (functions->isAtLeastGL(gl::Version(3, 0)) ||
+        functions->hasGLExtension("GL_EXT_framebuffer_multisample") ||
+        functions->isAtLeastGLES(gl::Version(3, 0)) ||
+        functions->hasGLESExtension("GL_EXT_multisampled_render_to_texture"))
     {
         caps->maxSamples = QuerySingleGLInt(functions, GL_MAX_SAMPLES);
     }
@@ -885,30 +911,43 @@
     // Extension support
     extensions->setTextureExtensionSupport(*textureCapsMap);
     extensions->elementIndexUint = functions->standard == STANDARD_GL_DESKTOP ||
-                                   functions->isAtLeastGLES(gl::Version(3, 0)) || functions->hasGLESExtension("GL_OES_element_index_uint");
+                                   functions->isAtLeastGLES(gl::Version(3, 0)) ||
+                                   functions->hasGLESExtension("GL_OES_element_index_uint");
     extensions->getProgramBinary = caps->programBinaryFormats.size() > 0;
-    extensions->readFormatBGRA = functions->isAtLeastGL(gl::Version(1, 2)) || functions->hasGLExtension("GL_EXT_bgra") ||
+    extensions->readFormatBGRA   = functions->isAtLeastGL(gl::Version(1, 2)) ||
+                                 functions->hasGLExtension("GL_EXT_bgra") ||
                                  functions->hasGLESExtension("GL_EXT_read_format_bgra");
     extensions->mapBuffer = functions->isAtLeastGL(gl::Version(1, 5)) ||
                             functions->isAtLeastGLES(gl::Version(3, 0)) ||
                             functions->hasGLESExtension("GL_OES_mapbuffer");
-    extensions->mapBufferRange = functions->isAtLeastGL(gl::Version(3, 0)) || functions->hasGLExtension("GL_ARB_map_buffer_range") ||
-                                 functions->isAtLeastGLES(gl::Version(3, 0)) || functions->hasGLESExtension("GL_EXT_map_buffer_range");
+    extensions->mapBufferRange = functions->isAtLeastGL(gl::Version(3, 0)) ||
+                                 functions->hasGLExtension("GL_ARB_map_buffer_range") ||
+                                 functions->isAtLeastGLES(gl::Version(3, 0)) ||
+                                 functions->hasGLESExtension("GL_EXT_map_buffer_range");
     extensions->textureNPOT = functions->standard == STANDARD_GL_DESKTOP ||
-                              functions->isAtLeastGLES(gl::Version(3, 0)) || functions->hasGLESExtension("GL_OES_texture_npot");
+                              functions->isAtLeastGLES(gl::Version(3, 0)) ||
+                              functions->hasGLESExtension("GL_OES_texture_npot");
     // TODO(jmadill): Investigate emulating EXT_draw_buffers on ES 3.0's core functionality.
     extensions->drawBuffers = functions->isAtLeastGL(gl::Version(2, 0)) ||
                               functions->hasGLExtension("ARB_draw_buffers") ||
                               functions->hasGLESExtension("GL_EXT_draw_buffers");
     extensions->textureStorage = functions->standard == STANDARD_GL_DESKTOP ||
                                  functions->hasGLESExtension("GL_EXT_texture_storage");
-    extensions->textureFilterAnisotropic = functions->hasGLExtension("GL_EXT_texture_filter_anisotropic") || functions->hasGLESExtension("GL_EXT_texture_filter_anisotropic");
-    extensions->occlusionQueryBoolean    = nativegl::SupportsOcclusionQueries(functions);
-    extensions->maxTextureAnisotropy = extensions->textureFilterAnisotropic ? QuerySingleGLFloat(functions, GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT) : 0.0f;
-    extensions->fence = functions->hasGLExtension("GL_NV_fence") || functions->hasGLESExtension("GL_NV_fence");
-    extensions->blendMinMax = functions->isAtLeastGL(gl::Version(1, 5)) || functions->hasGLExtension("GL_EXT_blend_minmax") ||
-                              functions->isAtLeastGLES(gl::Version(3, 0)) || functions->hasGLESExtension("GL_EXT_blend_minmax");
-    extensions->framebufferBlit = (functions->blitFramebuffer != nullptr);
+    extensions->textureFilterAnisotropic =
+        functions->hasGLExtension("GL_EXT_texture_filter_anisotropic") ||
+        functions->hasGLESExtension("GL_EXT_texture_filter_anisotropic");
+    extensions->occlusionQueryBoolean = nativegl::SupportsOcclusionQueries(functions);
+    extensions->maxTextureAnisotropy =
+        extensions->textureFilterAnisotropic
+            ? QuerySingleGLFloat(functions, GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT)
+            : 0.0f;
+    extensions->fence =
+        functions->hasGLExtension("GL_NV_fence") || functions->hasGLESExtension("GL_NV_fence");
+    extensions->blendMinMax = functions->isAtLeastGL(gl::Version(1, 5)) ||
+                              functions->hasGLExtension("GL_EXT_blend_minmax") ||
+                              functions->isAtLeastGLES(gl::Version(3, 0)) ||
+                              functions->hasGLESExtension("GL_EXT_blend_minmax");
+    extensions->framebufferBlit        = (functions->blitFramebuffer != nullptr);
     extensions->framebufferMultisample = caps->maxSamples > 0;
     extensions->standardDerivatives    = functions->isAtLeastGL(gl::Version(2, 0)) ||
                                       functions->hasGLExtension("GL_ARB_fragment_shader") ||
@@ -925,15 +964,17 @@
         // GL_MAX_ARRAY_TEXTURE_LAYERS is guaranteed to be at least 256.
         const int maxLayers = QuerySingleGLInt(functions, GL_MAX_ARRAY_TEXTURE_LAYERS);
         // GL_MAX_VIEWPORTS is guaranteed to be at least 16.
-        const int maxViewports       = QuerySingleGLInt(functions, GL_MAX_VIEWPORTS);
-        extensions->maxViews         = static_cast<GLuint>(
+        const int maxViewports = QuerySingleGLInt(functions, GL_MAX_VIEWPORTS);
+        extensions->maxViews   = static_cast<GLuint>(
             std::min(static_cast<int>(gl::IMPLEMENTATION_ANGLE_MULTIVIEW_MAX_VIEWS),
                      std::min(maxLayers, maxViewports)));
         *multiviewImplementationType = MultiviewImplementationTypeGL::NV_VIEWPORT_ARRAY2;
     }
 
-    extensions->fboRenderMipmap = functions->isAtLeastGL(gl::Version(3, 0)) || functions->hasGLExtension("GL_EXT_framebuffer_object") ||
-                                  functions->isAtLeastGLES(gl::Version(3, 0)) || functions->hasGLESExtension("GL_OES_fbo_render_mipmap");
+    extensions->fboRenderMipmap = functions->isAtLeastGL(gl::Version(3, 0)) ||
+                                  functions->hasGLExtension("GL_EXT_framebuffer_object") ||
+                                  functions->isAtLeastGLES(gl::Version(3, 0)) ||
+                                  functions->hasGLESExtension("GL_OES_fbo_render_mipmap");
     extensions->instancedArrays = functions->isAtLeastGL(gl::Version(3, 1)) ||
                                   (functions->hasGLExtension("GL_ARB_instanced_arrays") &&
                                    (functions->hasGLExtension("GL_ARB_draw_instanced") ||
@@ -976,7 +1017,8 @@
     // the EXT_multisample_compatibility is written against ES3.1 but can apply
     // to earlier versions so therefore we're only checking for the extension string
     // and not the specific GLES version.
-    extensions->multisampleCompatibility = functions->isAtLeastGL(gl::Version(1, 3)) ||
+    extensions->multisampleCompatibility =
+        functions->isAtLeastGL(gl::Version(1, 3)) ||
         functions->hasGLESExtension("GL_EXT_multisample_compatibility");
 
     extensions->framebufferMixedSamples =
@@ -1006,6 +1048,9 @@
     extensions->multiviewMultisample =
         extensions->textureStorageMultisample2DArray && extensions->multiview;
 
+    extensions->textureMultisample = functions->isAtLeastGL(gl::Version(3, 2)) ||
+                                     functions->hasGLExtension("GL_ARB_texture_multisample");
+
     // NV_path_rendering
     // We also need interface query which is available in
     // >= 4.3 core or ARB_interface_query or >= GLES 3.1
@@ -1014,9 +1059,8 @@
         (functions->hasGLExtension("GL_ARB_program_interface_query") ||
          functions->isAtLeastGL(gl::Version(4, 3)));
 
-    const bool canEnableESPathRendering =
-        functions->hasGLESExtension("GL_NV_path_rendering") &&
-        functions->isAtLeastGLES(gl::Version(3, 1));
+    const bool canEnableESPathRendering = functions->hasGLESExtension("GL_NV_path_rendering") &&
+                                          functions->isAtLeastGLES(gl::Version(3, 1));
 
     extensions->pathRendering = canEnableGLPathRendering || canEnableESPathRendering;
 
@@ -1177,7 +1221,7 @@
 #endif
 
 #if defined(ANGLE_PLATFORM_APPLE)
-    workarounds->doWhileGLSLCausesGPUHang = true;
+    workarounds->doWhileGLSLCausesGPUHang                  = true;
     workarounds->useUnusedBlocksWithStandardOrSharedLayout = true;
     workarounds->rewriteFloatUnaryMinusOperator            = IsIntel(vendor);
 #endif
diff --git a/src/libANGLE/validationES.cpp b/src/libANGLE/validationES.cpp
index 9625028..37c424d 100644
--- a/src/libANGLE/validationES.cpp
+++ b/src/libANGLE/validationES.cpp
@@ -510,7 +510,8 @@
             return (context->getClientMajorVersion() >= 3);
 
         case TextureType::_2DMultisample:
-            return (context->getClientVersion() >= Version(3, 1));
+            return (context->getClientVersion() >= Version(3, 1) ||
+                    context->getExtensions().textureMultisample);
         case TextureType::_2DMultisampleArray:
             return context->getExtensions().textureStorageMultisample2DArray;
 
@@ -6412,9 +6413,11 @@
             break;
 
         case GL_TEXTURE_2D_MULTISAMPLE:
-            if (context->getClientVersion() < ES_3_1)
+            if (context->getClientVersion() < ES_3_1 &&
+                !context->getExtensions().textureMultisample)
             {
-                ANGLE_VALIDATION_ERR(context, InvalidEnum(), TextureTargetRequiresES31);
+                ANGLE_VALIDATION_ERR(context, InvalidEnum(),
+                                     MultisampleTextureExtensionOrES31Required);
                 return false;
             }
             break;
@@ -6539,4 +6542,25 @@
     return true;
 }
 
+bool ValidateTexStorage2DMultisampleBase(Context *context,
+                                         TextureType target,
+                                         GLsizei samples,
+                                         GLint internalFormat,
+                                         GLsizei width,
+                                         GLsizei height)
+{
+    if (target != TextureType::_2DMultisample)
+    {
+        ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidTarget);
+        return false;
+    }
+
+    if (width < 1 || height < 1)
+    {
+        ANGLE_VALIDATION_ERR(context, InvalidValue(), NegativeSize);
+        return false;
+    }
+
+    return ValidateTexStorageMultisample(context, target, samples, internalFormat, width, height);
+}
 }  // namespace gl
diff --git a/src/libANGLE/validationES.h b/src/libANGLE/validationES.h
index 28b0f6b..b6d9c2b 100644
--- a/src/libANGLE/validationES.h
+++ b/src/libANGLE/validationES.h
@@ -705,6 +705,13 @@
                                    GLsizei width,
                                    GLsizei height);
 
+bool ValidateTexStorage2DMultisampleBase(Context *context,
+                                         TextureType target,
+                                         GLsizei samples,
+                                         GLint internalFormat,
+                                         GLsizei width,
+                                         GLsizei height);
+
 // Utility macro for handling implementation methods inside Validation.
 #define ANGLE_HANDLE_VALIDATION_ERR(X) \
     context->handleError(X);           \
diff --git a/src/libANGLE/validationES2.cpp b/src/libANGLE/validationES2.cpp
index 2bcfd24..8db6a85 100644
--- a/src/libANGLE/validationES2.cpp
+++ b/src/libANGLE/validationES2.cpp
@@ -1133,8 +1133,9 @@
             break;
 
         case TextureType::_2DMultisample:
-            ASSERT(context->getClientVersion() < Version(3, 1));
-            ANGLE_VALIDATION_ERR(context, InvalidEnum(), ES31Required);
+            ASSERT(context->getClientVersion() < Version(3, 1) &&
+                   !context->getExtensions().textureMultisample);
+            ANGLE_VALIDATION_ERR(context, InvalidEnum(), MultisampleTextureExtensionOrES31Required);
             break;
 
         case TextureType::_2DMultisampleArray:
@@ -6035,9 +6036,11 @@
 
             case TextureTarget::_2DMultisample:
             {
-                if (context->getClientVersion() < ES_3_1)
+                if (context->getClientVersion() < ES_3_1 &&
+                    !context->getExtensions().textureMultisample)
                 {
-                    ANGLE_VALIDATION_ERR(context, InvalidOperation(), ES31Required);
+                    ANGLE_VALIDATION_ERR(context, InvalidOperation(),
+                                         MultisampleTextureExtensionOrES31Required);
                     return false;
                 }
 
diff --git a/src/libANGLE/validationES3.cpp b/src/libANGLE/validationES3.cpp
index eb12b87..cd2a286 100644
--- a/src/libANGLE/validationES3.cpp
+++ b/src/libANGLE/validationES3.cpp
@@ -4149,4 +4149,23 @@
     return true;
 }
 
+bool ValidateTexStorage2DMultisampleANGLE(Context *context,
+                                          TextureType target,
+                                          GLsizei samples,
+                                          GLint internalFormat,
+                                          GLsizei width,
+                                          GLsizei height,
+                                          GLboolean fixedSampleLocations)
+{
+    if (!context->getExtensions().textureMultisample)
+    {
+        ANGLE_VALIDATION_ERR(context, InvalidOperation(),
+                             MultisampleTextureExtensionOrES31Required);
+        return false;
+    }
+
+    return ValidateTexStorage2DMultisampleBase(context, target, samples, internalFormat, width,
+                                               height);
+}
+
 }  // namespace gl
diff --git a/src/libANGLE/validationES3.h b/src/libANGLE/validationES3.h
index e1a16d8..5f72e24 100644
--- a/src/libANGLE/validationES3.h
+++ b/src/libANGLE/validationES3.h
@@ -633,6 +633,13 @@
                                      const char *name);
 bool ValidateGetFragDataIndexEXT(Context *context, GLuint program, const char *name);
 
+bool ValidateTexStorage2DMultisampleANGLE(Context *context,
+                                          TextureType target,
+                                          GLsizei samples,
+                                          GLint internalFormat,
+                                          GLsizei width,
+                                          GLsizei height,
+                                          GLboolean fixedSampleLocations);
 }  // namespace gl
 
 #endif  // LIBANGLE_VALIDATION_ES3_H_
diff --git a/src/libANGLE/validationES31.cpp b/src/libANGLE/validationES31.cpp
index 96549c0..cd386ad 100644
--- a/src/libANGLE/validationES31.cpp
+++ b/src/libANGLE/validationES31.cpp
@@ -1030,19 +1030,8 @@
         return false;
     }
 
-    if (target != TextureType::_2DMultisample)
-    {
-        context->handleError(InvalidEnum() << "Target must be TEXTURE_2D_MULTISAMPLE.");
-        return false;
-    }
-
-    if (width < 1 || height < 1)
-    {
-        ANGLE_VALIDATION_ERR(context, InvalidValue(), NegativeSize);
-        return false;
-    }
-
-    return ValidateTexStorageMultisample(context, target, samples, internalFormat, width, height);
+    return ValidateTexStorage2DMultisampleBase(context, target, samples, internalFormat, width,
+                                               height);
 }
 
 bool ValidateGetMultisamplefv(Context *context, GLenum pname, GLuint index, GLfloat *val)
diff --git a/src/libGLESv2/entry_points_gles_ext_autogen.cpp b/src/libGLESv2/entry_points_gles_ext_autogen.cpp
index 16f7fcb..bbc6bf9 100644
--- a/src/libGLESv2/entry_points_gles_ext_autogen.cpp
+++ b/src/libGLESv2/entry_points_gles_ext_autogen.cpp
@@ -2095,6 +2095,37 @@
     }
 }
 
+// GL_ANGLE_texture_multisample
+void GL_APIENTRY TexStorage2DMultisampleANGLE(GLenum target,
+                                              GLsizei samples,
+                                              GLenum internalformat,
+                                              GLsizei width,
+                                              GLsizei height,
+                                              GLboolean fixedsamplelocations)
+{
+    ANGLE_SCOPED_GLOBAL_LOCK();
+    EVENT(
+        "(GLenum target = 0x%X, GLsizei samples = %d, GLenum internalformat = 0x%X, GLsizei width "
+        "= %d, GLsizei height = %d, GLboolean fixedsamplelocations = %u)",
+        target, samples, internalformat, width, height, fixedsamplelocations);
+
+    Context *context = GetValidGlobalContext();
+    if (context)
+    {
+        TextureType targetPacked = FromGLenum<TextureType>(target);
+        context->gatherParams<EntryPoint::TexStorage2DMultisampleANGLE>(
+            targetPacked, samples, internalformat, width, height, fixedsamplelocations);
+
+        if (context->skipValidation() ||
+            ValidateTexStorage2DMultisampleANGLE(context, targetPacked, samples, internalformat,
+                                                 width, height, fixedsamplelocations))
+        {
+            context->texStorage2DMultisample(targetPacked, samples, internalformat, width, height,
+                                             fixedsamplelocations);
+        }
+    }
+}
+
 // GL_ANGLE_translated_shader_source
 void GL_APIENTRY GetTranslatedShaderSourceANGLE(GLuint shader,
                                                 GLsizei bufsize,
@@ -19027,4 +19058,36 @@
         }
     }
 }
+
+void GL_APIENTRY TexStorage2DMultisampleANGLEContextANGLE(GLeglContext ctx,
+                                                          GLenum target,
+                                                          GLsizei samples,
+                                                          GLenum internalformat,
+                                                          GLsizei width,
+                                                          GLsizei height,
+                                                          GLboolean fixedsamplelocations)
+{
+    ANGLE_SCOPED_GLOBAL_LOCK();
+    EVENT(
+        "(GLenum target = 0x%X, GLsizei samples = %d, GLenum internalformat = 0x%X, GLsizei width "
+        "= %d, GLsizei height = %d, GLboolean fixedsamplelocations = %u)",
+        target, samples, internalformat, width, height, fixedsamplelocations);
+
+    Context *context = static_cast<gl::Context *>(ctx);
+    if (context)
+    {
+        ASSERT(context == GetValidGlobalContext());
+        TextureType targetPacked = FromGLenum<TextureType>(target);
+        context->gatherParams<EntryPoint::TexStorage2DMultisampleANGLE>(
+            targetPacked, samples, internalformat, width, height, fixedsamplelocations);
+
+        if (context->skipValidation() ||
+            ValidateTexStorage2DMultisampleANGLE(context, targetPacked, samples, internalformat,
+                                                 width, height, fixedsamplelocations))
+        {
+            context->texStorage2DMultisample(targetPacked, samples, internalformat, width, height,
+                                             fixedsamplelocations);
+        }
+    }
+}
 }  // namespace gl
diff --git a/src/libGLESv2/entry_points_gles_ext_autogen.h b/src/libGLESv2/entry_points_gles_ext_autogen.h
index 3b828f4..061bd0a 100644
--- a/src/libGLESv2/entry_points_gles_ext_autogen.h
+++ b/src/libGLESv2/entry_points_gles_ext_autogen.h
@@ -466,6 +466,14 @@
                                                              GLsizei *length,
                                                              GLuint64 *params);
 
+// GL_ANGLE_texture_multisample
+ANGLE_EXPORT void GL_APIENTRY TexStorage2DMultisampleANGLE(GLenum target,
+                                                           GLsizei samples,
+                                                           GLenum internalformat,
+                                                           GLsizei width,
+                                                           GLsizei height,
+                                                           GLboolean fixedsamplelocations);
+
 // GL_ANGLE_translated_shader_source
 ANGLE_EXPORT void GL_APIENTRY GetTranslatedShaderSourceANGLE(GLuint shader,
                                                              GLsizei bufsize,
@@ -3378,6 +3386,14 @@
                                                                 GLboolean unpackFlipY,
                                                                 GLboolean unpackPremultiplyAlpha,
                                                                 GLboolean unpackUnmultiplyAlpha);
+ANGLE_EXPORT void GL_APIENTRY
+TexStorage2DMultisampleANGLEContextANGLE(GLeglContext ctx,
+                                         GLenum target,
+                                         GLsizei samples,
+                                         GLenum internalformat,
+                                         GLsizei width,
+                                         GLsizei height,
+                                         GLboolean fixedsamplelocations);
 }  // namespace gl
 
 #endif  // LIBGLESV2_ENTRY_POINTS_GLES_EXT_AUTOGEN_H_
diff --git a/src/libGLESv2/libGLESv2_autogen.cpp b/src/libGLESv2/libGLESv2_autogen.cpp
index 763db14..0c7a73a 100644
--- a/src/libGLESv2/libGLESv2_autogen.cpp
+++ b/src/libGLESv2/libGLESv2_autogen.cpp
@@ -3176,6 +3176,18 @@
     return gl::GetQueryObjectui64vRobustANGLE(id, pname, bufSize, length, params);
 }
 
+// GL_ANGLE_texture_multisample
+void GL_APIENTRY glTexStorage2DMultisampleANGLE(GLenum target,
+                                                GLsizei samples,
+                                                GLenum internalformat,
+                                                GLsizei width,
+                                                GLsizei height,
+                                                GLboolean fixedsamplelocations)
+{
+    return gl::TexStorage2DMultisampleANGLE(target, samples, internalformat, width, height,
+                                            fixedsamplelocations);
+}
+
 // GL_ANGLE_translated_shader_source
 void GL_APIENTRY glGetTranslatedShaderSourceANGLE(GLuint shader,
                                                   GLsizei bufsize,
@@ -8892,4 +8904,16 @@
         z, width, height, depth, unpackFlipY, unpackPremultiplyAlpha, unpackUnmultiplyAlpha);
 }
 
+void GL_APIENTRY glTexStorage2DMultisampleANGLEContextANGLE(GLeglContext ctx,
+                                                            GLenum target,
+                                                            GLsizei samples,
+                                                            GLenum internalformat,
+                                                            GLsizei width,
+                                                            GLsizei height,
+                                                            GLboolean fixedsamplelocations)
+{
+    return gl::TexStorage2DMultisampleANGLEContextANGLE(ctx, target, samples, internalformat, width,
+                                                        height, fixedsamplelocations);
+}
+
 }  // extern "C"
diff --git a/src/libGLESv2/libGLESv2_autogen.def b/src/libGLESv2/libGLESv2_autogen.def
index 45a1be4..537e1c2 100644
--- a/src/libGLESv2/libGLESv2_autogen.def
+++ b/src/libGLESv2/libGLESv2_autogen.def
@@ -503,798 +503,802 @@
     glGetQueryObjecti64vRobustANGLE                   @473
     glGetQueryObjectui64vRobustANGLE                  @474
 
+    ; GL_ANGLE_texture_multisample
+    glTexStorage2DMultisampleANGLE                    @475
+
     ; GL_ANGLE_translated_shader_source
-    glGetTranslatedShaderSourceANGLE                  @475
+    glGetTranslatedShaderSourceANGLE                  @476
 
     ; GL_CHROMIUM_bind_uniform_location
-    glBindUniformLocationCHROMIUM                     @476
+    glBindUniformLocationCHROMIUM                     @477
 
     ; GL_CHROMIUM_copy_compressed_texture
-    glCompressedCopyTextureCHROMIUM                   @477
+    glCompressedCopyTextureCHROMIUM                   @478
 
     ; GL_CHROMIUM_copy_texture
-    glCopyTextureCHROMIUM                             @478
-    glCopySubTextureCHROMIUM                          @479
+    glCopyTextureCHROMIUM                             @479
+    glCopySubTextureCHROMIUM                          @480
 
     ; GL_CHROMIUM_framebuffer_mixed_samples
-    glCoverageModulationCHROMIUM                      @480
-    glMatrixLoadfCHROMIUM                             @481
-    glMatrixLoadIdentityCHROMIUM                      @482
+    glCoverageModulationCHROMIUM                      @481
+    glMatrixLoadfCHROMIUM                             @482
+    glMatrixLoadIdentityCHROMIUM                      @483
 
     ; GL_CHROMIUM_path_rendering
-    glGenPathsCHROMIUM                                @483
-    glDeletePathsCHROMIUM                             @484
-    glIsPathCHROMIUM                                  @485
-    glPathCommandsCHROMIUM                            @486
-    glPathParameterfCHROMIUM                          @487
-    glPathParameteriCHROMIUM                          @488
-    glGetPathParameterfvCHROMIUM                      @489
-    glGetPathParameterivCHROMIUM                      @490
-    glPathStencilFuncCHROMIUM                         @491
-    glStencilFillPathCHROMIUM                         @492
-    glStencilStrokePathCHROMIUM                       @493
-    glCoverFillPathCHROMIUM                           @494
-    glCoverStrokePathCHROMIUM                         @495
-    glStencilThenCoverFillPathCHROMIUM                @496
-    glStencilThenCoverStrokePathCHROMIUM              @497
-    glCoverFillPathInstancedCHROMIUM                  @498
-    glCoverStrokePathInstancedCHROMIUM                @499
-    glStencilStrokePathInstancedCHROMIUM              @500
-    glStencilFillPathInstancedCHROMIUM                @501
-    glStencilThenCoverFillPathInstancedCHROMIUM       @502
-    glStencilThenCoverStrokePathInstancedCHROMIUM     @503
-    glBindFragmentInputLocationCHROMIUM               @504
-    glProgramPathFragmentInputGenCHROMIUM             @505
+    glGenPathsCHROMIUM                                @484
+    glDeletePathsCHROMIUM                             @485
+    glIsPathCHROMIUM                                  @486
+    glPathCommandsCHROMIUM                            @487
+    glPathParameterfCHROMIUM                          @488
+    glPathParameteriCHROMIUM                          @489
+    glGetPathParameterfvCHROMIUM                      @490
+    glGetPathParameterivCHROMIUM                      @491
+    glPathStencilFuncCHROMIUM                         @492
+    glStencilFillPathCHROMIUM                         @493
+    glStencilStrokePathCHROMIUM                       @494
+    glCoverFillPathCHROMIUM                           @495
+    glCoverStrokePathCHROMIUM                         @496
+    glStencilThenCoverFillPathCHROMIUM                @497
+    glStencilThenCoverStrokePathCHROMIUM              @498
+    glCoverFillPathInstancedCHROMIUM                  @499
+    glCoverStrokePathInstancedCHROMIUM                @500
+    glStencilStrokePathInstancedCHROMIUM              @501
+    glStencilFillPathInstancedCHROMIUM                @502
+    glStencilThenCoverFillPathInstancedCHROMIUM       @503
+    glStencilThenCoverStrokePathInstancedCHROMIUM     @504
+    glBindFragmentInputLocationCHROMIUM               @505
+    glProgramPathFragmentInputGenCHROMIUM             @506
 
     ; GL_EXT_blend_func_extended
-    glBindFragDataLocationEXT                         @506
-    glBindFragDataLocationIndexedEXT                  @507
-    glGetFragDataIndexEXT                             @508
-    glGetProgramResourceLocationIndexEXT              @509
+    glBindFragDataLocationEXT                         @507
+    glBindFragDataLocationIndexedEXT                  @508
+    glGetFragDataIndexEXT                             @509
+    glGetProgramResourceLocationIndexEXT              @510
 
     ; GL_EXT_debug_marker
-    glInsertEventMarkerEXT                            @510
-    glPopGroupMarkerEXT                               @511
-    glPushGroupMarkerEXT                              @512
+    glInsertEventMarkerEXT                            @511
+    glPopGroupMarkerEXT                               @512
+    glPushGroupMarkerEXT                              @513
 
     ; GL_EXT_discard_framebuffer
-    glDiscardFramebufferEXT                           @513
+    glDiscardFramebufferEXT                           @514
 
     ; GL_EXT_disjoint_timer_query
-    glBeginQueryEXT                                   @514
-    glDeleteQueriesEXT                                @515
-    glEndQueryEXT                                     @516
-    glGenQueriesEXT                                   @517
-    glGetQueryObjecti64vEXT                           @518
-    glGetQueryObjectivEXT                             @519
-    glGetQueryObjectui64vEXT                          @520
-    glGetQueryObjectuivEXT                            @521
-    glGetQueryivEXT                                   @522
-    glIsQueryEXT                                      @523
-    glQueryCounterEXT                                 @524
+    glBeginQueryEXT                                   @515
+    glDeleteQueriesEXT                                @516
+    glEndQueryEXT                                     @517
+    glGenQueriesEXT                                   @518
+    glGetQueryObjecti64vEXT                           @519
+    glGetQueryObjectivEXT                             @520
+    glGetQueryObjectui64vEXT                          @521
+    glGetQueryObjectuivEXT                            @522
+    glGetQueryivEXT                                   @523
+    glIsQueryEXT                                      @524
+    glQueryCounterEXT                                 @525
 
     ; GL_EXT_draw_buffers
-    glDrawBuffersEXT                                  @525
+    glDrawBuffersEXT                                  @526
 
     ; GL_EXT_geometry_shader
-    glFramebufferTextureEXT                           @526
+    glFramebufferTextureEXT                           @527
 
     ; GL_EXT_map_buffer_range
-    glFlushMappedBufferRangeEXT                       @527
-    glMapBufferRangeEXT                               @528
+    glFlushMappedBufferRangeEXT                       @528
+    glMapBufferRangeEXT                               @529
 
     ; GL_EXT_occlusion_query_boolean
 
     ; GL_EXT_robustness
-    glGetGraphicsResetStatusEXT                       @529
-    glGetnUniformfvEXT                                @530
-    glGetnUniformivEXT                                @531
-    glReadnPixelsEXT                                  @532
+    glGetGraphicsResetStatusEXT                       @530
+    glGetnUniformfvEXT                                @531
+    glGetnUniformivEXT                                @532
+    glReadnPixelsEXT                                  @533
 
     ; GL_EXT_texture_storage
-    glTexStorage1DEXT                                 @533
-    glTexStorage2DEXT                                 @534
-    glTexStorage3DEXT                                 @535
+    glTexStorage1DEXT                                 @534
+    glTexStorage2DEXT                                 @535
+    glTexStorage3DEXT                                 @536
 
     ; GL_KHR_debug
-    glDebugMessageCallbackKHR                         @536
-    glDebugMessageControlKHR                          @537
-    glDebugMessageInsertKHR                           @538
-    glGetDebugMessageLogKHR                           @539
-    glGetObjectLabelKHR                               @540
-    glGetObjectPtrLabelKHR                            @541
-    glGetPointervKHR                                  @542
-    glObjectLabelKHR                                  @543
-    glObjectPtrLabelKHR                               @544
-    glPopDebugGroupKHR                                @545
-    glPushDebugGroupKHR                               @546
+    glDebugMessageCallbackKHR                         @537
+    glDebugMessageControlKHR                          @538
+    glDebugMessageInsertKHR                           @539
+    glGetDebugMessageLogKHR                           @540
+    glGetObjectLabelKHR                               @541
+    glGetObjectPtrLabelKHR                            @542
+    glGetPointervKHR                                  @543
+    glObjectLabelKHR                                  @544
+    glObjectPtrLabelKHR                               @545
+    glPopDebugGroupKHR                                @546
+    glPushDebugGroupKHR                               @547
 
     ; GL_KHR_parallel_shader_compile
-    glMaxShaderCompilerThreadsKHR                     @547
+    glMaxShaderCompilerThreadsKHR                     @548
 
     ; GL_NV_fence
-    glDeleteFencesNV                                  @548
-    glFinishFenceNV                                   @549
-    glGenFencesNV                                     @550
-    glGetFenceivNV                                    @551
-    glIsFenceNV                                       @552
-    glSetFenceNV                                      @553
-    glTestFenceNV                                     @554
+    glDeleteFencesNV                                  @549
+    glFinishFenceNV                                   @550
+    glGenFencesNV                                     @551
+    glGetFenceivNV                                    @552
+    glIsFenceNV                                       @553
+    glSetFenceNV                                      @554
+    glTestFenceNV                                     @555
 
     ; GL_OES_EGL_image
-    glEGLImageTargetRenderbufferStorageOES            @555
-    glEGLImageTargetTexture2DOES                      @556
+    glEGLImageTargetRenderbufferStorageOES            @556
+    glEGLImageTargetTexture2DOES                      @557
 
     ; GL_OES_draw_texture
-    glDrawTexfOES                                     @557
-    glDrawTexfvOES                                    @558
-    glDrawTexiOES                                     @559
-    glDrawTexivOES                                    @560
-    glDrawTexsOES                                     @561
-    glDrawTexsvOES                                    @562
-    glDrawTexxOES                                     @563
-    glDrawTexxvOES                                    @564
+    glDrawTexfOES                                     @558
+    glDrawTexfvOES                                    @559
+    glDrawTexiOES                                     @560
+    glDrawTexivOES                                    @561
+    glDrawTexsOES                                     @562
+    glDrawTexsvOES                                    @563
+    glDrawTexxOES                                     @564
+    glDrawTexxvOES                                    @565
 
     ; GL_OES_framebuffer_object
-    glBindFramebufferOES                              @565
-    glBindRenderbufferOES                             @566
-    glCheckFramebufferStatusOES                       @567
-    glDeleteFramebuffersOES                           @568
-    glDeleteRenderbuffersOES                          @569
-    glFramebufferRenderbufferOES                      @570
-    glFramebufferTexture2DOES                         @571
-    glGenFramebuffersOES                              @572
-    glGenRenderbuffersOES                             @573
-    glGenerateMipmapOES                               @574
-    glGetFramebufferAttachmentParameterivOES          @575
-    glGetRenderbufferParameterivOES                   @576
-    glIsFramebufferOES                                @577
-    glIsRenderbufferOES                               @578
-    glRenderbufferStorageOES                          @579
+    glBindFramebufferOES                              @566
+    glBindRenderbufferOES                             @567
+    glCheckFramebufferStatusOES                       @568
+    glDeleteFramebuffersOES                           @569
+    glDeleteRenderbuffersOES                          @570
+    glFramebufferRenderbufferOES                      @571
+    glFramebufferTexture2DOES                         @572
+    glGenFramebuffersOES                              @573
+    glGenRenderbuffersOES                             @574
+    glGenerateMipmapOES                               @575
+    glGetFramebufferAttachmentParameterivOES          @576
+    glGetRenderbufferParameterivOES                   @577
+    glIsFramebufferOES                                @578
+    glIsRenderbufferOES                               @579
+    glRenderbufferStorageOES                          @580
 
     ; GL_OES_get_program_binary
-    glGetProgramBinaryOES                             @580
-    glProgramBinaryOES                                @581
+    glGetProgramBinaryOES                             @581
+    glProgramBinaryOES                                @582
 
     ; GL_OES_mapbuffer
-    glGetBufferPointervOES                            @582
-    glMapBufferOES                                    @583
-    glUnmapBufferOES                                  @584
+    glGetBufferPointervOES                            @583
+    glMapBufferOES                                    @584
+    glUnmapBufferOES                                  @585
 
     ; GL_OES_matrix_palette
-    glCurrentPaletteMatrixOES                         @585
-    glLoadPaletteFromModelViewMatrixOES               @586
-    glMatrixIndexPointerOES                           @587
-    glWeightPointerOES                                @588
+    glCurrentPaletteMatrixOES                         @586
+    glLoadPaletteFromModelViewMatrixOES               @587
+    glMatrixIndexPointerOES                           @588
+    glWeightPointerOES                                @589
 
     ; GL_OES_point_size_array
-    glPointSizePointerOES                             @589
+    glPointSizePointerOES                             @590
 
     ; GL_OES_query_matrix
-    glQueryMatrixxOES                                 @590
+    glQueryMatrixxOES                                 @591
 
     ; GL_OES_texture_cube_map
-    glGetTexGenfvOES                                  @591
-    glGetTexGenivOES                                  @592
-    glGetTexGenxvOES                                  @593
-    glTexGenfOES                                      @594
-    glTexGenfvOES                                     @595
-    glTexGeniOES                                      @596
-    glTexGenivOES                                     @597
-    glTexGenxOES                                      @598
-    glTexGenxvOES                                     @599
+    glGetTexGenfvOES                                  @592
+    glGetTexGenivOES                                  @593
+    glGetTexGenxvOES                                  @594
+    glTexGenfOES                                      @595
+    glTexGenfvOES                                     @596
+    glTexGeniOES                                      @597
+    glTexGenivOES                                     @598
+    glTexGenxOES                                      @599
+    glTexGenxvOES                                     @600
 
     ; GL_OES_texture_storage_multisample_2d_array
-    glTexStorage3DMultisampleOES                      @600
+    glTexStorage3DMultisampleOES                      @601
 
     ; GL_OES_vertex_array_object
-    glBindVertexArrayOES                              @601
-    glDeleteVertexArraysOES                           @602
-    glGenVertexArraysOES                              @603
-    glIsVertexArrayOES                                @604
+    glBindVertexArrayOES                              @602
+    glDeleteVertexArraysOES                           @603
+    glGenVertexArraysOES                              @604
+    glIsVertexArrayOES                                @605
 
     ; EGL_ANGLE_explicit_context
-    glActiveShaderProgramContextANGLE                             @605
-    glActiveTextureContextANGLE                                   @606
-    glAlphaFuncContextANGLE                                       @607
-    glAlphaFuncxContextANGLE                                      @608
-    glAttachShaderContextANGLE                                    @609
-    glBeginQueryContextANGLE                                      @610
-    glBeginQueryEXTContextANGLE                                   @611
-    glBeginTransformFeedbackContextANGLE                          @612
-    glBindAttribLocationContextANGLE                              @613
-    glBindBufferContextANGLE                                      @614
-    glBindBufferBaseContextANGLE                                  @615
-    glBindBufferRangeContextANGLE                                 @616
-    glBindFragDataLocationEXTContextANGLE                         @617
-    glBindFragDataLocationIndexedEXTContextANGLE                  @618
-    glBindFramebufferContextANGLE                                 @619
-    glBindFramebufferOESContextANGLE                              @620
-    glBindImageTextureContextANGLE                                @621
-    glBindProgramPipelineContextANGLE                             @622
-    glBindRenderbufferContextANGLE                                @623
-    glBindRenderbufferOESContextANGLE                             @624
-    glBindSamplerContextANGLE                                     @625
-    glBindTextureContextANGLE                                     @626
-    glBindTransformFeedbackContextANGLE                           @627
-    glBindVertexArrayContextANGLE                                 @628
-    glBindVertexArrayOESContextANGLE                              @629
-    glBindVertexBufferContextANGLE                                @630
-    glBlendColorContextANGLE                                      @631
-    glBlendEquationContextANGLE                                   @632
-    glBlendEquationSeparateContextANGLE                           @633
-    glBlendFuncContextANGLE                                       @634
-    glBlendFuncSeparateContextANGLE                               @635
-    glBlitFramebufferContextANGLE                                 @636
-    glBlitFramebufferANGLEContextANGLE                            @637
-    glBufferDataContextANGLE                                      @638
-    glBufferSubDataContextANGLE                                   @639
-    glCheckFramebufferStatusContextANGLE                          @640
-    glCheckFramebufferStatusOESContextANGLE                       @641
-    glClearContextANGLE                                           @642
-    glClearBufferfiContextANGLE                                   @643
-    glClearBufferfvContextANGLE                                   @644
-    glClearBufferivContextANGLE                                   @645
-    glClearBufferuivContextANGLE                                  @646
-    glClearColorContextANGLE                                      @647
-    glClearColorxContextANGLE                                     @648
-    glClearDepthfContextANGLE                                     @649
-    glClearDepthxContextANGLE                                     @650
-    glClearStencilContextANGLE                                    @651
-    glClientActiveTextureContextANGLE                             @652
-    glClientWaitSyncContextANGLE                                  @653
-    glClipPlanefContextANGLE                                      @654
-    glClipPlanexContextANGLE                                      @655
-    glColor4fContextANGLE                                         @656
-    glColor4ubContextANGLE                                        @657
-    glColor4xContextANGLE                                         @658
-    glColorMaskContextANGLE                                       @659
-    glColorPointerContextANGLE                                    @660
-    glCompileShaderContextANGLE                                   @661
-    glCompressedTexImage2DContextANGLE                            @662
-    glCompressedTexImage3DContextANGLE                            @663
-    glCompressedTexSubImage2DContextANGLE                         @664
-    glCompressedTexSubImage3DContextANGLE                         @665
-    glCopyBufferSubDataContextANGLE                               @666
-    glCopyTexImage2DContextANGLE                                  @667
-    glCopyTexSubImage2DContextANGLE                               @668
-    glCopyTexSubImage3DContextANGLE                               @669
-    glCreateProgramContextANGLE                                   @670
-    glCreateShaderContextANGLE                                    @671
-    glCreateShaderProgramvContextANGLE                            @672
-    glCullFaceContextANGLE                                        @673
-    glCurrentPaletteMatrixOESContextANGLE                         @674
-    glDebugMessageCallbackKHRContextANGLE                         @675
-    glDebugMessageControlKHRContextANGLE                          @676
-    glDebugMessageInsertKHRContextANGLE                           @677
-    glDeleteBuffersContextANGLE                                   @678
-    glDeleteFencesNVContextANGLE                                  @679
-    glDeleteFramebuffersContextANGLE                              @680
-    glDeleteFramebuffersOESContextANGLE                           @681
-    glDeleteProgramContextANGLE                                   @682
-    glDeleteProgramPipelinesContextANGLE                          @683
-    glDeleteQueriesContextANGLE                                   @684
-    glDeleteQueriesEXTContextANGLE                                @685
-    glDeleteRenderbuffersContextANGLE                             @686
-    glDeleteRenderbuffersOESContextANGLE                          @687
-    glDeleteSamplersContextANGLE                                  @688
-    glDeleteShaderContextANGLE                                    @689
-    glDeleteSyncContextANGLE                                      @690
-    glDeleteTexturesContextANGLE                                  @691
-    glDeleteTransformFeedbacksContextANGLE                        @692
-    glDeleteVertexArraysContextANGLE                              @693
-    glDeleteVertexArraysOESContextANGLE                           @694
-    glDepthFuncContextANGLE                                       @695
-    glDepthMaskContextANGLE                                       @696
-    glDepthRangefContextANGLE                                     @697
-    glDepthRangexContextANGLE                                     @698
-    glDetachShaderContextANGLE                                    @699
-    glDisableContextANGLE                                         @700
-    glDisableClientStateContextANGLE                              @701
-    glDisableVertexAttribArrayContextANGLE                        @702
-    glDiscardFramebufferEXTContextANGLE                           @703
-    glDispatchComputeContextANGLE                                 @704
-    glDispatchComputeIndirectContextANGLE                         @705
-    glDrawArraysContextANGLE                                      @706
-    glDrawArraysIndirectContextANGLE                              @707
-    glDrawArraysInstancedContextANGLE                             @708
-    glDrawArraysInstancedANGLEContextANGLE                        @709
-    glDrawBuffersContextANGLE                                     @710
-    glDrawBuffersEXTContextANGLE                                  @711
-    glDrawElementsContextANGLE                                    @712
-    glDrawElementsIndirectContextANGLE                            @713
-    glDrawElementsInstancedContextANGLE                           @714
-    glDrawElementsInstancedANGLEContextANGLE                      @715
-    glDrawRangeElementsContextANGLE                               @716
-    glDrawTexfOESContextANGLE                                     @717
-    glDrawTexfvOESContextANGLE                                    @718
-    glDrawTexiOESContextANGLE                                     @719
-    glDrawTexivOESContextANGLE                                    @720
-    glDrawTexsOESContextANGLE                                     @721
-    glDrawTexsvOESContextANGLE                                    @722
-    glDrawTexxOESContextANGLE                                     @723
-    glDrawTexxvOESContextANGLE                                    @724
-    glEGLImageTargetRenderbufferStorageOESContextANGLE            @725
-    glEGLImageTargetTexture2DOESContextANGLE                      @726
-    glEnableContextANGLE                                          @727
-    glEnableClientStateContextANGLE                               @728
-    glEnableVertexAttribArrayContextANGLE                         @729
-    glEndQueryContextANGLE                                        @730
-    glEndQueryEXTContextANGLE                                     @731
-    glEndTransformFeedbackContextANGLE                            @732
-    glFenceSyncContextANGLE                                       @733
-    glFinishContextANGLE                                          @734
-    glFinishFenceNVContextANGLE                                   @735
-    glFlushContextANGLE                                           @736
-    glFlushMappedBufferRangeContextANGLE                          @737
-    glFlushMappedBufferRangeEXTContextANGLE                       @738
-    glFogfContextANGLE                                            @739
-    glFogfvContextANGLE                                           @740
-    glFogxContextANGLE                                            @741
-    glFogxvContextANGLE                                           @742
-    glFramebufferParameteriContextANGLE                           @743
-    glFramebufferRenderbufferContextANGLE                         @744
-    glFramebufferRenderbufferOESContextANGLE                      @745
-    glFramebufferTexture2DContextANGLE                            @746
-    glFramebufferTexture2DOESContextANGLE                         @747
-    glFramebufferTextureEXTContextANGLE                           @748
-    glFramebufferTextureLayerContextANGLE                         @749
-    glFrontFaceContextANGLE                                       @750
-    glFrustumfContextANGLE                                        @751
-    glFrustumxContextANGLE                                        @752
-    glGenBuffersContextANGLE                                      @753
-    glGenFencesNVContextANGLE                                     @754
-    glGenFramebuffersContextANGLE                                 @755
-    glGenFramebuffersOESContextANGLE                              @756
-    glGenProgramPipelinesContextANGLE                             @757
-    glGenQueriesContextANGLE                                      @758
-    glGenQueriesEXTContextANGLE                                   @759
-    glGenRenderbuffersContextANGLE                                @760
-    glGenRenderbuffersOESContextANGLE                             @761
-    glGenSamplersContextANGLE                                     @762
-    glGenTexturesContextANGLE                                     @763
-    glGenTransformFeedbacksContextANGLE                           @764
-    glGenVertexArraysContextANGLE                                 @765
-    glGenVertexArraysOESContextANGLE                              @766
-    glGenerateMipmapContextANGLE                                  @767
-    glGenerateMipmapOESContextANGLE                               @768
-    glGetActiveAttribContextANGLE                                 @769
-    glGetActiveUniformContextANGLE                                @770
-    glGetActiveUniformBlockNameContextANGLE                       @771
-    glGetActiveUniformBlockivContextANGLE                         @772
-    glGetActiveUniformsivContextANGLE                             @773
-    glGetAttachedShadersContextANGLE                              @774
-    glGetAttribLocationContextANGLE                               @775
-    glGetBooleani_vContextANGLE                                   @776
-    glGetBooleanvContextANGLE                                     @777
-    glGetBufferParameteri64vContextANGLE                          @778
-    glGetBufferParameterivContextANGLE                            @779
-    glGetBufferPointervContextANGLE                               @780
-    glGetBufferPointervOESContextANGLE                            @781
-    glGetClipPlanefContextANGLE                                   @782
-    glGetClipPlanexContextANGLE                                   @783
-    glGetDebugMessageLogKHRContextANGLE                           @784
-    glGetErrorContextANGLE                                        @785
-    glGetFenceivNVContextANGLE                                    @786
-    glGetFixedvContextANGLE                                       @787
-    glGetFloatvContextANGLE                                       @788
-    glGetFragDataIndexEXTContextANGLE                             @789
-    glGetFragDataLocationContextANGLE                             @790
-    glGetFramebufferAttachmentParameterivContextANGLE             @791
-    glGetFramebufferAttachmentParameterivOESContextANGLE          @792
-    glGetFramebufferParameterivContextANGLE                       @793
-    glGetGraphicsResetStatusEXTContextANGLE                       @794
-    glGetInteger64i_vContextANGLE                                 @795
-    glGetInteger64vContextANGLE                                   @796
-    glGetIntegeri_vContextANGLE                                   @797
-    glGetIntegervContextANGLE                                     @798
-    glGetInternalformativContextANGLE                             @799
-    glGetLightfvContextANGLE                                      @800
-    glGetLightxvContextANGLE                                      @801
-    glGetMaterialfvContextANGLE                                   @802
-    glGetMaterialxvContextANGLE                                   @803
-    glGetMultisamplefvContextANGLE                                @804
-    glGetObjectLabelKHRContextANGLE                               @805
-    glGetObjectPtrLabelKHRContextANGLE                            @806
-    glGetPointervContextANGLE                                     @807
-    glGetPointervKHRContextANGLE                                  @808
-    glGetProgramBinaryContextANGLE                                @809
-    glGetProgramBinaryOESContextANGLE                             @810
-    glGetProgramInfoLogContextANGLE                               @811
-    glGetProgramInterfaceivContextANGLE                           @812
-    glGetProgramPipelineInfoLogContextANGLE                       @813
-    glGetProgramPipelineivContextANGLE                            @814
-    glGetProgramResourceIndexContextANGLE                         @815
-    glGetProgramResourceLocationContextANGLE                      @816
-    glGetProgramResourceLocationIndexEXTContextANGLE              @817
-    glGetProgramResourceNameContextANGLE                          @818
-    glGetProgramResourceivContextANGLE                            @819
-    glGetProgramivContextANGLE                                    @820
-    glGetQueryObjecti64vEXTContextANGLE                           @821
-    glGetQueryObjectivEXTContextANGLE                             @822
-    glGetQueryObjectui64vEXTContextANGLE                          @823
-    glGetQueryObjectuivContextANGLE                               @824
-    glGetQueryObjectuivEXTContextANGLE                            @825
-    glGetQueryivContextANGLE                                      @826
-    glGetQueryivEXTContextANGLE                                   @827
-    glGetRenderbufferParameterivContextANGLE                      @828
-    glGetRenderbufferParameterivOESContextANGLE                   @829
-    glGetSamplerParameterfvContextANGLE                           @830
-    glGetSamplerParameterivContextANGLE                           @831
-    glGetShaderInfoLogContextANGLE                                @832
-    glGetShaderPrecisionFormatContextANGLE                        @833
-    glGetShaderSourceContextANGLE                                 @834
-    glGetShaderivContextANGLE                                     @835
-    glGetStringContextANGLE                                       @836
-    glGetStringiContextANGLE                                      @837
-    glGetSyncivContextANGLE                                       @838
-    glGetTexEnvfvContextANGLE                                     @839
-    glGetTexEnvivContextANGLE                                     @840
-    glGetTexEnvxvContextANGLE                                     @841
-    glGetTexGenfvOESContextANGLE                                  @842
-    glGetTexGenivOESContextANGLE                                  @843
-    glGetTexGenxvOESContextANGLE                                  @844
-    glGetTexLevelParameterfvContextANGLE                          @845
-    glGetTexLevelParameterivContextANGLE                          @846
-    glGetTexParameterfvContextANGLE                               @847
-    glGetTexParameterivContextANGLE                               @848
-    glGetTexParameterxvContextANGLE                               @849
-    glGetTransformFeedbackVaryingContextANGLE                     @850
-    glGetTranslatedShaderSourceANGLEContextANGLE                  @851
-    glGetUniformBlockIndexContextANGLE                            @852
-    glGetUniformIndicesContextANGLE                               @853
-    glGetUniformLocationContextANGLE                              @854
-    glGetUniformfvContextANGLE                                    @855
-    glGetUniformivContextANGLE                                    @856
-    glGetUniformuivContextANGLE                                   @857
-    glGetVertexAttribIivContextANGLE                              @858
-    glGetVertexAttribIuivContextANGLE                             @859
-    glGetVertexAttribPointervContextANGLE                         @860
-    glGetVertexAttribfvContextANGLE                               @861
-    glGetVertexAttribivContextANGLE                               @862
-    glGetnUniformfvEXTContextANGLE                                @863
-    glGetnUniformivEXTContextANGLE                                @864
-    glHintContextANGLE                                            @865
-    glInsertEventMarkerEXTContextANGLE                            @866
-    glInvalidateFramebufferContextANGLE                           @867
-    glInvalidateSubFramebufferContextANGLE                        @868
-    glIsBufferContextANGLE                                        @869
-    glIsEnabledContextANGLE                                       @870
-    glIsFenceNVContextANGLE                                       @871
-    glIsFramebufferContextANGLE                                   @872
-    glIsFramebufferOESContextANGLE                                @873
-    glIsProgramContextANGLE                                       @874
-    glIsProgramPipelineContextANGLE                               @875
-    glIsQueryContextANGLE                                         @876
-    glIsQueryEXTContextANGLE                                      @877
-    glIsRenderbufferContextANGLE                                  @878
-    glIsRenderbufferOESContextANGLE                               @879
-    glIsSamplerContextANGLE                                       @880
-    glIsShaderContextANGLE                                        @881
-    glIsSyncContextANGLE                                          @882
-    glIsTextureContextANGLE                                       @883
-    glIsTransformFeedbackContextANGLE                             @884
-    glIsVertexArrayContextANGLE                                   @885
-    glIsVertexArrayOESContextANGLE                                @886
-    glLightModelfContextANGLE                                     @887
-    glLightModelfvContextANGLE                                    @888
-    glLightModelxContextANGLE                                     @889
-    glLightModelxvContextANGLE                                    @890
-    glLightfContextANGLE                                          @891
-    glLightfvContextANGLE                                         @892
-    glLightxContextANGLE                                          @893
-    glLightxvContextANGLE                                         @894
-    glLineWidthContextANGLE                                       @895
-    glLineWidthxContextANGLE                                      @896
-    glLinkProgramContextANGLE                                     @897
-    glLoadIdentityContextANGLE                                    @898
-    glLoadMatrixfContextANGLE                                     @899
-    glLoadMatrixxContextANGLE                                     @900
-    glLoadPaletteFromModelViewMatrixOESContextANGLE               @901
-    glLogicOpContextANGLE                                         @902
-    glMapBufferOESContextANGLE                                    @903
-    glMapBufferRangeContextANGLE                                  @904
-    glMapBufferRangeEXTContextANGLE                               @905
-    glMaterialfContextANGLE                                       @906
-    glMaterialfvContextANGLE                                      @907
-    glMaterialxContextANGLE                                       @908
-    glMaterialxvContextANGLE                                      @909
-    glMatrixIndexPointerOESContextANGLE                           @910
-    glMatrixModeContextANGLE                                      @911
-    glMaxShaderCompilerThreadsKHRContextANGLE                     @912
-    glMemoryBarrierContextANGLE                                   @913
-    glMemoryBarrierByRegionContextANGLE                           @914
-    glMultMatrixfContextANGLE                                     @915
-    glMultMatrixxContextANGLE                                     @916
-    glMultiTexCoord4fContextANGLE                                 @917
-    glMultiTexCoord4xContextANGLE                                 @918
-    glNormal3fContextANGLE                                        @919
-    glNormal3xContextANGLE                                        @920
-    glNormalPointerContextANGLE                                   @921
-    glObjectLabelKHRContextANGLE                                  @922
-    glObjectPtrLabelKHRContextANGLE                               @923
-    glOrthofContextANGLE                                          @924
-    glOrthoxContextANGLE                                          @925
-    glPauseTransformFeedbackContextANGLE                          @926
-    glPixelStoreiContextANGLE                                     @927
-    glPointParameterfContextANGLE                                 @928
-    glPointParameterfvContextANGLE                                @929
-    glPointParameterxContextANGLE                                 @930
-    glPointParameterxvContextANGLE                                @931
-    glPointSizeContextANGLE                                       @932
-    glPointSizePointerOESContextANGLE                             @933
-    glPointSizexContextANGLE                                      @934
-    glPolygonOffsetContextANGLE                                   @935
-    glPolygonOffsetxContextANGLE                                  @936
-    glPopDebugGroupKHRContextANGLE                                @937
-    glPopGroupMarkerEXTContextANGLE                               @938
-    glPopMatrixContextANGLE                                       @939
-    glProgramBinaryContextANGLE                                   @940
-    glProgramBinaryOESContextANGLE                                @941
-    glProgramParameteriContextANGLE                               @942
-    glProgramUniform1fContextANGLE                                @943
-    glProgramUniform1fvContextANGLE                               @944
-    glProgramUniform1iContextANGLE                                @945
-    glProgramUniform1ivContextANGLE                               @946
-    glProgramUniform1uiContextANGLE                               @947
-    glProgramUniform1uivContextANGLE                              @948
-    glProgramUniform2fContextANGLE                                @949
-    glProgramUniform2fvContextANGLE                               @950
-    glProgramUniform2iContextANGLE                                @951
-    glProgramUniform2ivContextANGLE                               @952
-    glProgramUniform2uiContextANGLE                               @953
-    glProgramUniform2uivContextANGLE                              @954
-    glProgramUniform3fContextANGLE                                @955
-    glProgramUniform3fvContextANGLE                               @956
-    glProgramUniform3iContextANGLE                                @957
-    glProgramUniform3ivContextANGLE                               @958
-    glProgramUniform3uiContextANGLE                               @959
-    glProgramUniform3uivContextANGLE                              @960
-    glProgramUniform4fContextANGLE                                @961
-    glProgramUniform4fvContextANGLE                               @962
-    glProgramUniform4iContextANGLE                                @963
-    glProgramUniform4ivContextANGLE                               @964
-    glProgramUniform4uiContextANGLE                               @965
-    glProgramUniform4uivContextANGLE                              @966
-    glProgramUniformMatrix2fvContextANGLE                         @967
-    glProgramUniformMatrix2x3fvContextANGLE                       @968
-    glProgramUniformMatrix2x4fvContextANGLE                       @969
-    glProgramUniformMatrix3fvContextANGLE                         @970
-    glProgramUniformMatrix3x2fvContextANGLE                       @971
-    glProgramUniformMatrix3x4fvContextANGLE                       @972
-    glProgramUniformMatrix4fvContextANGLE                         @973
-    glProgramUniformMatrix4x2fvContextANGLE                       @974
-    glProgramUniformMatrix4x3fvContextANGLE                       @975
-    glPushDebugGroupKHRContextANGLE                               @976
-    glPushGroupMarkerEXTContextANGLE                              @977
-    glPushMatrixContextANGLE                                      @978
-    glQueryCounterEXTContextANGLE                                 @979
-    glQueryMatrixxOESContextANGLE                                 @980
-    glReadBufferContextANGLE                                      @981
-    glReadPixelsContextANGLE                                      @982
-    glReadnPixelsEXTContextANGLE                                  @983
-    glReleaseShaderCompilerContextANGLE                           @984
-    glRenderbufferStorageContextANGLE                             @985
-    glRenderbufferStorageMultisampleContextANGLE                  @986
-    glRenderbufferStorageMultisampleANGLEContextANGLE             @987
-    glRenderbufferStorageOESContextANGLE                          @988
-    glResumeTransformFeedbackContextANGLE                         @989
-    glRotatefContextANGLE                                         @990
-    glRotatexContextANGLE                                         @991
-    glSampleCoverageContextANGLE                                  @992
-    glSampleCoveragexContextANGLE                                 @993
-    glSampleMaskiContextANGLE                                     @994
-    glSamplerParameterfContextANGLE                               @995
-    glSamplerParameterfvContextANGLE                              @996
-    glSamplerParameteriContextANGLE                               @997
-    glSamplerParameterivContextANGLE                              @998
-    glScalefContextANGLE                                          @999
-    glScalexContextANGLE                                          @1000
-    glScissorContextANGLE                                         @1001
-    glSetFenceNVContextANGLE                                      @1002
-    glShadeModelContextANGLE                                      @1003
-    glShaderBinaryContextANGLE                                    @1004
-    glShaderSourceContextANGLE                                    @1005
-    glStencilFuncContextANGLE                                     @1006
-    glStencilFuncSeparateContextANGLE                             @1007
-    glStencilMaskContextANGLE                                     @1008
-    glStencilMaskSeparateContextANGLE                             @1009
-    glStencilOpContextANGLE                                       @1010
-    glStencilOpSeparateContextANGLE                               @1011
-    glTestFenceNVContextANGLE                                     @1012
-    glTexCoordPointerContextANGLE                                 @1013
-    glTexEnvfContextANGLE                                         @1014
-    glTexEnvfvContextANGLE                                        @1015
-    glTexEnviContextANGLE                                         @1016
-    glTexEnvivContextANGLE                                        @1017
-    glTexEnvxContextANGLE                                         @1018
-    glTexEnvxvContextANGLE                                        @1019
-    glTexGenfOESContextANGLE                                      @1020
-    glTexGenfvOESContextANGLE                                     @1021
-    glTexGeniOESContextANGLE                                      @1022
-    glTexGenivOESContextANGLE                                     @1023
-    glTexGenxOESContextANGLE                                      @1024
-    glTexGenxvOESContextANGLE                                     @1025
-    glTexImage2DContextANGLE                                      @1026
-    glTexImage3DContextANGLE                                      @1027
-    glTexParameterfContextANGLE                                   @1028
-    glTexParameterfvContextANGLE                                  @1029
-    glTexParameteriContextANGLE                                   @1030
-    glTexParameterivContextANGLE                                  @1031
-    glTexParameterxContextANGLE                                   @1032
-    glTexParameterxvContextANGLE                                  @1033
-    glTexStorage1DEXTContextANGLE                                 @1034
-    glTexStorage2DContextANGLE                                    @1035
-    glTexStorage2DEXTContextANGLE                                 @1036
-    glTexStorage2DMultisampleContextANGLE                         @1037
-    glTexStorage3DContextANGLE                                    @1038
-    glTexStorage3DEXTContextANGLE                                 @1039
-    glTexStorage3DMultisampleOESContextANGLE                      @1040
-    glTexSubImage2DContextANGLE                                   @1041
-    glTexSubImage3DContextANGLE                                   @1042
-    glTransformFeedbackVaryingsContextANGLE                       @1043
-    glTranslatefContextANGLE                                      @1044
-    glTranslatexContextANGLE                                      @1045
-    glUniform1fContextANGLE                                       @1046
-    glUniform1fvContextANGLE                                      @1047
-    glUniform1iContextANGLE                                       @1048
-    glUniform1ivContextANGLE                                      @1049
-    glUniform1uiContextANGLE                                      @1050
-    glUniform1uivContextANGLE                                     @1051
-    glUniform2fContextANGLE                                       @1052
-    glUniform2fvContextANGLE                                      @1053
-    glUniform2iContextANGLE                                       @1054
-    glUniform2ivContextANGLE                                      @1055
-    glUniform2uiContextANGLE                                      @1056
-    glUniform2uivContextANGLE                                     @1057
-    glUniform3fContextANGLE                                       @1058
-    glUniform3fvContextANGLE                                      @1059
-    glUniform3iContextANGLE                                       @1060
-    glUniform3ivContextANGLE                                      @1061
-    glUniform3uiContextANGLE                                      @1062
-    glUniform3uivContextANGLE                                     @1063
-    glUniform4fContextANGLE                                       @1064
-    glUniform4fvContextANGLE                                      @1065
-    glUniform4iContextANGLE                                       @1066
-    glUniform4ivContextANGLE                                      @1067
-    glUniform4uiContextANGLE                                      @1068
-    glUniform4uivContextANGLE                                     @1069
-    glUniformBlockBindingContextANGLE                             @1070
-    glUniformMatrix2fvContextANGLE                                @1071
-    glUniformMatrix2x3fvContextANGLE                              @1072
-    glUniformMatrix2x4fvContextANGLE                              @1073
-    glUniformMatrix3fvContextANGLE                                @1074
-    glUniformMatrix3x2fvContextANGLE                              @1075
-    glUniformMatrix3x4fvContextANGLE                              @1076
-    glUniformMatrix4fvContextANGLE                                @1077
-    glUniformMatrix4x2fvContextANGLE                              @1078
-    glUniformMatrix4x3fvContextANGLE                              @1079
-    glUnmapBufferContextANGLE                                     @1080
-    glUnmapBufferOESContextANGLE                                  @1081
-    glUseProgramContextANGLE                                      @1082
-    glUseProgramStagesContextANGLE                                @1083
-    glValidateProgramContextANGLE                                 @1084
-    glValidateProgramPipelineContextANGLE                         @1085
-    glVertexAttrib1fContextANGLE                                  @1086
-    glVertexAttrib1fvContextANGLE                                 @1087
-    glVertexAttrib2fContextANGLE                                  @1088
-    glVertexAttrib2fvContextANGLE                                 @1089
-    glVertexAttrib3fContextANGLE                                  @1090
-    glVertexAttrib3fvContextANGLE                                 @1091
-    glVertexAttrib4fContextANGLE                                  @1092
-    glVertexAttrib4fvContextANGLE                                 @1093
-    glVertexAttribBindingContextANGLE                             @1094
-    glVertexAttribDivisorContextANGLE                             @1095
-    glVertexAttribDivisorANGLEContextANGLE                        @1096
-    glVertexAttribFormatContextANGLE                              @1097
-    glVertexAttribI4iContextANGLE                                 @1098
-    glVertexAttribI4ivContextANGLE                                @1099
-    glVertexAttribI4uiContextANGLE                                @1100
-    glVertexAttribI4uivContextANGLE                               @1101
-    glVertexAttribIFormatContextANGLE                             @1102
-    glVertexAttribIPointerContextANGLE                            @1103
-    glVertexAttribPointerContextANGLE                             @1104
-    glVertexBindingDivisorContextANGLE                            @1105
-    glVertexPointerContextANGLE                                   @1106
-    glViewportContextANGLE                                        @1107
-    glWaitSyncContextANGLE                                        @1108
-    glWeightPointerOESContextANGLE                                @1109
-    glBindUniformLocationCHROMIUMContextANGLE                     @1110
-    glCoverageModulationCHROMIUMContextANGLE                      @1111
-    glMatrixLoadfCHROMIUMContextANGLE                             @1112
-    glMatrixLoadIdentityCHROMIUMContextANGLE                      @1113
-    glGenPathsCHROMIUMContextANGLE                                @1114
-    glDeletePathsCHROMIUMContextANGLE                             @1115
-    glIsPathCHROMIUMContextANGLE                                  @1116
-    glPathCommandsCHROMIUMContextANGLE                            @1117
-    glPathParameterfCHROMIUMContextANGLE                          @1118
-    glPathParameteriCHROMIUMContextANGLE                          @1119
-    glGetPathParameterfvCHROMIUMContextANGLE                      @1120
-    glGetPathParameterivCHROMIUMContextANGLE                      @1121
-    glPathStencilFuncCHROMIUMContextANGLE                         @1122
-    glStencilFillPathCHROMIUMContextANGLE                         @1123
-    glStencilStrokePathCHROMIUMContextANGLE                       @1124
-    glCoverFillPathCHROMIUMContextANGLE                           @1125
-    glCoverStrokePathCHROMIUMContextANGLE                         @1126
-    glStencilThenCoverFillPathCHROMIUMContextANGLE                @1127
-    glStencilThenCoverStrokePathCHROMIUMContextANGLE              @1128
-    glCoverFillPathInstancedCHROMIUMContextANGLE                  @1129
-    glCoverStrokePathInstancedCHROMIUMContextANGLE                @1130
-    glStencilStrokePathInstancedCHROMIUMContextANGLE              @1131
-    glStencilFillPathInstancedCHROMIUMContextANGLE                @1132
-    glStencilThenCoverFillPathInstancedCHROMIUMContextANGLE       @1133
-    glStencilThenCoverStrokePathInstancedCHROMIUMContextANGLE     @1134
-    glBindFragmentInputLocationCHROMIUMContextANGLE               @1135
-    glProgramPathFragmentInputGenCHROMIUMContextANGLE             @1136
-    glCopyTextureCHROMIUMContextANGLE                             @1137
-    glCopySubTextureCHROMIUMContextANGLE                          @1138
-    glCompressedCopyTextureCHROMIUMContextANGLE                   @1139
-    glRequestExtensionANGLEContextANGLE                           @1140
-    glGetBooleanvRobustANGLEContextANGLE                          @1141
-    glGetBufferParameterivRobustANGLEContextANGLE                 @1142
-    glGetFloatvRobustANGLEContextANGLE                            @1143
-    glGetFramebufferAttachmentParameterivRobustANGLEContextANGLE  @1144
-    glGetIntegervRobustANGLEContextANGLE                          @1145
-    glGetProgramivRobustANGLEContextANGLE                         @1146
-    glGetRenderbufferParameterivRobustANGLEContextANGLE           @1147
-    glGetShaderivRobustANGLEContextANGLE                          @1148
-    glGetTexParameterfvRobustANGLEContextANGLE                    @1149
-    glGetTexParameterivRobustANGLEContextANGLE                    @1150
-    glGetUniformfvRobustANGLEContextANGLE                         @1151
-    glGetUniformivRobustANGLEContextANGLE                         @1152
-    glGetVertexAttribfvRobustANGLEContextANGLE                    @1153
-    glGetVertexAttribivRobustANGLEContextANGLE                    @1154
-    glGetVertexAttribPointervRobustANGLEContextANGLE              @1155
-    glReadPixelsRobustANGLEContextANGLE                           @1156
-    glTexImage2DRobustANGLEContextANGLE                           @1157
-    glTexParameterfvRobustANGLEContextANGLE                       @1158
-    glTexParameterivRobustANGLEContextANGLE                       @1159
-    glTexSubImage2DRobustANGLEContextANGLE                        @1160
-    glTexImage3DRobustANGLEContextANGLE                           @1161
-    glTexSubImage3DRobustANGLEContextANGLE                        @1162
-    glCompressedTexImage2DRobustANGLEContextANGLE                 @1163
-    glCompressedTexSubImage2DRobustANGLEContextANGLE              @1164
-    glCompressedTexImage3DRobustANGLEContextANGLE                 @1165
-    glCompressedTexSubImage3DRobustANGLEContextANGLE              @1166
-    glGetQueryivRobustANGLEContextANGLE                           @1167
-    glGetQueryObjectuivRobustANGLEContextANGLE                    @1168
-    glGetBufferPointervRobustANGLEContextANGLE                    @1169
-    glGetIntegeri_vRobustANGLEContextANGLE                        @1170
-    glGetInternalformativRobustANGLEContextANGLE                  @1171
-    glGetVertexAttribIivRobustANGLEContextANGLE                   @1172
-    glGetVertexAttribIuivRobustANGLEContextANGLE                  @1173
-    glGetUniformuivRobustANGLEContextANGLE                        @1174
-    glGetActiveUniformBlockivRobustANGLEContextANGLE              @1175
-    glGetInteger64vRobustANGLEContextANGLE                        @1176
-    glGetInteger64i_vRobustANGLEContextANGLE                      @1177
-    glGetBufferParameteri64vRobustANGLEContextANGLE               @1178
-    glSamplerParameterivRobustANGLEContextANGLE                   @1179
-    glSamplerParameterfvRobustANGLEContextANGLE                   @1180
-    glGetSamplerParameterivRobustANGLEContextANGLE                @1181
-    glGetSamplerParameterfvRobustANGLEContextANGLE                @1182
-    glGetFramebufferParameterivRobustANGLEContextANGLE            @1183
-    glGetProgramInterfaceivRobustANGLEContextANGLE                @1184
-    glGetBooleani_vRobustANGLEContextANGLE                        @1185
-    glGetMultisamplefvRobustANGLEContextANGLE                     @1186
-    glGetTexLevelParameterivRobustANGLEContextANGLE               @1187
-    glGetTexLevelParameterfvRobustANGLEContextANGLE               @1188
-    glGetPointervRobustANGLERobustANGLEContextANGLE               @1189
-    glReadnPixelsRobustANGLEContextANGLE                          @1190
-    glGetnUniformfvRobustANGLEContextANGLE                        @1191
-    glGetnUniformivRobustANGLEContextANGLE                        @1192
-    glGetnUniformuivRobustANGLEContextANGLE                       @1193
-    glTexParameterIivRobustANGLEContextANGLE                      @1194
-    glTexParameterIuivRobustANGLEContextANGLE                     @1195
-    glGetTexParameterIivRobustANGLEContextANGLE                   @1196
-    glGetTexParameterIuivRobustANGLEContextANGLE                  @1197
-    glSamplerParameterIivRobustANGLEContextANGLE                  @1198
-    glSamplerParameterIuivRobustANGLEContextANGLE                 @1199
-    glGetSamplerParameterIivRobustANGLEContextANGLE               @1200
-    glGetSamplerParameterIuivRobustANGLEContextANGLE              @1201
-    glGetQueryObjectivRobustANGLEContextANGLE                     @1202
-    glGetQueryObjecti64vRobustANGLEContextANGLE                   @1203
-    glGetQueryObjectui64vRobustANGLEContextANGLE                  @1204
-    glFramebufferTextureMultiviewLayeredANGLEContextANGLE         @1205
-    glFramebufferTextureMultiviewSideBySideANGLEContextANGLE      @1206
-    glCopyTexture3DANGLEContextANGLE                              @1207
-    glCopySubTexture3DANGLEContextANGLE                           @1208
+    glActiveShaderProgramContextANGLE                             @606
+    glActiveTextureContextANGLE                                   @607
+    glAlphaFuncContextANGLE                                       @608
+    glAlphaFuncxContextANGLE                                      @609
+    glAttachShaderContextANGLE                                    @610
+    glBeginQueryContextANGLE                                      @611
+    glBeginQueryEXTContextANGLE                                   @612
+    glBeginTransformFeedbackContextANGLE                          @613
+    glBindAttribLocationContextANGLE                              @614
+    glBindBufferContextANGLE                                      @615
+    glBindBufferBaseContextANGLE                                  @616
+    glBindBufferRangeContextANGLE                                 @617
+    glBindFragDataLocationEXTContextANGLE                         @618
+    glBindFragDataLocationIndexedEXTContextANGLE                  @619
+    glBindFramebufferContextANGLE                                 @620
+    glBindFramebufferOESContextANGLE                              @621
+    glBindImageTextureContextANGLE                                @622
+    glBindProgramPipelineContextANGLE                             @623
+    glBindRenderbufferContextANGLE                                @624
+    glBindRenderbufferOESContextANGLE                             @625
+    glBindSamplerContextANGLE                                     @626
+    glBindTextureContextANGLE                                     @627
+    glBindTransformFeedbackContextANGLE                           @628
+    glBindVertexArrayContextANGLE                                 @629
+    glBindVertexArrayOESContextANGLE                              @630
+    glBindVertexBufferContextANGLE                                @631
+    glBlendColorContextANGLE                                      @632
+    glBlendEquationContextANGLE                                   @633
+    glBlendEquationSeparateContextANGLE                           @634
+    glBlendFuncContextANGLE                                       @635
+    glBlendFuncSeparateContextANGLE                               @636
+    glBlitFramebufferContextANGLE                                 @637
+    glBlitFramebufferANGLEContextANGLE                            @638
+    glBufferDataContextANGLE                                      @639
+    glBufferSubDataContextANGLE                                   @640
+    glCheckFramebufferStatusContextANGLE                          @641
+    glCheckFramebufferStatusOESContextANGLE                       @642
+    glClearContextANGLE                                           @643
+    glClearBufferfiContextANGLE                                   @644
+    glClearBufferfvContextANGLE                                   @645
+    glClearBufferivContextANGLE                                   @646
+    glClearBufferuivContextANGLE                                  @647
+    glClearColorContextANGLE                                      @648
+    glClearColorxContextANGLE                                     @649
+    glClearDepthfContextANGLE                                     @650
+    glClearDepthxContextANGLE                                     @651
+    glClearStencilContextANGLE                                    @652
+    glClientActiveTextureContextANGLE                             @653
+    glClientWaitSyncContextANGLE                                  @654
+    glClipPlanefContextANGLE                                      @655
+    glClipPlanexContextANGLE                                      @656
+    glColor4fContextANGLE                                         @657
+    glColor4ubContextANGLE                                        @658
+    glColor4xContextANGLE                                         @659
+    glColorMaskContextANGLE                                       @660
+    glColorPointerContextANGLE                                    @661
+    glCompileShaderContextANGLE                                   @662
+    glCompressedTexImage2DContextANGLE                            @663
+    glCompressedTexImage3DContextANGLE                            @664
+    glCompressedTexSubImage2DContextANGLE                         @665
+    glCompressedTexSubImage3DContextANGLE                         @666
+    glCopyBufferSubDataContextANGLE                               @667
+    glCopyTexImage2DContextANGLE                                  @668
+    glCopyTexSubImage2DContextANGLE                               @669
+    glCopyTexSubImage3DContextANGLE                               @670
+    glCreateProgramContextANGLE                                   @671
+    glCreateShaderContextANGLE                                    @672
+    glCreateShaderProgramvContextANGLE                            @673
+    glCullFaceContextANGLE                                        @674
+    glCurrentPaletteMatrixOESContextANGLE                         @675
+    glDebugMessageCallbackKHRContextANGLE                         @676
+    glDebugMessageControlKHRContextANGLE                          @677
+    glDebugMessageInsertKHRContextANGLE                           @678
+    glDeleteBuffersContextANGLE                                   @679
+    glDeleteFencesNVContextANGLE                                  @680
+    glDeleteFramebuffersContextANGLE                              @681
+    glDeleteFramebuffersOESContextANGLE                           @682
+    glDeleteProgramContextANGLE                                   @683
+    glDeleteProgramPipelinesContextANGLE                          @684
+    glDeleteQueriesContextANGLE                                   @685
+    glDeleteQueriesEXTContextANGLE                                @686
+    glDeleteRenderbuffersContextANGLE                             @687
+    glDeleteRenderbuffersOESContextANGLE                          @688
+    glDeleteSamplersContextANGLE                                  @689
+    glDeleteShaderContextANGLE                                    @690
+    glDeleteSyncContextANGLE                                      @691
+    glDeleteTexturesContextANGLE                                  @692
+    glDeleteTransformFeedbacksContextANGLE                        @693
+    glDeleteVertexArraysContextANGLE                              @694
+    glDeleteVertexArraysOESContextANGLE                           @695
+    glDepthFuncContextANGLE                                       @696
+    glDepthMaskContextANGLE                                       @697
+    glDepthRangefContextANGLE                                     @698
+    glDepthRangexContextANGLE                                     @699
+    glDetachShaderContextANGLE                                    @700
+    glDisableContextANGLE                                         @701
+    glDisableClientStateContextANGLE                              @702
+    glDisableVertexAttribArrayContextANGLE                        @703
+    glDiscardFramebufferEXTContextANGLE                           @704
+    glDispatchComputeContextANGLE                                 @705
+    glDispatchComputeIndirectContextANGLE                         @706
+    glDrawArraysContextANGLE                                      @707
+    glDrawArraysIndirectContextANGLE                              @708
+    glDrawArraysInstancedContextANGLE                             @709
+    glDrawArraysInstancedANGLEContextANGLE                        @710
+    glDrawBuffersContextANGLE                                     @711
+    glDrawBuffersEXTContextANGLE                                  @712
+    glDrawElementsContextANGLE                                    @713
+    glDrawElementsIndirectContextANGLE                            @714
+    glDrawElementsInstancedContextANGLE                           @715
+    glDrawElementsInstancedANGLEContextANGLE                      @716
+    glDrawRangeElementsContextANGLE                               @717
+    glDrawTexfOESContextANGLE                                     @718
+    glDrawTexfvOESContextANGLE                                    @719
+    glDrawTexiOESContextANGLE                                     @720
+    glDrawTexivOESContextANGLE                                    @721
+    glDrawTexsOESContextANGLE                                     @722
+    glDrawTexsvOESContextANGLE                                    @723
+    glDrawTexxOESContextANGLE                                     @724
+    glDrawTexxvOESContextANGLE                                    @725
+    glEGLImageTargetRenderbufferStorageOESContextANGLE            @726
+    glEGLImageTargetTexture2DOESContextANGLE                      @727
+    glEnableContextANGLE                                          @728
+    glEnableClientStateContextANGLE                               @729
+    glEnableVertexAttribArrayContextANGLE                         @730
+    glEndQueryContextANGLE                                        @731
+    glEndQueryEXTContextANGLE                                     @732
+    glEndTransformFeedbackContextANGLE                            @733
+    glFenceSyncContextANGLE                                       @734
+    glFinishContextANGLE                                          @735
+    glFinishFenceNVContextANGLE                                   @736
+    glFlushContextANGLE                                           @737
+    glFlushMappedBufferRangeContextANGLE                          @738
+    glFlushMappedBufferRangeEXTContextANGLE                       @739
+    glFogfContextANGLE                                            @740
+    glFogfvContextANGLE                                           @741
+    glFogxContextANGLE                                            @742
+    glFogxvContextANGLE                                           @743
+    glFramebufferParameteriContextANGLE                           @744
+    glFramebufferRenderbufferContextANGLE                         @745
+    glFramebufferRenderbufferOESContextANGLE                      @746
+    glFramebufferTexture2DContextANGLE                            @747
+    glFramebufferTexture2DOESContextANGLE                         @748
+    glFramebufferTextureEXTContextANGLE                           @749
+    glFramebufferTextureLayerContextANGLE                         @750
+    glFrontFaceContextANGLE                                       @751
+    glFrustumfContextANGLE                                        @752
+    glFrustumxContextANGLE                                        @753
+    glGenBuffersContextANGLE                                      @754
+    glGenFencesNVContextANGLE                                     @755
+    glGenFramebuffersContextANGLE                                 @756
+    glGenFramebuffersOESContextANGLE                              @757
+    glGenProgramPipelinesContextANGLE                             @758
+    glGenQueriesContextANGLE                                      @759
+    glGenQueriesEXTContextANGLE                                   @760
+    glGenRenderbuffersContextANGLE                                @761
+    glGenRenderbuffersOESContextANGLE                             @762
+    glGenSamplersContextANGLE                                     @763
+    glGenTexturesContextANGLE                                     @764
+    glGenTransformFeedbacksContextANGLE                           @765
+    glGenVertexArraysContextANGLE                                 @766
+    glGenVertexArraysOESContextANGLE                              @767
+    glGenerateMipmapContextANGLE                                  @768
+    glGenerateMipmapOESContextANGLE                               @769
+    glGetActiveAttribContextANGLE                                 @770
+    glGetActiveUniformContextANGLE                                @771
+    glGetActiveUniformBlockNameContextANGLE                       @772
+    glGetActiveUniformBlockivContextANGLE                         @773
+    glGetActiveUniformsivContextANGLE                             @774
+    glGetAttachedShadersContextANGLE                              @775
+    glGetAttribLocationContextANGLE                               @776
+    glGetBooleani_vContextANGLE                                   @777
+    glGetBooleanvContextANGLE                                     @778
+    glGetBufferParameteri64vContextANGLE                          @779
+    glGetBufferParameterivContextANGLE                            @780
+    glGetBufferPointervContextANGLE                               @781
+    glGetBufferPointervOESContextANGLE                            @782
+    glGetClipPlanefContextANGLE                                   @783
+    glGetClipPlanexContextANGLE                                   @784
+    glGetDebugMessageLogKHRContextANGLE                           @785
+    glGetErrorContextANGLE                                        @786
+    glGetFenceivNVContextANGLE                                    @787
+    glGetFixedvContextANGLE                                       @788
+    glGetFloatvContextANGLE                                       @789
+    glGetFragDataIndexEXTContextANGLE                             @790
+    glGetFragDataLocationContextANGLE                             @791
+    glGetFramebufferAttachmentParameterivContextANGLE             @792
+    glGetFramebufferAttachmentParameterivOESContextANGLE          @793
+    glGetFramebufferParameterivContextANGLE                       @794
+    glGetGraphicsResetStatusEXTContextANGLE                       @795
+    glGetInteger64i_vContextANGLE                                 @796
+    glGetInteger64vContextANGLE                                   @797
+    glGetIntegeri_vContextANGLE                                   @798
+    glGetIntegervContextANGLE                                     @799
+    glGetInternalformativContextANGLE                             @800
+    glGetLightfvContextANGLE                                      @801
+    glGetLightxvContextANGLE                                      @802
+    glGetMaterialfvContextANGLE                                   @803
+    glGetMaterialxvContextANGLE                                   @804
+    glGetMultisamplefvContextANGLE                                @805
+    glGetObjectLabelKHRContextANGLE                               @806
+    glGetObjectPtrLabelKHRContextANGLE                            @807
+    glGetPointervContextANGLE                                     @808
+    glGetPointervKHRContextANGLE                                  @809
+    glGetProgramBinaryContextANGLE                                @810
+    glGetProgramBinaryOESContextANGLE                             @811
+    glGetProgramInfoLogContextANGLE                               @812
+    glGetProgramInterfaceivContextANGLE                           @813
+    glGetProgramPipelineInfoLogContextANGLE                       @814
+    glGetProgramPipelineivContextANGLE                            @815
+    glGetProgramResourceIndexContextANGLE                         @816
+    glGetProgramResourceLocationContextANGLE                      @817
+    glGetProgramResourceLocationIndexEXTContextANGLE              @818
+    glGetProgramResourceNameContextANGLE                          @819
+    glGetProgramResourceivContextANGLE                            @820
+    glGetProgramivContextANGLE                                    @821
+    glGetQueryObjecti64vEXTContextANGLE                           @822
+    glGetQueryObjectivEXTContextANGLE                             @823
+    glGetQueryObjectui64vEXTContextANGLE                          @824
+    glGetQueryObjectuivContextANGLE                               @825
+    glGetQueryObjectuivEXTContextANGLE                            @826
+    glGetQueryivContextANGLE                                      @827
+    glGetQueryivEXTContextANGLE                                   @828
+    glGetRenderbufferParameterivContextANGLE                      @829
+    glGetRenderbufferParameterivOESContextANGLE                   @830
+    glGetSamplerParameterfvContextANGLE                           @831
+    glGetSamplerParameterivContextANGLE                           @832
+    glGetShaderInfoLogContextANGLE                                @833
+    glGetShaderPrecisionFormatContextANGLE                        @834
+    glGetShaderSourceContextANGLE                                 @835
+    glGetShaderivContextANGLE                                     @836
+    glGetStringContextANGLE                                       @837
+    glGetStringiContextANGLE                                      @838
+    glGetSyncivContextANGLE                                       @839
+    glGetTexEnvfvContextANGLE                                     @840
+    glGetTexEnvivContextANGLE                                     @841
+    glGetTexEnvxvContextANGLE                                     @842
+    glGetTexGenfvOESContextANGLE                                  @843
+    glGetTexGenivOESContextANGLE                                  @844
+    glGetTexGenxvOESContextANGLE                                  @845
+    glGetTexLevelParameterfvContextANGLE                          @846
+    glGetTexLevelParameterivContextANGLE                          @847
+    glGetTexParameterfvContextANGLE                               @848
+    glGetTexParameterivContextANGLE                               @849
+    glGetTexParameterxvContextANGLE                               @850
+    glGetTransformFeedbackVaryingContextANGLE                     @851
+    glGetTranslatedShaderSourceANGLEContextANGLE                  @852
+    glGetUniformBlockIndexContextANGLE                            @853
+    glGetUniformIndicesContextANGLE                               @854
+    glGetUniformLocationContextANGLE                              @855
+    glGetUniformfvContextANGLE                                    @856
+    glGetUniformivContextANGLE                                    @857
+    glGetUniformuivContextANGLE                                   @858
+    glGetVertexAttribIivContextANGLE                              @859
+    glGetVertexAttribIuivContextANGLE                             @860
+    glGetVertexAttribPointervContextANGLE                         @861
+    glGetVertexAttribfvContextANGLE                               @862
+    glGetVertexAttribivContextANGLE                               @863
+    glGetnUniformfvEXTContextANGLE                                @864
+    glGetnUniformivEXTContextANGLE                                @865
+    glHintContextANGLE                                            @866
+    glInsertEventMarkerEXTContextANGLE                            @867
+    glInvalidateFramebufferContextANGLE                           @868
+    glInvalidateSubFramebufferContextANGLE                        @869
+    glIsBufferContextANGLE                                        @870
+    glIsEnabledContextANGLE                                       @871
+    glIsFenceNVContextANGLE                                       @872
+    glIsFramebufferContextANGLE                                   @873
+    glIsFramebufferOESContextANGLE                                @874
+    glIsProgramContextANGLE                                       @875
+    glIsProgramPipelineContextANGLE                               @876
+    glIsQueryContextANGLE                                         @877
+    glIsQueryEXTContextANGLE                                      @878
+    glIsRenderbufferContextANGLE                                  @879
+    glIsRenderbufferOESContextANGLE                               @880
+    glIsSamplerContextANGLE                                       @881
+    glIsShaderContextANGLE                                        @882
+    glIsSyncContextANGLE                                          @883
+    glIsTextureContextANGLE                                       @884
+    glIsTransformFeedbackContextANGLE                             @885
+    glIsVertexArrayContextANGLE                                   @886
+    glIsVertexArrayOESContextANGLE                                @887
+    glLightModelfContextANGLE                                     @888
+    glLightModelfvContextANGLE                                    @889
+    glLightModelxContextANGLE                                     @890
+    glLightModelxvContextANGLE                                    @891
+    glLightfContextANGLE                                          @892
+    glLightfvContextANGLE                                         @893
+    glLightxContextANGLE                                          @894
+    glLightxvContextANGLE                                         @895
+    glLineWidthContextANGLE                                       @896
+    glLineWidthxContextANGLE                                      @897
+    glLinkProgramContextANGLE                                     @898
+    glLoadIdentityContextANGLE                                    @899
+    glLoadMatrixfContextANGLE                                     @900
+    glLoadMatrixxContextANGLE                                     @901
+    glLoadPaletteFromModelViewMatrixOESContextANGLE               @902
+    glLogicOpContextANGLE                                         @903
+    glMapBufferOESContextANGLE                                    @904
+    glMapBufferRangeContextANGLE                                  @905
+    glMapBufferRangeEXTContextANGLE                               @906
+    glMaterialfContextANGLE                                       @907
+    glMaterialfvContextANGLE                                      @908
+    glMaterialxContextANGLE                                       @909
+    glMaterialxvContextANGLE                                      @910
+    glMatrixIndexPointerOESContextANGLE                           @911
+    glMatrixModeContextANGLE                                      @912
+    glMaxShaderCompilerThreadsKHRContextANGLE                     @913
+    glMemoryBarrierContextANGLE                                   @914
+    glMemoryBarrierByRegionContextANGLE                           @915
+    glMultMatrixfContextANGLE                                     @916
+    glMultMatrixxContextANGLE                                     @917
+    glMultiTexCoord4fContextANGLE                                 @918
+    glMultiTexCoord4xContextANGLE                                 @919
+    glNormal3fContextANGLE                                        @920
+    glNormal3xContextANGLE                                        @921
+    glNormalPointerContextANGLE                                   @922
+    glObjectLabelKHRContextANGLE                                  @923
+    glObjectPtrLabelKHRContextANGLE                               @924
+    glOrthofContextANGLE                                          @925
+    glOrthoxContextANGLE                                          @926
+    glPauseTransformFeedbackContextANGLE                          @927
+    glPixelStoreiContextANGLE                                     @928
+    glPointParameterfContextANGLE                                 @929
+    glPointParameterfvContextANGLE                                @930
+    glPointParameterxContextANGLE                                 @931
+    glPointParameterxvContextANGLE                                @932
+    glPointSizeContextANGLE                                       @933
+    glPointSizePointerOESContextANGLE                             @934
+    glPointSizexContextANGLE                                      @935
+    glPolygonOffsetContextANGLE                                   @936
+    glPolygonOffsetxContextANGLE                                  @937
+    glPopDebugGroupKHRContextANGLE                                @938
+    glPopGroupMarkerEXTContextANGLE                               @939
+    glPopMatrixContextANGLE                                       @940
+    glProgramBinaryContextANGLE                                   @941
+    glProgramBinaryOESContextANGLE                                @942
+    glProgramParameteriContextANGLE                               @943
+    glProgramUniform1fContextANGLE                                @944
+    glProgramUniform1fvContextANGLE                               @945
+    glProgramUniform1iContextANGLE                                @946
+    glProgramUniform1ivContextANGLE                               @947
+    glProgramUniform1uiContextANGLE                               @948
+    glProgramUniform1uivContextANGLE                              @949
+    glProgramUniform2fContextANGLE                                @950
+    glProgramUniform2fvContextANGLE                               @951
+    glProgramUniform2iContextANGLE                                @952
+    glProgramUniform2ivContextANGLE                               @953
+    glProgramUniform2uiContextANGLE                               @954
+    glProgramUniform2uivContextANGLE                              @955
+    glProgramUniform3fContextANGLE                                @956
+    glProgramUniform3fvContextANGLE                               @957
+    glProgramUniform3iContextANGLE                                @958
+    glProgramUniform3ivContextANGLE                               @959
+    glProgramUniform3uiContextANGLE                               @960
+    glProgramUniform3uivContextANGLE                              @961
+    glProgramUniform4fContextANGLE                                @962
+    glProgramUniform4fvContextANGLE                               @963
+    glProgramUniform4iContextANGLE                                @964
+    glProgramUniform4ivContextANGLE                               @965
+    glProgramUniform4uiContextANGLE                               @966
+    glProgramUniform4uivContextANGLE                              @967
+    glProgramUniformMatrix2fvContextANGLE                         @968
+    glProgramUniformMatrix2x3fvContextANGLE                       @969
+    glProgramUniformMatrix2x4fvContextANGLE                       @970
+    glProgramUniformMatrix3fvContextANGLE                         @971
+    glProgramUniformMatrix3x2fvContextANGLE                       @972
+    glProgramUniformMatrix3x4fvContextANGLE                       @973
+    glProgramUniformMatrix4fvContextANGLE                         @974
+    glProgramUniformMatrix4x2fvContextANGLE                       @975
+    glProgramUniformMatrix4x3fvContextANGLE                       @976
+    glPushDebugGroupKHRContextANGLE                               @977
+    glPushGroupMarkerEXTContextANGLE                              @978
+    glPushMatrixContextANGLE                                      @979
+    glQueryCounterEXTContextANGLE                                 @980
+    glQueryMatrixxOESContextANGLE                                 @981
+    glReadBufferContextANGLE                                      @982
+    glReadPixelsContextANGLE                                      @983
+    glReadnPixelsEXTContextANGLE                                  @984
+    glReleaseShaderCompilerContextANGLE                           @985
+    glRenderbufferStorageContextANGLE                             @986
+    glRenderbufferStorageMultisampleContextANGLE                  @987
+    glRenderbufferStorageMultisampleANGLEContextANGLE             @988
+    glRenderbufferStorageOESContextANGLE                          @989
+    glResumeTransformFeedbackContextANGLE                         @990
+    glRotatefContextANGLE                                         @991
+    glRotatexContextANGLE                                         @992
+    glSampleCoverageContextANGLE                                  @993
+    glSampleCoveragexContextANGLE                                 @994
+    glSampleMaskiContextANGLE                                     @995
+    glSamplerParameterfContextANGLE                               @996
+    glSamplerParameterfvContextANGLE                              @997
+    glSamplerParameteriContextANGLE                               @998
+    glSamplerParameterivContextANGLE                              @999
+    glScalefContextANGLE                                          @1000
+    glScalexContextANGLE                                          @1001
+    glScissorContextANGLE                                         @1002
+    glSetFenceNVContextANGLE                                      @1003
+    glShadeModelContextANGLE                                      @1004
+    glShaderBinaryContextANGLE                                    @1005
+    glShaderSourceContextANGLE                                    @1006
+    glStencilFuncContextANGLE                                     @1007
+    glStencilFuncSeparateContextANGLE                             @1008
+    glStencilMaskContextANGLE                                     @1009
+    glStencilMaskSeparateContextANGLE                             @1010
+    glStencilOpContextANGLE                                       @1011
+    glStencilOpSeparateContextANGLE                               @1012
+    glTestFenceNVContextANGLE                                     @1013
+    glTexCoordPointerContextANGLE                                 @1014
+    glTexEnvfContextANGLE                                         @1015
+    glTexEnvfvContextANGLE                                        @1016
+    glTexEnviContextANGLE                                         @1017
+    glTexEnvivContextANGLE                                        @1018
+    glTexEnvxContextANGLE                                         @1019
+    glTexEnvxvContextANGLE                                        @1020
+    glTexGenfOESContextANGLE                                      @1021
+    glTexGenfvOESContextANGLE                                     @1022
+    glTexGeniOESContextANGLE                                      @1023
+    glTexGenivOESContextANGLE                                     @1024
+    glTexGenxOESContextANGLE                                      @1025
+    glTexGenxvOESContextANGLE                                     @1026
+    glTexImage2DContextANGLE                                      @1027
+    glTexImage3DContextANGLE                                      @1028
+    glTexParameterfContextANGLE                                   @1029
+    glTexParameterfvContextANGLE                                  @1030
+    glTexParameteriContextANGLE                                   @1031
+    glTexParameterivContextANGLE                                  @1032
+    glTexParameterxContextANGLE                                   @1033
+    glTexParameterxvContextANGLE                                  @1034
+    glTexStorage1DEXTContextANGLE                                 @1035
+    glTexStorage2DContextANGLE                                    @1036
+    glTexStorage2DEXTContextANGLE                                 @1037
+    glTexStorage2DMultisampleContextANGLE                         @1038
+    glTexStorage3DContextANGLE                                    @1039
+    glTexStorage3DEXTContextANGLE                                 @1040
+    glTexStorage3DMultisampleOESContextANGLE                      @1041
+    glTexSubImage2DContextANGLE                                   @1042
+    glTexSubImage3DContextANGLE                                   @1043
+    glTransformFeedbackVaryingsContextANGLE                       @1044
+    glTranslatefContextANGLE                                      @1045
+    glTranslatexContextANGLE                                      @1046
+    glUniform1fContextANGLE                                       @1047
+    glUniform1fvContextANGLE                                      @1048
+    glUniform1iContextANGLE                                       @1049
+    glUniform1ivContextANGLE                                      @1050
+    glUniform1uiContextANGLE                                      @1051
+    glUniform1uivContextANGLE                                     @1052
+    glUniform2fContextANGLE                                       @1053
+    glUniform2fvContextANGLE                                      @1054
+    glUniform2iContextANGLE                                       @1055
+    glUniform2ivContextANGLE                                      @1056
+    glUniform2uiContextANGLE                                      @1057
+    glUniform2uivContextANGLE                                     @1058
+    glUniform3fContextANGLE                                       @1059
+    glUniform3fvContextANGLE                                      @1060
+    glUniform3iContextANGLE                                       @1061
+    glUniform3ivContextANGLE                                      @1062
+    glUniform3uiContextANGLE                                      @1063
+    glUniform3uivContextANGLE                                     @1064
+    glUniform4fContextANGLE                                       @1065
+    glUniform4fvContextANGLE                                      @1066
+    glUniform4iContextANGLE                                       @1067
+    glUniform4ivContextANGLE                                      @1068
+    glUniform4uiContextANGLE                                      @1069
+    glUniform4uivContextANGLE                                     @1070
+    glUniformBlockBindingContextANGLE                             @1071
+    glUniformMatrix2fvContextANGLE                                @1072
+    glUniformMatrix2x3fvContextANGLE                              @1073
+    glUniformMatrix2x4fvContextANGLE                              @1074
+    glUniformMatrix3fvContextANGLE                                @1075
+    glUniformMatrix3x2fvContextANGLE                              @1076
+    glUniformMatrix3x4fvContextANGLE                              @1077
+    glUniformMatrix4fvContextANGLE                                @1078
+    glUniformMatrix4x2fvContextANGLE                              @1079
+    glUniformMatrix4x3fvContextANGLE                              @1080
+    glUnmapBufferContextANGLE                                     @1081
+    glUnmapBufferOESContextANGLE                                  @1082
+    glUseProgramContextANGLE                                      @1083
+    glUseProgramStagesContextANGLE                                @1084
+    glValidateProgramContextANGLE                                 @1085
+    glValidateProgramPipelineContextANGLE                         @1086
+    glVertexAttrib1fContextANGLE                                  @1087
+    glVertexAttrib1fvContextANGLE                                 @1088
+    glVertexAttrib2fContextANGLE                                  @1089
+    glVertexAttrib2fvContextANGLE                                 @1090
+    glVertexAttrib3fContextANGLE                                  @1091
+    glVertexAttrib3fvContextANGLE                                 @1092
+    glVertexAttrib4fContextANGLE                                  @1093
+    glVertexAttrib4fvContextANGLE                                 @1094
+    glVertexAttribBindingContextANGLE                             @1095
+    glVertexAttribDivisorContextANGLE                             @1096
+    glVertexAttribDivisorANGLEContextANGLE                        @1097
+    glVertexAttribFormatContextANGLE                              @1098
+    glVertexAttribI4iContextANGLE                                 @1099
+    glVertexAttribI4ivContextANGLE                                @1100
+    glVertexAttribI4uiContextANGLE                                @1101
+    glVertexAttribI4uivContextANGLE                               @1102
+    glVertexAttribIFormatContextANGLE                             @1103
+    glVertexAttribIPointerContextANGLE                            @1104
+    glVertexAttribPointerContextANGLE                             @1105
+    glVertexBindingDivisorContextANGLE                            @1106
+    glVertexPointerContextANGLE                                   @1107
+    glViewportContextANGLE                                        @1108
+    glWaitSyncContextANGLE                                        @1109
+    glWeightPointerOESContextANGLE                                @1110
+    glBindUniformLocationCHROMIUMContextANGLE                     @1111
+    glCoverageModulationCHROMIUMContextANGLE                      @1112
+    glMatrixLoadfCHROMIUMContextANGLE                             @1113
+    glMatrixLoadIdentityCHROMIUMContextANGLE                      @1114
+    glGenPathsCHROMIUMContextANGLE                                @1115
+    glDeletePathsCHROMIUMContextANGLE                             @1116
+    glIsPathCHROMIUMContextANGLE                                  @1117
+    glPathCommandsCHROMIUMContextANGLE                            @1118
+    glPathParameterfCHROMIUMContextANGLE                          @1119
+    glPathParameteriCHROMIUMContextANGLE                          @1120
+    glGetPathParameterfvCHROMIUMContextANGLE                      @1121
+    glGetPathParameterivCHROMIUMContextANGLE                      @1122
+    glPathStencilFuncCHROMIUMContextANGLE                         @1123
+    glStencilFillPathCHROMIUMContextANGLE                         @1124
+    glStencilStrokePathCHROMIUMContextANGLE                       @1125
+    glCoverFillPathCHROMIUMContextANGLE                           @1126
+    glCoverStrokePathCHROMIUMContextANGLE                         @1127
+    glStencilThenCoverFillPathCHROMIUMContextANGLE                @1128
+    glStencilThenCoverStrokePathCHROMIUMContextANGLE              @1129
+    glCoverFillPathInstancedCHROMIUMContextANGLE                  @1130
+    glCoverStrokePathInstancedCHROMIUMContextANGLE                @1131
+    glStencilStrokePathInstancedCHROMIUMContextANGLE              @1132
+    glStencilFillPathInstancedCHROMIUMContextANGLE                @1133
+    glStencilThenCoverFillPathInstancedCHROMIUMContextANGLE       @1134
+    glStencilThenCoverStrokePathInstancedCHROMIUMContextANGLE     @1135
+    glBindFragmentInputLocationCHROMIUMContextANGLE               @1136
+    glProgramPathFragmentInputGenCHROMIUMContextANGLE             @1137
+    glCopyTextureCHROMIUMContextANGLE                             @1138
+    glCopySubTextureCHROMIUMContextANGLE                          @1139
+    glCompressedCopyTextureCHROMIUMContextANGLE                   @1140
+    glRequestExtensionANGLEContextANGLE                           @1141
+    glGetBooleanvRobustANGLEContextANGLE                          @1142
+    glGetBufferParameterivRobustANGLEContextANGLE                 @1143
+    glGetFloatvRobustANGLEContextANGLE                            @1144
+    glGetFramebufferAttachmentParameterivRobustANGLEContextANGLE  @1145
+    glGetIntegervRobustANGLEContextANGLE                          @1146
+    glGetProgramivRobustANGLEContextANGLE                         @1147
+    glGetRenderbufferParameterivRobustANGLEContextANGLE           @1148
+    glGetShaderivRobustANGLEContextANGLE                          @1149
+    glGetTexParameterfvRobustANGLEContextANGLE                    @1150
+    glGetTexParameterivRobustANGLEContextANGLE                    @1151
+    glGetUniformfvRobustANGLEContextANGLE                         @1152
+    glGetUniformivRobustANGLEContextANGLE                         @1153
+    glGetVertexAttribfvRobustANGLEContextANGLE                    @1154
+    glGetVertexAttribivRobustANGLEContextANGLE                    @1155
+    glGetVertexAttribPointervRobustANGLEContextANGLE              @1156
+    glReadPixelsRobustANGLEContextANGLE                           @1157
+    glTexImage2DRobustANGLEContextANGLE                           @1158
+    glTexParameterfvRobustANGLEContextANGLE                       @1159
+    glTexParameterivRobustANGLEContextANGLE                       @1160
+    glTexSubImage2DRobustANGLEContextANGLE                        @1161
+    glTexImage3DRobustANGLEContextANGLE                           @1162
+    glTexSubImage3DRobustANGLEContextANGLE                        @1163
+    glCompressedTexImage2DRobustANGLEContextANGLE                 @1164
+    glCompressedTexSubImage2DRobustANGLEContextANGLE              @1165
+    glCompressedTexImage3DRobustANGLEContextANGLE                 @1166
+    glCompressedTexSubImage3DRobustANGLEContextANGLE              @1167
+    glGetQueryivRobustANGLEContextANGLE                           @1168
+    glGetQueryObjectuivRobustANGLEContextANGLE                    @1169
+    glGetBufferPointervRobustANGLEContextANGLE                    @1170
+    glGetIntegeri_vRobustANGLEContextANGLE                        @1171
+    glGetInternalformativRobustANGLEContextANGLE                  @1172
+    glGetVertexAttribIivRobustANGLEContextANGLE                   @1173
+    glGetVertexAttribIuivRobustANGLEContextANGLE                  @1174
+    glGetUniformuivRobustANGLEContextANGLE                        @1175
+    glGetActiveUniformBlockivRobustANGLEContextANGLE              @1176
+    glGetInteger64vRobustANGLEContextANGLE                        @1177
+    glGetInteger64i_vRobustANGLEContextANGLE                      @1178
+    glGetBufferParameteri64vRobustANGLEContextANGLE               @1179
+    glSamplerParameterivRobustANGLEContextANGLE                   @1180
+    glSamplerParameterfvRobustANGLEContextANGLE                   @1181
+    glGetSamplerParameterivRobustANGLEContextANGLE                @1182
+    glGetSamplerParameterfvRobustANGLEContextANGLE                @1183
+    glGetFramebufferParameterivRobustANGLEContextANGLE            @1184
+    glGetProgramInterfaceivRobustANGLEContextANGLE                @1185
+    glGetBooleani_vRobustANGLEContextANGLE                        @1186
+    glGetMultisamplefvRobustANGLEContextANGLE                     @1187
+    glGetTexLevelParameterivRobustANGLEContextANGLE               @1188
+    glGetTexLevelParameterfvRobustANGLEContextANGLE               @1189
+    glGetPointervRobustANGLERobustANGLEContextANGLE               @1190
+    glReadnPixelsRobustANGLEContextANGLE                          @1191
+    glGetnUniformfvRobustANGLEContextANGLE                        @1192
+    glGetnUniformivRobustANGLEContextANGLE                        @1193
+    glGetnUniformuivRobustANGLEContextANGLE                       @1194
+    glTexParameterIivRobustANGLEContextANGLE                      @1195
+    glTexParameterIuivRobustANGLEContextANGLE                     @1196
+    glGetTexParameterIivRobustANGLEContextANGLE                   @1197
+    glGetTexParameterIuivRobustANGLEContextANGLE                  @1198
+    glSamplerParameterIivRobustANGLEContextANGLE                  @1199
+    glSamplerParameterIuivRobustANGLEContextANGLE                 @1200
+    glGetSamplerParameterIivRobustANGLEContextANGLE               @1201
+    glGetSamplerParameterIuivRobustANGLEContextANGLE              @1202
+    glGetQueryObjectivRobustANGLEContextANGLE                     @1203
+    glGetQueryObjecti64vRobustANGLEContextANGLE                   @1204
+    glGetQueryObjectui64vRobustANGLEContextANGLE                  @1205
+    glFramebufferTextureMultiviewLayeredANGLEContextANGLE         @1206
+    glFramebufferTextureMultiviewSideBySideANGLEContextANGLE      @1207
+    glCopyTexture3DANGLEContextANGLE                              @1208
+    glCopySubTexture3DANGLEContextANGLE                           @1209
+    glTexStorage2DMultisampleANGLEContextANGLE                    @1210
diff --git a/src/libGLESv2/proc_table_data.json b/src/libGLESv2/proc_table_data.json
index 5c4d75a..2383dd5 100644
--- a/src/libGLESv2/proc_table_data.json
+++ b/src/libGLESv2/proc_table_data.json
@@ -721,6 +721,10 @@
         "glFramebufferTextureEXT"
     ],
 
+    "GL_ANGLE_texture_multisample": [
+        "glTexStorage2DMultisampleANGLE"
+    ],
+
     "EGL 1.0": [
         "eglChooseConfig",
         "eglCopyBuffers",
diff --git a/src/tests/gl_tests/TextureMultisampleTest.cpp b/src/tests/gl_tests/TextureMultisampleTest.cpp
index 9866ea3..0ef5541 100644
--- a/src/tests/gl_tests/TextureMultisampleTest.cpp
+++ b/src/tests/gl_tests/TextureMultisampleTest.cpp
@@ -62,6 +62,13 @@
         ANGLETest::TearDown();
     }
 
+    void texStorageMultisample(GLenum target,
+                               GLint samples,
+                               GLenum format,
+                               GLsizei width,
+                               GLsizei height,
+                               GLboolean fixedsamplelocations);
+
     GLuint mFramebuffer = 0;
     GLuint mTexture     = 0;
 
@@ -80,6 +87,33 @@
         return maxSamples;
     }
 
+    bool lessThanES31MultisampleExtNotSupported()
+    {
+        return getClientMajorVersion() <= 3 && getClientMinorVersion() < 1 &&
+               !ensureExtensionEnabled("GL_ANGLE_texture_multisample");
+    }
+
+    const char *multisampleTextureFragmentShader()
+    {
+        return R"(#version 300 es
+#extension GL_ANGLE_texture_multisample : require
+precision highp float;
+precision highp int;
+
+uniform highp sampler2DMS tex;
+uniform int sampleNum;
+
+in vec4 v_position;
+out vec4 my_FragColor;
+
+void main() {
+    ivec2 texSize = textureSize(tex);
+    ivec2 sampleCoords = ivec2((v_position.xy * 0.5 + 0.5) * vec2(texSize.xy - 1));
+    my_FragColor = texelFetch(tex, sampleCoords, sampleNum);
+}
+)";
+    };
+
     const char *blitArrayTextureLayerFragmentShader()
     {
         return R"(#version 310 es
@@ -125,10 +159,10 @@
     };
 };
 
-class TextureMultisampleTestES31 : public TextureMultisampleTest
+class NegativeTextureMultisampleTest : public TextureMultisampleTest
 {
   protected:
-    TextureMultisampleTestES31() : TextureMultisampleTest() {}
+    NegativeTextureMultisampleTest() : TextureMultisampleTest() {}
 };
 
 class TextureMultisampleArrayWebGLTest : public TextureMultisampleTest
@@ -157,104 +191,108 @@
     }
 };
 
+void TextureMultisampleTest::texStorageMultisample(GLenum target,
+                                                   GLint samples,
+                                                   GLenum internalformat,
+                                                   GLsizei width,
+                                                   GLsizei height,
+                                                   GLboolean fixedsamplelocations)
+{
+    if (getClientMajorVersion() <= 3 && getClientMinorVersion() < 1 &&
+        ensureExtensionEnabled("GL_ANGLE_texture_multisample"))
+    {
+        glTexStorage2DMultisampleANGLE(target, samples, internalformat, width, height,
+                                       fixedsamplelocations);
+    }
+    else
+    {
+        glTexStorage2DMultisample(target, samples, internalformat, width, height,
+                                  fixedsamplelocations);
+    }
+}
+
 // Tests that if es version < 3.1, GL_TEXTURE_2D_MULTISAMPLE is not supported in
 // GetInternalformativ. Checks that the number of samples returned is valid in case of ES >= 3.1.
 TEST_P(TextureMultisampleTest, MultisampleTargetGetInternalFormativBase)
 {
+    ANGLE_SKIP_TEST_IF(lessThanES31MultisampleExtNotSupported());
+
     // This query returns supported sample counts in descending order. If only one sample count is
     // queried, it should be the maximum one.
     GLint maxSamplesR8 = 0;
     glGetInternalformativ(GL_TEXTURE_2D_MULTISAMPLE, GL_R8, GL_SAMPLES, 1, &maxSamplesR8);
-    if (getClientMajorVersion() < 3 || getClientMinorVersion() < 1)
-    {
-        ASSERT_GL_ERROR(GL_INVALID_ENUM);
-    }
-    else
-    {
-        ASSERT_GL_NO_ERROR();
 
-        // GLES 3.1 section 19.3.1 specifies the required minimum of how many samples are supported.
-        GLint maxColorTextureSamples;
-        glGetIntegerv(GL_MAX_COLOR_TEXTURE_SAMPLES, &maxColorTextureSamples);
-        GLint maxSamples;
-        glGetIntegerv(GL_MAX_SAMPLES, &maxSamples);
-        GLint maxSamplesR8Required = std::min(maxColorTextureSamples, maxSamples);
+    // GLES 3.1 section 19.3.1 specifies the required minimum of how many samples are supported.
+    GLint maxColorTextureSamples;
+    glGetIntegerv(GL_MAX_COLOR_TEXTURE_SAMPLES, &maxColorTextureSamples);
+    GLint maxSamples;
+    glGetIntegerv(GL_MAX_SAMPLES, &maxSamples);
+    GLint maxSamplesR8Required = std::min(maxColorTextureSamples, maxSamples);
 
-        EXPECT_GE(maxSamplesR8, maxSamplesR8Required);
-    }
+    EXPECT_GE(maxSamplesR8, maxSamplesR8Required);
+    ASSERT_GL_NO_ERROR();
 }
 
-// Tests that if es version < 3.1, GL_TEXTURE_2D_MULTISAMPLE is not supported in
-// FramebufferTexture2D.
+// Tests that if es version < 3.1 and multisample extension is unsupported,
+// GL_TEXTURE_2D_MULTISAMPLE_ANGLE is not supported in FramebufferTexture2D.
 TEST_P(TextureMultisampleTest, MultisampleTargetFramebufferTexture2D)
 {
+    ANGLE_SKIP_TEST_IF(lessThanES31MultisampleExtNotSupported());
     GLint samples = 1;
     glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, mTexture);
-    glTexStorage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, samples, GL_RGBA8, 64, 64, GL_FALSE);
-    if (getClientMajorVersion() < 3 || getClientMinorVersion() < 1)
-    {
-        ASSERT_GL_ERROR(GL_INVALID_ENUM);
-    }
-    else
-    {
-        ASSERT_GL_NO_ERROR();
-    }
+    texStorageMultisample(GL_TEXTURE_2D_MULTISAMPLE, samples, GL_RGBA8, 64, 64, GL_FALSE);
 
     glBindFramebuffer(GL_FRAMEBUFFER, mFramebuffer);
     glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D_MULTISAMPLE,
                            mTexture, 0);
-    if (getClientMajorVersion() < 3 || getClientMinorVersion() < 1)
-    {
-        ASSERT_GL_ERROR(GL_INVALID_OPERATION);
-    }
-    else
-    {
-        ASSERT_GL_NO_ERROR();
-    }
+    ASSERT_GL_NO_ERROR();
 }
 
 // Tests basic functionality of glTexStorage2DMultisample.
-TEST_P(TextureMultisampleTestES31, ValidateTextureStorageMultisampleParameters)
+TEST_P(TextureMultisampleTest, ValidateTextureStorageMultisampleParameters)
 {
+    ANGLE_SKIP_TEST_IF(lessThanES31MultisampleExtNotSupported());
+
     glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, mTexture);
-    glTexStorage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, 1, GL_RGBA8, 1, 1, GL_FALSE);
+    texStorageMultisample(GL_TEXTURE_2D_MULTISAMPLE, 1, GL_RGBA8, 1, 1, GL_FALSE);
     ASSERT_GL_NO_ERROR();
 
     GLint params = 0;
     glGetTexParameteriv(GL_TEXTURE_2D_MULTISAMPLE, GL_TEXTURE_IMMUTABLE_FORMAT, &params);
     EXPECT_EQ(1, params);
 
-    glTexStorage2DMultisample(GL_TEXTURE_2D, 1, GL_RGBA8, 1, 1, GL_FALSE);
+    texStorageMultisample(GL_TEXTURE_2D, 1, GL_RGBA8, 1, 1, GL_FALSE);
     ASSERT_GL_ERROR(GL_INVALID_ENUM);
 
-    glTexStorage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, 1, GL_RGBA8, 0, 0, GL_FALSE);
+    texStorageMultisample(GL_TEXTURE_2D_MULTISAMPLE, 1, GL_RGBA8, 0, 0, GL_FALSE);
     ASSERT_GL_ERROR(GL_INVALID_VALUE);
 
     GLint maxSize = 0;
     glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxSize);
-    glTexStorage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, 1, GL_RGBA8, maxSize + 1, 1, GL_FALSE);
+    texStorageMultisample(GL_TEXTURE_2D_MULTISAMPLE, 1, GL_RGBA8, maxSize + 1, 1, GL_FALSE);
     ASSERT_GL_ERROR(GL_INVALID_VALUE);
 
     GLint maxSamples = 0;
     glGetInternalformativ(GL_TEXTURE_2D_MULTISAMPLE, GL_R8, GL_SAMPLES, 1, &maxSamples);
-    glTexStorage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, maxSamples + 1, GL_RGBA8, 1, 1, GL_FALSE);
+    texStorageMultisample(GL_TEXTURE_2D_MULTISAMPLE, maxSamples + 1, GL_RGBA8, 1, 1, GL_FALSE);
     ASSERT_GL_ERROR(GL_INVALID_OPERATION);
 
-    glTexStorage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, 0, GL_RGBA8, 1, 1, GL_FALSE);
+    texStorageMultisample(GL_TEXTURE_2D_MULTISAMPLE, 0, GL_RGBA8, 1, 1, GL_FALSE);
     ASSERT_GL_ERROR(GL_INVALID_VALUE);
 
-    glTexStorage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, 1, GL_RGBA, 0, 0, GL_FALSE);
+    texStorageMultisample(GL_TEXTURE_2D_MULTISAMPLE, 1, GL_RGBA, 0, 0, GL_FALSE);
     ASSERT_GL_ERROR(GL_INVALID_VALUE);
 
     glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, 0);
-    glTexStorage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, 1, GL_RGBA8, 1, 1, GL_FALSE);
+    texStorageMultisample(GL_TEXTURE_2D_MULTISAMPLE, 1, GL_RGBA8, 1, 1, GL_FALSE);
     ASSERT_GL_ERROR(GL_INVALID_OPERATION);
 }
 
 // Tests the value of MAX_INTEGER_SAMPLES is no less than 1.
 // [OpenGL ES 3.1 SPEC Table 20.40]
-TEST_P(TextureMultisampleTestES31, MaxIntegerSamples)
+TEST_P(TextureMultisampleTest, MaxIntegerSamples)
 {
+    ANGLE_SKIP_TEST_IF(lessThanES31MultisampleExtNotSupported());
     GLint maxIntegerSamples;
     glGetIntegerv(GL_MAX_INTEGER_SAMPLES, &maxIntegerSamples);
     EXPECT_GE(maxIntegerSamples, 1);
@@ -263,8 +301,9 @@
 
 // Tests the value of MAX_COLOR_TEXTURE_SAMPLES is no less than 1.
 // [OpenGL ES 3.1 SPEC Table 20.40]
-TEST_P(TextureMultisampleTestES31, MaxColorTextureSamples)
+TEST_P(TextureMultisampleTest, MaxColorTextureSamples)
 {
+    ANGLE_SKIP_TEST_IF(lessThanES31MultisampleExtNotSupported());
     GLint maxColorTextureSamples;
     glGetIntegerv(GL_MAX_COLOR_TEXTURE_SAMPLES, &maxColorTextureSamples);
     EXPECT_GE(maxColorTextureSamples, 1);
@@ -273,8 +312,9 @@
 
 // Tests the value of MAX_DEPTH_TEXTURE_SAMPLES is no less than 1.
 // [OpenGL ES 3.1 SPEC Table 20.40]
-TEST_P(TextureMultisampleTestES31, MaxDepthTextureSamples)
+TEST_P(TextureMultisampleTest, MaxDepthTextureSamples)
 {
+    ANGLE_SKIP_TEST_IF(lessThanES31MultisampleExtNotSupported());
     GLint maxDepthTextureSamples;
     glGetIntegerv(GL_MAX_DEPTH_TEXTURE_SAMPLES, &maxDepthTextureSamples);
     EXPECT_GE(maxDepthTextureSamples, 1);
@@ -282,9 +322,9 @@
 }
 
 // The value of sample position should be equal to standard pattern on D3D.
-TEST_P(TextureMultisampleTestES31, CheckSamplePositions)
+TEST_P(TextureMultisampleTest, CheckSamplePositions)
 {
-    ANGLE_SKIP_TEST_IF(!IsD3D11());
+    ANGLE_SKIP_TEST_IF(!IsD3D11() || (getClientMajorVersion() <= 3 && getClientMinorVersion() < 1));
 
     GLsizei maxSamples = 0;
     glGetIntegerv(GL_MAX_SAMPLES, &maxSamples);
@@ -315,6 +355,90 @@
     ASSERT_GL_NO_ERROR();
 }
 
+// Test textureSize and texelFetch when using ANGLE_texture_multisample extension
+TEST_P(TextureMultisampleTest, SimpleTexelFetch)
+{
+    ANGLE_SKIP_TEST_IF(IsD3D11());
+    ANGLE_SKIP_TEST_IF(!ensureExtensionEnabled("GL_ANGLE_texture_multisample"));
+
+    ANGLE_GL_PROGRAM(texelFetchProgram, essl3_shaders::vs::Passthrough(),
+                     multisampleTextureFragmentShader());
+
+    GLint texLocation = glGetUniformLocation(texelFetchProgram, "tex");
+    ASSERT_GE(texLocation, 0);
+    GLint sampleNumLocation = glGetUniformLocation(texelFetchProgram, "sampleNum");
+    ASSERT_GE(sampleNumLocation, 0);
+
+    const GLsizei kWidth  = 4;
+    const GLsizei kHeight = 4;
+
+    std::vector<GLenum> testFormats = {GL_RGBA8};
+    GLint samplesToUse              = getSamplesToUse(GL_TEXTURE_2D_MULTISAMPLE_ANGLE, testFormats);
+
+    glBindTexture(GL_TEXTURE_2D_MULTISAMPLE_ANGLE, mTexture);
+    texStorageMultisample(GL_TEXTURE_2D_MULTISAMPLE_ANGLE, samplesToUse, GL_RGBA8, kWidth,
+                              kHeight, GL_TRUE);
+    ASSERT_GL_NO_ERROR();
+
+    // Clear texture zero to green.
+    glBindFramebuffer(GL_FRAMEBUFFER, mFramebuffer);
+    GLColor clearColor = GLColor::green;
+
+    glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
+                           GL_TEXTURE_2D_MULTISAMPLE_ANGLE, mTexture, 0);
+    GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
+    ASSERT_GLENUM_EQ(GL_FRAMEBUFFER_COMPLETE, status);
+    glClearColor(clearColor.R / 255.0f, clearColor.G / 255.0f, clearColor.B / 255.0f,
+                 clearColor.A / 255.0f);
+    glClear(GL_COLOR_BUFFER_BIT);
+    ASSERT_GL_NO_ERROR();
+
+    glBindFramebuffer(GL_FRAMEBUFFER, 0);
+    glUseProgram(texelFetchProgram);
+    glViewport(0, 0, kWidth, kHeight);
+
+    for (GLint sampleNum = 0; sampleNum < samplesToUse; ++sampleNum)
+    {
+        glUniform1i(sampleNumLocation, sampleNum);
+        drawQuad(texelFetchProgram, essl31_shaders::PositionAttrib(), 0.5f, 1.0f, true);
+        ASSERT_GL_NO_ERROR();
+        EXPECT_PIXEL_RECT_EQ(0, 0, kWidth, kHeight, clearColor);
+    }
+}
+
+// Negative tests of multisample texture. When context less than ES 3.1 and ANGLE_texture_multsample
+// not enabled, the feature isn't supported.
+TEST_P(NegativeTextureMultisampleTest, Negtive)
+{
+    ANGLE_SKIP_TEST_IF(ensureExtensionEnabled("GL_ANGLE_texture_multisample"));
+
+    GLint maxSamples = 0;
+    glGetInternalformativ(GL_TEXTURE_2D_MULTISAMPLE, GL_R8, GL_SAMPLES, 1, &maxSamples);
+    ASSERT_GL_ERROR(GL_INVALID_ENUM);
+
+    GLint maxColorTextureSamples;
+    glGetIntegerv(GL_MAX_COLOR_TEXTURE_SAMPLES, &maxColorTextureSamples);
+    ASSERT_GL_ERROR(GL_INVALID_ENUM);
+
+    GLint maxDepthTextureSamples;
+    glGetIntegerv(GL_MAX_DEPTH_TEXTURE_SAMPLES, &maxDepthTextureSamples);
+    ASSERT_GL_ERROR(GL_INVALID_ENUM);
+
+    glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, mTexture);
+    ASSERT_GL_ERROR(GL_INVALID_ENUM);
+
+    texStorageMultisample(GL_TEXTURE_2D_MULTISAMPLE, 4, GL_RGBA8, 64, 64, GL_FALSE);
+    ASSERT_GL_ERROR(GL_INVALID_OPERATION);
+
+    glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D_MULTISAMPLE,
+                           mTexture, 0);
+    ASSERT_GL_ERROR(GL_INVALID_OPERATION);
+
+    GLint params = 0;
+    glGetTexParameteriv(GL_TEXTURE_2D_MULTISAMPLE, GL_TEXTURE_IMMUTABLE_FORMAT, &params);
+    ASSERT_GL_ERROR(GL_INVALID_ENUM);
+}
+
 // Tests that GL_TEXTURE_2D_MULTISAMPLE_ARRAY is not supported in GetInternalformativ when the
 // extension is not supported.
 TEST_P(TextureMultisampleArrayWebGLTest, MultisampleArrayTargetGetInternalFormativWithoutExtension)
@@ -796,15 +920,15 @@
 }
 
 ANGLE_INSTANTIATE_TEST(TextureMultisampleTest,
+                       ES3_D3D11(),
                        ES31_D3D11(),
                        ES3_OPENGL(),
                        ES3_OPENGLES(),
                        ES31_OPENGL(),
                        ES31_OPENGLES());
-ANGLE_INSTANTIATE_TEST(TextureMultisampleTestES31, ES31_D3D11(), ES31_OPENGL(), ES31_OPENGLES());
+ANGLE_INSTANTIATE_TEST(NegativeTextureMultisampleTest, ES3_D3D11(), ES3_OPENGL(), ES3_OPENGLES());
 ANGLE_INSTANTIATE_TEST(TextureMultisampleArrayWebGLTest,
                        ES31_D3D11(),
                        ES31_OPENGL(),
                        ES31_OPENGLES());
-
 }  // anonymous namespace