Bug 1472851 - Update ANGLE to mozilla/angle/firefox-63. (chromium 3440) r=jgilbert
authorjgilbert@mozilla.com <jdashg@gmail.com>
Fri, 29 Jun 2018 19:13:04 -0700
changeset 424722 d47ad50b4668675dc3ff3c8208e2a7d1c4e6d086
parent 424721 a4f4255490994901fe9e57e56ee372bca0e50029
child 424723 9fed5fa6c25a2f62feead541984dbf6296ddbbed
push id34222
push useraiakab@mozilla.com
push dateTue, 03 Jul 2018 08:54:46 +0000
treeherdermozilla-central@f6e1ff7b57e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs1472851
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1472851 - Update ANGLE to mozilla/angle/firefox-63. (chromium 3440) r=jgilbert MozReview-Commit-ID: Hm6jbnqpaTt
gfx/angle/checkout/include/EGL/eglext_angle.h
gfx/angle/checkout/include/GLES/glext_angle.h
gfx/angle/checkout/include/GLES/glext_explicit_context_autogen.inc
gfx/angle/checkout/include/GLES2/gl2ext_angle.h
gfx/angle/checkout/include/GLES2/gl2ext_explicit_context_autogen.inc
gfx/angle/checkout/include/GLES3/gl31ext_explicit_context_autogen.inc
gfx/angle/checkout/include/GLES3/gl3ext_explicit_context_autogen.inc
gfx/angle/checkout/include/GLSLANG/ShaderLang.h
gfx/angle/checkout/out/gen/angle/id/commit.h
gfx/angle/checkout/src/common/debug.cpp
gfx/angle/checkout/src/common/debug.h
gfx/angle/checkout/src/common/platform.h
gfx/angle/checkout/src/common/third_party/base/anglebase/logging.h
gfx/angle/checkout/src/compiler/preprocessor/DiagnosticsBase.cpp
gfx/angle/checkout/src/compiler/preprocessor/DiagnosticsBase.h
gfx/angle/checkout/src/compiler/preprocessor/DirectiveHandlerBase.cpp
gfx/angle/checkout/src/compiler/preprocessor/DirectiveHandlerBase.h
gfx/angle/checkout/src/compiler/preprocessor/DirectiveParser.cpp
gfx/angle/checkout/src/compiler/preprocessor/DirectiveParser.h
gfx/angle/checkout/src/compiler/preprocessor/ExpressionParser.cpp
gfx/angle/checkout/src/compiler/preprocessor/ExpressionParser.h
gfx/angle/checkout/src/compiler/preprocessor/ExpressionParser.y
gfx/angle/checkout/src/compiler/preprocessor/Input.cpp
gfx/angle/checkout/src/compiler/preprocessor/Input.h
gfx/angle/checkout/src/compiler/preprocessor/Lexer.cpp
gfx/angle/checkout/src/compiler/preprocessor/Lexer.h
gfx/angle/checkout/src/compiler/preprocessor/Macro.cpp
gfx/angle/checkout/src/compiler/preprocessor/Macro.h
gfx/angle/checkout/src/compiler/preprocessor/MacroExpander.cpp
gfx/angle/checkout/src/compiler/preprocessor/MacroExpander.h
gfx/angle/checkout/src/compiler/preprocessor/Preprocessor.cpp
gfx/angle/checkout/src/compiler/preprocessor/Preprocessor.h
gfx/angle/checkout/src/compiler/preprocessor/SourceLocation.h
gfx/angle/checkout/src/compiler/preprocessor/Token.cpp
gfx/angle/checkout/src/compiler/preprocessor/Token.h
gfx/angle/checkout/src/compiler/preprocessor/Tokenizer.cpp
gfx/angle/checkout/src/compiler/preprocessor/Tokenizer.h
gfx/angle/checkout/src/compiler/preprocessor/Tokenizer.l
gfx/angle/checkout/src/compiler/preprocessor/numeric_lex.h
gfx/angle/checkout/src/compiler/translator/CollectVariables.cpp
gfx/angle/checkout/src/compiler/translator/Compiler.cpp
gfx/angle/checkout/src/compiler/translator/ConstantUnion.cpp
gfx/angle/checkout/src/compiler/translator/Diagnostics.cpp
gfx/angle/checkout/src/compiler/translator/Diagnostics.h
gfx/angle/checkout/src/compiler/translator/DirectiveHandler.cpp
gfx/angle/checkout/src/compiler/translator/DirectiveHandler.h
gfx/angle/checkout/src/compiler/translator/IntermNode.cpp
gfx/angle/checkout/src/compiler/translator/OutputGLSLBase.cpp
gfx/angle/checkout/src/compiler/translator/OutputGLSLBase.h
gfx/angle/checkout/src/compiler/translator/OutputHLSL.cpp
gfx/angle/checkout/src/compiler/translator/ParseContext.cpp
gfx/angle/checkout/src/compiler/translator/ParseContext.h
gfx/angle/checkout/src/compiler/translator/Symbol.cpp
gfx/angle/checkout/src/compiler/translator/Symbol.h
gfx/angle/checkout/src/compiler/translator/SymbolTable.cpp
gfx/angle/checkout/src/compiler/translator/SymbolTable.h
gfx/angle/checkout/src/compiler/translator/glslang.l
gfx/angle/checkout/src/compiler/translator/glslang_lex.cpp
gfx/angle/checkout/src/compiler/translator/tree_ops/RewriteRepeatedAssignToSwizzled.cpp
gfx/angle/checkout/src/compiler/translator/tree_ops/RewriteRepeatedAssignToSwizzled.h
gfx/angle/checkout/src/compiler/translator/tree_util/IntermTraverse.h
gfx/angle/checkout/src/compiler/translator/util.cpp
gfx/angle/checkout/src/gpu_info_util/SystemInfo.h
gfx/angle/checkout/src/libANGLE/AttributeMap.h
gfx/angle/checkout/src/libANGLE/Buffer.cpp
gfx/angle/checkout/src/libANGLE/Buffer.h
gfx/angle/checkout/src/libANGLE/Caps.cpp
gfx/angle/checkout/src/libANGLE/Caps.h
gfx/angle/checkout/src/libANGLE/Compiler.cpp
gfx/angle/checkout/src/libANGLE/Compiler.h
gfx/angle/checkout/src/libANGLE/Context.cpp
gfx/angle/checkout/src/libANGLE/Context.h
gfx/angle/checkout/src/libANGLE/Context_gles_1_0.cpp
gfx/angle/checkout/src/libANGLE/Context_gles_1_0_autogen.h
gfx/angle/checkout/src/libANGLE/Debug.cpp
gfx/angle/checkout/src/libANGLE/Debug.h
gfx/angle/checkout/src/libANGLE/Display.cpp
gfx/angle/checkout/src/libANGLE/Error.cpp
gfx/angle/checkout/src/libANGLE/Error.h
gfx/angle/checkout/src/libANGLE/ErrorStrings.h
gfx/angle/checkout/src/libANGLE/Framebuffer.cpp
gfx/angle/checkout/src/libANGLE/Framebuffer.h
gfx/angle/checkout/src/libANGLE/FramebufferAttachment.cpp
gfx/angle/checkout/src/libANGLE/GLES1Renderer.cpp
gfx/angle/checkout/src/libANGLE/GLES1Renderer.h
gfx/angle/checkout/src/libANGLE/GLES1Shaders.inc
gfx/angle/checkout/src/libANGLE/GLES1State.cpp
gfx/angle/checkout/src/libANGLE/GLES1State.h
gfx/angle/checkout/src/libANGLE/Image.cpp
gfx/angle/checkout/src/libANGLE/ImageIndex.cpp
gfx/angle/checkout/src/libANGLE/ImageIndex.h
gfx/angle/checkout/src/libANGLE/Observer.h
gfx/angle/checkout/src/libANGLE/PackedEGLEnums_autogen.cpp
gfx/angle/checkout/src/libANGLE/PackedEGLEnums_autogen.h
gfx/angle/checkout/src/libANGLE/PackedEnums.cpp
gfx/angle/checkout/src/libANGLE/PackedEnums.h
gfx/angle/checkout/src/libANGLE/PackedGLEnums.cpp
gfx/angle/checkout/src/libANGLE/PackedGLEnums.h
gfx/angle/checkout/src/libANGLE/PackedGLEnums_autogen.cpp
gfx/angle/checkout/src/libANGLE/PackedGLEnums_autogen.h
gfx/angle/checkout/src/libANGLE/Program.cpp
gfx/angle/checkout/src/libANGLE/Program.h
gfx/angle/checkout/src/libANGLE/ProgramLinkedResources.cpp
gfx/angle/checkout/src/libANGLE/ProgramLinkedResources.h
gfx/angle/checkout/src/libANGLE/Query.cpp
gfx/angle/checkout/src/libANGLE/Query.h
gfx/angle/checkout/src/libANGLE/Shader.cpp
gfx/angle/checkout/src/libANGLE/State.cpp
gfx/angle/checkout/src/libANGLE/State.h
gfx/angle/checkout/src/libANGLE/Surface.cpp
gfx/angle/checkout/src/libANGLE/Surface.h
gfx/angle/checkout/src/libANGLE/Texture.cpp
gfx/angle/checkout/src/libANGLE/Texture.h
gfx/angle/checkout/src/libANGLE/TransformFeedback.cpp
gfx/angle/checkout/src/libANGLE/TransformFeedback.h
gfx/angle/checkout/src/libANGLE/Uniform.cpp
gfx/angle/checkout/src/libANGLE/Uniform.h
gfx/angle/checkout/src/libANGLE/VaryingPacking.cpp
gfx/angle/checkout/src/libANGLE/VaryingPacking.h
gfx/angle/checkout/src/libANGLE/VertexArray.cpp
gfx/angle/checkout/src/libANGLE/VertexArray.h
gfx/angle/checkout/src/libANGLE/VertexAttribute.cpp
gfx/angle/checkout/src/libANGLE/VertexAttribute.h
gfx/angle/checkout/src/libANGLE/angletypes.cpp
gfx/angle/checkout/src/libANGLE/angletypes.h
gfx/angle/checkout/src/libANGLE/entry_points_enum_autogen.h
gfx/angle/checkout/src/libANGLE/formatutils.cpp
gfx/angle/checkout/src/libANGLE/queryutils.cpp
gfx/angle/checkout/src/libANGLE/queryutils.h
gfx/angle/checkout/src/libANGLE/renderer/BufferImpl.h
gfx/angle/checkout/src/libANGLE/renderer/FramebufferImpl.h
gfx/angle/checkout/src/libANGLE/renderer/GLImplFactory.h
gfx/angle/checkout/src/libANGLE/renderer/QueryImpl.h
gfx/angle/checkout/src/libANGLE/renderer/RenderTargetCache.h
gfx/angle/checkout/src/libANGLE/renderer/ShaderImpl.h
gfx/angle/checkout/src/libANGLE/renderer/SurfaceImpl.h
gfx/angle/checkout/src/libANGLE/renderer/TextureImpl.h
gfx/angle/checkout/src/libANGLE/renderer/VertexArrayImpl.h
gfx/angle/checkout/src/libANGLE/renderer/d3d/DynamicHLSL.cpp
gfx/angle/checkout/src/libANGLE/renderer/d3d/DynamicHLSL.h
gfx/angle/checkout/src/libANGLE/renderer/d3d/ImageD3D.h
gfx/angle/checkout/src/libANGLE/renderer/d3d/ProgramD3D.cpp
gfx/angle/checkout/src/libANGLE/renderer/d3d/ProgramD3D.h
gfx/angle/checkout/src/libANGLE/renderer/d3d/RendererD3D.h
gfx/angle/checkout/src/libANGLE/renderer/d3d/ShaderD3D.cpp
gfx/angle/checkout/src/libANGLE/renderer/d3d/ShaderD3D.h
gfx/angle/checkout/src/libANGLE/renderer/d3d/SurfaceD3D.cpp
gfx/angle/checkout/src/libANGLE/renderer/d3d/SurfaceD3D.h
gfx/angle/checkout/src/libANGLE/renderer/d3d/TextureD3D.cpp
gfx/angle/checkout/src/libANGLE/renderer/d3d/TextureD3D.h
gfx/angle/checkout/src/libANGLE/renderer/d3d/TextureStorage.h
gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d11/Blit11.cpp
gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d11/Context11.cpp
gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d11/Context11.h
gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d11/Fence11.cpp
gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.cpp
gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.h
gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d11/Image11.cpp
gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d11/Query11.cpp
gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d11/Query11.h
gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d11/Renderer11.h
gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d11/StateManager11.cpp
gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d11/TextureStorage11.cpp
gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d11/TextureStorage11.h
gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d11/VertexArray11.cpp
gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp
gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.h
gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d9/Blit9.h
gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d9/Context9.cpp
gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d9/Context9.h
gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d9/Framebuffer9.cpp
gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d9/Framebuffer9.h
gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d9/Image9.cpp
gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d9/Query9.cpp
gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d9/Query9.h
gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp
gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d9/TextureStorage9.cpp
gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d9/renderer9_utils.cpp
gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d9/renderer9_utils.h
gfx/angle/checkout/src/libANGLE/renderer/driver_utils.cpp
gfx/angle/checkout/src/libANGLE/renderer/driver_utils.h
gfx/angle/checkout/src/libANGLE/renderer/renderer_utils.cpp
gfx/angle/checkout/src/libANGLE/validationEGL.cpp
gfx/angle/checkout/src/libANGLE/validationEGL.h
gfx/angle/checkout/src/libANGLE/validationES.cpp
gfx/angle/checkout/src/libANGLE/validationES.h
gfx/angle/checkout/src/libANGLE/validationES1.cpp
gfx/angle/checkout/src/libANGLE/validationES1.h
gfx/angle/checkout/src/libANGLE/validationES2.cpp
gfx/angle/checkout/src/libANGLE/validationES2.h
gfx/angle/checkout/src/libANGLE/validationES3.cpp
gfx/angle/checkout/src/libANGLE/validationES3.h
gfx/angle/checkout/src/libANGLE/validationES31.cpp
gfx/angle/checkout/src/libANGLE/validationES31.h
gfx/angle/checkout/src/libGLESv2/entry_points_egl.cpp
gfx/angle/checkout/src/libGLESv2/entry_points_gles_1_0_autogen.cpp
gfx/angle/checkout/src/libGLESv2/entry_points_gles_2_0_ext.cpp
gfx/angle/checkout/src/libGLESv2/entry_points_gles_2_0_ext.h
gfx/angle/checkout/src/libGLESv2/entry_points_gles_3_0_autogen.cpp
gfx/angle/checkout/src/libGLESv2/entry_points_gles_ext_autogen.cpp
gfx/angle/checkout/src/libGLESv2/entry_points_gles_ext_autogen.h
gfx/angle/checkout/src/libGLESv2/libGLESv2.cpp
gfx/angle/checkout/src/libGLESv2/libGLESv2.def
gfx/angle/checkout/src/libGLESv2/libGLESv2_autogen.cpp
gfx/angle/checkout/src/libGLESv2/libGLESv2_autogen.def
gfx/angle/checkout/src/libGLESv2/proc_table_autogen.cpp
gfx/angle/cherry_picks.txt
gfx/angle/targets/angle_common/moz.build
gfx/angle/targets/angle_gpu_info_util/moz.build
gfx/angle/targets/angle_image_util/moz.build
gfx/angle/targets/libANGLE/moz.build
gfx/angle/targets/libEGL/moz.build
gfx/angle/targets/libGLESv2/moz.build
gfx/angle/targets/preprocessor/moz.build
gfx/angle/targets/translator/moz.build
--- a/gfx/angle/checkout/include/EGL/eglext_angle.h
+++ b/gfx/angle/checkout/include/EGL/eglext_angle.h
@@ -64,16 +64,17 @@
 #define EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_REFERENCE_ANGLE 0x320C
 #define EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE 0x320F
 #endif /* EGL_ANGLE_platform_angle_d3d */
 
 #ifndef EGL_ANGLE_platform_angle_opengl
 #define EGL_ANGLE_platform_angle_opengl 1
 #define EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE 0x320D
 #define EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE 0x320E
+#define EGL_PLATFORM_ANGLE_EGL_HANDLE_ANGLE 0x3480
 #endif /* EGL_ANGLE_platform_angle_opengl */
 
 #ifndef EGL_ANGLE_platform_angle_null
 #define EGL_ANGLE_platform_angle_null 1
 #define EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE 0x33AE
 #endif /* EGL_ANGLE_platform_angle_null */
 
 #ifndef EGL_ANGLE_platform_angle_vulkan
--- a/gfx/angle/checkout/include/GLES/glext_angle.h
+++ b/gfx/angle/checkout/include/GLES/glext_angle.h
@@ -7,11 +7,17 @@
 //   Currently we don't include this file directly, we patch glext.h
 //   to include it implicitly so it is visible throughout our code.
 
 #ifndef INCLUDE_GLES_GLEXT_ANGLE_H_
 #define INCLUDE_GLES_GLEXT_ANGLE_H_
 
 // clang-format off
 
+#ifndef GL_ANGLE_explicit_context_gles1
+#define GL_ANGLE_explicit_context_gles1
+typedef void *GLeglContext;
+#include "glext_explicit_context_autogen.inc"
+#endif /* GL_ANGLE_explicit_context_gles1 */
+
 // clang-format on
 
 #endif  // INCLUDE_GLES_GLEXT_ANGLE_H_
new file mode 100644
--- /dev/null
+++ b/gfx/angle/checkout/include/GLES/glext_explicit_context_autogen.inc
@@ -0,0 +1,260 @@
+// GENERATED FILE - DO NOT EDIT.
+// Generated by generate_entry_points.py using data from gl.xml and gl_angle_ext.xml.
+//
+// Copyright 2018 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// glext_explicit_context_autogen.inc:
+//   Function declarations for the EGL_ANGLE_explicit_context extension
+
+typedef void (GL_APIENTRYP PFNGLALPHAFUNCCONTEXTANGLE)(GLeglContext ctx, GLenum func, GLfloat ref);
+typedef void (GL_APIENTRYP PFNGLALPHAFUNCXCONTEXTANGLE)(GLeglContext ctx, GLenum func, GLfixed ref);
+typedef void (GL_APIENTRYP PFNGLCLEARCOLORXCONTEXTANGLE)(GLeglContext ctx, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
+typedef void (GL_APIENTRYP PFNGLCLEARDEPTHXCONTEXTANGLE)(GLeglContext ctx, GLfixed depth);
+typedef void (GL_APIENTRYP PFNGLCLIENTACTIVETEXTURECONTEXTANGLE)(GLeglContext ctx, GLenum texture);
+typedef void (GL_APIENTRYP PFNGLCLIPPLANEFCONTEXTANGLE)(GLeglContext ctx, GLenum p, const GLfloat *eqn);
+typedef void (GL_APIENTRYP PFNGLCLIPPLANEXCONTEXTANGLE)(GLeglContext ctx, GLenum plane, const GLfixed *equation);
+typedef void (GL_APIENTRYP PFNGLCOLOR4FCONTEXTANGLE)(GLeglContext ctx, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+typedef void (GL_APIENTRYP PFNGLCOLOR4UBCONTEXTANGLE)(GLeglContext ctx, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
+typedef void (GL_APIENTRYP PFNGLCOLOR4XCONTEXTANGLE)(GLeglContext ctx, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
+typedef void (GL_APIENTRYP PFNGLCOLORPOINTERCONTEXTANGLE)(GLeglContext ctx, GLint size, GLenum type, GLsizei stride, const void *pointer);
+typedef void (GL_APIENTRYP PFNGLDEPTHRANGEXCONTEXTANGLE)(GLeglContext ctx, GLfixed n, GLfixed f);
+typedef void (GL_APIENTRYP PFNGLDISABLECLIENTSTATECONTEXTANGLE)(GLeglContext ctx, GLenum array);
+typedef void (GL_APIENTRYP PFNGLENABLECLIENTSTATECONTEXTANGLE)(GLeglContext ctx, GLenum array);
+typedef void (GL_APIENTRYP PFNGLFOGFCONTEXTANGLE)(GLeglContext ctx, GLenum pname, GLfloat param);
+typedef void (GL_APIENTRYP PFNGLFOGFVCONTEXTANGLE)(GLeglContext ctx, GLenum pname, const GLfloat *params);
+typedef void (GL_APIENTRYP PFNGLFOGXCONTEXTANGLE)(GLeglContext ctx, GLenum pname, GLfixed param);
+typedef void (GL_APIENTRYP PFNGLFOGXVCONTEXTANGLE)(GLeglContext ctx, GLenum pname, const GLfixed *param);
+typedef void (GL_APIENTRYP PFNGLFRUSTUMFCONTEXTANGLE)(GLeglContext ctx, GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
+typedef void (GL_APIENTRYP PFNGLFRUSTUMXCONTEXTANGLE)(GLeglContext ctx, GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
+typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEFCONTEXTANGLE)(GLeglContext ctx, GLenum plane, GLfloat *equation);
+typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEXCONTEXTANGLE)(GLeglContext ctx, GLenum plane, GLfixed *equation);
+typedef void (GL_APIENTRYP PFNGLGETFIXEDVCONTEXTANGLE)(GLeglContext ctx, GLenum pname, GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLGETLIGHTFVCONTEXTANGLE)(GLeglContext ctx, GLenum light, GLenum pname, GLfloat *params);
+typedef void (GL_APIENTRYP PFNGLGETLIGHTXVCONTEXTANGLE)(GLeglContext ctx, GLenum light, GLenum pname, GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLGETMATERIALFVCONTEXTANGLE)(GLeglContext ctx, GLenum face, GLenum pname, GLfloat *params);
+typedef void (GL_APIENTRYP PFNGLGETMATERIALXVCONTEXTANGLE)(GLeglContext ctx, GLenum face, GLenum pname, GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLGETPOINTERVCONTEXTANGLE)(GLeglContext ctx, GLenum pname, void **params);
+typedef void (GL_APIENTRYP PFNGLGETTEXENVFVCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLfloat *params);
+typedef void (GL_APIENTRYP PFNGLGETTEXENVIVCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLGETTEXENVXVCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERXVCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLLIGHTMODELFCONTEXTANGLE)(GLeglContext ctx, GLenum pname, GLfloat param);
+typedef void (GL_APIENTRYP PFNGLLIGHTMODELFVCONTEXTANGLE)(GLeglContext ctx, GLenum pname, const GLfloat *params);
+typedef void (GL_APIENTRYP PFNGLLIGHTMODELXCONTEXTANGLE)(GLeglContext ctx, GLenum pname, GLfixed param);
+typedef void (GL_APIENTRYP PFNGLLIGHTMODELXVCONTEXTANGLE)(GLeglContext ctx, GLenum pname, const GLfixed *param);
+typedef void (GL_APIENTRYP PFNGLLIGHTFCONTEXTANGLE)(GLeglContext ctx, GLenum light, GLenum pname, GLfloat param);
+typedef void (GL_APIENTRYP PFNGLLIGHTFVCONTEXTANGLE)(GLeglContext ctx, GLenum light, GLenum pname, const GLfloat *params);
+typedef void (GL_APIENTRYP PFNGLLIGHTXCONTEXTANGLE)(GLeglContext ctx, GLenum light, GLenum pname, GLfixed param);
+typedef void (GL_APIENTRYP PFNGLLIGHTXVCONTEXTANGLE)(GLeglContext ctx, GLenum light, GLenum pname, const GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLLINEWIDTHXCONTEXTANGLE)(GLeglContext ctx, GLfixed width);
+typedef void (GL_APIENTRYP PFNGLLOADIDENTITYCONTEXTANGLE)(GLeglContext ctx);
+typedef void (GL_APIENTRYP PFNGLLOADMATRIXFCONTEXTANGLE)(GLeglContext ctx, const GLfloat *m);
+typedef void (GL_APIENTRYP PFNGLLOADMATRIXXCONTEXTANGLE)(GLeglContext ctx, const GLfixed *m);
+typedef void (GL_APIENTRYP PFNGLLOGICOPCONTEXTANGLE)(GLeglContext ctx, GLenum opcode);
+typedef void (GL_APIENTRYP PFNGLMATERIALFCONTEXTANGLE)(GLeglContext ctx, GLenum face, GLenum pname, GLfloat param);
+typedef void (GL_APIENTRYP PFNGLMATERIALFVCONTEXTANGLE)(GLeglContext ctx, GLenum face, GLenum pname, const GLfloat *params);
+typedef void (GL_APIENTRYP PFNGLMATERIALXCONTEXTANGLE)(GLeglContext ctx, GLenum face, GLenum pname, GLfixed param);
+typedef void (GL_APIENTRYP PFNGLMATERIALXVCONTEXTANGLE)(GLeglContext ctx, GLenum face, GLenum pname, const GLfixed *param);
+typedef void (GL_APIENTRYP PFNGLMATRIXMODECONTEXTANGLE)(GLeglContext ctx, GLenum mode);
+typedef void (GL_APIENTRYP PFNGLMULTMATRIXFCONTEXTANGLE)(GLeglContext ctx, const GLfloat *m);
+typedef void (GL_APIENTRYP PFNGLMULTMATRIXXCONTEXTANGLE)(GLeglContext ctx, const GLfixed *m);
+typedef void (GL_APIENTRYP PFNGLMULTITEXCOORD4FCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+typedef void (GL_APIENTRYP PFNGLMULTITEXCOORD4XCONTEXTANGLE)(GLeglContext ctx, GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
+typedef void (GL_APIENTRYP PFNGLNORMAL3FCONTEXTANGLE)(GLeglContext ctx, GLfloat nx, GLfloat ny, GLfloat nz);
+typedef void (GL_APIENTRYP PFNGLNORMAL3XCONTEXTANGLE)(GLeglContext ctx, GLfixed nx, GLfixed ny, GLfixed nz);
+typedef void (GL_APIENTRYP PFNGLNORMALPOINTERCONTEXTANGLE)(GLeglContext ctx, GLenum type, GLsizei stride, const void *pointer);
+typedef void (GL_APIENTRYP PFNGLORTHOFCONTEXTANGLE)(GLeglContext ctx, GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
+typedef void (GL_APIENTRYP PFNGLORTHOXCONTEXTANGLE)(GLeglContext ctx, GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
+typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERFCONTEXTANGLE)(GLeglContext ctx, GLenum pname, GLfloat param);
+typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERFVCONTEXTANGLE)(GLeglContext ctx, GLenum pname, const GLfloat *params);
+typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXCONTEXTANGLE)(GLeglContext ctx, GLenum pname, GLfixed param);
+typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXVCONTEXTANGLE)(GLeglContext ctx, GLenum pname, const GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLPOINTSIZECONTEXTANGLE)(GLeglContext ctx, GLfloat size);
+typedef void (GL_APIENTRYP PFNGLPOINTSIZEXCONTEXTANGLE)(GLeglContext ctx, GLfixed size);
+typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETXCONTEXTANGLE)(GLeglContext ctx, GLfixed factor, GLfixed units);
+typedef void (GL_APIENTRYP PFNGLPOPMATRIXCONTEXTANGLE)(GLeglContext ctx);
+typedef void (GL_APIENTRYP PFNGLPUSHMATRIXCONTEXTANGLE)(GLeglContext ctx);
+typedef void (GL_APIENTRYP PFNGLROTATEFCONTEXTANGLE)(GLeglContext ctx, GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GL_APIENTRYP PFNGLROTATEXCONTEXTANGLE)(GLeglContext ctx, GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
+typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEXCONTEXTANGLE)(GLeglContext ctx, GLclampx value, GLboolean invert);
+typedef void (GL_APIENTRYP PFNGLSCALEFCONTEXTANGLE)(GLeglContext ctx, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GL_APIENTRYP PFNGLSCALEXCONTEXTANGLE)(GLeglContext ctx, GLfixed x, GLfixed y, GLfixed z);
+typedef void (GL_APIENTRYP PFNGLSHADEMODELCONTEXTANGLE)(GLeglContext ctx, GLenum mode);
+typedef void (GL_APIENTRYP PFNGLTEXCOORDPOINTERCONTEXTANGLE)(GLeglContext ctx, GLint size, GLenum type, GLsizei stride, const void *pointer);
+typedef void (GL_APIENTRYP PFNGLTEXENVFCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLfloat param);
+typedef void (GL_APIENTRYP PFNGLTEXENVFVCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, const GLfloat *params);
+typedef void (GL_APIENTRYP PFNGLTEXENVICONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLint param);
+typedef void (GL_APIENTRYP PFNGLTEXENVIVCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, const GLint *params);
+typedef void (GL_APIENTRYP PFNGLTEXENVXCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLfixed param);
+typedef void (GL_APIENTRYP PFNGLTEXENVXVCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, const GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLfixed param);
+typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXVCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, const GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLTRANSLATEFCONTEXTANGLE)(GLeglContext ctx, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GL_APIENTRYP PFNGLTRANSLATEXCONTEXTANGLE)(GLeglContext ctx, GLfixed x, GLfixed y, GLfixed z);
+typedef void (GL_APIENTRYP PFNGLVERTEXPOINTERCONTEXTANGLE)(GLeglContext ctx, GLint size, GLenum type, GLsizei stride, const void *pointer);
+typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFEROESCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLuint framebuffer);
+typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFEROESCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLuint renderbuffer);
+typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSOESCONTEXTANGLE)(GLeglContext ctx, GLenum target);
+typedef void (GL_APIENTRYP PFNGLCURRENTPALETTEMATRIXOESCONTEXTANGLE)(GLeglContext ctx, GLuint matrixpaletteindex);
+typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSOESCONTEXTANGLE)(GLeglContext ctx, GLsizei n, const GLuint *framebuffers);
+typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSOESCONTEXTANGLE)(GLeglContext ctx, GLsizei n, const GLuint *renderbuffers);
+typedef void (GL_APIENTRYP PFNGLDRAWTEXFOESCONTEXTANGLE)(GLeglContext ctx, GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
+typedef void (GL_APIENTRYP PFNGLDRAWTEXFVOESCONTEXTANGLE)(GLeglContext ctx, const GLfloat *coords);
+typedef void (GL_APIENTRYP PFNGLDRAWTEXIOESCONTEXTANGLE)(GLeglContext ctx, GLint x, GLint y, GLint z, GLint width, GLint height);
+typedef void (GL_APIENTRYP PFNGLDRAWTEXIVOESCONTEXTANGLE)(GLeglContext ctx, const GLint *coords);
+typedef void (GL_APIENTRYP PFNGLDRAWTEXSOESCONTEXTANGLE)(GLeglContext ctx, GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
+typedef void (GL_APIENTRYP PFNGLDRAWTEXSVOESCONTEXTANGLE)(GLeglContext ctx, const GLshort *coords);
+typedef void (GL_APIENTRYP PFNGLDRAWTEXXOESCONTEXTANGLE)(GLeglContext ctx, GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
+typedef void (GL_APIENTRYP PFNGLDRAWTEXXVOESCONTEXTANGLE)(GLeglContext ctx, const GLfixed *coords);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEROESCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DOESCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSOESCONTEXTANGLE)(GLeglContext ctx, GLsizei n, GLuint *framebuffers);
+typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSOESCONTEXTANGLE)(GLeglContext ctx, GLsizei n, GLuint *renderbuffers);
+typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPOESCONTEXTANGLE)(GLeglContext ctx, GLenum target);
+typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum attachment, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVOESCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLGETTEXGENFVOESCONTEXTANGLE)(GLeglContext ctx, GLenum coord, GLenum pname, GLfloat *params);
+typedef void (GL_APIENTRYP PFNGLGETTEXGENIVOESCONTEXTANGLE)(GLeglContext ctx, GLenum coord, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLGETTEXGENXVOESCONTEXTANGLE)(GLeglContext ctx, GLenum coord, GLenum pname, GLfixed *params);
+typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFEROESCONTEXTANGLE)(GLeglContext ctx, GLuint framebuffer);
+typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFEROESCONTEXTANGLE)(GLeglContext ctx, GLuint renderbuffer);
+typedef void (GL_APIENTRYP PFNGLLOADPALETTEFROMMODELVIEWMATRIXOESCONTEXTANGLE)(GLeglContext ctx);
+typedef void (GL_APIENTRYP PFNGLMATRIXINDEXPOINTEROESCONTEXTANGLE)(GLeglContext ctx, GLint size, GLenum type, GLsizei stride, const void *pointer);
+typedef void (GL_APIENTRYP PFNGLPOINTSIZEPOINTEROESCONTEXTANGLE)(GLeglContext ctx, GLenum type, GLsizei stride, const void *pointer);
+typedef GLbitfield (GL_APIENTRYP PFNGLQUERYMATRIXXOESCONTEXTANGLE)(GLeglContext ctx, GLfixed *mantissa, GLint *exponent);
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEOESCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLTEXGENFOESCONTEXTANGLE)(GLeglContext ctx, GLenum coord, GLenum pname, GLfloat param);
+typedef void (GL_APIENTRYP PFNGLTEXGENFVOESCONTEXTANGLE)(GLeglContext ctx, GLenum coord, GLenum pname, const GLfloat *params);
+typedef void (GL_APIENTRYP PFNGLTEXGENIOESCONTEXTANGLE)(GLeglContext ctx, GLenum coord, GLenum pname, GLint param);
+typedef void (GL_APIENTRYP PFNGLTEXGENIVOESCONTEXTANGLE)(GLeglContext ctx, GLenum coord, GLenum pname, const GLint *params);
+typedef void (GL_APIENTRYP PFNGLTEXGENXOESCONTEXTANGLE)(GLeglContext ctx, GLenum coord, GLenum pname, GLfixed param);
+typedef void (GL_APIENTRYP PFNGLTEXGENXVOESCONTEXTANGLE)(GLeglContext ctx, GLenum coord, GLenum pname, const GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLWEIGHTPOINTEROESCONTEXTANGLE)(GLeglContext ctx, GLint size, GLenum type, GLsizei stride, const void *pointer);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glAlphaFuncContextANGLE(GLeglContext ctx, GLenum func, GLfloat ref);
+GL_API void GL_APIENTRY glAlphaFuncxContextANGLE(GLeglContext ctx, GLenum func, GLfixed ref);
+GL_API void GL_APIENTRY glClearColorxContextANGLE(GLeglContext ctx, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
+GL_API void GL_APIENTRY glClearDepthxContextANGLE(GLeglContext ctx, GLfixed depth);
+GL_API void GL_APIENTRY glClientActiveTextureContextANGLE(GLeglContext ctx, GLenum texture);
+GL_API void GL_APIENTRY glClipPlanefContextANGLE(GLeglContext ctx, GLenum p, const GLfloat *eqn);
+GL_API void GL_APIENTRY glClipPlanexContextANGLE(GLeglContext ctx, GLenum plane, const GLfixed *equation);
+GL_API void GL_APIENTRY glColor4fContextANGLE(GLeglContext ctx, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+GL_API void GL_APIENTRY glColor4ubContextANGLE(GLeglContext ctx, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
+GL_API void GL_APIENTRY glColor4xContextANGLE(GLeglContext ctx, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
+GL_API void GL_APIENTRY glColorPointerContextANGLE(GLeglContext ctx, GLint size, GLenum type, GLsizei stride, const void *pointer);
+GL_API void GL_APIENTRY glDepthRangexContextANGLE(GLeglContext ctx, GLfixed n, GLfixed f);
+GL_API void GL_APIENTRY glDisableClientStateContextANGLE(GLeglContext ctx, GLenum array);
+GL_API void GL_APIENTRY glEnableClientStateContextANGLE(GLeglContext ctx, GLenum array);
+GL_API void GL_APIENTRY glFogfContextANGLE(GLeglContext ctx, GLenum pname, GLfloat param);
+GL_API void GL_APIENTRY glFogfvContextANGLE(GLeglContext ctx, GLenum pname, const GLfloat *params);
+GL_API void GL_APIENTRY glFogxContextANGLE(GLeglContext ctx, GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glFogxvContextANGLE(GLeglContext ctx, GLenum pname, const GLfixed *param);
+GL_API void GL_APIENTRY glFrustumfContextANGLE(GLeglContext ctx, GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
+GL_API void GL_APIENTRY glFrustumxContextANGLE(GLeglContext ctx, GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
+GL_API void GL_APIENTRY glGetClipPlanefContextANGLE(GLeglContext ctx, GLenum plane, GLfloat *equation);
+GL_API void GL_APIENTRY glGetClipPlanexContextANGLE(GLeglContext ctx, GLenum plane, GLfixed *equation);
+GL_API void GL_APIENTRY glGetFixedvContextANGLE(GLeglContext ctx, GLenum pname, GLfixed *params);
+GL_API void GL_APIENTRY glGetLightfvContextANGLE(GLeglContext ctx, GLenum light, GLenum pname, GLfloat *params);
+GL_API void GL_APIENTRY glGetLightxvContextANGLE(GLeglContext ctx, GLenum light, GLenum pname, GLfixed *params);
+GL_API void GL_APIENTRY glGetMaterialfvContextANGLE(GLeglContext ctx, GLenum face, GLenum pname, GLfloat *params);
+GL_API void GL_APIENTRY glGetMaterialxvContextANGLE(GLeglContext ctx, GLenum face, GLenum pname, GLfixed *params);
+GL_API void GL_APIENTRY glGetPointervContextANGLE(GLeglContext ctx, GLenum pname, void **params);
+GL_API void GL_APIENTRY glGetTexEnvfvContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLfloat *params);
+GL_API void GL_APIENTRY glGetTexEnvivContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLint *params);
+GL_API void GL_APIENTRY glGetTexEnvxvContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLfixed *params);
+GL_API void GL_APIENTRY glGetTexParameterxvContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLfixed *params);
+GL_API void GL_APIENTRY glLightModelfContextANGLE(GLeglContext ctx, GLenum pname, GLfloat param);
+GL_API void GL_APIENTRY glLightModelfvContextANGLE(GLeglContext ctx, GLenum pname, const GLfloat *params);
+GL_API void GL_APIENTRY glLightModelxContextANGLE(GLeglContext ctx, GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glLightModelxvContextANGLE(GLeglContext ctx, GLenum pname, const GLfixed *param);
+GL_API void GL_APIENTRY glLightfContextANGLE(GLeglContext ctx, GLenum light, GLenum pname, GLfloat param);
+GL_API void GL_APIENTRY glLightfvContextANGLE(GLeglContext ctx, GLenum light, GLenum pname, const GLfloat *params);
+GL_API void GL_APIENTRY glLightxContextANGLE(GLeglContext ctx, GLenum light, GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glLightxvContextANGLE(GLeglContext ctx, GLenum light, GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glLineWidthxContextANGLE(GLeglContext ctx, GLfixed width);
+GL_API void GL_APIENTRY glLoadIdentityContextANGLE(GLeglContext ctx);
+GL_API void GL_APIENTRY glLoadMatrixfContextANGLE(GLeglContext ctx, const GLfloat *m);
+GL_API void GL_APIENTRY glLoadMatrixxContextANGLE(GLeglContext ctx, const GLfixed *m);
+GL_API void GL_APIENTRY glLogicOpContextANGLE(GLeglContext ctx, GLenum opcode);
+GL_API void GL_APIENTRY glMaterialfContextANGLE(GLeglContext ctx, GLenum face, GLenum pname, GLfloat param);
+GL_API void GL_APIENTRY glMaterialfvContextANGLE(GLeglContext ctx, GLenum face, GLenum pname, const GLfloat *params);
+GL_API void GL_APIENTRY glMaterialxContextANGLE(GLeglContext ctx, GLenum face, GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glMaterialxvContextANGLE(GLeglContext ctx, GLenum face, GLenum pname, const GLfixed *param);
+GL_API void GL_APIENTRY glMatrixModeContextANGLE(GLeglContext ctx, GLenum mode);
+GL_API void GL_APIENTRY glMultMatrixfContextANGLE(GLeglContext ctx, const GLfloat *m);
+GL_API void GL_APIENTRY glMultMatrixxContextANGLE(GLeglContext ctx, const GLfixed *m);
+GL_API void GL_APIENTRY glMultiTexCoord4fContextANGLE(GLeglContext ctx, GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+GL_API void GL_APIENTRY glMultiTexCoord4xContextANGLE(GLeglContext ctx, GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
+GL_API void GL_APIENTRY glNormal3fContextANGLE(GLeglContext ctx, GLfloat nx, GLfloat ny, GLfloat nz);
+GL_API void GL_APIENTRY glNormal3xContextANGLE(GLeglContext ctx, GLfixed nx, GLfixed ny, GLfixed nz);
+GL_API void GL_APIENTRY glNormalPointerContextANGLE(GLeglContext ctx, GLenum type, GLsizei stride, const void *pointer);
+GL_API void GL_APIENTRY glOrthofContextANGLE(GLeglContext ctx, GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
+GL_API void GL_APIENTRY glOrthoxContextANGLE(GLeglContext ctx, GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
+GL_API void GL_APIENTRY glPointParameterfContextANGLE(GLeglContext ctx, GLenum pname, GLfloat param);
+GL_API void GL_APIENTRY glPointParameterfvContextANGLE(GLeglContext ctx, GLenum pname, const GLfloat *params);
+GL_API void GL_APIENTRY glPointParameterxContextANGLE(GLeglContext ctx, GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glPointParameterxvContextANGLE(GLeglContext ctx, GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glPointSizeContextANGLE(GLeglContext ctx, GLfloat size);
+GL_API void GL_APIENTRY glPointSizexContextANGLE(GLeglContext ctx, GLfixed size);
+GL_API void GL_APIENTRY glPolygonOffsetxContextANGLE(GLeglContext ctx, GLfixed factor, GLfixed units);
+GL_API void GL_APIENTRY glPopMatrixContextANGLE(GLeglContext ctx);
+GL_API void GL_APIENTRY glPushMatrixContextANGLE(GLeglContext ctx);
+GL_API void GL_APIENTRY glRotatefContextANGLE(GLeglContext ctx, GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
+GL_API void GL_APIENTRY glRotatexContextANGLE(GLeglContext ctx, GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
+GL_API void GL_APIENTRY glSampleCoveragexContextANGLE(GLeglContext ctx, GLclampx value, GLboolean invert);
+GL_API void GL_APIENTRY glScalefContextANGLE(GLeglContext ctx, GLfloat x, GLfloat y, GLfloat z);
+GL_API void GL_APIENTRY glScalexContextANGLE(GLeglContext ctx, GLfixed x, GLfixed y, GLfixed z);
+GL_API void GL_APIENTRY glShadeModelContextANGLE(GLeglContext ctx, GLenum mode);
+GL_API void GL_APIENTRY glTexCoordPointerContextANGLE(GLeglContext ctx, GLint size, GLenum type, GLsizei stride, const void *pointer);
+GL_API void GL_APIENTRY glTexEnvfContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLfloat param);
+GL_API void GL_APIENTRY glTexEnvfvContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, const GLfloat *params);
+GL_API void GL_APIENTRY glTexEnviContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLint param);
+GL_API void GL_APIENTRY glTexEnvivContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, const GLint *params);
+GL_API void GL_APIENTRY glTexEnvxContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glTexEnvxvContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glTexParameterxContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glTexParameterxvContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glTranslatefContextANGLE(GLeglContext ctx, GLfloat x, GLfloat y, GLfloat z);
+GL_API void GL_APIENTRY glTranslatexContextANGLE(GLeglContext ctx, GLfixed x, GLfixed y, GLfixed z);
+GL_API void GL_APIENTRY glVertexPointerContextANGLE(GLeglContext ctx, GLint size, GLenum type, GLsizei stride, const void *pointer);
+GL_API void GL_APIENTRY glBindFramebufferOESContextANGLE(GLeglContext ctx, GLenum target, GLuint framebuffer);
+GL_API void GL_APIENTRY glBindRenderbufferOESContextANGLE(GLeglContext ctx, GLenum target, GLuint renderbuffer);
+GL_API GLenum GL_APIENTRY glCheckFramebufferStatusOESContextANGLE(GLeglContext ctx, GLenum target);
+GL_API void GL_APIENTRY glCurrentPaletteMatrixOESContextANGLE(GLeglContext ctx, GLuint matrixpaletteindex);
+GL_API void GL_APIENTRY glDeleteFramebuffersOESContextANGLE(GLeglContext ctx, GLsizei n, const GLuint *framebuffers);
+GL_API void GL_APIENTRY glDeleteRenderbuffersOESContextANGLE(GLeglContext ctx, GLsizei n, const GLuint *renderbuffers);
+GL_API void GL_APIENTRY glDrawTexfOESContextANGLE(GLeglContext ctx, GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
+GL_API void GL_APIENTRY glDrawTexfvOESContextANGLE(GLeglContext ctx, const GLfloat *coords);
+GL_API void GL_APIENTRY glDrawTexiOESContextANGLE(GLeglContext ctx, GLint x, GLint y, GLint z, GLint width, GLint height);
+GL_API void GL_APIENTRY glDrawTexivOESContextANGLE(GLeglContext ctx, const GLint *coords);
+GL_API void GL_APIENTRY glDrawTexsOESContextANGLE(GLeglContext ctx, GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
+GL_API void GL_APIENTRY glDrawTexsvOESContextANGLE(GLeglContext ctx, const GLshort *coords);
+GL_API void GL_APIENTRY glDrawTexxOESContextANGLE(GLeglContext ctx, GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
+GL_API void GL_APIENTRY glDrawTexxvOESContextANGLE(GLeglContext ctx, const GLfixed *coords);
+GL_API void GL_APIENTRY glFramebufferRenderbufferOESContextANGLE(GLeglContext ctx, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+GL_API void GL_APIENTRY glFramebufferTexture2DOESContextANGLE(GLeglContext ctx, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+GL_API void GL_APIENTRY glGenFramebuffersOESContextANGLE(GLeglContext ctx, GLsizei n, GLuint *framebuffers);
+GL_API void GL_APIENTRY glGenRenderbuffersOESContextANGLE(GLeglContext ctx, GLsizei n, GLuint *renderbuffers);
+GL_API void GL_APIENTRY glGenerateMipmapOESContextANGLE(GLeglContext ctx, GLenum target);
+GL_API void GL_APIENTRY glGetFramebufferAttachmentParameterivOESContextANGLE(GLeglContext ctx, GLenum target, GLenum attachment, GLenum pname, GLint *params);
+GL_API void GL_APIENTRY glGetRenderbufferParameterivOESContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLint *params);
+GL_API void GL_APIENTRY glGetTexGenfvOESContextANGLE(GLeglContext ctx, GLenum coord, GLenum pname, GLfloat *params);
+GL_API void GL_APIENTRY glGetTexGenivOESContextANGLE(GLeglContext ctx, GLenum coord, GLenum pname, GLint *params);
+GL_API void GL_APIENTRY glGetTexGenxvOESContextANGLE(GLeglContext ctx, GLenum coord, GLenum pname, GLfixed *params);
+GL_API GLboolean GL_APIENTRY glIsFramebufferOESContextANGLE(GLeglContext ctx, GLuint framebuffer);
+GL_API GLboolean GL_APIENTRY glIsRenderbufferOESContextANGLE(GLeglContext ctx, GLuint renderbuffer);
+GL_API void GL_APIENTRY glLoadPaletteFromModelViewMatrixOESContextANGLE(GLeglContext ctx);
+GL_API void GL_APIENTRY glMatrixIndexPointerOESContextANGLE(GLeglContext ctx, GLint size, GLenum type, GLsizei stride, const void *pointer);
+GL_API void GL_APIENTRY glPointSizePointerOESContextANGLE(GLeglContext ctx, GLenum type, GLsizei stride, const void *pointer);
+GL_API GLbitfield GL_APIENTRY glQueryMatrixxOESContextANGLE(GLeglContext ctx, GLfixed *mantissa, GLint *exponent);
+GL_API void GL_APIENTRY glRenderbufferStorageOESContextANGLE(GLeglContext ctx, GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+GL_API void GL_APIENTRY glTexGenfOESContextANGLE(GLeglContext ctx, GLenum coord, GLenum pname, GLfloat param);
+GL_API void GL_APIENTRY glTexGenfvOESContextANGLE(GLeglContext ctx, GLenum coord, GLenum pname, const GLfloat *params);
+GL_API void GL_APIENTRY glTexGeniOESContextANGLE(GLeglContext ctx, GLenum coord, GLenum pname, GLint param);
+GL_API void GL_APIENTRY glTexGenivOESContextANGLE(GLeglContext ctx, GLenum coord, GLenum pname, const GLint *params);
+GL_API void GL_APIENTRY glTexGenxOESContextANGLE(GLeglContext ctx, GLenum coord, GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glTexGenxvOESContextANGLE(GLeglContext ctx, GLenum coord, GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glWeightPointerOESContextANGLE(GLeglContext ctx, GLint size, GLenum type, GLsizei stride, const void *pointer);
+#endif
\ No newline at end of file
--- a/gfx/angle/checkout/include/GLES2/gl2ext_angle.h
+++ b/gfx/angle/checkout/include/GLES2/gl2ext_angle.h
@@ -541,11 +541,19 @@ GL_APICALL void GL_APIENTRY glFramebuffe
 #ifndef GL_ANGLE_texture_rectangle
 #define GL_ANGLE_texture_rectangle 1
 #define GL_MAX_RECTANGLE_TEXTURE_SIZE_ANGLE 0x84F8
 #define GL_TEXTURE_RECTANGLE_ANGLE 0x84F5
 #define GL_TEXTURE_BINDING_RECTANGLE_ANGLE 0x84F6
 #define GL_SAMPLER_2D_RECT_ANGLE 0x8B63
 #endif /* GL_ANGLE_texture_rectangle */
 
+#ifndef GL_ANGLE_explicit_context
+#define GL_ANGLE_explicit_context
+typedef void *GLeglContext;
+#include "gl2ext_explicit_context_autogen.inc"
+#include "../GLES3/gl3ext_explicit_context_autogen.inc"
+#include "../GLES3/gl31ext_explicit_context_autogen.inc"
+#endif /* GL_ANGLE_explicit_context */
+
 // clang-format on
 
 #endif  // INCLUDE_GLES2_GL2EXT_ANGLE_H_
new file mode 100644
--- /dev/null
+++ b/gfx/angle/checkout/include/GLES2/gl2ext_explicit_context_autogen.inc
@@ -0,0 +1,610 @@
+// GENERATED FILE - DO NOT EDIT.
+// Generated by generate_entry_points.py using data from gl.xml and gl_angle_ext.xml.
+//
+// Copyright 2018 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// gl2ext_explicit_context_autogen.inc:
+//   Function declarations for the EGL_ANGLE_explicit_context extension
+
+typedef void (GL_APIENTRYP PFNGLACTIVETEXTURECONTEXTANGLE)(GLeglContext ctx, GLenum texture);
+typedef void (GL_APIENTRYP PFNGLATTACHSHADERCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLuint shader);
+typedef void (GL_APIENTRYP PFNGLBINDATTRIBLOCATIONCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLuint index, const GLchar *name);
+typedef void (GL_APIENTRYP PFNGLBINDBUFFERCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLuint buffer);
+typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFERCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLuint framebuffer);
+typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFERCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLuint renderbuffer);
+typedef void (GL_APIENTRYP PFNGLBINDTEXTURECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLuint texture);
+typedef void (GL_APIENTRYP PFNGLBLENDCOLORCONTEXTANGLE)(GLeglContext ctx, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONCONTEXTANGLE)(GLeglContext ctx, GLenum mode);
+typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATECONTEXTANGLE)(GLeglContext ctx, GLenum modeRGB, GLenum modeAlpha);
+typedef void (GL_APIENTRYP PFNGLBLENDFUNCCONTEXTANGLE)(GLeglContext ctx, GLenum sfactor, GLenum dfactor);
+typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATECONTEXTANGLE)(GLeglContext ctx, GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+typedef void (GL_APIENTRYP PFNGLBUFFERDATACONTEXTANGLE)(GLeglContext ctx, GLenum target, GLsizeiptr size, const void *data, GLenum usage);
+typedef void (GL_APIENTRYP PFNGLBUFFERSUBDATACONTEXTANGLE)(GLeglContext ctx, GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
+typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSCONTEXTANGLE)(GLeglContext ctx, GLenum target);
+typedef void (GL_APIENTRYP PFNGLCLEARCONTEXTANGLE)(GLeglContext ctx, GLbitfield mask);
+typedef void (GL_APIENTRYP PFNGLCLEARCOLORCONTEXTANGLE)(GLeglContext ctx, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFCONTEXTANGLE)(GLeglContext ctx, GLfloat d);
+typedef void (GL_APIENTRYP PFNGLCLEARSTENCILCONTEXTANGLE)(GLeglContext ctx, GLint s);
+typedef void (GL_APIENTRYP PFNGLCOLORMASKCONTEXTANGLE)(GLeglContext ctx, GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+typedef void (GL_APIENTRYP PFNGLCOMPILESHADERCONTEXTANGLE)(GLeglContext ctx, GLuint shader);
+typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
+typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
+typedef void (GL_APIENTRYP PFNGLCOPYTEXIMAGE2DCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE2DCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef GLuint (GL_APIENTRYP PFNGLCREATEPROGRAMCONTEXTANGLE)(GLeglContext ctx);
+typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERCONTEXTANGLE)(GLeglContext ctx, GLenum type);
+typedef void (GL_APIENTRYP PFNGLCULLFACECONTEXTANGLE)(GLeglContext ctx, GLenum mode);
+typedef void (GL_APIENTRYP PFNGLDELETEBUFFERSCONTEXTANGLE)(GLeglContext ctx, GLsizei n, const GLuint *buffers);
+typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSCONTEXTANGLE)(GLeglContext ctx, GLsizei n, const GLuint *framebuffers);
+typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMCONTEXTANGLE)(GLeglContext ctx, GLuint program);
+typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSCONTEXTANGLE)(GLeglContext ctx, GLsizei n, const GLuint *renderbuffers);
+typedef void (GL_APIENTRYP PFNGLDELETESHADERCONTEXTANGLE)(GLeglContext ctx, GLuint shader);
+typedef void (GL_APIENTRYP PFNGLDELETETEXTURESCONTEXTANGLE)(GLeglContext ctx, GLsizei n, const GLuint *textures);
+typedef void (GL_APIENTRYP PFNGLDEPTHFUNCCONTEXTANGLE)(GLeglContext ctx, GLenum func);
+typedef void (GL_APIENTRYP PFNGLDEPTHMASKCONTEXTANGLE)(GLeglContext ctx, GLboolean flag);
+typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFCONTEXTANGLE)(GLeglContext ctx, GLfloat n, GLfloat f);
+typedef void (GL_APIENTRYP PFNGLDETACHSHADERCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLuint shader);
+typedef void (GL_APIENTRYP PFNGLDISABLECONTEXTANGLE)(GLeglContext ctx, GLenum cap);
+typedef void (GL_APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYCONTEXTANGLE)(GLeglContext ctx, GLuint index);
+typedef void (GL_APIENTRYP PFNGLDRAWARRAYSCONTEXTANGLE)(GLeglContext ctx, GLenum mode, GLint first, GLsizei count);
+typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSCONTEXTANGLE)(GLeglContext ctx, GLenum mode, GLsizei count, GLenum type, const void *indices);
+typedef void (GL_APIENTRYP PFNGLENABLECONTEXTANGLE)(GLeglContext ctx, GLenum cap);
+typedef void (GL_APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYCONTEXTANGLE)(GLeglContext ctx, GLuint index);
+typedef void (GL_APIENTRYP PFNGLFINISHCONTEXTANGLE)(GLeglContext ctx);
+typedef void (GL_APIENTRYP PFNGLFLUSHCONTEXTANGLE)(GLeglContext ctx);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (GL_APIENTRYP PFNGLFRONTFACECONTEXTANGLE)(GLeglContext ctx, GLenum mode);
+typedef void (GL_APIENTRYP PFNGLGENBUFFERSCONTEXTANGLE)(GLeglContext ctx, GLsizei n, GLuint *buffers);
+typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSCONTEXTANGLE)(GLeglContext ctx, GLsizei n, GLuint *framebuffers);
+typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSCONTEXTANGLE)(GLeglContext ctx, GLsizei n, GLuint *renderbuffers);
+typedef void (GL_APIENTRYP PFNGLGENTEXTURESCONTEXTANGLE)(GLeglContext ctx, GLsizei n, GLuint *textures);
+typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPCONTEXTANGLE)(GLeglContext ctx, GLenum target);
+typedef void (GL_APIENTRYP PFNGLGETACTIVEATTRIBCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+typedef void (GL_APIENTRYP PFNGLGETATTACHEDSHADERSCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
+typedef GLint (GL_APIENTRYP PFNGLGETATTRIBLOCATIONCONTEXTANGLE)(GLeglContext ctx, GLuint program, const GLchar *name);
+typedef void (GL_APIENTRYP PFNGLGETBOOLEANVCONTEXTANGLE)(GLeglContext ctx, GLenum pname, GLboolean *data);
+typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERIVCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLint *params);
+typedef GLenum (GL_APIENTRYP PFNGLGETERRORCONTEXTANGLE)(GLeglContext ctx);
+typedef void (GL_APIENTRYP PFNGLGETFLOATVCONTEXTANGLE)(GLeglContext ctx, GLenum pname, GLfloat *data);
+typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum attachment, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLGETINTEGERVCONTEXTANGLE)(GLeglContext ctx, GLenum pname, GLint *data);
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMINFOLOGCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMIVCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLGETSHADERINFOLOGCONTEXTANGLE)(GLeglContext ctx, GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+typedef void (GL_APIENTRYP PFNGLGETSHADERPRECISIONFORMATCONTEXTANGLE)(GLeglContext ctx, GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
+typedef void (GL_APIENTRYP PFNGLGETSHADERSOURCECONTEXTANGLE)(GLeglContext ctx, GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
+typedef void (GL_APIENTRYP PFNGLGETSHADERIVCONTEXTANGLE)(GLeglContext ctx, GLuint shader, GLenum pname, GLint *params);
+typedef const GLubyte *(GL_APIENTRYP PFNGLGETSTRINGCONTEXTANGLE)(GLeglContext ctx, GLenum name);
+typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERFVCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLfloat *params);
+typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIVCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLint *params);
+typedef GLint (GL_APIENTRYP PFNGLGETUNIFORMLOCATIONCONTEXTANGLE)(GLeglContext ctx, GLuint program, const GLchar *name);
+typedef void (GL_APIENTRYP PFNGLGETUNIFORMFVCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLfloat *params);
+typedef void (GL_APIENTRYP PFNGLGETUNIFORMIVCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLint *params);
+typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVCONTEXTANGLE)(GLeglContext ctx, GLuint index, GLenum pname, void **pointer);
+typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBFVCONTEXTANGLE)(GLeglContext ctx, GLuint index, GLenum pname, GLfloat *params);
+typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIVCONTEXTANGLE)(GLeglContext ctx, GLuint index, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLHINTCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum mode);
+typedef GLboolean (GL_APIENTRYP PFNGLISBUFFERCONTEXTANGLE)(GLeglContext ctx, GLuint buffer);
+typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDCONTEXTANGLE)(GLeglContext ctx, GLenum cap);
+typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFERCONTEXTANGLE)(GLeglContext ctx, GLuint framebuffer);
+typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMCONTEXTANGLE)(GLeglContext ctx, GLuint program);
+typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFERCONTEXTANGLE)(GLeglContext ctx, GLuint renderbuffer);
+typedef GLboolean (GL_APIENTRYP PFNGLISSHADERCONTEXTANGLE)(GLeglContext ctx, GLuint shader);
+typedef GLboolean (GL_APIENTRYP PFNGLISTEXTURECONTEXTANGLE)(GLeglContext ctx, GLuint texture);
+typedef void (GL_APIENTRYP PFNGLLINEWIDTHCONTEXTANGLE)(GLeglContext ctx, GLfloat width);
+typedef void (GL_APIENTRYP PFNGLLINKPROGRAMCONTEXTANGLE)(GLeglContext ctx, GLuint program);
+typedef void (GL_APIENTRYP PFNGLPIXELSTOREICONTEXTANGLE)(GLeglContext ctx, GLenum pname, GLint param);
+typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETCONTEXTANGLE)(GLeglContext ctx, GLfloat factor, GLfloat units);
+typedef void (GL_APIENTRYP PFNGLREADPIXELSCONTEXTANGLE)(GLeglContext ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
+typedef void (GL_APIENTRYP PFNGLRELEASESHADERCOMPILERCONTEXTANGLE)(GLeglContext ctx);
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGECONTEXTANGLE)(GLeglContext ctx, GLfloat value, GLboolean invert);
+typedef void (GL_APIENTRYP PFNGLSCISSORCONTEXTANGLE)(GLeglContext ctx, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLSHADERBINARYCONTEXTANGLE)(GLeglContext ctx, GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
+typedef void (GL_APIENTRYP PFNGLSHADERSOURCECONTEXTANGLE)(GLeglContext ctx, GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
+typedef void (GL_APIENTRYP PFNGLSTENCILFUNCCONTEXTANGLE)(GLeglContext ctx, GLenum func, GLint ref, GLuint mask);
+typedef void (GL_APIENTRYP PFNGLSTENCILFUNCSEPARATECONTEXTANGLE)(GLeglContext ctx, GLenum face, GLenum func, GLint ref, GLuint mask);
+typedef void (GL_APIENTRYP PFNGLSTENCILMASKCONTEXTANGLE)(GLeglContext ctx, GLuint mask);
+typedef void (GL_APIENTRYP PFNGLSTENCILMASKSEPARATECONTEXTANGLE)(GLeglContext ctx, GLenum face, GLuint mask);
+typedef void (GL_APIENTRYP PFNGLSTENCILOPCONTEXTANGLE)(GLeglContext ctx, GLenum fail, GLenum zfail, GLenum zpass);
+typedef void (GL_APIENTRYP PFNGLSTENCILOPSEPARATECONTEXTANGLE)(GLeglContext ctx, GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
+typedef void (GL_APIENTRYP PFNGLTEXIMAGE2DCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
+typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLfloat param);
+typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFVCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, const GLfloat *params);
+typedef void (GL_APIENTRYP PFNGLTEXPARAMETERICONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLint param);
+typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIVCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, const GLint *params);
+typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE2DCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
+typedef void (GL_APIENTRYP PFNGLUNIFORM1FCONTEXTANGLE)(GLeglContext ctx, GLint location, GLfloat v0);
+typedef void (GL_APIENTRYP PFNGLUNIFORM1FVCONTEXTANGLE)(GLeglContext ctx, GLint location, GLsizei count, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLUNIFORM1ICONTEXTANGLE)(GLeglContext ctx, GLint location, GLint v0);
+typedef void (GL_APIENTRYP PFNGLUNIFORM1IVCONTEXTANGLE)(GLeglContext ctx, GLint location, GLsizei count, const GLint *value);
+typedef void (GL_APIENTRYP PFNGLUNIFORM2FCONTEXTANGLE)(GLeglContext ctx, GLint location, GLfloat v0, GLfloat v1);
+typedef void (GL_APIENTRYP PFNGLUNIFORM2FVCONTEXTANGLE)(GLeglContext ctx, GLint location, GLsizei count, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLUNIFORM2ICONTEXTANGLE)(GLeglContext ctx, GLint location, GLint v0, GLint v1);
+typedef void (GL_APIENTRYP PFNGLUNIFORM2IVCONTEXTANGLE)(GLeglContext ctx, GLint location, GLsizei count, const GLint *value);
+typedef void (GL_APIENTRYP PFNGLUNIFORM3FCONTEXTANGLE)(GLeglContext ctx, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+typedef void (GL_APIENTRYP PFNGLUNIFORM3FVCONTEXTANGLE)(GLeglContext ctx, GLint location, GLsizei count, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLUNIFORM3ICONTEXTANGLE)(GLeglContext ctx, GLint location, GLint v0, GLint v1, GLint v2);
+typedef void (GL_APIENTRYP PFNGLUNIFORM3IVCONTEXTANGLE)(GLeglContext ctx, GLint location, GLsizei count, const GLint *value);
+typedef void (GL_APIENTRYP PFNGLUNIFORM4FCONTEXTANGLE)(GLeglContext ctx, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+typedef void (GL_APIENTRYP PFNGLUNIFORM4FVCONTEXTANGLE)(GLeglContext ctx, GLint location, GLsizei count, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLUNIFORM4ICONTEXTANGLE)(GLeglContext ctx, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+typedef void (GL_APIENTRYP PFNGLUNIFORM4IVCONTEXTANGLE)(GLeglContext ctx, GLint location, GLsizei count, const GLint *value);
+typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2FVCONTEXTANGLE)(GLeglContext ctx, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3FVCONTEXTANGLE)(GLeglContext ctx, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4FVCONTEXTANGLE)(GLeglContext ctx, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLUSEPROGRAMCONTEXTANGLE)(GLeglContext ctx, GLuint program);
+typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMCONTEXTANGLE)(GLeglContext ctx, GLuint program);
+typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FCONTEXTANGLE)(GLeglContext ctx, GLuint index, GLfloat x);
+typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FVCONTEXTANGLE)(GLeglContext ctx, GLuint index, const GLfloat *v);
+typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FCONTEXTANGLE)(GLeglContext ctx, GLuint index, GLfloat x, GLfloat y);
+typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FVCONTEXTANGLE)(GLeglContext ctx, GLuint index, const GLfloat *v);
+typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FCONTEXTANGLE)(GLeglContext ctx, GLuint index, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FVCONTEXTANGLE)(GLeglContext ctx, GLuint index, const GLfloat *v);
+typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FCONTEXTANGLE)(GLeglContext ctx, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FVCONTEXTANGLE)(GLeglContext ctx, GLuint index, const GLfloat *v);
+typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBPOINTERCONTEXTANGLE)(GLeglContext ctx, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
+typedef void (GL_APIENTRYP PFNGLVIEWPORTCONTEXTANGLE)(GLeglContext ctx, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLuint id);
+typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESCONTEXTANGLE)(GLeglContext ctx, GLuint array);
+typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERANGLECONTEXTANGLE)(GLeglContext ctx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKKHRCONTEXTANGLE)(GLeglContext ctx, GLDEBUGPROCKHR callback, const void *userParam);
+typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLKHRCONTEXTANGLE)(GLeglContext ctx, GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
+typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTKHRCONTEXTANGLE)(GLeglContext ctx, GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
+typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVCONTEXTANGLE)(GLeglContext ctx, GLsizei n, const GLuint *fences);
+typedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTCONTEXTANGLE)(GLeglContext ctx, GLsizei n, const GLuint *ids);
+typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESCONTEXTANGLE)(GLeglContext ctx, GLsizei n, const GLuint *arrays);
+typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLsizei numAttachments, const GLenum *attachments);
+typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDANGLECONTEXTANGLE)(GLeglContext ctx, GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSEXTCONTEXTANGLE)(GLeglContext ctx, GLsizei n, const GLenum *bufs);
+typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDANGLECONTEXTANGLE)(GLeglContext ctx, GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
+typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLeglImageOES image);
+typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLeglImageOES image);
+typedef void (GL_APIENTRYP PFNGLENDQUERYEXTCONTEXTANGLE)(GLeglContext ctx, GLenum target);
+typedef void (GL_APIENTRYP PFNGLFINISHFENCENVCONTEXTANGLE)(GLeglContext ctx, GLuint fence);
+typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLintptr offset, GLsizeiptr length);
+typedef void (GL_APIENTRYP PFNGLGENFENCESNVCONTEXTANGLE)(GLeglContext ctx, GLsizei n, GLuint *fences);
+typedef void (GL_APIENTRYP PFNGLGENQUERIESEXTCONTEXTANGLE)(GLeglContext ctx, GLsizei n, GLuint *ids);
+typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESCONTEXTANGLE)(GLeglContext ctx, GLsizei n, GLuint *arrays);
+typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, void **params);
+typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGKHRCONTEXTANGLE)(GLeglContext ctx, GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
+typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVCONTEXTANGLE)(GLeglContext ctx, GLuint fence, GLenum pname, GLint *params);
+typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTCONTEXTANGLE)(GLeglContext ctx);
+typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELKHRCONTEXTANGLE)(GLeglContext ctx, GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
+typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELKHRCONTEXTANGLE)(GLeglContext ctx, const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
+typedef void (GL_APIENTRYP PFNGLGETPOINTERVKHRCONTEXTANGLE)(GLeglContext ctx, GLenum pname, void **params);
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
+typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTI64VEXTCONTEXTANGLE)(GLeglContext ctx, GLuint id, GLenum pname, GLint64 *params);
+typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTIVEXTCONTEXTANGLE)(GLeglContext ctx, GLuint id, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTCONTEXTANGLE)(GLeglContext ctx, GLuint id, GLenum pname, GLuint64 *params);
+typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTCONTEXTANGLE)(GLeglContext ctx, GLuint id, GLenum pname, GLuint *params);
+typedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLGETTRANSLATEDSHADERSOURCEANGLECONTEXTANGLE)(GLeglContext ctx, GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);
+typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
+typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLsizei bufSize, GLint *params);
+typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTCONTEXTANGLE)(GLeglContext ctx, GLsizei length, const GLchar *marker);
+typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVCONTEXTANGLE)(GLeglContext ctx, GLuint fence);
+typedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTCONTEXTANGLE)(GLeglContext ctx, GLuint id);
+typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESCONTEXTANGLE)(GLeglContext ctx, GLuint array);
+typedef void *(GL_APIENTRYP PFNGLMAPBUFFEROESCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum access);
+typedef void *(GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+typedef void (GL_APIENTRYP PFNGLOBJECTLABELKHRCONTEXTANGLE)(GLeglContext ctx, GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
+typedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELKHRCONTEXTANGLE)(GLeglContext ctx, const void *ptr, GLsizei length, const GLchar *label);
+typedef void (GL_APIENTRYP PFNGLPOPDEBUGGROUPKHRCONTEXTANGLE)(GLeglContext ctx);
+typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTCONTEXTANGLE)(GLeglContext ctx);
+typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLenum binaryFormat, const void *binary, GLint length);
+typedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPKHRCONTEXTANGLE)(GLeglContext ctx, GLenum source, GLuint id, GLsizei length, const GLchar *message);
+typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTCONTEXTANGLE)(GLeglContext ctx, GLsizei length, const GLchar *marker);
+typedef void (GL_APIENTRYP PFNGLQUERYCOUNTEREXTCONTEXTANGLE)(GLeglContext ctx, GLuint id, GLenum target);
+typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTCONTEXTANGLE)(GLeglContext ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLSETFENCENVCONTEXTANGLE)(GLeglContext ctx, GLuint fence, GLenum condition);
+typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVCONTEXTANGLE)(GLeglContext ctx, GLuint fence);
+typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESCONTEXTANGLE)(GLeglContext ctx, GLenum target);
+typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORANGLECONTEXTANGLE)(GLeglContext ctx, GLuint index, GLuint divisor);
+typedef void (GL_APIENTRYP PFNGLBINDUNIFORMLOCATIONCHROMIUMCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, const GLchar* name);
+typedef void (GL_APIENTRYP PFNGLCOVERAGEMODULATIONCHROMIUMCONTEXTANGLE)(GLeglContext ctx, GLenum components);
+typedef void (GL_APIENTRYP PFNGLMATRIXLOADFCHROMIUMCONTEXTANGLE)(GLeglContext ctx, GLenum matrixMode, const GLfloat * matrix);
+typedef void (GL_APIENTRYP PFNGLMATRIXLOADIDENTITYCHROMIUMCONTEXTANGLE)(GLeglContext ctx, GLenum matrixMode);
+typedef GLuint (GL_APIENTRYP PFNGLGENPATHSCHROMIUMCONTEXTANGLE)(GLeglContext ctx, GLsizei range);
+typedef void (GL_APIENTRYP PFNGLDELETEPATHSCHROMIUMCONTEXTANGLE)(GLeglContext ctx, GLuint first, GLsizei range);
+typedef GLboolean (GL_APIENTRYP PFNGLISPATHCHROMIUMCONTEXTANGLE)(GLeglContext ctx, GLuint path);
+typedef void (GL_APIENTRYP PFNGLPATHCOMMANDSCHROMIUMCONTEXTANGLE)(GLeglContext ctx, GLuint path, GLsizei numCommands, const GLubyte * commands, GLsizei numCoords, GLenum coordType, const void* coords);
+typedef void (GL_APIENTRYP PFNGLPATHPARAMETERFCHROMIUMCONTEXTANGLE)(GLeglContext ctx, GLuint path, GLenum pname, GLfloat value);
+typedef void (GL_APIENTRYP PFNGLPATHPARAMETERICHROMIUMCONTEXTANGLE)(GLeglContext ctx, GLuint path, GLenum pname, GLint value);
+typedef void (GL_APIENTRYP PFNGLGETPATHPARAMETERFVCHROMIUMCONTEXTANGLE)(GLeglContext ctx, GLuint path, GLenum pname, GLfloat * value);
+typedef void (GL_APIENTRYP PFNGLGETPATHPARAMETERIVCHROMIUMCONTEXTANGLE)(GLeglContext ctx, GLuint path, GLenum pname, GLint * value);
+typedef void (GL_APIENTRYP PFNGLPATHSTENCILFUNCCHROMIUMCONTEXTANGLE)(GLeglContext ctx, GLenum func, GLint ref, GLuint mask);
+typedef void (GL_APIENTRYP PFNGLSTENCILFILLPATHCHROMIUMCONTEXTANGLE)(GLeglContext ctx, GLuint path, GLenum fillMode, GLuint mask);
+typedef void (GL_APIENTRYP PFNGLSTENCILSTROKEPATHCHROMIUMCONTEXTANGLE)(GLeglContext ctx, GLuint path, GLint reference, GLuint mask);
+typedef void (GL_APIENTRYP PFNGLCOVERFILLPATHCHROMIUMCONTEXTANGLE)(GLeglContext ctx, GLuint path, GLenum coverMode);
+typedef void (GL_APIENTRYP PFNGLCOVERSTROKEPATHCHROMIUMCONTEXTANGLE)(GLeglContext ctx, GLuint path, GLenum coverMode);
+typedef void (GL_APIENTRYP PFNGLSTENCILTHENCOVERFILLPATHCHROMIUMCONTEXTANGLE)(GLeglContext ctx, GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode);
+typedef void (GL_APIENTRYP PFNGLSTENCILTHENCOVERSTROKEPATHCHROMIUMCONTEXTANGLE)(GLeglContext ctx, GLuint path, GLint reference, GLuint mask, GLenum coverMode);
+typedef void (GL_APIENTRYP PFNGLCOVERFILLPATHINSTANCEDCHROMIUMCONTEXTANGLE)(GLeglContext ctx, GLsizei numPath, GLenum pathNameType, const void * paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat * transformValues);
+typedef void (GL_APIENTRYP PFNGLCOVERSTROKEPATHINSTANCEDCHROMIUMCONTEXTANGLE)(GLeglContext ctx, GLsizei numPath, GLenum pathNameType, const void * paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat * transformValues);
+typedef void (GL_APIENTRYP PFNGLSTENCILSTROKEPATHINSTANCEDCHROMIUMCONTEXTANGLE)(GLeglContext ctx, GLsizei numPath, GLenum pathNameType, const void * paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat * transformValues);
+typedef void (GL_APIENTRYP PFNGLSTENCILFILLPATHINSTANCEDCHROMIUMCONTEXTANGLE)(GLeglContext ctx, GLsizei numPaths, GLenum pathNameType, const void * paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat * transformValues);
+typedef void (GL_APIENTRYP PFNGLSTENCILTHENCOVERFILLPATHINSTANCEDCHROMIUMCONTEXTANGLE)(GLeglContext ctx, GLsizei numPaths, GLenum pathNameType, const void * paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat * transformValues);
+typedef void (GL_APIENTRYP PFNGLSTENCILTHENCOVERSTROKEPATHINSTANCEDCHROMIUMCONTEXTANGLE)(GLeglContext ctx, GLsizei numPaths, GLenum pathNameType, const void * paths, GLuint pathBase, GLint reference, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat * transformValues);
+typedef void (GL_APIENTRYP PFNGLBINDFRAGMENTINPUTLOCATIONCHROMIUMCONTEXTANGLE)(GLeglContext ctx, GLuint programs, GLint location, const GLchar * name);
+typedef void (GL_APIENTRYP PFNGLPROGRAMPATHFRAGMENTINPUTGENCHROMIUMCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat * coeffs);
+typedef void (GL_APIENTRYP PFNGLCOPYTEXTURECHROMIUMCONTEXTANGLE)(GLeglContext ctx, GLuint sourceId, GLint sourceLevel, GLenum destTarget, GLuint destId, GLint destLevel, GLint internalFormat, GLenum destType, GLboolean unpackFlipY, GLboolean unpackPremultiplyAlpha, GLboolean unpackUnmultiplyAlpha);
+typedef void (GL_APIENTRYP PFNGLCOPYSUBTEXTURECHROMIUMCONTEXTANGLE)(GLeglContext ctx, GLuint sourceId, GLint sourceLevel, GLenum destTarget, GLuint destId, GLint destLevel, GLint xoffset, GLint yoffset, GLint x, GLint y, GLint width, GLint height, GLboolean unpackFlipY, GLboolean unpackPremultiplyAlpha, GLboolean unpackUnmultiplyAlpha);
+typedef void (GL_APIENTRYP PFNGLCOMPRESSEDCOPYTEXTURECHROMIUMCONTEXTANGLE)(GLeglContext ctx, GLuint sourceId, GLuint destId);
+typedef void (GL_APIENTRYP PFNGLREQUESTEXTENSIONANGLECONTEXTANGLE)(GLeglContext ctx, const GLchar * name);
+typedef void (GL_APIENTRYP PFNGLGETBOOLEANVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum pname, GLsizei bufSize, GLsizei * length, GLboolean * params);
+typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+typedef void (GL_APIENTRYP PFNGLGETFLOATVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum pname, GLsizei bufSize, GLsizei * length, GLfloat * params);
+typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum attachment, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+typedef void (GL_APIENTRYP PFNGLGETINTEGERVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * data);
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLuint program, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+typedef void (GL_APIENTRYP PFNGLGETSHADERIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLuint shader, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERFVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLsizei bufSize, GLsizei * length, GLfloat * params);
+typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+typedef void (GL_APIENTRYP PFNGLGETUNIFORMFVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLsizei bufSize, GLsizei * length, GLfloat * params);
+typedef void (GL_APIENTRYP PFNGLGETUNIFORMIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLsizei bufSize, GLsizei * length, GLint * params);
+typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBFVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLuint index, GLenum pname, GLsizei bufSize, GLsizei * length, GLfloat * params);
+typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLuint index, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLuint index, GLenum pname, GLsizei bufSize, GLsizei * length, void ** pointer);
+typedef void (GL_APIENTRYP PFNGLREADPIXELSROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLsizei * length, GLsizei * columns, GLsizei * rows, void * pixels);
+typedef void (GL_APIENTRYP PFNGLTEXIMAGE2DROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLsizei bufSize, const void * pixels);
+typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLsizei bufSize, const GLfloat * params);
+typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLsizei bufSize, const GLint * params);
+typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE2DROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, const void * pixels);
+typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLsizei bufSize, const void * pixels);
+typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, const void * pixels);
+typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, GLsizei dataSize, const GLvoid * data);
+typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLint level, GLsizei xoffset, GLsizei yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, GLsizei dataSize, const GLvoid * data);
+typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, GLsizei dataSize, const GLvoid * data);
+typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, GLsizei dataSize, const GLvoid * data);
+typedef void (GL_APIENTRYP PFNGLGETQUERYIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLuint id, GLenum pname, GLsizei bufSize, GLsizei * length, GLuint * params);
+typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLsizei bufSize, GLsizei * length, void ** params);
+typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLuint index, GLsizei bufSize, GLsizei * length, GLint * data);
+typedef void (GL_APIENTRYP PFNGLGETINTERNALFORMATIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLuint index, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIUIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLuint index, GLenum pname, GLsizei bufSize, GLsizei * length, GLuint * params);
+typedef void (GL_APIENTRYP PFNGLGETUNIFORMUIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLsizei bufSize, GLsizei * length, GLuint * params);
+typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLuint program, GLuint uniformBlockIndex, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+typedef void (GL_APIENTRYP PFNGLGETINTEGER64VROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum pname, GLsizei bufSize, GLsizei * length, GLint64 * data);
+typedef void (GL_APIENTRYP PFNGLGETINTEGER64I_VROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLuint index, GLsizei bufSize, GLsizei * length, GLint64 * data);
+typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERI64VROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLsizei bufSize, GLsizei * length, GLint64 * params);
+typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLuint sampler, GLuint pname, GLsizei bufSize, const GLint * param);
+typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERFVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLuint sampler, GLenum pname, GLsizei bufSize, const GLfloat * param);
+typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLuint sampler, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERFVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLuint sampler, GLenum pname, GLsizei bufSize, GLsizei * length, GLfloat * params);
+typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLuint sampler, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMINTERFACEIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLuint program, GLenum programInterface, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+typedef void (GL_APIENTRYP PFNGLGETBOOLEANI_VROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLuint index, GLsizei bufSize, GLsizei * length, GLboolean * data);
+typedef void (GL_APIENTRYP PFNGLGETMULTISAMPLEFVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum pname, GLuint index, GLsizei bufSize, GLsizei * length, GLfloat * val);
+typedef void (GL_APIENTRYP PFNGLGETTEXLEVELPARAMETERIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLint level, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+typedef void (GL_APIENTRYP PFNGLGETTEXLEVELPARAMETERFVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLint level, GLenum pname, GLsizei bufSize, GLsizei * length, GLfloat * params);
+typedef void (GL_APIENTRYP PFNGLGETPOINTERVROBUSTANGLEROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum pname, GLsizei bufSize, GLsizei * length, void ** params);
+typedef void (GL_APIENTRYP PFNGLREADNPIXELSROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLsizei * length, GLsizei * columns, GLsizei * rows, void * data);
+typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLsizei bufSize, GLsizei * length, GLfloat * params);
+typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLsizei bufSize, GLsizei * length, GLint * params);
+typedef void (GL_APIENTRYP PFNGLGETNUNIFORMUIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLsizei bufSize, GLsizei * length, GLuint * params);
+typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLsizei bufSize, const GLint * params);
+typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIUIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLsizei bufSize, const GLuint * params);
+typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIUIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLsizei bufSize, GLsizei * length, GLuint * params);
+typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLuint sampler, GLenum pname, GLsizei bufSize, const GLint * param);
+typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIUIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLuint sampler, GLenum pname, GLsizei bufSize, const GLuint * param);
+typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLuint sampler, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLuint sampler, GLenum pname, GLsizei bufSize, GLsizei * length, GLuint * params);
+typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTIVROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLuint id, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTI64VROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLuint id, GLenum pname, GLsizei bufSize, GLsizei * length, GLint64 * params);
+typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUI64VROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLuint id, GLenum pname, GLsizei bufSize, GLsizei * length, GLuint64 * params);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREMULTIVIEWLAYEREDANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREMULTIVIEWSIDEBYSIDEANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum attachment, GLuint texture, GLint level, GLsizei numViews, const GLint * viewportOffsets);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glActiveTextureContextANGLE(GLeglContext ctx, GLenum texture);
+GL_APICALL void GL_APIENTRY glAttachShaderContextANGLE(GLeglContext ctx, GLuint program, GLuint shader);
+GL_APICALL void GL_APIENTRY glBindAttribLocationContextANGLE(GLeglContext ctx, GLuint program, GLuint index, const GLchar *name);
+GL_APICALL void GL_APIENTRY glBindBufferContextANGLE(GLeglContext ctx, GLenum target, GLuint buffer);
+GL_APICALL void GL_APIENTRY glBindFramebufferContextANGLE(GLeglContext ctx, GLenum target, GLuint framebuffer);
+GL_APICALL void GL_APIENTRY glBindRenderbufferContextANGLE(GLeglContext ctx, GLenum target, GLuint renderbuffer);
+GL_APICALL void GL_APIENTRY glBindTextureContextANGLE(GLeglContext ctx, GLenum target, GLuint texture);
+GL_APICALL void GL_APIENTRY glBlendColorContextANGLE(GLeglContext ctx, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+GL_APICALL void GL_APIENTRY glBlendEquationContextANGLE(GLeglContext ctx, GLenum mode);
+GL_APICALL void GL_APIENTRY glBlendEquationSeparateContextANGLE(GLeglContext ctx, GLenum modeRGB, GLenum modeAlpha);
+GL_APICALL void GL_APIENTRY glBlendFuncContextANGLE(GLeglContext ctx, GLenum sfactor, GLenum dfactor);
+GL_APICALL void GL_APIENTRY glBlendFuncSeparateContextANGLE(GLeglContext ctx, GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+GL_APICALL void GL_APIENTRY glBufferDataContextANGLE(GLeglContext ctx, GLenum target, GLsizeiptr size, const void *data, GLenum usage);
+GL_APICALL void GL_APIENTRY glBufferSubDataContextANGLE(GLeglContext ctx, GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
+GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatusContextANGLE(GLeglContext ctx, GLenum target);
+GL_APICALL void GL_APIENTRY glClearContextANGLE(GLeglContext ctx, GLbitfield mask);
+GL_APICALL void GL_APIENTRY glClearColorContextANGLE(GLeglContext ctx, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+GL_APICALL void GL_APIENTRY glClearDepthfContextANGLE(GLeglContext ctx, GLfloat d);
+GL_APICALL void GL_APIENTRY glClearStencilContextANGLE(GLeglContext ctx, GLint s);
+GL_APICALL void GL_APIENTRY glColorMaskContextANGLE(GLeglContext ctx, GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+GL_APICALL void GL_APIENTRY glCompileShaderContextANGLE(GLeglContext ctx, GLuint shader);
+GL_APICALL void GL_APIENTRY glCompressedTexImage2DContextANGLE(GLeglContext ctx, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
+GL_APICALL void GL_APIENTRY glCompressedTexSubImage2DContextANGLE(GLeglContext ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
+GL_APICALL void GL_APIENTRY glCopyTexImage2DContextANGLE(GLeglContext ctx, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+GL_APICALL void GL_APIENTRY glCopyTexSubImage2DContextANGLE(GLeglContext ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GL_APICALL GLuint GL_APIENTRY glCreateProgramContextANGLE(GLeglContext ctx);
+GL_APICALL GLuint GL_APIENTRY glCreateShaderContextANGLE(GLeglContext ctx, GLenum type);
+GL_APICALL void GL_APIENTRY glCullFaceContextANGLE(GLeglContext ctx, GLenum mode);
+GL_APICALL void GL_APIENTRY glDeleteBuffersContextANGLE(GLeglContext ctx, GLsizei n, const GLuint *buffers);
+GL_APICALL void GL_APIENTRY glDeleteFramebuffersContextANGLE(GLeglContext ctx, GLsizei n, const GLuint *framebuffers);
+GL_APICALL void GL_APIENTRY glDeleteProgramContextANGLE(GLeglContext ctx, GLuint program);
+GL_APICALL void GL_APIENTRY glDeleteRenderbuffersContextANGLE(GLeglContext ctx, GLsizei n, const GLuint *renderbuffers);
+GL_APICALL void GL_APIENTRY glDeleteShaderContextANGLE(GLeglContext ctx, GLuint shader);
+GL_APICALL void GL_APIENTRY glDeleteTexturesContextANGLE(GLeglContext ctx, GLsizei n, const GLuint *textures);
+GL_APICALL void GL_APIENTRY glDepthFuncContextANGLE(GLeglContext ctx, GLenum func);
+GL_APICALL void GL_APIENTRY glDepthMaskContextANGLE(GLeglContext ctx, GLboolean flag);
+GL_APICALL void GL_APIENTRY glDepthRangefContextANGLE(GLeglContext ctx, GLfloat n, GLfloat f);
+GL_APICALL void GL_APIENTRY glDetachShaderContextANGLE(GLeglContext ctx, GLuint program, GLuint shader);
+GL_APICALL void GL_APIENTRY glDisableContextANGLE(GLeglContext ctx, GLenum cap);
+GL_APICALL void GL_APIENTRY glDisableVertexAttribArrayContextANGLE(GLeglContext ctx, GLuint index);
+GL_APICALL void GL_APIENTRY glDrawArraysContextANGLE(GLeglContext ctx, GLenum mode, GLint first, GLsizei count);
+GL_APICALL void GL_APIENTRY glDrawElementsContextANGLE(GLeglContext ctx, GLenum mode, GLsizei count, GLenum type, const void *indices);
+GL_APICALL void GL_APIENTRY glEnableContextANGLE(GLeglContext ctx, GLenum cap);
+GL_APICALL void GL_APIENTRY glEnableVertexAttribArrayContextANGLE(GLeglContext ctx, GLuint index);
+GL_APICALL void GL_APIENTRY glFinishContextANGLE(GLeglContext ctx);
+GL_APICALL void GL_APIENTRY glFlushContextANGLE(GLeglContext ctx);
+GL_APICALL void GL_APIENTRY glFramebufferRenderbufferContextANGLE(GLeglContext ctx, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+GL_APICALL void GL_APIENTRY glFramebufferTexture2DContextANGLE(GLeglContext ctx, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+GL_APICALL void GL_APIENTRY glFrontFaceContextANGLE(GLeglContext ctx, GLenum mode);
+GL_APICALL void GL_APIENTRY glGenBuffersContextANGLE(GLeglContext ctx, GLsizei n, GLuint *buffers);
+GL_APICALL void GL_APIENTRY glGenFramebuffersContextANGLE(GLeglContext ctx, GLsizei n, GLuint *framebuffers);
+GL_APICALL void GL_APIENTRY glGenRenderbuffersContextANGLE(GLeglContext ctx, GLsizei n, GLuint *renderbuffers);
+GL_APICALL void GL_APIENTRY glGenTexturesContextANGLE(GLeglContext ctx, GLsizei n, GLuint *textures);
+GL_APICALL void GL_APIENTRY glGenerateMipmapContextANGLE(GLeglContext ctx, GLenum target);
+GL_APICALL void GL_APIENTRY glGetActiveAttribContextANGLE(GLeglContext ctx, GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+GL_APICALL void GL_APIENTRY glGetActiveUniformContextANGLE(GLeglContext ctx, GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+GL_APICALL void GL_APIENTRY glGetAttachedShadersContextANGLE(GLeglContext ctx, GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
+GL_APICALL GLint GL_APIENTRY glGetAttribLocationContextANGLE(GLeglContext ctx, GLuint program, const GLchar *name);
+GL_APICALL void GL_APIENTRY glGetBooleanvContextANGLE(GLeglContext ctx, GLenum pname, GLboolean *data);
+GL_APICALL void GL_APIENTRY glGetBufferParameterivContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLint *params);
+GL_APICALL GLenum GL_APIENTRY glGetErrorContextANGLE(GLeglContext ctx);
+GL_APICALL void GL_APIENTRY glGetFloatvContextANGLE(GLeglContext ctx, GLenum pname, GLfloat *data);
+GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameterivContextANGLE(GLeglContext ctx, GLenum target, GLenum attachment, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetIntegervContextANGLE(GLeglContext ctx, GLenum pname, GLint *data);
+GL_APICALL void GL_APIENTRY glGetProgramInfoLogContextANGLE(GLeglContext ctx, GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+GL_APICALL void GL_APIENTRY glGetProgramivContextANGLE(GLeglContext ctx, GLuint program, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetRenderbufferParameterivContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetShaderInfoLogContextANGLE(GLeglContext ctx, GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormatContextANGLE(GLeglContext ctx, GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
+GL_APICALL void GL_APIENTRY glGetShaderSourceContextANGLE(GLeglContext ctx, GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
+GL_APICALL void GL_APIENTRY glGetShaderivContextANGLE(GLeglContext ctx, GLuint shader, GLenum pname, GLint *params);
+GL_APICALL const GLubyte *GL_APIENTRY glGetStringContextANGLE(GLeglContext ctx, GLenum name);
+GL_APICALL void GL_APIENTRY glGetTexParameterfvContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLfloat *params);
+GL_APICALL void GL_APIENTRY glGetTexParameterivContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLint *params);
+GL_APICALL GLint GL_APIENTRY glGetUniformLocationContextANGLE(GLeglContext ctx, GLuint program, const GLchar *name);
+GL_APICALL void GL_APIENTRY glGetUniformfvContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLfloat *params);
+GL_APICALL void GL_APIENTRY glGetUniformivContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLint *params);
+GL_APICALL void GL_APIENTRY glGetVertexAttribPointervContextANGLE(GLeglContext ctx, GLuint index, GLenum pname, void **pointer);
+GL_APICALL void GL_APIENTRY glGetVertexAttribfvContextANGLE(GLeglContext ctx, GLuint index, GLenum pname, GLfloat *params);
+GL_APICALL void GL_APIENTRY glGetVertexAttribivContextANGLE(GLeglContext ctx, GLuint index, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glHintContextANGLE(GLeglContext ctx, GLenum target, GLenum mode);
+GL_APICALL GLboolean GL_APIENTRY glIsBufferContextANGLE(GLeglContext ctx, GLuint buffer);
+GL_APICALL GLboolean GL_APIENTRY glIsEnabledContextANGLE(GLeglContext ctx, GLenum cap);
+GL_APICALL GLboolean GL_APIENTRY glIsFramebufferContextANGLE(GLeglContext ctx, GLuint framebuffer);
+GL_APICALL GLboolean GL_APIENTRY glIsProgramContextANGLE(GLeglContext ctx, GLuint program);
+GL_APICALL GLboolean GL_APIENTRY glIsRenderbufferContextANGLE(GLeglContext ctx, GLuint renderbuffer);
+GL_APICALL GLboolean GL_APIENTRY glIsShaderContextANGLE(GLeglContext ctx, GLuint shader);
+GL_APICALL GLboolean GL_APIENTRY glIsTextureContextANGLE(GLeglContext ctx, GLuint texture);
+GL_APICALL void GL_APIENTRY glLineWidthContextANGLE(GLeglContext ctx, GLfloat width);
+GL_APICALL void GL_APIENTRY glLinkProgramContextANGLE(GLeglContext ctx, GLuint program);
+GL_APICALL void GL_APIENTRY glPixelStoreiContextANGLE(GLeglContext ctx, GLenum pname, GLint param);
+GL_APICALL void GL_APIENTRY glPolygonOffsetContextANGLE(GLeglContext ctx, GLfloat factor, GLfloat units);
+GL_APICALL void GL_APIENTRY glReadPixelsContextANGLE(GLeglContext ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
+GL_APICALL void GL_APIENTRY glReleaseShaderCompilerContextANGLE(GLeglContext ctx);
+GL_APICALL void GL_APIENTRY glRenderbufferStorageContextANGLE(GLeglContext ctx, GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glSampleCoverageContextANGLE(GLeglContext ctx, GLfloat value, GLboolean invert);
+GL_APICALL void GL_APIENTRY glScissorContextANGLE(GLeglContext ctx, GLint x, GLint y, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glShaderBinaryContextANGLE(GLeglContext ctx, GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
+GL_APICALL void GL_APIENTRY glShaderSourceContextANGLE(GLeglContext ctx, GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
+GL_APICALL void GL_APIENTRY glStencilFuncContextANGLE(GLeglContext ctx, GLenum func, GLint ref, GLuint mask);
+GL_APICALL void GL_APIENTRY glStencilFuncSeparateContextANGLE(GLeglContext ctx, GLenum face, GLenum func, GLint ref, GLuint mask);
+GL_APICALL void GL_APIENTRY glStencilMaskContextANGLE(GLeglContext ctx, GLuint mask);
+GL_APICALL void GL_APIENTRY glStencilMaskSeparateContextANGLE(GLeglContext ctx, GLenum face, GLuint mask);
+GL_APICALL void GL_APIENTRY glStencilOpContextANGLE(GLeglContext ctx, GLenum fail, GLenum zfail, GLenum zpass);
+GL_APICALL void GL_APIENTRY glStencilOpSeparateContextANGLE(GLeglContext ctx, GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
+GL_APICALL void GL_APIENTRY glTexImage2DContextANGLE(GLeglContext ctx, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
+GL_APICALL void GL_APIENTRY glTexParameterfContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLfloat param);
+GL_APICALL void GL_APIENTRY glTexParameterfvContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, const GLfloat *params);
+GL_APICALL void GL_APIENTRY glTexParameteriContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLint param);
+GL_APICALL void GL_APIENTRY glTexParameterivContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, const GLint *params);
+GL_APICALL void GL_APIENTRY glTexSubImage2DContextANGLE(GLeglContext ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
+GL_APICALL void GL_APIENTRY glUniform1fContextANGLE(GLeglContext ctx, GLint location, GLfloat v0);
+GL_APICALL void GL_APIENTRY glUniform1fvContextANGLE(GLeglContext ctx, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniform1iContextANGLE(GLeglContext ctx, GLint location, GLint v0);
+GL_APICALL void GL_APIENTRY glUniform1ivContextANGLE(GLeglContext ctx, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glUniform2fContextANGLE(GLeglContext ctx, GLint location, GLfloat v0, GLfloat v1);
+GL_APICALL void GL_APIENTRY glUniform2fvContextANGLE(GLeglContext ctx, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniform2iContextANGLE(GLeglContext ctx, GLint location, GLint v0, GLint v1);
+GL_APICALL void GL_APIENTRY glUniform2ivContextANGLE(GLeglContext ctx, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glUniform3fContextANGLE(GLeglContext ctx, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+GL_APICALL void GL_APIENTRY glUniform3fvContextANGLE(GLeglContext ctx, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniform3iContextANGLE(GLeglContext ctx, GLint location, GLint v0, GLint v1, GLint v2);
+GL_APICALL void GL_APIENTRY glUniform3ivContextANGLE(GLeglContext ctx, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glUniform4fContextANGLE(GLeglContext ctx, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+GL_APICALL void GL_APIENTRY glUniform4fvContextANGLE(GLeglContext ctx, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniform4iContextANGLE(GLeglContext ctx, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+GL_APICALL void GL_APIENTRY glUniform4ivContextANGLE(GLeglContext ctx, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix2fvContextANGLE(GLeglContext ctx, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix3fvContextANGLE(GLeglContext ctx, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix4fvContextANGLE(GLeglContext ctx, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUseProgramContextANGLE(GLeglContext ctx, GLuint program);
+GL_APICALL void GL_APIENTRY glValidateProgramContextANGLE(GLeglContext ctx, GLuint program);
+GL_APICALL void GL_APIENTRY glVertexAttrib1fContextANGLE(GLeglContext ctx, GLuint index, GLfloat x);
+GL_APICALL void GL_APIENTRY glVertexAttrib1fvContextANGLE(GLeglContext ctx, GLuint index, const GLfloat *v);
+GL_APICALL void GL_APIENTRY glVertexAttrib2fContextANGLE(GLeglContext ctx, GLuint index, GLfloat x, GLfloat y);
+GL_APICALL void GL_APIENTRY glVertexAttrib2fvContextANGLE(GLeglContext ctx, GLuint index, const GLfloat *v);
+GL_APICALL void GL_APIENTRY glVertexAttrib3fContextANGLE(GLeglContext ctx, GLuint index, GLfloat x, GLfloat y, GLfloat z);
+GL_APICALL void GL_APIENTRY glVertexAttrib3fvContextANGLE(GLeglContext ctx, GLuint index, const GLfloat *v);
+GL_APICALL void GL_APIENTRY glVertexAttrib4fContextANGLE(GLeglContext ctx, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GL_APICALL void GL_APIENTRY glVertexAttrib4fvContextANGLE(GLeglContext ctx, GLuint index, const GLfloat *v);
+GL_APICALL void GL_APIENTRY glVertexAttribPointerContextANGLE(GLeglContext ctx, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
+GL_APICALL void GL_APIENTRY glViewportContextANGLE(GLeglContext ctx, GLint x, GLint y, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glBeginQueryEXTContextANGLE(GLeglContext ctx, GLenum target, GLuint id);
+GL_APICALL void GL_APIENTRY glBindVertexArrayOESContextANGLE(GLeglContext ctx, GLuint array);
+GL_APICALL void GL_APIENTRY glBlitFramebufferANGLEContextANGLE(GLeglContext ctx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+GL_APICALL void GL_APIENTRY glDebugMessageCallbackKHRContextANGLE(GLeglContext ctx, GLDEBUGPROCKHR callback, const void *userParam);
+GL_APICALL void GL_APIENTRY glDebugMessageControlKHRContextANGLE(GLeglContext ctx, GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
+GL_APICALL void GL_APIENTRY glDebugMessageInsertKHRContextANGLE(GLeglContext ctx, GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
+GL_APICALL void GL_APIENTRY glDeleteFencesNVContextANGLE(GLeglContext ctx, GLsizei n, const GLuint *fences);
+GL_APICALL void GL_APIENTRY glDeleteQueriesEXTContextANGLE(GLeglContext ctx, GLsizei n, const GLuint *ids);
+GL_APICALL void GL_APIENTRY glDeleteVertexArraysOESContextANGLE(GLeglContext ctx, GLsizei n, const GLuint *arrays);
+GL_APICALL void GL_APIENTRY glDiscardFramebufferEXTContextANGLE(GLeglContext ctx, GLenum target, GLsizei numAttachments, const GLenum *attachments);
+GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLEContextANGLE(GLeglContext ctx, GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+GL_APICALL void GL_APIENTRY glDrawBuffersEXTContextANGLE(GLeglContext ctx, GLsizei n, const GLenum *bufs);
+GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLEContextANGLE(GLeglContext ctx, GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
+GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOESContextANGLE(GLeglContext ctx, GLenum target, GLeglImageOES image);
+GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOESContextANGLE(GLeglContext ctx, GLenum target, GLeglImageOES image);
+GL_APICALL void GL_APIENTRY glEndQueryEXTContextANGLE(GLeglContext ctx, GLenum target);
+GL_APICALL void GL_APIENTRY glFinishFenceNVContextANGLE(GLeglContext ctx, GLuint fence);
+GL_APICALL void GL_APIENTRY glFlushMappedBufferRangeEXTContextANGLE(GLeglContext ctx, GLenum target, GLintptr offset, GLsizeiptr length);
+GL_APICALL void GL_APIENTRY glGenFencesNVContextANGLE(GLeglContext ctx, GLsizei n, GLuint *fences);
+GL_APICALL void GL_APIENTRY glGenQueriesEXTContextANGLE(GLeglContext ctx, GLsizei n, GLuint *ids);
+GL_APICALL void GL_APIENTRY glGenVertexArraysOESContextANGLE(GLeglContext ctx, GLsizei n, GLuint *arrays);
+GL_APICALL void GL_APIENTRY glGetBufferPointervOESContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, void **params);
+GL_APICALL GLuint GL_APIENTRY glGetDebugMessageLogKHRContextANGLE(GLeglContext ctx, GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
+GL_APICALL void GL_APIENTRY glGetFenceivNVContextANGLE(GLeglContext ctx, GLuint fence, GLenum pname, GLint *params);
+GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXTContextANGLE(GLeglContext ctx);
+GL_APICALL void GL_APIENTRY glGetObjectLabelKHRContextANGLE(GLeglContext ctx, GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
+GL_APICALL void GL_APIENTRY glGetObjectPtrLabelKHRContextANGLE(GLeglContext ctx, const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
+GL_APICALL void GL_APIENTRY glGetPointervKHRContextANGLE(GLeglContext ctx, GLenum pname, void **params);
+GL_APICALL void GL_APIENTRY glGetProgramBinaryOESContextANGLE(GLeglContext ctx, GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
+GL_APICALL void GL_APIENTRY glGetQueryObjecti64vEXTContextANGLE(GLeglContext ctx, GLuint id, GLenum pname, GLint64 *params);
+GL_APICALL void GL_APIENTRY glGetQueryObjectivEXTContextANGLE(GLeglContext ctx, GLuint id, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetQueryObjectui64vEXTContextANGLE(GLeglContext ctx, GLuint id, GLenum pname, GLuint64 *params);
+GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXTContextANGLE(GLeglContext ctx, GLuint id, GLenum pname, GLuint *params);
+GL_APICALL void GL_APIENTRY glGetQueryivEXTContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLEContextANGLE(GLeglContext ctx, GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);
+GL_APICALL void GL_APIENTRY glGetnUniformfvEXTContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
+GL_APICALL void GL_APIENTRY glGetnUniformivEXTContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLsizei bufSize, GLint *params);
+GL_APICALL void GL_APIENTRY glInsertEventMarkerEXTContextANGLE(GLeglContext ctx, GLsizei length, const GLchar *marker);
+GL_APICALL GLboolean GL_APIENTRY glIsFenceNVContextANGLE(GLeglContext ctx, GLuint fence);
+GL_APICALL GLboolean GL_APIENTRY glIsQueryEXTContextANGLE(GLeglContext ctx, GLuint id);
+GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOESContextANGLE(GLeglContext ctx, GLuint array);
+GL_APICALL void *GL_APIENTRY glMapBufferOESContextANGLE(GLeglContext ctx, GLenum target, GLenum access);
+GL_APICALL void *GL_APIENTRY glMapBufferRangeEXTContextANGLE(GLeglContext ctx, GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+GL_APICALL void GL_APIENTRY glObjectLabelKHRContextANGLE(GLeglContext ctx, GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
+GL_APICALL void GL_APIENTRY glObjectPtrLabelKHRContextANGLE(GLeglContext ctx, const void *ptr, GLsizei length, const GLchar *label);
+GL_APICALL void GL_APIENTRY glPopDebugGroupKHRContextANGLE(GLeglContext ctx);
+GL_APICALL void GL_APIENTRY glPopGroupMarkerEXTContextANGLE(GLeglContext ctx);
+GL_APICALL void GL_APIENTRY glProgramBinaryOESContextANGLE(GLeglContext ctx, GLuint program, GLenum binaryFormat, const void *binary, GLint length);
+GL_APICALL void GL_APIENTRY glPushDebugGroupKHRContextANGLE(GLeglContext ctx, GLenum source, GLuint id, GLsizei length, const GLchar *message);
+GL_APICALL void GL_APIENTRY glPushGroupMarkerEXTContextANGLE(GLeglContext ctx, GLsizei length, const GLchar *marker);
+GL_APICALL void GL_APIENTRY glQueryCounterEXTContextANGLE(GLeglContext ctx, GLuint id, GLenum target);
+GL_APICALL void GL_APIENTRY glReadnPixelsEXTContextANGLE(GLeglContext ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLEContextANGLE(GLeglContext ctx, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glSetFenceNVContextANGLE(GLeglContext ctx, GLuint fence, GLenum condition);
+GL_APICALL GLboolean GL_APIENTRY glTestFenceNVContextANGLE(GLeglContext ctx, GLuint fence);
+GL_APICALL void GL_APIENTRY glTexStorage1DEXTContextANGLE(GLeglContext ctx, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+GL_APICALL void GL_APIENTRY glTexStorage2DEXTContextANGLE(GLeglContext ctx, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glTexStorage3DEXTContextANGLE(GLeglContext ctx, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOESContextANGLE(GLeglContext ctx, GLenum target);
+GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLEContextANGLE(GLeglContext ctx, GLuint index, GLuint divisor);
+GL_APICALL void GL_APIENTRY glBindUniformLocationCHROMIUMContextANGLE(GLeglContext ctx, GLuint program, GLint location, const GLchar* name);
+GL_APICALL void GL_APIENTRY glCoverageModulationCHROMIUMContextANGLE(GLeglContext ctx, GLenum components);
+GL_APICALL void GL_APIENTRY glMatrixLoadfCHROMIUMContextANGLE(GLeglContext ctx, GLenum matrixMode, const GLfloat * matrix);
+GL_APICALL void GL_APIENTRY glMatrixLoadIdentityCHROMIUMContextANGLE(GLeglContext ctx, GLenum matrixMode);
+GL_APICALL GLuint GL_APIENTRY glGenPathsCHROMIUMContextANGLE(GLeglContext ctx, GLsizei range);
+GL_APICALL void GL_APIENTRY glDeletePathsCHROMIUMContextANGLE(GLeglContext ctx, GLuint first, GLsizei range);
+GL_APICALL GLboolean GL_APIENTRY glIsPathCHROMIUMContextANGLE(GLeglContext ctx, GLuint path);
+GL_APICALL void GL_APIENTRY glPathCommandsCHROMIUMContextANGLE(GLeglContext ctx, GLuint path, GLsizei numCommands, const GLubyte * commands, GLsizei numCoords, GLenum coordType, const void* coords);
+GL_APICALL void GL_APIENTRY glPathParameterfCHROMIUMContextANGLE(GLeglContext ctx, GLuint path, GLenum pname, GLfloat value);
+GL_APICALL void GL_APIENTRY glPathParameteriCHROMIUMContextANGLE(GLeglContext ctx, GLuint path, GLenum pname, GLint value);
+GL_APICALL void GL_APIENTRY glGetPathParameterfvCHROMIUMContextANGLE(GLeglContext ctx, GLuint path, GLenum pname, GLfloat * value);
+GL_APICALL void GL_APIENTRY glGetPathParameterivCHROMIUMContextANGLE(GLeglContext ctx, GLuint path, GLenum pname, GLint * value);
+GL_APICALL void GL_APIENTRY glPathStencilFuncCHROMIUMContextANGLE(GLeglContext ctx, GLenum func, GLint ref, GLuint mask);
+GL_APICALL void GL_APIENTRY glStencilFillPathCHROMIUMContextANGLE(GLeglContext ctx, GLuint path, GLenum fillMode, GLuint mask);
+GL_APICALL void GL_APIENTRY glStencilStrokePathCHROMIUMContextANGLE(GLeglContext ctx, GLuint path, GLint reference, GLuint mask);
+GL_APICALL void GL_APIENTRY glCoverFillPathCHROMIUMContextANGLE(GLeglContext ctx, GLuint path, GLenum coverMode);
+GL_APICALL void GL_APIENTRY glCoverStrokePathCHROMIUMContextANGLE(GLeglContext ctx, GLuint path, GLenum coverMode);
+GL_APICALL void GL_APIENTRY glStencilThenCoverFillPathCHROMIUMContextANGLE(GLeglContext ctx, GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode);
+GL_APICALL void GL_APIENTRY glStencilThenCoverStrokePathCHROMIUMContextANGLE(GLeglContext ctx, GLuint path, GLint reference, GLuint mask, GLenum coverMode);
+GL_APICALL void GL_APIENTRY glCoverFillPathInstancedCHROMIUMContextANGLE(GLeglContext ctx, GLsizei numPath, GLenum pathNameType, const void * paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat * transformValues);
+GL_APICALL void GL_APIENTRY glCoverStrokePathInstancedCHROMIUMContextANGLE(GLeglContext ctx, GLsizei numPath, GLenum pathNameType, const void * paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat * transformValues);
+GL_APICALL void GL_APIENTRY glStencilStrokePathInstancedCHROMIUMContextANGLE(GLeglContext ctx, GLsizei numPath, GLenum pathNameType, const void * paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat * transformValues);
+GL_APICALL void GL_APIENTRY glStencilFillPathInstancedCHROMIUMContextANGLE(GLeglContext ctx, GLsizei numPaths, GLenum pathNameType, const void * paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat * transformValues);
+GL_APICALL void GL_APIENTRY glStencilThenCoverFillPathInstancedCHROMIUMContextANGLE(GLeglContext ctx, GLsizei numPaths, GLenum pathNameType, const void * paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat * transformValues);
+GL_APICALL void GL_APIENTRY glStencilThenCoverStrokePathInstancedCHROMIUMContextANGLE(GLeglContext ctx, GLsizei numPaths, GLenum pathNameType, const void * paths, GLuint pathBase, GLint reference, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat * transformValues);
+GL_APICALL void GL_APIENTRY glBindFragmentInputLocationCHROMIUMContextANGLE(GLeglContext ctx, GLuint programs, GLint location, const GLchar * name);
+GL_APICALL void GL_APIENTRY glProgramPathFragmentInputGenCHROMIUMContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat * coeffs);
+GL_APICALL void GL_APIENTRY glCopyTextureCHROMIUMContextANGLE(GLeglContext ctx, GLuint sourceId, GLint sourceLevel, GLenum destTarget, GLuint destId, GLint destLevel, GLint internalFormat, GLenum destType, GLboolean unpackFlipY, GLboolean unpackPremultiplyAlpha, GLboolean unpackUnmultiplyAlpha);
+GL_APICALL void GL_APIENTRY glCopySubTextureCHROMIUMContextANGLE(GLeglContext ctx, GLuint sourceId, GLint sourceLevel, GLenum destTarget, GLuint destId, GLint destLevel, GLint xoffset, GLint yoffset, GLint x, GLint y, GLint width, GLint height, GLboolean unpackFlipY, GLboolean unpackPremultiplyAlpha, GLboolean unpackUnmultiplyAlpha);
+GL_APICALL void GL_APIENTRY glCompressedCopyTextureCHROMIUMContextANGLE(GLeglContext ctx, GLuint sourceId, GLuint destId);
+GL_APICALL void GL_APIENTRY glRequestExtensionANGLEContextANGLE(GLeglContext ctx, const GLchar * name);
+GL_APICALL void GL_APIENTRY glGetBooleanvRobustANGLEContextANGLE(GLeglContext ctx, GLenum pname, GLsizei bufSize, GLsizei * length, GLboolean * params);
+GL_APICALL void GL_APIENTRY glGetBufferParameterivRobustANGLEContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+GL_APICALL void GL_APIENTRY glGetFloatvRobustANGLEContextANGLE(GLeglContext ctx, GLenum pname, GLsizei bufSize, GLsizei * length, GLfloat * params);
+GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameterivRobustANGLEContextANGLE(GLeglContext ctx, GLenum target, GLenum attachment, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+GL_APICALL void GL_APIENTRY glGetIntegervRobustANGLEContextANGLE(GLeglContext ctx, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * data);
+GL_APICALL void GL_APIENTRY glGetProgramivRobustANGLEContextANGLE(GLeglContext ctx, GLuint program, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+GL_APICALL void GL_APIENTRY glGetRenderbufferParameterivRobustANGLEContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+GL_APICALL void GL_APIENTRY glGetShaderivRobustANGLEContextANGLE(GLeglContext ctx, GLuint shader, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+GL_APICALL void GL_APIENTRY glGetTexParameterfvRobustANGLEContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLsizei bufSize, GLsizei * length, GLfloat * params);
+GL_APICALL void GL_APIENTRY glGetTexParameterivRobustANGLEContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+GL_APICALL void GL_APIENTRY glGetUniformfvRobustANGLEContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLsizei bufSize, GLsizei * length, GLfloat * params);
+GL_APICALL void GL_APIENTRY glGetUniformivRobustANGLEContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLsizei bufSize, GLsizei * length, GLint * params);
+GL_APICALL void GL_APIENTRY glGetVertexAttribfvRobustANGLEContextANGLE(GLeglContext ctx, GLuint index, GLenum pname, GLsizei bufSize, GLsizei * length, GLfloat * params);
+GL_APICALL void GL_APIENTRY glGetVertexAttribivRobustANGLEContextANGLE(GLeglContext ctx, GLuint index, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+GL_APICALL void GL_APIENTRY glGetVertexAttribPointervRobustANGLEContextANGLE(GLeglContext ctx, GLuint index, GLenum pname, GLsizei bufSize, GLsizei * length, void ** pointer);
+GL_APICALL void GL_APIENTRY glReadPixelsRobustANGLEContextANGLE(GLeglContext ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLsizei * length, GLsizei * columns, GLsizei * rows, void * pixels);
+GL_APICALL void GL_APIENTRY glTexImage2DRobustANGLEContextANGLE(GLeglContext ctx, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLsizei bufSize, const void * pixels);
+GL_APICALL void GL_APIENTRY glTexParameterfvRobustANGLEContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLsizei bufSize, const GLfloat * params);
+GL_APICALL void GL_APIENTRY glTexParameterivRobustANGLEContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLsizei bufSize, const GLint * params);
+GL_APICALL void GL_APIENTRY glTexSubImage2DRobustANGLEContextANGLE(GLeglContext ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, const void * pixels);
+GL_APICALL void GL_APIENTRY glTexImage3DRobustANGLEContextANGLE(GLeglContext ctx, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLsizei bufSize, const void * pixels);
+GL_APICALL void GL_APIENTRY glTexSubImage3DRobustANGLEContextANGLE(GLeglContext ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, const void * pixels);
+GL_APICALL void GL_APIENTRY glCompressedTexImage2DRobustANGLEContextANGLE(GLeglContext ctx, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, GLsizei dataSize, const GLvoid * data);
+GL_APICALL void GL_APIENTRY glCompressedTexSubImage2DRobustANGLEContextANGLE(GLeglContext ctx, GLenum target, GLint level, GLsizei xoffset, GLsizei yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, GLsizei dataSize, const GLvoid * data);
+GL_APICALL void GL_APIENTRY glCompressedTexImage3DRobustANGLEContextANGLE(GLeglContext ctx, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, GLsizei dataSize, const GLvoid * data);
+GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DRobustANGLEContextANGLE(GLeglContext ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, GLsizei dataSize, const GLvoid * data);
+GL_APICALL void GL_APIENTRY glGetQueryivRobustANGLEContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+GL_APICALL void GL_APIENTRY glGetQueryObjectuivRobustANGLEContextANGLE(GLeglContext ctx, GLuint id, GLenum pname, GLsizei bufSize, GLsizei * length, GLuint * params);
+GL_APICALL void GL_APIENTRY glGetBufferPointervRobustANGLEContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLsizei bufSize, GLsizei * length, void ** params);
+GL_APICALL void GL_APIENTRY glGetIntegeri_vRobustANGLEContextANGLE(GLeglContext ctx, GLenum target, GLuint index, GLsizei bufSize, GLsizei * length, GLint * data);
+GL_APICALL void GL_APIENTRY glGetInternalformativRobustANGLEContextANGLE(GLeglContext ctx, GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+GL_APICALL void GL_APIENTRY glGetVertexAttribIivRobustANGLEContextANGLE(GLeglContext ctx, GLuint index, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+GL_APICALL void GL_APIENTRY glGetVertexAttribIuivRobustANGLEContextANGLE(GLeglContext ctx, GLuint index, GLenum pname, GLsizei bufSize, GLsizei * length, GLuint * params);
+GL_APICALL void GL_APIENTRY glGetUniformuivRobustANGLEContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLsizei bufSize, GLsizei * length, GLuint * params);
+GL_APICALL void GL_APIENTRY glGetActiveUniformBlockivRobustANGLEContextANGLE(GLeglContext ctx, GLuint program, GLuint uniformBlockIndex, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+GL_APICALL void GL_APIENTRY glGetInteger64vRobustANGLEContextANGLE(GLeglContext ctx, GLenum pname, GLsizei bufSize, GLsizei * length, GLint64 * data);
+GL_APICALL void GL_APIENTRY glGetInteger64i_vRobustANGLEContextANGLE(GLeglContext ctx, GLenum target, GLuint index, GLsizei bufSize, GLsizei * length, GLint64 * data);
+GL_APICALL void GL_APIENTRY glGetBufferParameteri64vRobustANGLEContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLsizei bufSize, GLsizei * length, GLint64 * params);
+GL_APICALL void GL_APIENTRY glSamplerParameterivRobustANGLEContextANGLE(GLeglContext ctx, GLuint sampler, GLuint pname, GLsizei bufSize, const GLint * param);
+GL_APICALL void GL_APIENTRY glSamplerParameterfvRobustANGLEContextANGLE(GLeglContext ctx, GLuint sampler, GLenum pname, GLsizei bufSize, const GLfloat * param);
+GL_APICALL void GL_APIENTRY glGetSamplerParameterivRobustANGLEContextANGLE(GLeglContext ctx, GLuint sampler, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+GL_APICALL void GL_APIENTRY glGetSamplerParameterfvRobustANGLEContextANGLE(GLeglContext ctx, GLuint sampler, GLenum pname, GLsizei bufSize, GLsizei * length, GLfloat * params);
+GL_APICALL void GL_APIENTRY glGetFramebufferParameterivRobustANGLEContextANGLE(GLeglContext ctx, GLuint sampler, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+GL_APICALL void GL_APIENTRY glGetProgramInterfaceivRobustANGLEContextANGLE(GLeglContext ctx, GLuint program, GLenum programInterface, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+GL_APICALL void GL_APIENTRY glGetBooleani_vRobustANGLEContextANGLE(GLeglContext ctx, GLenum target, GLuint index, GLsizei bufSize, GLsizei * length, GLboolean * data);
+GL_APICALL void GL_APIENTRY glGetMultisamplefvRobustANGLEContextANGLE(GLeglContext ctx, GLenum pname, GLuint index, GLsizei bufSize, GLsizei * length, GLfloat * val);
+GL_APICALL void GL_APIENTRY glGetTexLevelParameterivRobustANGLEContextANGLE(GLeglContext ctx, GLenum target, GLint level, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+GL_APICALL void GL_APIENTRY glGetTexLevelParameterfvRobustANGLEContextANGLE(GLeglContext ctx, GLenum target, GLint level, GLenum pname, GLsizei bufSize, GLsizei * length, GLfloat * params);
+GL_APICALL void GL_APIENTRY glGetPointervRobustANGLERobustANGLEContextANGLE(GLeglContext ctx, GLenum pname, GLsizei bufSize, GLsizei * length, void ** params);
+GL_APICALL void GL_APIENTRY glReadnPixelsRobustANGLEContextANGLE(GLeglContext ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLsizei * length, GLsizei * columns, GLsizei * rows, void * data);
+GL_APICALL void GL_APIENTRY glGetnUniformfvRobustANGLEContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLsizei bufSize, GLsizei * length, GLfloat * params);
+GL_APICALL void GL_APIENTRY glGetnUniformivRobustANGLEContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLsizei bufSize, GLsizei * length, GLint * params);
+GL_APICALL void GL_APIENTRY glGetnUniformuivRobustANGLEContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLsizei bufSize, GLsizei * length, GLuint * params);
+GL_APICALL void GL_APIENTRY glTexParameterIivRobustANGLEContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLsizei bufSize, const GLint * params);
+GL_APICALL void GL_APIENTRY glTexParameterIuivRobustANGLEContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLsizei bufSize, const GLuint * params);
+GL_APICALL void GL_APIENTRY glGetTexParameterIivRobustANGLEContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+GL_APICALL void GL_APIENTRY glGetTexParameterIuivRobustANGLEContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLsizei bufSize, GLsizei * length, GLuint * params);
+GL_APICALL void GL_APIENTRY glSamplerParameterIivRobustANGLEContextANGLE(GLeglContext ctx, GLuint sampler, GLenum pname, GLsizei bufSize, const GLint * param);
+GL_APICALL void GL_APIENTRY glSamplerParameterIuivRobustANGLEContextANGLE(GLeglContext ctx, GLuint sampler, GLenum pname, GLsizei bufSize, const GLuint * param);
+GL_APICALL void GL_APIENTRY glGetSamplerParameterIivRobustANGLEContextANGLE(GLeglContext ctx, GLuint sampler, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+GL_APICALL void GL_APIENTRY glGetSamplerParameterIuivRobustANGLEContextANGLE(GLeglContext ctx, GLuint sampler, GLenum pname, GLsizei bufSize, GLsizei * length, GLuint * params);
+GL_APICALL void GL_APIENTRY glGetQueryObjectivRobustANGLEContextANGLE(GLeglContext ctx, GLuint id, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * params);
+GL_APICALL void GL_APIENTRY glGetQueryObjecti64vRobustANGLEContextANGLE(GLeglContext ctx, GLuint id, GLenum pname, GLsizei bufSize, GLsizei * length, GLint64 * params);
+GL_APICALL void GL_APIENTRY glGetQueryObjectui64vRobustANGLEContextANGLE(GLeglContext ctx, GLuint id, GLenum pname, GLsizei bufSize, GLsizei * length, GLuint64 * params);
+GL_APICALL void GL_APIENTRY glFramebufferTextureMultiviewLayeredANGLEContextANGLE(GLeglContext ctx, GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews);
+GL_APICALL void GL_APIENTRY glFramebufferTextureMultiviewSideBySideANGLEContextANGLE(GLeglContext ctx, GLenum target, GLenum attachment, GLuint texture, GLint level, GLsizei numViews, const GLint * viewportOffsets);
+#endif
new file mode 100644
--- /dev/null
+++ b/gfx/angle/checkout/include/GLES3/gl31ext_explicit_context_autogen.inc
@@ -0,0 +1,148 @@
+// GENERATED FILE - DO NOT EDIT.
+// Generated by generate_entry_points.py using data from gl.xml and gl_angle_ext.xml.
+//
+// Copyright 2018 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// gl31ext_explicit_context_autogen.inc:
+//   Function declarations for the EGL_ANGLE_explicit_context extension
+
+typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMCONTEXTANGLE)(GLeglContext ctx, GLuint pipeline, GLuint program);
+typedef void (GL_APIENTRYP PFNGLBINDIMAGETEXTURECONTEXTANGLE)(GLeglContext ctx, GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
+typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINECONTEXTANGLE)(GLeglContext ctx, GLuint pipeline);
+typedef void (GL_APIENTRYP PFNGLBINDVERTEXBUFFERCONTEXTANGLE)(GLeglContext ctx, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
+typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVCONTEXTANGLE)(GLeglContext ctx, GLenum type, GLsizei count, const GLchar *const*strings);
+typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESCONTEXTANGLE)(GLeglContext ctx, GLsizei n, const GLuint *pipelines);
+typedef void (GL_APIENTRYP PFNGLDISPATCHCOMPUTECONTEXTANGLE)(GLeglContext ctx, GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
+typedef void (GL_APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTCONTEXTANGLE)(GLeglContext ctx, GLintptr indirect);
+typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINDIRECTCONTEXTANGLE)(GLeglContext ctx, GLenum mode, const void *indirect);
+typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINDIRECTCONTEXTANGLE)(GLeglContext ctx, GLenum mode, GLenum type, const void *indirect);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERPARAMETERICONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLint param);
+typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESCONTEXTANGLE)(GLeglContext ctx, GLsizei n, GLuint *pipelines);
+typedef void (GL_APIENTRYP PFNGLGETBOOLEANI_VCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLuint index, GLboolean *data);
+typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLGETMULTISAMPLEFVCONTEXTANGLE)(GLeglContext ctx, GLenum pname, GLuint index, GLfloat *val);
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMINTERFACEIVCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLenum programInterface, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGCONTEXTANGLE)(GLeglContext ctx, GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVCONTEXTANGLE)(GLeglContext ctx, GLuint pipeline, GLenum pname, GLint *params);
+typedef GLuint (GL_APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLenum programInterface, const GLchar *name);
+typedef GLint (GL_APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLenum programInterface, const GLchar *name);
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMRESOURCENAMECONTEXTANGLE)(GLeglContext ctx, GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMRESOURCEIVCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);
+typedef void (GL_APIENTRYP PFNGLGETTEXLEVELPARAMETERFVCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLint level, GLenum pname, GLfloat *params);
+typedef void (GL_APIENTRYP PFNGLGETTEXLEVELPARAMETERIVCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLint level, GLenum pname, GLint *params);
+typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINECONTEXTANGLE)(GLeglContext ctx, GLuint pipeline);
+typedef void (GL_APIENTRYP PFNGLMEMORYBARRIERCONTEXTANGLE)(GLeglContext ctx, GLbitfield barriers);
+typedef void (GL_APIENTRYP PFNGLMEMORYBARRIERBYREGIONCONTEXTANGLE)(GLeglContext ctx, GLbitfield barriers);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLfloat v0);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1ICONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLint v0);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UICONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLuint v0);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIVCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLsizei count, const GLuint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLfloat v0, GLfloat v1);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2ICONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLint v0, GLint v1);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UICONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLuint v0, GLuint v1);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIVCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLsizei count, const GLuint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3ICONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UICONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIVCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLsizei count, const GLuint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4ICONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UICONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIVCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLsizei count, const GLuint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLSAMPLEMASKICONTEXTANGLE)(GLeglContext ctx, GLuint maskNumber, GLbitfield mask);
+typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESCONTEXTANGLE)(GLeglContext ctx, GLuint pipeline, GLbitfield stages, GLuint program);
+typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINECONTEXTANGLE)(GLeglContext ctx, GLuint pipeline);
+typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBBINDINGCONTEXTANGLE)(GLeglContext ctx, GLuint attribindex, GLuint bindingindex);
+typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBFORMATCONTEXTANGLE)(GLeglContext ctx, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
+typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBIFORMATCONTEXTANGLE)(GLeglContext ctx, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+typedef void (GL_APIENTRYP PFNGLVERTEXBINDINGDIVISORCONTEXTANGLE)(GLeglContext ctx, GLuint bindingindex, GLuint divisor);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glActiveShaderProgramContextANGLE(GLeglContext ctx, GLuint pipeline, GLuint program);
+GL_APICALL void GL_APIENTRY glBindImageTextureContextANGLE(GLeglContext ctx, GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
+GL_APICALL void GL_APIENTRY glBindProgramPipelineContextANGLE(GLeglContext ctx, GLuint pipeline);
+GL_APICALL void GL_APIENTRY glBindVertexBufferContextANGLE(GLeglContext ctx, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
+GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvContextANGLE(GLeglContext ctx, GLenum type, GLsizei count, const GLchar *const*strings);
+GL_APICALL void GL_APIENTRY glDeleteProgramPipelinesContextANGLE(GLeglContext ctx, GLsizei n, const GLuint *pipelines);
+GL_APICALL void GL_APIENTRY glDispatchComputeContextANGLE(GLeglContext ctx, GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
+GL_APICALL void GL_APIENTRY glDispatchComputeIndirectContextANGLE(GLeglContext ctx, GLintptr indirect);
+GL_APICALL void GL_APIENTRY glDrawArraysIndirectContextANGLE(GLeglContext ctx, GLenum mode, const void *indirect);
+GL_APICALL void GL_APIENTRY glDrawElementsIndirectContextANGLE(GLeglContext ctx, GLenum mode, GLenum type, const void *indirect);
+GL_APICALL void GL_APIENTRY glFramebufferParameteriContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLint param);
+GL_APICALL void GL_APIENTRY glGenProgramPipelinesContextANGLE(GLeglContext ctx, GLsizei n, GLuint *pipelines);
+GL_APICALL void GL_APIENTRY glGetBooleani_vContextANGLE(GLeglContext ctx, GLenum target, GLuint index, GLboolean *data);
+GL_APICALL void GL_APIENTRY glGetFramebufferParameterivContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetMultisamplefvContextANGLE(GLeglContext ctx, GLenum pname, GLuint index, GLfloat *val);
+GL_APICALL void GL_APIENTRY glGetProgramInterfaceivContextANGLE(GLeglContext ctx, GLuint program, GLenum programInterface, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogContextANGLE(GLeglContext ctx, GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+GL_APICALL void GL_APIENTRY glGetProgramPipelineivContextANGLE(GLeglContext ctx, GLuint pipeline, GLenum pname, GLint *params);
+GL_APICALL GLuint GL_APIENTRY glGetProgramResourceIndexContextANGLE(GLeglContext ctx, GLuint program, GLenum programInterface, const GLchar *name);
+GL_APICALL GLint GL_APIENTRY glGetProgramResourceLocationContextANGLE(GLeglContext ctx, GLuint program, GLenum programInterface, const GLchar *name);
+GL_APICALL void GL_APIENTRY glGetProgramResourceNameContextANGLE(GLeglContext ctx, GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
+GL_APICALL void GL_APIENTRY glGetProgramResourceivContextANGLE(GLeglContext ctx, GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);
+GL_APICALL void GL_APIENTRY glGetTexLevelParameterfvContextANGLE(GLeglContext ctx, GLenum target, GLint level, GLenum pname, GLfloat *params);
+GL_APICALL void GL_APIENTRY glGetTexLevelParameterivContextANGLE(GLeglContext ctx, GLenum target, GLint level, GLenum pname, GLint *params);
+GL_APICALL GLboolean GL_APIENTRY glIsProgramPipelineContextANGLE(GLeglContext ctx, GLuint pipeline);
+GL_APICALL void GL_APIENTRY glMemoryBarrierContextANGLE(GLeglContext ctx, GLbitfield barriers);
+GL_APICALL void GL_APIENTRY glMemoryBarrierByRegionContextANGLE(GLeglContext ctx, GLbitfield barriers);
+GL_APICALL void GL_APIENTRY glProgramUniform1fContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLfloat v0);
+GL_APICALL void GL_APIENTRY glProgramUniform1fvContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniform1iContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLint v0);
+GL_APICALL void GL_APIENTRY glProgramUniform1ivContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform1uiContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLuint v0);
+GL_APICALL void GL_APIENTRY glProgramUniform1uivContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLsizei count, const GLuint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform2fContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLfloat v0, GLfloat v1);
+GL_APICALL void GL_APIENTRY glProgramUniform2fvContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniform2iContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLint v0, GLint v1);
+GL_APICALL void GL_APIENTRY glProgramUniform2ivContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform2uiContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLuint v0, GLuint v1);
+GL_APICALL void GL_APIENTRY glProgramUniform2uivContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLsizei count, const GLuint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform3fContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+GL_APICALL void GL_APIENTRY glProgramUniform3fvContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniform3iContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
+GL_APICALL void GL_APIENTRY glProgramUniform3ivContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform3uiContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
+GL_APICALL void GL_APIENTRY glProgramUniform3uivContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLsizei count, const GLuint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform4fContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+GL_APICALL void GL_APIENTRY glProgramUniform4fvContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniform4iContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+GL_APICALL void GL_APIENTRY glProgramUniform4ivContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform4uiContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+GL_APICALL void GL_APIENTRY glProgramUniform4uivContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLsizei count, const GLuint *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fvContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x3fvContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x4fvContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fvContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x2fvContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x4fvContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fvContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x2fvContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x3fvContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glSampleMaskiContextANGLE(GLeglContext ctx, GLuint maskNumber, GLbitfield mask);
+GL_APICALL void GL_APIENTRY glTexStorage2DMultisampleContextANGLE(GLeglContext ctx, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+GL_APICALL void GL_APIENTRY glUseProgramStagesContextANGLE(GLeglContext ctx, GLuint pipeline, GLbitfield stages, GLuint program);
+GL_APICALL void GL_APIENTRY glValidateProgramPipelineContextANGLE(GLeglContext ctx, GLuint pipeline);
+GL_APICALL void GL_APIENTRY glVertexAttribBindingContextANGLE(GLeglContext ctx, GLuint attribindex, GLuint bindingindex);
+GL_APICALL void GL_APIENTRY glVertexAttribFormatContextANGLE(GLeglContext ctx, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
+GL_APICALL void GL_APIENTRY glVertexAttribIFormatContextANGLE(GLeglContext ctx, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+GL_APICALL void GL_APIENTRY glVertexBindingDivisorContextANGLE(GLeglContext ctx, GLuint bindingindex, GLuint divisor);
+#endif
new file mode 100644
--- /dev/null
+++ b/gfx/angle/checkout/include/GLES3/gl3ext_explicit_context_autogen.inc
@@ -0,0 +1,220 @@
+// GENERATED FILE - DO NOT EDIT.
+// Generated by generate_entry_points.py using data from gl.xml and gl_angle_ext.xml.
+//
+// Copyright 2018 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// gl3ext_explicit_context_autogen.inc:
+//   Function declarations for the EGL_ANGLE_explicit_context extension
+
+typedef void (GL_APIENTRYP PFNGLBEGINQUERYCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLuint id);
+typedef void (GL_APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKCONTEXTANGLE)(GLeglContext ctx, GLenum primitiveMode);
+typedef void (GL_APIENTRYP PFNGLBINDBUFFERBASECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLuint index, GLuint buffer);
+typedef void (GL_APIENTRYP PFNGLBINDBUFFERRANGECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
+typedef void (GL_APIENTRYP PFNGLBINDSAMPLERCONTEXTANGLE)(GLeglContext ctx, GLuint unit, GLuint sampler);
+typedef void (GL_APIENTRYP PFNGLBINDTRANSFORMFEEDBACKCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLuint id);
+typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYCONTEXTANGLE)(GLeglContext ctx, GLuint array);
+typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERCONTEXTANGLE)(GLeglContext ctx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+typedef void (GL_APIENTRYP PFNGLCLEARBUFFERFICONTEXTANGLE)(GLeglContext ctx, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
+typedef void (GL_APIENTRYP PFNGLCLEARBUFFERFVCONTEXTANGLE)(GLeglContext ctx, GLenum buffer, GLint drawbuffer, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLCLEARBUFFERIVCONTEXTANGLE)(GLeglContext ctx, GLenum buffer, GLint drawbuffer, const GLint *value);
+typedef void (GL_APIENTRYP PFNGLCLEARBUFFERUIVCONTEXTANGLE)(GLeglContext ctx, GLenum buffer, GLint drawbuffer, const GLuint *value);
+typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCCONTEXTANGLE)(GLeglContext ctx, GLsync sync, GLbitfield flags, GLuint64 timeout);
+typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
+typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
+typedef void (GL_APIENTRYP PFNGLCOPYBUFFERSUBDATACONTEXTANGLE)(GLeglContext ctx, GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
+typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLDELETEQUERIESCONTEXTANGLE)(GLeglContext ctx, GLsizei n, const GLuint *ids);
+typedef void (GL_APIENTRYP PFNGLDELETESAMPLERSCONTEXTANGLE)(GLeglContext ctx, GLsizei count, const GLuint *samplers);
+typedef void (GL_APIENTRYP PFNGLDELETESYNCCONTEXTANGLE)(GLeglContext ctx, GLsync sync);
+typedef void (GL_APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSCONTEXTANGLE)(GLeglContext ctx, GLsizei n, const GLuint *ids);
+typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSCONTEXTANGLE)(GLeglContext ctx, GLsizei n, const GLuint *arrays);
+typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDCONTEXTANGLE)(GLeglContext ctx, GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
+typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSCONTEXTANGLE)(GLeglContext ctx, GLsizei n, const GLenum *bufs);
+typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDCONTEXTANGLE)(GLeglContext ctx, GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
+typedef void (GL_APIENTRYP PFNGLDRAWRANGEELEMENTSCONTEXTANGLE)(GLeglContext ctx, GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
+typedef void (GL_APIENTRYP PFNGLENDQUERYCONTEXTANGLE)(GLeglContext ctx, GLenum target);
+typedef void (GL_APIENTRYP PFNGLENDTRANSFORMFEEDBACKCONTEXTANGLE)(GLeglContext ctx);
+typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCCONTEXTANGLE)(GLeglContext ctx, GLenum condition, GLbitfield flags);
+typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLintptr offset, GLsizeiptr length);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+typedef void (GL_APIENTRYP PFNGLGENQUERIESCONTEXTANGLE)(GLeglContext ctx, GLsizei n, GLuint *ids);
+typedef void (GL_APIENTRYP PFNGLGENSAMPLERSCONTEXTANGLE)(GLeglContext ctx, GLsizei count, GLuint *samplers);
+typedef void (GL_APIENTRYP PFNGLGENTRANSFORMFEEDBACKSCONTEXTANGLE)(GLeglContext ctx, GLsizei n, GLuint *ids);
+typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSCONTEXTANGLE)(GLeglContext ctx, GLsizei n, GLuint *arrays);
+typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMECONTEXTANGLE)(GLeglContext ctx, GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
+typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMSIVCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERI64VCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLint64 *params);
+typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, void **params);
+typedef GLint (GL_APIENTRYP PFNGLGETFRAGDATALOCATIONCONTEXTANGLE)(GLeglContext ctx, GLuint program, const GLchar *name);
+typedef void (GL_APIENTRYP PFNGLGETINTEGER64I_VCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLuint index, GLint64 *data);
+typedef void (GL_APIENTRYP PFNGLGETINTEGER64VCONTEXTANGLE)(GLeglContext ctx, GLenum pname, GLint64 *data);
+typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLuint index, GLint *data);
+typedef void (GL_APIENTRYP PFNGLGETINTERNALFORMATIVCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
+typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVCONTEXTANGLE)(GLeglContext ctx, GLuint id, GLenum pname, GLuint *params);
+typedef void (GL_APIENTRYP PFNGLGETQUERYIVCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERFVCONTEXTANGLE)(GLeglContext ctx, GLuint sampler, GLenum pname, GLfloat *params);
+typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIVCONTEXTANGLE)(GLeglContext ctx, GLuint sampler, GLenum pname, GLint *params);
+typedef const GLubyte *(GL_APIENTRYP PFNGLGETSTRINGICONTEXTANGLE)(GLeglContext ctx, GLenum name, GLuint index);
+typedef void (GL_APIENTRYP PFNGLGETSYNCIVCONTEXTANGLE)(GLeglContext ctx, GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
+typedef void (GL_APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
+typedef GLuint (GL_APIENTRYP PFNGLGETUNIFORMBLOCKINDEXCONTEXTANGLE)(GLeglContext ctx, GLuint program, const GLchar *uniformBlockName);
+typedef void (GL_APIENTRYP PFNGLGETUNIFORMINDICESCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);
+typedef void (GL_APIENTRYP PFNGLGETUNIFORMUIVCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLint location, GLuint *params);
+typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIIVCONTEXTANGLE)(GLeglContext ctx, GLuint index, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIUIVCONTEXTANGLE)(GLeglContext ctx, GLuint index, GLenum pname, GLuint *params);
+typedef void (GL_APIENTRYP PFNGLINVALIDATEFRAMEBUFFERCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLsizei numAttachments, const GLenum *attachments);
+typedef void (GL_APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef GLboolean (GL_APIENTRYP PFNGLISQUERYCONTEXTANGLE)(GLeglContext ctx, GLuint id);
+typedef GLboolean (GL_APIENTRYP PFNGLISSAMPLERCONTEXTANGLE)(GLeglContext ctx, GLuint sampler);
+typedef GLboolean (GL_APIENTRYP PFNGLISSYNCCONTEXTANGLE)(GLeglContext ctx, GLsync sync);
+typedef GLboolean (GL_APIENTRYP PFNGLISTRANSFORMFEEDBACKCONTEXTANGLE)(GLeglContext ctx, GLuint id);
+typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYCONTEXTANGLE)(GLeglContext ctx, GLuint array);
+typedef void *(GL_APIENTRYP PFNGLMAPBUFFERRANGECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+typedef void (GL_APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKCONTEXTANGLE)(GLeglContext ctx);
+typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
+typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERICONTEXTANGLE)(GLeglContext ctx, GLuint program, GLenum pname, GLint value);
+typedef void (GL_APIENTRYP PFNGLREADBUFFERCONTEXTANGLE)(GLeglContext ctx, GLenum src);
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKCONTEXTANGLE)(GLeglContext ctx);
+typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERFCONTEXTANGLE)(GLeglContext ctx, GLuint sampler, GLenum pname, GLfloat param);
+typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERFVCONTEXTANGLE)(GLeglContext ctx, GLuint sampler, GLenum pname, const GLfloat *param);
+typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERICONTEXTANGLE)(GLeglContext ctx, GLuint sampler, GLenum pname, GLint param);
+typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIVCONTEXTANGLE)(GLeglContext ctx, GLuint sampler, GLenum pname, const GLint *param);
+typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
+typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DCONTEXTANGLE)(GLeglContext ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
+typedef void (GL_APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
+typedef void (GL_APIENTRYP PFNGLUNIFORM1UICONTEXTANGLE)(GLeglContext ctx, GLint location, GLuint v0);
+typedef void (GL_APIENTRYP PFNGLUNIFORM1UIVCONTEXTANGLE)(GLeglContext ctx, GLint location, GLsizei count, const GLuint *value);
+typedef void (GL_APIENTRYP PFNGLUNIFORM2UICONTEXTANGLE)(GLeglContext ctx, GLint location, GLuint v0, GLuint v1);
+typedef void (GL_APIENTRYP PFNGLUNIFORM2UIVCONTEXTANGLE)(GLeglContext ctx, GLint location, GLsizei count, const GLuint *value);
+typedef void (GL_APIENTRYP PFNGLUNIFORM3UICONTEXTANGLE)(GLeglContext ctx, GLint location, GLuint v0, GLuint v1, GLuint v2);
+typedef void (GL_APIENTRYP PFNGLUNIFORM3UIVCONTEXTANGLE)(GLeglContext ctx, GLint location, GLsizei count, const GLuint *value);
+typedef void (GL_APIENTRYP PFNGLUNIFORM4UICONTEXTANGLE)(GLeglContext ctx, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+typedef void (GL_APIENTRYP PFNGLUNIFORM4UIVCONTEXTANGLE)(GLeglContext ctx, GLint location, GLsizei count, const GLuint *value);
+typedef void (GL_APIENTRYP PFNGLUNIFORMBLOCKBINDINGCONTEXTANGLE)(GLeglContext ctx, GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
+typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X3FVCONTEXTANGLE)(GLeglContext ctx, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X4FVCONTEXTANGLE)(GLeglContext ctx, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X2FVCONTEXTANGLE)(GLeglContext ctx, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X4FVCONTEXTANGLE)(GLeglContext ctx, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X2FVCONTEXTANGLE)(GLeglContext ctx, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X3FVCONTEXTANGLE)(GLeglContext ctx, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFERCONTEXTANGLE)(GLeglContext ctx, GLenum target);
+typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORCONTEXTANGLE)(GLeglContext ctx, GLuint index, GLuint divisor);
+typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4ICONTEXTANGLE)(GLeglContext ctx, GLuint index, GLint x, GLint y, GLint z, GLint w);
+typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4IVCONTEXTANGLE)(GLeglContext ctx, GLuint index, const GLint *v);
+typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4UICONTEXTANGLE)(GLeglContext ctx, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4UIVCONTEXTANGLE)(GLeglContext ctx, GLuint index, const GLuint *v);
+typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBIPOINTERCONTEXTANGLE)(GLeglContext ctx, GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
+typedef void (GL_APIENTRYP PFNGLWAITSYNCCONTEXTANGLE)(GLeglContext ctx, GLsync sync, GLbitfield flags, GLuint64 timeout);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glBeginQueryContextANGLE(GLeglContext ctx, GLenum target, GLuint id);
+GL_APICALL void GL_APIENTRY glBeginTransformFeedbackContextANGLE(GLeglContext ctx, GLenum primitiveMode);
+GL_APICALL void GL_APIENTRY glBindBufferBaseContextANGLE(GLeglContext ctx, GLenum target, GLuint index, GLuint buffer);
+GL_APICALL void GL_APIENTRY glBindBufferRangeContextANGLE(GLeglContext ctx, GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
+GL_APICALL void GL_APIENTRY glBindSamplerContextANGLE(GLeglContext ctx, GLuint unit, GLuint sampler);
+GL_APICALL void GL_APIENTRY glBindTransformFeedbackContextANGLE(GLeglContext ctx, GLenum target, GLuint id);
+GL_APICALL void GL_APIENTRY glBindVertexArrayContextANGLE(GLeglContext ctx, GLuint array);
+GL_APICALL void GL_APIENTRY glBlitFramebufferContextANGLE(GLeglContext ctx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+GL_APICALL void GL_APIENTRY glClearBufferfiContextANGLE(GLeglContext ctx, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
+GL_APICALL void GL_APIENTRY glClearBufferfvContextANGLE(GLeglContext ctx, GLenum buffer, GLint drawbuffer, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glClearBufferivContextANGLE(GLeglContext ctx, GLenum buffer, GLint drawbuffer, const GLint *value);
+GL_APICALL void GL_APIENTRY glClearBufferuivContextANGLE(GLeglContext ctx, GLenum buffer, GLint drawbuffer, const GLuint *value);
+GL_APICALL GLenum GL_APIENTRY glClientWaitSyncContextANGLE(GLeglContext ctx, GLsync sync, GLbitfield flags, GLuint64 timeout);
+GL_APICALL void GL_APIENTRY glCompressedTexImage3DContextANGLE(GLeglContext ctx, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
+GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DContextANGLE(GLeglContext ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
+GL_APICALL void GL_APIENTRY glCopyBufferSubDataContextANGLE(GLeglContext ctx, GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
+GL_APICALL void GL_APIENTRY glCopyTexSubImage3DContextANGLE(GLeglContext ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glDeleteQueriesContextANGLE(GLeglContext ctx, GLsizei n, const GLuint *ids);
+GL_APICALL void GL_APIENTRY glDeleteSamplersContextANGLE(GLeglContext ctx, GLsizei count, const GLuint *samplers);
+GL_APICALL void GL_APIENTRY glDeleteSyncContextANGLE(GLeglContext ctx, GLsync sync);
+GL_APICALL void GL_APIENTRY glDeleteTransformFeedbacksContextANGLE(GLeglContext ctx, GLsizei n, const GLuint *ids);
+GL_APICALL void GL_APIENTRY glDeleteVertexArraysContextANGLE(GLeglContext ctx, GLsizei n, const GLuint *arrays);
+GL_APICALL void GL_APIENTRY glDrawArraysInstancedContextANGLE(GLeglContext ctx, GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
+GL_APICALL void GL_APIENTRY glDrawBuffersContextANGLE(GLeglContext ctx, GLsizei n, const GLenum *bufs);
+GL_APICALL void GL_APIENTRY glDrawElementsInstancedContextANGLE(GLeglContext ctx, GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
+GL_APICALL void GL_APIENTRY glDrawRangeElementsContextANGLE(GLeglContext ctx, GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
+GL_APICALL void GL_APIENTRY glEndQueryContextANGLE(GLeglContext ctx, GLenum target);
+GL_APICALL void GL_APIENTRY glEndTransformFeedbackContextANGLE(GLeglContext ctx);
+GL_APICALL GLsync GL_APIENTRY glFenceSyncContextANGLE(GLeglContext ctx, GLenum condition, GLbitfield flags);
+GL_APICALL void GL_APIENTRY glFlushMappedBufferRangeContextANGLE(GLeglContext ctx, GLenum target, GLintptr offset, GLsizeiptr length);
+GL_APICALL void GL_APIENTRY glFramebufferTextureLayerContextANGLE(GLeglContext ctx, GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+GL_APICALL void GL_APIENTRY glGenQueriesContextANGLE(GLeglContext ctx, GLsizei n, GLuint *ids);
+GL_APICALL void GL_APIENTRY glGenSamplersContextANGLE(GLeglContext ctx, GLsizei count, GLuint *samplers);
+GL_APICALL void GL_APIENTRY glGenTransformFeedbacksContextANGLE(GLeglContext ctx, GLsizei n, GLuint *ids);
+GL_APICALL void GL_APIENTRY glGenVertexArraysContextANGLE(GLeglContext ctx, GLsizei n, GLuint *arrays);
+GL_APICALL void GL_APIENTRY glGetActiveUniformBlockNameContextANGLE(GLeglContext ctx, GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
+GL_APICALL void GL_APIENTRY glGetActiveUniformBlockivContextANGLE(GLeglContext ctx, GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetActiveUniformsivContextANGLE(GLeglContext ctx, GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetBufferParameteri64vContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLint64 *params);
+GL_APICALL void GL_APIENTRY glGetBufferPointervContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, void **params);
+GL_APICALL GLint GL_APIENTRY glGetFragDataLocationContextANGLE(GLeglContext ctx, GLuint program, const GLchar *name);
+GL_APICALL void GL_APIENTRY glGetInteger64i_vContextANGLE(GLeglContext ctx, GLenum target, GLuint index, GLint64 *data);
+GL_APICALL void GL_APIENTRY glGetInteger64vContextANGLE(GLeglContext ctx, GLenum pname, GLint64 *data);
+GL_APICALL void GL_APIENTRY glGetIntegeri_vContextANGLE(GLeglContext ctx, GLenum target, GLuint index, GLint *data);
+GL_APICALL void GL_APIENTRY glGetInternalformativContextANGLE(GLeglContext ctx, GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
+GL_APICALL void GL_APIENTRY glGetProgramBinaryContextANGLE(GLeglContext ctx, GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
+GL_APICALL void GL_APIENTRY glGetQueryObjectuivContextANGLE(GLeglContext ctx, GLuint id, GLenum pname, GLuint *params);
+GL_APICALL void GL_APIENTRY glGetQueryivContextANGLE(GLeglContext ctx, GLenum target, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetSamplerParameterfvContextANGLE(GLeglContext ctx, GLuint sampler, GLenum pname, GLfloat *params);
+GL_APICALL void GL_APIENTRY glGetSamplerParameterivContextANGLE(GLeglContext ctx, GLuint sampler, GLenum pname, GLint *params);
+GL_APICALL const GLubyte *GL_APIENTRY glGetStringiContextANGLE(GLeglContext ctx, GLenum name, GLuint index);
+GL_APICALL void GL_APIENTRY glGetSyncivContextANGLE(GLeglContext ctx, GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
+GL_APICALL void GL_APIENTRY glGetTransformFeedbackVaryingContextANGLE(GLeglContext ctx, GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
+GL_APICALL GLuint GL_APIENTRY glGetUniformBlockIndexContextANGLE(GLeglContext ctx, GLuint program, const GLchar *uniformBlockName);
+GL_APICALL void GL_APIENTRY glGetUniformIndicesContextANGLE(GLeglContext ctx, GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);
+GL_APICALL void GL_APIENTRY glGetUniformuivContextANGLE(GLeglContext ctx, GLuint program, GLint location, GLuint *params);
+GL_APICALL void GL_APIENTRY glGetVertexAttribIivContextANGLE(GLeglContext ctx, GLuint index, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetVertexAttribIuivContextANGLE(GLeglContext ctx, GLuint index, GLenum pname, GLuint *params);
+GL_APICALL void GL_APIENTRY glInvalidateFramebufferContextANGLE(GLeglContext ctx, GLenum target, GLsizei numAttachments, const GLenum *attachments);
+GL_APICALL void GL_APIENTRY glInvalidateSubFramebufferContextANGLE(GLeglContext ctx, GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
+GL_APICALL GLboolean GL_APIENTRY glIsQueryContextANGLE(GLeglContext ctx, GLuint id);
+GL_APICALL GLboolean GL_APIENTRY glIsSamplerContextANGLE(GLeglContext ctx, GLuint sampler);
+GL_APICALL GLboolean GL_APIENTRY glIsSyncContextANGLE(GLeglContext ctx, GLsync sync);
+GL_APICALL GLboolean GL_APIENTRY glIsTransformFeedbackContextANGLE(GLeglContext ctx, GLuint id);
+GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayContextANGLE(GLeglContext ctx, GLuint array);
+GL_APICALL void *GL_APIENTRY glMapBufferRangeContextANGLE(GLeglContext ctx, GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+GL_APICALL void GL_APIENTRY glPauseTransformFeedbackContextANGLE(GLeglContext ctx);
+GL_APICALL void GL_APIENTRY glProgramBinaryContextANGLE(GLeglContext ctx, GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
+GL_APICALL void GL_APIENTRY glProgramParameteriContextANGLE(GLeglContext ctx, GLuint program, GLenum pname, GLint value);
+GL_APICALL void GL_APIENTRY glReadBufferContextANGLE(GLeglContext ctx, GLenum src);
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleContextANGLE(GLeglContext ctx, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glResumeTransformFeedbackContextANGLE(GLeglContext ctx);
+GL_APICALL void GL_APIENTRY glSamplerParameterfContextANGLE(GLeglContext ctx, GLuint sampler, GLenum pname, GLfloat param);
+GL_APICALL void GL_APIENTRY glSamplerParameterfvContextANGLE(GLeglContext ctx, GLuint sampler, GLenum pname, const GLfloat *param);
+GL_APICALL void GL_APIENTRY glSamplerParameteriContextANGLE(GLeglContext ctx, GLuint sampler, GLenum pname, GLint param);
+GL_APICALL void GL_APIENTRY glSamplerParameterivContextANGLE(GLeglContext ctx, GLuint sampler, GLenum pname, const GLint *param);
+GL_APICALL void GL_APIENTRY glTexImage3DContextANGLE(GLeglContext ctx, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
+GL_APICALL void GL_APIENTRY glTexStorage2DContextANGLE(GLeglContext ctx, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glTexStorage3DContextANGLE(GLeglContext ctx, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+GL_APICALL void GL_APIENTRY glTexSubImage3DContextANGLE(GLeglContext ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
+GL_APICALL void GL_APIENTRY glTransformFeedbackVaryingsContextANGLE(GLeglContext ctx, GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
+GL_APICALL void GL_APIENTRY glUniform1uiContextANGLE(GLeglContext ctx, GLint location, GLuint v0);
+GL_APICALL void GL_APIENTRY glUniform1uivContextANGLE(GLeglContext ctx, GLint location, GLsizei count, const GLuint *value);
+GL_APICALL void GL_APIENTRY glUniform2uiContextANGLE(GLeglContext ctx, GLint location, GLuint v0, GLuint v1);
+GL_APICALL void GL_APIENTRY glUniform2uivContextANGLE(GLeglContext ctx, GLint location, GLsizei count, const GLuint *value);
+GL_APICALL void GL_APIENTRY glUniform3uiContextANGLE(GLeglContext ctx, GLint location, GLuint v0, GLuint v1, GLuint v2);
+GL_APICALL void GL_APIENTRY glUniform3uivContextANGLE(GLeglContext ctx, GLint location, GLsizei count, const GLuint *value);
+GL_APICALL void GL_APIENTRY glUniform4uiContextANGLE(GLeglContext ctx, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+GL_APICALL void GL_APIENTRY glUniform4uivContextANGLE(GLeglContext ctx, GLint location, GLsizei count, const GLuint *value);
+GL_APICALL void GL_APIENTRY glUniformBlockBindingContextANGLE(GLeglContext ctx, GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
+GL_APICALL void GL_APIENTRY glUniformMatrix2x3fvContextANGLE(GLeglContext ctx, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix2x4fvContextANGLE(GLeglContext ctx, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix3x2fvContextANGLE(GLeglContext ctx, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix3x4fvContextANGLE(GLeglContext ctx, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix4x2fvContextANGLE(GLeglContext ctx, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix4x3fvContextANGLE(GLeglContext ctx, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL GLboolean GL_APIENTRY glUnmapBufferContextANGLE(GLeglContext ctx, GLenum target);
+GL_APICALL void GL_APIENTRY glVertexAttribDivisorContextANGLE(GLeglContext ctx, GLuint index, GLuint divisor);
+GL_APICALL void GL_APIENTRY glVertexAttribI4iContextANGLE(GLeglContext ctx, GLuint index, GLint x, GLint y, GLint z, GLint w);
+GL_APICALL void GL_APIENTRY glVertexAttribI4ivContextANGLE(GLeglContext ctx, GLuint index, const GLint *v);
+GL_APICALL void GL_APIENTRY glVertexAttribI4uiContextANGLE(GLeglContext ctx, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+GL_APICALL void GL_APIENTRY glVertexAttribI4uivContextANGLE(GLeglContext ctx, GLuint index, const GLuint *v);
+GL_APICALL void GL_APIENTRY glVertexAttribIPointerContextANGLE(GLeglContext ctx, GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
+GL_APICALL void GL_APIENTRY glWaitSyncContextANGLE(GLeglContext ctx, GLsync sync, GLbitfield flags, GLuint64 timeout);
+#endif
--- a/gfx/angle/checkout/include/GLSLANG/ShaderLang.h
+++ b/gfx/angle/checkout/include/GLSLANG/ShaderLang.h
@@ -256,16 +256,20 @@ const ShCompileOptions SH_DONT_USE_LOOPS
 // Don't use D3D constant register zero when allocating space for uniforms. This is targeted to work
 // around a bug in NVIDIA D3D driver version 388.59 where in very specific cases the driver would
 // not handle constant register zero correctly. Only has an effect on HLSL translation.
 const ShCompileOptions SH_SKIP_D3D_CONSTANT_REGISTER_ZERO = UINT64_C(1) << 37;
 
 // Clamp gl_FragDepth to the range [0.0, 1.0] in case it is statically used.
 const ShCompileOptions SH_CLAMP_FRAG_DEPTH = UINT64_C(1) << 38;
 
+// Rewrite expressions like "v.x = z = expression;". Works around a bug in NVIDIA OpenGL drivers
+// prior to version 397.31.
+const ShCompileOptions SH_REWRITE_REPEATED_ASSIGN_TO_SWIZZLED = UINT64_C(1) << 39;
+
 // Defines alternate strategies for implementing array index clamping.
 enum ShArrayIndexClampingStrategy
 {
     // Use the clamp intrinsic for array index clamping.
     SH_CLAMP_WITH_CLAMP_INTRINSIC = 1,
 
     // Use a user-defined function for array index clamping.
     SH_CLAMP_WITH_USER_DEFINED_INT_CLAMP_FUNCTION
--- a/gfx/angle/checkout/out/gen/angle/id/commit.h
+++ b/gfx/angle/checkout/out/gen/angle/id/commit.h
@@ -1,3 +1,3 @@
-#define ANGLE_COMMIT_HASH "595ccab4acc3"
+#define ANGLE_COMMIT_HASH "fc96a1a98357"
 #define ANGLE_COMMIT_HASH_SIZE 12
-#define ANGLE_COMMIT_DATE "2018-06-01 17:26:22 -0700"
+#define ANGLE_COMMIT_DATE "2018-06-29 19:06:56 -0700"
--- a/gfx/angle/checkout/src/common/debug.cpp
+++ b/gfx/angle/checkout/src/common/debug.cpp
@@ -40,17 +40,17 @@ constexpr const char *LogSeverityName(in
                                                             : "UNKNOWN";
 }
 
 bool ShouldCreateLogMessage(LogSeverity severity)
 {
 #if defined(ANGLE_TRACE_ENABLED)
     return true;
 #elif defined(ANGLE_ENABLE_ASSERTS)
-    return severity == LOG_ERR;
+    return severity != LOG_EVENT;
 #else
     return false;
 #endif
 }
 
 }  // namespace
 
 namespace priv
@@ -60,16 +60,19 @@ bool ShouldCreatePlatformLogMessage(LogS
 {
 #if defined(ANGLE_TRACE_ENABLED)
     return true;
 #else
     return severity != LOG_EVENT;
 #endif
 }
 
+// This is never instantiated, it's just used for EAT_STREAM_PARAMETERS to an object of the correct
+// type on the LHS of the unused part of the ternary operator.
+std::ostream *gSwallowStream;
 }  // namespace priv
 
 bool DebugAnnotationsActive()
 {
 #if defined(ANGLE_ENABLE_DEBUG_ANNOTATIONS)
     return g_debugAnnotator != nullptr && g_debugAnnotator->getStatus();
 #else
     return false;
@@ -208,23 +211,20 @@ LogSeverity LogMessage::getSeverity() co
 }
 
 std::string LogMessage::getMessage() const
 {
     return mStream.str();
 }
 
 #if defined(ANGLE_PLATFORM_WINDOWS)
-std::ostream &operator<<(std::ostream &os, const FmtHR &fmt)
+priv::FmtHexHelper<HRESULT> FmtHR(HRESULT value)
 {
-    os << "HRESULT: ";
-    return FmtHexInt(os, fmt.mHR);
+    return priv::FmtHexHelper<HRESULT>("HRESULT: ", value);
 }
 
-std::ostream &operator<<(std::ostream &os, const FmtErr &fmt)
+priv::FmtHexHelper<DWORD> FmtErr(DWORD value)
 {
-    os << "error: ";
-    return FmtHexInt(os, fmt.mErr);
+    return priv::FmtHexHelper<DWORD>("error: ", value);
 }
-
 #endif  // defined(ANGLE_PLATFORM_WINDOWS)
 
 }  // namespace gl
--- a/gfx/angle/checkout/src/common/debug.h
+++ b/gfx/angle/checkout/src/common/debug.h
@@ -1,15 +1,16 @@
 //
 // Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
 
-// debug.h: Debugging utilities.
+// debug.h: Debugging utilities. A lot of the logging code is adapted from Chromium's
+// base/logging.h.
 
 #ifndef COMMON_DEBUG_H_
 #define COMMON_DEBUG_H_
 
 #include <assert.h>
 #include <stdio.h>
 
 #include <ios>
@@ -99,16 +100,18 @@ namespace priv
 class LogMessageVoidify
 {
   public:
     LogMessageVoidify() {}
     // This has to be an operator with a precedence lower than << but higher than ?:
     void operator&(std::ostream &) {}
 };
 
+extern std::ostream *gSwallowStream;
+
 // Used by ANGLE_LOG_IS_ON to lazy-evaluate stream arguments.
 bool ShouldCreatePlatformLogMessage(LogSeverity severity);
 
 template <int N, typename T>
 std::ostream &FmtHex(std::ostream &os, T value)
 {
     os << "0x";
 
@@ -119,49 +122,62 @@ std::ostream &FmtHex(std::ostream &os, T
     os << std::hex << std::uppercase << std::setw(N) << std::setfill('0') << value;
 
     os.flags(oldFlags);
     os.width(oldWidth);
     os.fill(oldFill);
 
     return os;
 }
-}  // namespace priv
 
-#if defined(ANGLE_PLATFORM_WINDOWS)
-class FmtHR
+template <typename T>
+std::ostream &FmtHexAutoSized(std::ostream &os, T value)
+{
+    constexpr int N = sizeof(T) * 2;
+    return priv::FmtHex<N>(os, value);
+}
+
+template <typename T>
+class FmtHexHelper
 {
   public:
-    explicit FmtHR(HRESULT hresult) : mHR(hresult) {}
+    FmtHexHelper(const char *prefix, T value) : mPrefix(prefix), mValue(value) {}
+    explicit FmtHexHelper(T value) : mPrefix(nullptr), mValue(value) {}
+
   private:
-    HRESULT mHR;
-    friend std::ostream &operator<<(std::ostream &os, const FmtHR &fmt);
+    const char *mPrefix;
+    T mValue;
+
+    friend std::ostream &operator<<(std::ostream &os, const FmtHexHelper &fmt)
+    {
+        if (fmt.mPrefix)
+        {
+            os << fmt.mPrefix;
+        }
+        return FmtHexAutoSized(os, fmt.mValue);
+    }
 };
 
-class FmtErr
-{
-  public:
-    explicit FmtErr(DWORD err) : mErr(err) {}
+}  // namespace priv
 
-  private:
-    DWORD mErr;
-    friend std::ostream &operator<<(std::ostream &os, const FmtErr &fmt);
-};
+template <typename T>
+priv::FmtHexHelper<T> FmtHex(T value)
+{
+    return priv::FmtHexHelper<T>(value);
+}
+
+#if defined(ANGLE_PLATFORM_WINDOWS)
+priv::FmtHexHelper<HRESULT> FmtHR(HRESULT value);
+priv::FmtHexHelper<DWORD> FmtErr(DWORD value);
 #endif  // defined(ANGLE_PLATFORM_WINDOWS)
 
 template <typename T>
-std::ostream &FmtHexShort(std::ostream &os, T value)
+std::ostream &FmtHex(std::ostream &os, T value)
 {
-    return priv::FmtHex<4>(os, value);
-}
-
-template <typename T>
-std::ostream &FmtHexInt(std::ostream &os, T value)
-{
-    return priv::FmtHex<8>(os, value);
+    return priv::FmtHexAutoSized(os, value);
 }
 
 // A few definitions of macros that don't generate much code. These are used
 // by ANGLE_LOG(). Since these are used all over our code, it's
 // better to have compact code for these operations.
 #define COMPACT_ANGLE_LOG_EX_EVENT(ClassName, ...) \
     ::gl::ClassName(__FUNCTION__, __LINE__, ::gl::LOG_EVENT, ##__VA_ARGS__)
 #define COMPACT_ANGLE_LOG_EX_WARN(ClassName, ...) \
@@ -227,64 +243,72 @@ std::ostream &FmtHexInt(std::ostream &os
 #define ANGLE_ASSERT_IMPL(expression) assert(expression)
 #define ANGLE_ASSERT_IMPL_IS_NORETURN 0
 #else
 // TODO(jmadill): Detect if debugger is attached and break.
 #define ANGLE_ASSERT_IMPL(expression) ANGLE_CRASH()
 #define ANGLE_ASSERT_IMPL_IS_NORETURN 1
 #endif  // !defined(NDEBUG)
 
+// Note that gSwallowStream is used instead of an arbitrary LOG() stream to avoid the creation of an
+// object with a non-trivial destructor (LogMessage). On MSVC x86 (checked on 2015 Update 3), this
+// causes a few additional pointless instructions to be emitted even at full optimization level,
+// even though the : arm of the ternary operator is clearly never executed. Using a simpler object
+// to be &'d with Voidify() avoids these extra instructions. Using a simpler POD object with a
+// templated operator<< also works to avoid these instructions. However, this causes warnings on
+// statically defined implementations of operator<<(std::ostream, ...) in some .cpp files, because
+// they become defined-but-unreferenced functions. A reinterpret_cast of 0 to an ostream* also is
+// not suitable, because some compilers warn of undefined behavior.
+#define ANGLE_EAT_STREAM_PARAMETERS \
+    true ? static_cast<void>(0) : ::gl::priv::LogMessageVoidify() & (*::gl::priv::gSwallowStream)
+
 // A macro asserting a condition and outputting failures to the debug log
 #if defined(ANGLE_ENABLE_ASSERTS)
 #define ASSERT(expression)                                                                         \
     (expression ? static_cast<void>(0) : ((ERR() << "\t! Assert failed in " << __FUNCTION__ << "(" \
                                                  << __LINE__ << "): " << #expression),             \
                                           ANGLE_ASSERT_IMPL(expression)))
 #define UNREACHABLE_IS_NORETURN ANGLE_ASSERT_IMPL_IS_NORETURN
 #else
-// These are just dummy values.
-#define COMPACT_ANGLE_LOG_EX_ASSERT(ClassName, ...) \
-    COMPACT_ANGLE_LOG_EX_EVENT(ClassName, ##__VA_ARGS__)
-#define COMPACT_ANGLE_LOG_ASSERT COMPACT_ANGLE_LOG_EVENT
-namespace gl
-{
-constexpr LogSeverity LOG_ASSERT = LOG_EVENT;
-}  // namespace gl
-
-#define ASSERT(condition)                                                     \
-    ANGLE_LAZY_STREAM(ANGLE_LOG_STREAM(ASSERT), false ? !(condition) : false) \
-        << "Check failed: " #condition ". "
+#define ASSERT(condition) ANGLE_EAT_STREAM_PARAMETERS << !(condition)
 #define UNREACHABLE_IS_NORETURN 0
 #endif  // defined(ANGLE_ENABLE_ASSERTS)
 
-#define UNUSED_VARIABLE(variable) ((void)variable)
+#define ANGLE_UNUSED_VARIABLE(variable) (static_cast<void>(variable))
 
 // A macro to indicate unimplemented functionality
 #ifndef NOASSERT_UNIMPLEMENTED
 #define NOASSERT_UNIMPLEMENTED 1
 #endif
 
 #if defined(ANGLE_TRACE_ENABLED) || defined(ANGLE_ENABLE_ASSERTS)
-#define UNIMPLEMENTED()                                                                      \
-    {                                                                                        \
-        ERR() << "\t! Unimplemented: " << __FUNCTION__ << "(" << __FILE__ << ":" << __LINE__ \
-              << ")";                                                                        \
-        ASSERT(NOASSERT_UNIMPLEMENTED);                                                      \
-    }                                                                                        \
+#define UNIMPLEMENTED()                                                                       \
+    {                                                                                         \
+        WARN() << "\t! Unimplemented: " << __FUNCTION__ << "(" << __FILE__ << ":" << __LINE__ \
+               << ")";                                                                        \
+        ASSERT(NOASSERT_UNIMPLEMENTED);                                                       \
+    }                                                                                         \
     ANGLE_EMPTY_STATEMENT
 
 // A macro for code which is not expected to be reached under valid assumptions
-#define UNREACHABLE()                                                                            \
-    ((ERR() << "\t! Unreachable reached: " << __FUNCTION__ << "(" << __FILE__ << ":" << __LINE__ \
-            << ")"),                                                                             \
-     ASSERT(false))
+#define UNREACHABLE()                                                                              \
+    {                                                                                              \
+        ERR() << "\t! Unreachable reached: " << __FUNCTION__ << "(" << __FILE__ << ":" << __LINE__ \
+              << ")";                                                                              \
+        ASSERT(false);                                                                             \
+    }                                                                                              \
+    ANGLE_EMPTY_STATEMENT
 #else
 #define UNIMPLEMENTED()                 \
     {                                   \
         ASSERT(NOASSERT_UNIMPLEMENTED); \
     }                                   \
     ANGLE_EMPTY_STATEMENT
 
 // A macro for code which is not expected to be reached under valid assumptions
-#define UNREACHABLE() ASSERT(false)
+#define UNREACHABLE()  \
+    {                  \
+        ASSERT(false); \
+    }                  \
+    ANGLE_EMPTY_STATEMENT
 #endif  // defined(ANGLE_TRACE_ENABLED) || defined(ANGLE_ENABLE_ASSERTS)
 
 #endif   // COMMON_DEBUG_H_
--- a/gfx/angle/checkout/src/common/platform.h
+++ b/gfx/angle/checkout/src/common/platform.h
@@ -96,9 +96,20 @@
 #if defined(__mips__) || defined(__arm__) || defined(__aarch64__)
 #include <stddef.h>
 #endif
 
 // The MemoryBarrier function name collides with a macro under Windows
 // We will undef the macro so that the function name does not get replaced
 #undef MemoryBarrier
 
+// Macro for hinting that an expression is likely to be true/false.
+#if !defined(ANGLE_LIKELY) || !defined(ANGLE_UNLIKELY)
+#if defined(__GNUC__) || defined(__clang__)
+#define ANGLE_LIKELY(x) __builtin_expect(!!(x), 1)
+#define ANGLE_UNLIKELY(x) __builtin_expect(!!(x), 0)
+#else
+#define ANGLE_LIKELY(x) (x)
+#define ANGLE_UNLIKELY(x) (x)
+#endif  // defined(__GNUC__) || defined(__clang__)
+#endif  // !defined(ANGLE_LIKELY) || !defined(ANGLE_UNLIKELY)
+
 #endif // COMMON_PLATFORM_H_
--- a/gfx/angle/checkout/src/common/third_party/base/anglebase/logging.h
+++ b/gfx/angle/checkout/src/common/third_party/base/anglebase/logging.h
@@ -15,12 +15,12 @@
 #endif
 
 #ifndef CHECK
 #define CHECK(X) ASSERT(X)
 #endif
 
 // Unfortunately ANGLE relies on ASSERT being an empty statement, which these libs don't respect.
 #ifndef NOTREACHED
-#define NOTREACHED() UNREACHABLE()
+#define NOTREACHED() ({ UNREACHABLE(); })
 #endif
 
 #endif  // ANGLEBASE_LOGGING_H_
--- a/gfx/angle/checkout/src/compiler/preprocessor/DiagnosticsBase.cpp
+++ b/gfx/angle/checkout/src/compiler/preprocessor/DiagnosticsBase.cpp
@@ -3,16 +3,19 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
 
 #include "compiler/preprocessor/DiagnosticsBase.h"
 
 #include "common/debug.h"
 
+namespace angle
+{
+
 namespace pp
 {
 
 Diagnostics::~Diagnostics()
 {
 }
 
 void Diagnostics::report(ID id, const SourceLocation &loc, const std::string &text)
@@ -136,8 +139,10 @@ const char *Diagnostics::message(ID id)
         // Warnings end.
         default:
             UNREACHABLE();
             return "";
     }
 }
 
 }  // namespace pp
+
+}  // namespace angle
--- a/gfx/angle/checkout/src/compiler/preprocessor/DiagnosticsBase.h
+++ b/gfx/angle/checkout/src/compiler/preprocessor/DiagnosticsBase.h
@@ -4,16 +4,19 @@
 // found in the LICENSE file.
 //
 
 #ifndef COMPILER_PREPROCESSOR_DIAGNOSTICSBASE_H_
 #define COMPILER_PREPROCESSOR_DIAGNOSTICSBASE_H_
 
 #include <string>
 
+namespace angle
+{
+
 namespace pp
 {
 
 struct SourceLocation;
 
 // Base class for reporting diagnostic messages.
 // Derived classes are responsible for formatting and printing the messages.
 class Diagnostics
@@ -82,9 +85,11 @@ class Diagnostics
     bool isError(ID id);
     const char *message(ID id);
 
     virtual void print(ID id, const SourceLocation &loc, const std::string &text) = 0;
 };
 
 }  // namespace pp
 
+}  // namespace angle
+
 #endif  // COMPILER_PREPROCESSOR_DIAGNOSTICSBASE_H_
--- a/gfx/angle/checkout/src/compiler/preprocessor/DirectiveHandlerBase.cpp
+++ b/gfx/angle/checkout/src/compiler/preprocessor/DirectiveHandlerBase.cpp
@@ -1,16 +1,21 @@
 //
 // Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
 
 #include "compiler/preprocessor/DirectiveHandlerBase.h"
 
+namespace angle
+{
+
 namespace pp
 {
 
 DirectiveHandler::~DirectiveHandler()
 {
 }
 
 }  // namespace pp
+
+}  // namespace angle
--- a/gfx/angle/checkout/src/compiler/preprocessor/DirectiveHandlerBase.h
+++ b/gfx/angle/checkout/src/compiler/preprocessor/DirectiveHandlerBase.h
@@ -4,16 +4,19 @@
 // found in the LICENSE file.
 //
 
 #ifndef COMPILER_PREPROCESSOR_DIRECTIVEHANDLERBASE_H_
 #define COMPILER_PREPROCESSOR_DIRECTIVEHANDLERBASE_H_
 
 #include <string>
 
+namespace angle
+{
+
 namespace pp
 {
 
 struct SourceLocation;
 
 // Base class for handling directives.
 // Preprocessor uses this class to notify the clients about certain
 // preprocessor directives. Derived classes are responsible for
@@ -35,9 +38,11 @@ class DirectiveHandler
                                  const std::string &name,
                                  const std::string &behavior) = 0;
 
     virtual void handleVersion(const SourceLocation &loc, int version) = 0;
 };
 
 }  // namespace pp
 
+}  // namespace angle
+
 #endif  // COMPILER_PREPROCESSOR_DIRECTIVEHANDLERBASE_H_
--- a/gfx/angle/checkout/src/compiler/preprocessor/DirectiveParser.cpp
+++ b/gfx/angle/checkout/src/compiler/preprocessor/DirectiveParser.cpp
@@ -13,16 +13,19 @@
 #include "common/debug.h"
 #include "compiler/preprocessor/DiagnosticsBase.h"
 #include "compiler/preprocessor/DirectiveHandlerBase.h"
 #include "compiler/preprocessor/ExpressionParser.h"
 #include "compiler/preprocessor/MacroExpander.h"
 #include "compiler/preprocessor/Token.h"
 #include "compiler/preprocessor/Tokenizer.h"
 
+namespace angle
+{
+
 namespace
 {
 enum DirectiveType
 {
     DIRECTIVE_NONE,
     DIRECTIVE_DEFINE,
     DIRECTIVE_UNDEF,
     DIRECTIVE_IF,
@@ -993,8 +996,10 @@ int DirectiveParser::parseExpressionIfde
         mDiagnostics->report(Diagnostics::PP_CONDITIONAL_UNEXPECTED_TOKEN, token->location,
                              token->text);
         skipUntilEOD(mTokenizer, token);
     }
     return expression;
 }
 
 }  // namespace pp
+
+}  // namespace angle
--- a/gfx/angle/checkout/src/compiler/preprocessor/DirectiveParser.h
+++ b/gfx/angle/checkout/src/compiler/preprocessor/DirectiveParser.h
@@ -6,16 +6,19 @@
 
 #ifndef COMPILER_PREPROCESSOR_DIRECTIVEPARSER_H_
 #define COMPILER_PREPROCESSOR_DIRECTIVEPARSER_H_
 
 #include "compiler/preprocessor/Lexer.h"
 #include "compiler/preprocessor/Macro.h"
 #include "compiler/preprocessor/SourceLocation.h"
 
+namespace angle
+{
+
 namespace pp
 {
 
 class Diagnostics;
 class DirectiveHandler;
 class Tokenizer;
 
 class DirectiveParser : public Lexer
@@ -75,9 +78,11 @@ class DirectiveParser : public Lexer
     Diagnostics *mDiagnostics;
     DirectiveHandler *mDirectiveHandler;
     int mShaderVersion;
     int mMaxMacroExpansionDepth;
 };
 
 }  // namespace pp
 
+}  // namespace angle
+
 #endif  // COMPILER_PREPROCESSOR_DIRECTIVEPARSER_H_
--- a/gfx/angle/checkout/src/compiler/preprocessor/ExpressionParser.cpp
+++ b/gfx/angle/checkout/src/compiler/preprocessor/ExpressionParser.cpp
@@ -112,23 +112,23 @@ typedef uint32_t UNSIGNED_TYPE;
 #define YYENABLE_NLS 0
 #define YYLTYPE_IS_TRIVIAL 1
 #define YYSTYPE_IS_TRIVIAL 1
 #define YYSTYPE_IS_DECLARED 1
 
 namespace {
 struct Context
 {
-    pp::Diagnostics* diagnostics;
-    pp::Lexer* lexer;
-    pp::Token* token;
+    angle::pp::Diagnostics *diagnostics;
+    angle::pp::Lexer *lexer;
+    angle::pp::Token *token;
     int* result;
     bool parsePresetToken;
 
-    pp::ExpressionParser::ErrorSettings errorSettings;
+    angle::pp::ExpressionParser::ErrorSettings errorSettings;
     bool *valid;
 
     void startIgnoreErrors() { ++ignoreErrors; }
     void endIgnoreErrors() { --ignoreErrors; }
 
     bool isIgnoringErrors() { return ignoreErrors > 0; }
 
     int ignoreErrors;
@@ -1492,19 +1492,18 @@ yyreduce:
     {
         if ((yyvsp[0]) < 0 || (yyvsp[0]) > 31)
         {
             if (!context->isIgnoringErrors())
             {
                 std::ostringstream stream;
                 stream << (yyvsp[-2]) << " >> " << (yyvsp[0]);
                 std::string text = stream.str();
-                context->diagnostics->report(pp::Diagnostics::PP_UNDEFINED_SHIFT,
-                                             context->token->location,
-                                             text.c_str());
+                context->diagnostics->report(angle::pp::Diagnostics::PP_UNDEFINED_SHIFT,
+                                             context->token->location, text.c_str());
                 *(context->valid) = false;
             }
             (yyval) = static_cast<YYSTYPE>(0);
         }
         else if ((yyvsp[-2]) < 0)
         {
             // Logical shift right.
             (yyval) = static_cast<YYSTYPE>(static_cast<UNSIGNED_TYPE>((yyvsp[-2])) >> (yyvsp[0]));
@@ -1522,19 +1521,18 @@ yyreduce:
     {
         if ((yyvsp[0]) < 0 || (yyvsp[0]) > 31)
         {
             if (!context->isIgnoringErrors())
             {
                 std::ostringstream stream;
                 stream << (yyvsp[-2]) << " << " << (yyvsp[0]);
                 std::string text = stream.str();
-                context->diagnostics->report(pp::Diagnostics::PP_UNDEFINED_SHIFT,
-                                             context->token->location,
-                                             text.c_str());
+                context->diagnostics->report(angle::pp::Diagnostics::PP_UNDEFINED_SHIFT,
+                                             context->token->location, text.c_str());
                 *(context->valid) = false;
             }
             (yyval) = static_cast<YYSTYPE>(0);
         }
         else
         {
             // Logical shift left. Casting to unsigned is needed to ensure there's no signed integer
             // overflow, which some tools treat as an error.
@@ -1565,19 +1563,18 @@ yyreduce:
     {
         if ((yyvsp[0]) == 0)
         {
             if (!context->isIgnoringErrors())
             {
                 std::ostringstream stream;
                 stream << (yyvsp[-2]) << " % " << (yyvsp[0]);
                 std::string text = stream.str();
-                context->diagnostics->report(pp::Diagnostics::PP_DIVISION_BY_ZERO,
-                                             context->token->location,
-                                             text.c_str());
+                context->diagnostics->report(angle::pp::Diagnostics::PP_DIVISION_BY_ZERO,
+                                             context->token->location, text.c_str());
                 *(context->valid) = false;
             }
             (yyval) = static_cast<YYSTYPE>(0);
         }
         else if (((yyvsp[-2]) == std::numeric_limits<YYSTYPE>::min()) && ((yyvsp[0]) == -1))
         {
             // Check for the special case where the minimum representable number is
             // divided by -1. If left alone this has undefined results.
@@ -1596,19 +1593,18 @@ yyreduce:
     {
         if ((yyvsp[0]) == 0)
         {
             if (!context->isIgnoringErrors())
             {
                 std::ostringstream stream;
                 stream << (yyvsp[-2]) << " / " << (yyvsp[0]);
                 std::string text = stream.str();
-                context->diagnostics->report(pp::Diagnostics::PP_DIVISION_BY_ZERO,
-                                            context->token->location,
-                                            text.c_str());
+                context->diagnostics->report(angle::pp::Diagnostics::PP_DIVISION_BY_ZERO,
+                                             context->token->location, text.c_str());
                 *(context->valid) = false;
             }
             (yyval) = static_cast<YYSTYPE>(0);
         }
         else if (((yyvsp[-2]) == std::numeric_limits<YYSTYPE>::min()) && ((yyvsp[0]) == -1))
         {
             // Check for the special case where the minimum representable number is
             // divided by -1. If left alone this leads to integer overflow in C++, which
@@ -1909,69 +1905,71 @@ yyreturn:
 #endif
   return yyresult;
 }
 
 
 
 int yylex(YYSTYPE *lvalp, Context *context)
 {
-    pp::Token *token = context->token;
+    angle::pp::Token *token = context->token;
     if (!context->parsePresetToken)
     {
         context->lexer->lex(token);
     }
     context->parsePresetToken = false;
 
     int type = 0;
 
     switch (token->type)
     {
-      case pp::Token::CONST_INT: {
-        unsigned int val = 0;
-        int testVal = 0;
-        if (!token->uValue(&val) || (!token->iValue(&testVal) &&
-                                     context->errorSettings.integerLiteralsMustFit32BitSignedRange))
+        case angle::pp::Token::CONST_INT:
         {
-            context->diagnostics->report(pp::Diagnostics::PP_INTEGER_OVERFLOW,
-                                         token->location, token->text);
-            *(context->valid) = false;
-        }
-        *lvalp = static_cast<YYSTYPE>(val);
-        type = TOK_CONST_INT;
-        break;
+            unsigned int val = 0;
+            int testVal      = 0;
+            if (!token->uValue(&val) ||
+                (!token->iValue(&testVal) &&
+                 context->errorSettings.integerLiteralsMustFit32BitSignedRange))
+            {
+                context->diagnostics->report(angle::pp::Diagnostics::PP_INTEGER_OVERFLOW,
+                                             token->location, token->text);
+                *(context->valid) = false;
+            }
+            *lvalp = static_cast<YYSTYPE>(val);
+            type   = TOK_CONST_INT;
+            break;
       }
-      case pp::Token::IDENTIFIER:
-        *lvalp = static_cast<YYSTYPE>(-1);
-        type = TOK_IDENTIFIER;
-        break;
-      case pp::Token::OP_OR:
-        type = TOK_OP_OR;
-        break;
-      case pp::Token::OP_AND:
-        type = TOK_OP_AND;
-        break;
-      case pp::Token::OP_NE:
-        type = TOK_OP_NE;
-        break;
-      case pp::Token::OP_EQ:
-        type = TOK_OP_EQ;
-        break;
-      case pp::Token::OP_GE:
-        type = TOK_OP_GE;
-        break;
-      case pp::Token::OP_LE:
-        type = TOK_OP_LE;
-        break;
-      case pp::Token::OP_RIGHT:
-        type = TOK_OP_RIGHT;
-        break;
-      case pp::Token::OP_LEFT:
-        type = TOK_OP_LEFT;
-        break;
+      case angle::pp::Token::IDENTIFIER:
+          *lvalp = static_cast<YYSTYPE>(-1);
+          type   = TOK_IDENTIFIER;
+          break;
+      case angle::pp::Token::OP_OR:
+          type = TOK_OP_OR;
+          break;
+      case angle::pp::Token::OP_AND:
+          type = TOK_OP_AND;
+          break;
+      case angle::pp::Token::OP_NE:
+          type = TOK_OP_NE;
+          break;
+      case angle::pp::Token::OP_EQ:
+          type = TOK_OP_EQ;
+          break;
+      case angle::pp::Token::OP_GE:
+          type = TOK_OP_GE;
+          break;
+      case angle::pp::Token::OP_LE:
+          type = TOK_OP_LE;
+          break;
+      case angle::pp::Token::OP_RIGHT:
+          type = TOK_OP_RIGHT;
+          break;
+      case angle::pp::Token::OP_LEFT:
+          type = TOK_OP_LEFT;
+          break;
       case '|':
       case '^':
       case '&':
       case '>':
       case '<':
       case '-':
       case '+':
       case '%':
@@ -1988,21 +1986,23 @@ int yylex(YYSTYPE *lvalp, Context *conte
         break;
     }
 
     return type;
 }
 
 void yyerror(Context *context, const char *reason)
 {
-    context->diagnostics->report(pp::Diagnostics::PP_INVALID_EXPRESSION,
-                                 context->token->location,
-                                 reason);
+    context->diagnostics->report(angle::pp::Diagnostics::PP_INVALID_EXPRESSION,
+                                 context->token->location, reason);
 }
 
+namespace angle
+{
+
 namespace pp {
 
 ExpressionParser::ExpressionParser(Lexer *lexer, Diagnostics *diagnostics)
     : mLexer(lexer),
       mDiagnostics(diagnostics)
 {
 }
 
@@ -2037,8 +2037,10 @@ bool ExpressionParser::parse(Token *toke
         mDiagnostics->report(Diagnostics::PP_INTERNAL_ERROR, token->location, "");
         break;
     }
 
     return ret == 0;
 }
 
 }  // namespace pp
+
+}  // namespace angle
--- a/gfx/angle/checkout/src/compiler/preprocessor/ExpressionParser.h
+++ b/gfx/angle/checkout/src/compiler/preprocessor/ExpressionParser.h
@@ -5,16 +5,19 @@
 //
 
 #ifndef COMPILER_PREPROCESSOR_EXPRESSIONPARSER_H_
 #define COMPILER_PREPROCESSOR_EXPRESSIONPARSER_H_
 
 #include "common/angleutils.h"
 #include "compiler/preprocessor/DiagnosticsBase.h"
 
+namespace angle
+{
+
 namespace pp
 {
 
 class Lexer;
 struct Token;
 
 class ExpressionParser : angle::NonCopyable
 {
@@ -35,9 +38,11 @@ class ExpressionParser : angle::NonCopya
 
   private:
     Lexer *mLexer;
     Diagnostics *mDiagnostics;
 };
 
 }  // namespace pp
 
+}  // namespace angle
+
 #endif  // COMPILER_PREPROCESSOR_EXPRESSIONPARSER_H_
--- a/gfx/angle/checkout/src/compiler/preprocessor/ExpressionParser.y
+++ b/gfx/angle/checkout/src/compiler/preprocessor/ExpressionParser.y
@@ -54,23 +54,23 @@ typedef uint32_t UNSIGNED_TYPE;
 #define YYENABLE_NLS 0
 #define YYLTYPE_IS_TRIVIAL 1
 #define YYSTYPE_IS_TRIVIAL 1
 #define YYSTYPE_IS_DECLARED 1
 
 namespace {
 struct Context
 {
-    pp::Diagnostics* diagnostics;
-    pp::Lexer* lexer;
-    pp::Token* token;
+    angle::pp::Diagnostics *diagnostics;
+    angle::pp::Lexer *lexer;
+    angle::pp::Token *token;
     int* result;
     bool parsePresetToken;
 
-    pp::ExpressionParser::ErrorSettings errorSettings;
+    angle::pp::ExpressionParser::ErrorSettings errorSettings;
     bool *valid;
 
     void startIgnoreErrors() { ++ignoreErrors; }
     void endIgnoreErrors() { --ignoreErrors; }
 
     bool isIgnoringErrors() { return ignoreErrors > 0; }
 
     int ignoreErrors;
@@ -196,17 +196,17 @@ expression
     | expression TOK_OP_RIGHT expression {
         if ($3 < 0 || $3 > 31)
         {
             if (!context->isIgnoringErrors())
             {
                 std::ostringstream stream;
                 stream << $1 << " >> " << $3;
                 std::string text = stream.str();
-                context->diagnostics->report(pp::Diagnostics::PP_UNDEFINED_SHIFT,
+                context->diagnostics->report(angle::pp::Diagnostics::PP_UNDEFINED_SHIFT,
                                              context->token->location,
                                              text.c_str());
                 *(context->valid) = false;
             }
             $$ = static_cast<YYSTYPE>(0);
         }
         else if ($1 < 0)
         {
@@ -221,17 +221,17 @@ expression
     | expression TOK_OP_LEFT expression {
         if ($3 < 0 || $3 > 31)
         {
             if (!context->isIgnoringErrors())
             {
                 std::ostringstream stream;
                 stream << $1 << " << " << $3;
                 std::string text = stream.str();
-                context->diagnostics->report(pp::Diagnostics::PP_UNDEFINED_SHIFT,
+                context->diagnostics->report(angle::pp::Diagnostics::PP_UNDEFINED_SHIFT,
                                              context->token->location,
                                              text.c_str());
                 *(context->valid) = false;
             }
             $$ = static_cast<YYSTYPE>(0);
         }
         else
         {
@@ -249,17 +249,17 @@ expression
     | expression '%' expression {
         if ($3 == 0)
         {
             if (!context->isIgnoringErrors())
             {
                 std::ostringstream stream;
                 stream << $1 << " % " << $3;
                 std::string text = stream.str();
-                context->diagnostics->report(pp::Diagnostics::PP_DIVISION_BY_ZERO,
+                context->diagnostics->report(angle::pp::Diagnostics::PP_DIVISION_BY_ZERO,
                                              context->token->location,
                                              text.c_str());
                 *(context->valid) = false;
             }
             $$ = static_cast<YYSTYPE>(0);
         }
         else if (($1 == std::numeric_limits<YYSTYPE>::min()) && ($3 == -1))
         {
@@ -275,17 +275,17 @@ expression
     | expression '/' expression {
         if ($3 == 0)
         {
             if (!context->isIgnoringErrors())
             {
                 std::ostringstream stream;
                 stream << $1 << " / " << $3;
                 std::string text = stream.str();
-                context->diagnostics->report(pp::Diagnostics::PP_DIVISION_BY_ZERO,
+                context->diagnostics->report(angle::pp::Diagnostics::PP_DIVISION_BY_ZERO,
                                             context->token->location,
                                             text.c_str());
                 *(context->valid) = false;
             }
             $$ = static_cast<YYSTYPE>(0);
         }
         else if (($1 == std::numeric_limits<YYSTYPE>::min()) && ($3 == -1))
         {
@@ -327,67 +327,67 @@ expression
         $$ = $2;
     }
 ;
 
 %%
 
 int yylex(YYSTYPE *lvalp, Context *context)
 {
-    pp::Token *token = context->token;
+    angle::pp::Token *token = context->token;
     if (!context->parsePresetToken)
     {
         context->lexer->lex(token);
     }
     context->parsePresetToken = false;
 
     int type = 0;
 
     switch (token->type)
     {
-      case pp::Token::CONST_INT: {
+      case angle::pp::Token::CONST_INT: {
         unsigned int val = 0;
         int testVal = 0;
         if (!token->uValue(&val) || (!token->iValue(&testVal) &&
                                      context->errorSettings.integerLiteralsMustFit32BitSignedRange))
         {
-            context->diagnostics->report(pp::Diagnostics::PP_INTEGER_OVERFLOW,
+            context->diagnostics->report(angle::pp::Diagnostics::PP_INTEGER_OVERFLOW,
                                          token->location, token->text);
             *(context->valid) = false;
         }
         *lvalp = static_cast<YYSTYPE>(val);
         type = TOK_CONST_INT;
         break;
       }
-      case pp::Token::IDENTIFIER:
+      case angle::pp::Token::IDENTIFIER:
         *lvalp = static_cast<YYSTYPE>(-1);
         type = TOK_IDENTIFIER;
         break;
-      case pp::Token::OP_OR:
+      case angle::pp::Token::OP_OR:
         type = TOK_OP_OR;
         break;
-      case pp::Token::OP_AND:
+      case angle::pp::Token::OP_AND:
         type = TOK_OP_AND;
         break;
-      case pp::Token::OP_NE:
+      case angle::pp::Token::OP_NE:
         type = TOK_OP_NE;
         break;
-      case pp::Token::OP_EQ:
+      case angle::pp::Token::OP_EQ:
         type = TOK_OP_EQ;
         break;
-      case pp::Token::OP_GE:
+      case angle::pp::Token::OP_GE:
         type = TOK_OP_GE;
         break;
-      case pp::Token::OP_LE:
+      case angle::pp::Token::OP_LE:
         type = TOK_OP_LE;
         break;
-      case pp::Token::OP_RIGHT:
+      case angle::pp::Token::OP_RIGHT:
         type = TOK_OP_RIGHT;
         break;
-      case pp::Token::OP_LEFT:
+      case angle::pp::Token::OP_LEFT:
         type = TOK_OP_LEFT;
         break;
       case '|':
       case '^':
       case '&':
       case '>':
       case '<':
       case '-':
@@ -406,21 +406,23 @@ int yylex(YYSTYPE *lvalp, Context *conte
         break;
     }
 
     return type;
 }
 
 void yyerror(Context *context, const char *reason)
 {
-    context->diagnostics->report(pp::Diagnostics::PP_INVALID_EXPRESSION,
+    context->diagnostics->report(angle::pp::Diagnostics::PP_INVALID_EXPRESSION,
                                  context->token->location,
                                  reason);
 }
 
+namespace angle {
+
 namespace pp {
 
 ExpressionParser::ExpressionParser(Lexer *lexer, Diagnostics *diagnostics)
     : mLexer(lexer),
       mDiagnostics(diagnostics)
 {
 }
 
@@ -455,8 +457,10 @@ bool ExpressionParser::parse(Token *toke
         mDiagnostics->report(Diagnostics::PP_INTERNAL_ERROR, token->location, "");
         break;
     }
 
     return ret == 0;
 }
 
 }  // namespace pp
+
+}  // namespace angle
--- a/gfx/angle/checkout/src/compiler/preprocessor/Input.cpp
+++ b/gfx/angle/checkout/src/compiler/preprocessor/Input.cpp
@@ -6,16 +6,19 @@
 
 #include "compiler/preprocessor/Input.h"
 
 #include <algorithm>
 #include <cstring>
 
 #include "common/debug.h"
 
+namespace angle
+{
+
 namespace pp
 {
 
 Input::Input() : mCount(0), mString(0)
 {
 }
 
 Input::~Input()
@@ -122,8 +125,10 @@ size_t Input::read(char *buf, size_t max
             ++mReadLoc.sIndex;
             mReadLoc.cIndex = 0;
         }
     }
     return nRead;
 }
 
 }  // namespace pp
+
+}  // namespace angle
--- a/gfx/angle/checkout/src/compiler/preprocessor/Input.h
+++ b/gfx/angle/checkout/src/compiler/preprocessor/Input.h
@@ -5,16 +5,19 @@
 //
 
 #ifndef COMPILER_PREPROCESSOR_INPUT_H_
 #define COMPILER_PREPROCESSOR_INPUT_H_
 
 #include <cstddef>
 #include <vector>
 
+namespace angle
+{
+
 namespace pp
 {
 
 // Holds and reads input for Lexer.
 class Input
 {
   public:
     Input();
@@ -46,9 +49,11 @@ class Input
     const char *const *mString;
     std::vector<size_t> mLength;
 
     Location mReadLoc;
 };
 
 }  // namespace pp
 
+}  // namespace angle
+
 #endif  // COMPILER_PREPROCESSOR_INPUT_H_
--- a/gfx/angle/checkout/src/compiler/preprocessor/Lexer.cpp
+++ b/gfx/angle/checkout/src/compiler/preprocessor/Lexer.cpp
@@ -1,16 +1,21 @@
 //
 // Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
 
 #include "compiler/preprocessor/Lexer.h"
 
+namespace angle
+{
+
 namespace pp
 {
 
 Lexer::~Lexer()
 {
 }
 
 }  // namespace pp
+
+}  // namespace angle
--- a/gfx/angle/checkout/src/compiler/preprocessor/Lexer.h
+++ b/gfx/angle/checkout/src/compiler/preprocessor/Lexer.h
@@ -4,24 +4,29 @@
 // found in the LICENSE file.
 //
 
 #ifndef COMPILER_PREPROCESSOR_LEXER_H_
 #define COMPILER_PREPROCESSOR_LEXER_H_
 
 #include "common/angleutils.h"
 
+namespace angle
+{
+
 namespace pp
 {
 
 struct Token;
 
 class Lexer : angle::NonCopyable
 {
   public:
     virtual ~Lexer();
 
     virtual void lex(Token *token) = 0;
 };
 
 }  // namespace pp
 
+}  // namespace angle
+
 #endif  // COMPILER_PREPROCESSOR_LEXER_H_
--- a/gfx/angle/checkout/src/compiler/preprocessor/Macro.cpp
+++ b/gfx/angle/checkout/src/compiler/preprocessor/Macro.cpp
@@ -4,16 +4,19 @@
 // found in the LICENSE file.
 //
 
 #include "compiler/preprocessor/Macro.h"
 
 #include "common/angleutils.h"
 #include "compiler/preprocessor/Token.h"
 
+namespace angle
+{
+
 namespace pp
 {
 
 Macro::Macro() : predefined(false), disabled(false), expansionCount(0), type(kTypeObj)
 {
 }
 
 Macro::~Macro()
@@ -37,8 +40,10 @@ void PredefineMacro(MacroSet *macroSet, 
     macro->type                  = Macro::kTypeObj;
     macro->name                  = name;
     macro->replacements.push_back(token);
 
     (*macroSet)[name] = macro;
 }
 
 }  // namespace pp
+
+}  // namespace angle
--- a/gfx/angle/checkout/src/compiler/preprocessor/Macro.h
+++ b/gfx/angle/checkout/src/compiler/preprocessor/Macro.h
@@ -7,16 +7,19 @@
 #ifndef COMPILER_PREPROCESSOR_MACRO_H_
 #define COMPILER_PREPROCESSOR_MACRO_H_
 
 #include <map>
 #include <memory>
 #include <string>
 #include <vector>
 
+namespace angle
+{
+
 namespace pp
 {
 
 struct Token;
 
 struct Macro
 {
     enum Type
@@ -42,9 +45,11 @@ struct Macro
 };
 
 typedef std::map<std::string, std::shared_ptr<Macro>> MacroSet;
 
 void PredefineMacro(MacroSet *macroSet, const char *name, int value);
 
 }  // namespace pp
 
+}  // namespace angle
+
 #endif  // COMPILER_PREPROCESSOR_MACRO_H_
--- a/gfx/angle/checkout/src/compiler/preprocessor/MacroExpander.cpp
+++ b/gfx/angle/checkout/src/compiler/preprocessor/MacroExpander.cpp
@@ -7,16 +7,19 @@
 #include "compiler/preprocessor/MacroExpander.h"
 
 #include <algorithm>
 
 #include "common/debug.h"
 #include "compiler/preprocessor/DiagnosticsBase.h"
 #include "compiler/preprocessor/Token.h"
 
+namespace angle
+{
+
 namespace pp
 {
 
 namespace
 {
 
 const size_t kMaxContextTokens = 10000;
 
@@ -474,8 +477,10 @@ const Token &MacroExpander::MacroContext
 
 void MacroExpander::MacroContext::unget()
 {
     ASSERT(index > 0);
     --index;
 }
 
 }  // namespace pp
+
+}  // namespace angle
--- a/gfx/angle/checkout/src/compiler/preprocessor/MacroExpander.h
+++ b/gfx/angle/checkout/src/compiler/preprocessor/MacroExpander.h
@@ -8,16 +8,19 @@
 #define COMPILER_PREPROCESSOR_MACROEXPANDER_H_
 
 #include <memory>
 #include <vector>
 
 #include "compiler/preprocessor/Lexer.h"
 #include "compiler/preprocessor/Macro.h"
 
+namespace angle
+{
+
 namespace pp
 {
 
 class Diagnostics;
 struct SourceLocation;
 
 class MacroExpander : public Lexer
 {
@@ -75,9 +78,11 @@ class MacroExpander : public Lexer
     bool mDeferReenablingMacros;
     std::vector<std::shared_ptr<Macro>> mMacrosToReenable;
 
     class ScopedMacroReenabler;
 };
 
 }  // namespace pp
 
+}  // namespace angle
+
 #endif  // COMPILER_PREPROCESSOR_MACROEXPANDER_H_
--- a/gfx/angle/checkout/src/compiler/preprocessor/Preprocessor.cpp
+++ b/gfx/angle/checkout/src/compiler/preprocessor/Preprocessor.cpp
@@ -9,16 +9,19 @@
 #include "common/debug.h"
 #include "compiler/preprocessor/DiagnosticsBase.h"
 #include "compiler/preprocessor/DirectiveParser.h"
 #include "compiler/preprocessor/Macro.h"
 #include "compiler/preprocessor/MacroExpander.h"
 #include "compiler/preprocessor/Token.h"
 #include "compiler/preprocessor/Tokenizer.h"
 
+namespace angle
+{
+
 namespace pp
 {
 
 struct PreprocessorImpl
 {
     Diagnostics *diagnostics;
     MacroSet macroSet;
     Tokenizer tokenizer;
@@ -100,8 +103,10 @@ void Preprocessor::lex(Token *token)
 }
 
 void Preprocessor::setMaxTokenSize(size_t maxTokenSize)
 {
     mImpl->tokenizer.setMaxTokenSize(maxTokenSize);
 }
 
 }  // namespace pp
+
+}  // namespace angle
--- a/gfx/angle/checkout/src/compiler/preprocessor/Preprocessor.h
+++ b/gfx/angle/checkout/src/compiler/preprocessor/Preprocessor.h
@@ -6,16 +6,19 @@
 
 #ifndef COMPILER_PREPROCESSOR_PREPROCESSOR_H_
 #define COMPILER_PREPROCESSOR_PREPROCESSOR_H_
 
 #include <cstddef>
 
 #include "common/angleutils.h"
 
+namespace angle
+{
+
 namespace pp
 {
 
 class Diagnostics;
 class DirectiveHandler;
 struct PreprocessorImpl;
 struct Token;
 
@@ -52,9 +55,11 @@ class Preprocessor : angle::NonCopyable
     void setMaxTokenSize(size_t maxTokenSize);
 
   private:
     PreprocessorImpl *mImpl;
 };
 
 }  // namespace pp
 
+}  // namespace angle
+
 #endif  // COMPILER_PREPROCESSOR_PREPROCESSOR_H_
--- a/gfx/angle/checkout/src/compiler/preprocessor/SourceLocation.h
+++ b/gfx/angle/checkout/src/compiler/preprocessor/SourceLocation.h
@@ -2,16 +2,19 @@
 // Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
 
 #ifndef COMPILER_PREPROCESSOR_SOURCELOCATION_H_
 #define COMPILER_PREPROCESSOR_SOURCELOCATION_H_
 
+namespace angle
+{
+
 namespace pp
 {
 
 struct SourceLocation
 {
     SourceLocation() : file(0), line(0) {}
     SourceLocation(int f, int l) : file(f), line(l) {}
 
@@ -31,9 +34,11 @@ inline bool operator==(const SourceLocat
 
 inline bool operator!=(const SourceLocation &lhs, const SourceLocation &rhs)
 {
     return !lhs.equals(rhs);
 }
 
 }  // namespace pp
 
+}  // namespace angle
+
 #endif  // COMPILER_PREPROCESSOR_SOURCELOCATION_H_
--- a/gfx/angle/checkout/src/compiler/preprocessor/Token.cpp
+++ b/gfx/angle/checkout/src/compiler/preprocessor/Token.cpp
@@ -4,16 +4,19 @@
 // found in the LICENSE file.
 //
 
 #include "compiler/preprocessor/Token.h"
 
 #include "common/debug.h"
 #include "compiler/preprocessor/numeric_lex.h"
 
+namespace angle
+{
+
 namespace pp
 {
 
 void Token::reset()
 {
     type     = 0;
     flags    = 0;
     location = SourceLocation();
@@ -73,8 +76,10 @@ std::ostream &operator<<(std::ostream &o
     if (token.hasLeadingSpace())
         out << " ";
 
     out << token.text;
     return out;
 }
 
 }  // namespace pp
+
+}  // namespace angle
--- a/gfx/angle/checkout/src/compiler/preprocessor/Token.h
+++ b/gfx/angle/checkout/src/compiler/preprocessor/Token.h
@@ -7,16 +7,19 @@
 #ifndef COMPILER_PREPROCESSOR_TOKEN_H_
 #define COMPILER_PREPROCESSOR_TOKEN_H_
 
 #include <ostream>
 #include <string>
 
 #include "compiler/preprocessor/SourceLocation.h"
 
+namespace angle
+{
+
 namespace pp
 {
 
 struct Token
 {
     enum Type
     {
         // Calling this ERROR causes a conflict with wingdi.h
@@ -99,11 +102,13 @@ inline bool operator==(const Token &lhs,
 
 inline bool operator!=(const Token &lhs, const Token &rhs)
 {
     return !lhs.equals(rhs);
 }
 
 std::ostream &operator<<(std::ostream &out, const Token &token);
 
-}  // namepsace pp
+}  // namespace pp
+
+}  // namespace angle
 
 #endif  // COMPILER_PREPROCESSOR_TOKEN_H_
--- a/gfx/angle/checkout/src/compiler/preprocessor/Tokenizer.cpp
+++ b/gfx/angle/checkout/src/compiler/preprocessor/Tokenizer.cpp
@@ -919,65 +919,58 @@ IF YOU MODIFY THIS FILE YOU ALSO NEED TO
 // Workaround for flex using the register keyword, deprecated in C++11.
 #ifdef __cplusplus
 #if __cplusplus > 199711L
 #define register
 #endif
 #endif
 
 typedef std::string YYSTYPE;
-typedef pp::SourceLocation YYLTYPE;
+typedef angle::pp::SourceLocation YYLTYPE;
 
 // Use the unused yycolumn variable to track file (string) number.
 #define yyfileno yycolumn
 
 #define YY_USER_INIT                   \
     do {                               \
         yyfileno = 0;                  \
         yylineno = 1;                  \
         yyextra->leadingSpace = false; \
         yyextra->lineStart = true;     \
     } while(0);
 
 #define YY_NO_INPUT
 #define YY_USER_ACTION                                              \
     do                                                              \
     {                                                               \
-        pp::Input* input = &yyextra->input;                         \
-        pp::Input::Location* scanLoc = &yyextra->scanLoc;           \
+        angle::pp::Input *input             = &yyextra->input;      \
+        angle::pp::Input::Location *scanLoc = &yyextra->scanLoc;    \
         while ((scanLoc->sIndex < input->count()) &&                \
                (scanLoc->cIndex >= input->length(scanLoc->sIndex))) \
         {                                                           \
             scanLoc->cIndex -= input->length(scanLoc->sIndex++);    \
-            ++yyfileno; yylineno = 1;                               \
+            ++yyfileno;                                             \
+            yylineno = 1;                                           \
         }                                                           \
         yylloc->file = yyfileno;                                    \
         yylloc->line = yylineno;                                    \
         scanLoc->cIndex += yyleng;                                  \
-    } while(0);
+    } while (0);
 
 #define YY_INPUT(buf, result, maxSize) \
     result = yyextra->input.read(buf, maxSize, &yylineno);
 
 
 
 
 
 #define INITIAL 0
 #define COMMENT 1
 
-
-
-
-
-
-#define YY_EXTRA_TYPE pp::Tokenizer::Context*
-
-
-
+#define YY_EXTRA_TYPE angle::pp::Tokenizer::Context *
 
 /* Holds the entire state of the reentrant scanner. */
 struct yyguts_t
     {
 
     /* User-defined. Not touched by flex. */
     YY_EXTRA_TYPE yyextra_r;
 
@@ -1431,211 +1424,211 @@ YY_RULE_SETUP
 	YY_BREAK
 case 5:
 /* rule 5 can match eol */
 YY_RULE_SETUP
 {
     if (yylineno == INT_MAX)
     {
         *yylval = "Integer overflow on line number";
-        return pp::Token::GOT_ERROR;
+        return angle::pp::Token::GOT_ERROR;
     }
     ++yylineno;
 }
 	YY_BREAK
 case 6:
 YY_RULE_SETUP
 {
     yyextra->leadingSpace = true;
     BEGIN(INITIAL);
 }
 	YY_BREAK
 case 7:
 YY_RULE_SETUP
 {
     // # is only valid at start of line for preprocessor directives.
     yylval->assign(1, yytext[0]);
-    return yyextra->lineStart ? pp::Token::PP_HASH : pp::Token::PP_OTHER;
+    return yyextra->lineStart ? angle::pp::Token::PP_HASH : angle::pp::Token::PP_OTHER;
 }
 	YY_BREAK
 case 8:
 YY_RULE_SETUP
 {
     yylval->assign(yytext, yyleng);
-    return pp::Token::IDENTIFIER;
+    return angle::pp::Token::IDENTIFIER;
 }
 	YY_BREAK
 case 9:
 YY_RULE_SETUP
 {
     yylval->assign(yytext, yyleng);
-    return pp::Token::CONST_INT;
+    return angle::pp::Token::CONST_INT;
 }
 	YY_BREAK
 case 10:
 YY_RULE_SETUP
 {
     yylval->assign(yytext, yyleng);
-    return pp::Token::CONST_FLOAT;
+    return angle::pp::Token::CONST_FLOAT;
 }
 	YY_BREAK
 /* Anything that starts with a {DIGIT} or .{DIGIT} must be a number. */
 /* Rule to catch all invalid integers and floats. */
 case 11:
 YY_RULE_SETUP
 {
     yylval->assign(yytext, yyleng);
-    return pp::Token::PP_NUMBER;
+    return angle::pp::Token::PP_NUMBER;
 }
 	YY_BREAK
 case 12:
 YY_RULE_SETUP
 {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_INC;
+    return angle::pp::Token::OP_INC;
 }
 	YY_BREAK
 case 13:
 YY_RULE_SETUP
 {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_DEC;
+    return angle::pp::Token::OP_DEC;
 }
 	YY_BREAK
 case 14:
 YY_RULE_SETUP
 {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_LEFT;
+    return angle::pp::Token::OP_LEFT;
 }
 	YY_BREAK
 case 15:
 YY_RULE_SETUP
 {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_RIGHT;
+    return angle::pp::Token::OP_RIGHT;
 }
 	YY_BREAK
 case 16:
 YY_RULE_SETUP
 {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_LE;
+    return angle::pp::Token::OP_LE;
 }
 	YY_BREAK
 case 17:
 YY_RULE_SETUP
 {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_GE;
+    return angle::pp::Token::OP_GE;
 }
 	YY_BREAK
 case 18:
 YY_RULE_SETUP
 {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_EQ;
+    return angle::pp::Token::OP_EQ;
 }
 	YY_BREAK
 case 19:
 YY_RULE_SETUP
 {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_NE;
+    return angle::pp::Token::OP_NE;
 }
 	YY_BREAK
 case 20:
 YY_RULE_SETUP
 {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_AND;
+    return angle::pp::Token::OP_AND;
 }
 	YY_BREAK
 case 21:
 YY_RULE_SETUP
 {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_XOR;
+    return angle::pp::Token::OP_XOR;
 }
 	YY_BREAK
 case 22:
 YY_RULE_SETUP
 {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_OR;
+    return angle::pp::Token::OP_OR;
 }
 	YY_BREAK
 case 23:
 YY_RULE_SETUP
 {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_ADD_ASSIGN;
+    return angle::pp::Token::OP_ADD_ASSIGN;
 }
 	YY_BREAK
 case 24:
 YY_RULE_SETUP
 {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_SUB_ASSIGN;
+    return angle::pp::Token::OP_SUB_ASSIGN;
 }
 	YY_BREAK
 case 25:
 YY_RULE_SETUP
 {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_MUL_ASSIGN;
+    return angle::pp::Token::OP_MUL_ASSIGN;
 }
 	YY_BREAK
 case 26:
 YY_RULE_SETUP
 {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_DIV_ASSIGN;
+    return angle::pp::Token::OP_DIV_ASSIGN;
 }
 	YY_BREAK
 case 27:
 YY_RULE_SETUP
 {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_MOD_ASSIGN;
+    return angle::pp::Token::OP_MOD_ASSIGN;
 }
 	YY_BREAK
 case 28:
 YY_RULE_SETUP
 {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_LEFT_ASSIGN;
+    return angle::pp::Token::OP_LEFT_ASSIGN;
 }
 	YY_BREAK
 case 29:
 YY_RULE_SETUP
 {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_RIGHT_ASSIGN;
+    return angle::pp::Token::OP_RIGHT_ASSIGN;
 }
 	YY_BREAK
 case 30:
 YY_RULE_SETUP
 {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_AND_ASSIGN;
+    return angle::pp::Token::OP_AND_ASSIGN;
 }
 	YY_BREAK
 case 31:
 YY_RULE_SETUP
 {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_XOR_ASSIGN;
+    return angle::pp::Token::OP_XOR_ASSIGN;
 }
 	YY_BREAK
 case 32:
 YY_RULE_SETUP
 {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_OR_ASSIGN;
+    return angle::pp::Token::OP_OR_ASSIGN;
 }
 	YY_BREAK
 case 33:
 YY_RULE_SETUP
 {
     yylval->assign(1, yytext[0]);
     return yytext[0];
 }
@@ -1646,61 +1639,61 @@ YY_RULE_SETUP
 	YY_BREAK
 case 35:
 /* rule 35 can match eol */
 YY_RULE_SETUP
 {
     if (yylineno == INT_MAX)
     {
         *yylval = "Integer overflow on line number";
-        return pp::Token::GOT_ERROR;
+        return angle::pp::Token::GOT_ERROR;
     }
     ++yylineno;
     yylval->assign(1, '\n');
     return '\n';
 }
 	YY_BREAK
 case 36:
 YY_RULE_SETUP
 {
     yylval->assign(1, yytext[0]);
-    return pp::Token::PP_OTHER;
+    return angle::pp::Token::PP_OTHER;
 }
 	YY_BREAK
 case YY_STATE_EOF(INITIAL):
 case YY_STATE_EOF(COMMENT):
 {
     // YY_USER_ACTION is not invoked for handling EOF.
     // Set the location for EOF token manually.
-    pp::Input* input = &yyextra->input;
-    pp::Input::Location* scanLoc = &yyextra->scanLoc;
+    angle::pp::Input *input             = &yyextra->input;
+    angle::pp::Input::Location *scanLoc = &yyextra->scanLoc;
     yy_size_t sIndexMax = input->count() ? input->count() - 1 : 0;
     if (scanLoc->sIndex != sIndexMax)
     {
         // We can only reach here if there are empty strings at the
         // end of the input.
         scanLoc->sIndex = sIndexMax; scanLoc->cIndex = 0;
         // FIXME: this is not 64-bit clean.
         yyfileno = static_cast<int>(sIndexMax); yylineno = 1;
     }
     yylloc->file = yyfileno;
     yylloc->line = yylineno;
     yylval->clear();
 
     // Line number overflows fake EOFs to exit early, check for this case.
     if (yylineno == INT_MAX)
     {
-        yyextra->diagnostics->report(pp::Diagnostics::PP_TOKENIZER_ERROR,
-                                     pp::SourceLocation(yyfileno, yylineno),
+        yyextra->diagnostics->report(angle::pp::Diagnostics::PP_TOKENIZER_ERROR,
+                                     angle::pp::SourceLocation(yyfileno, yylineno),
                                      "Integer overflow on line number");
     }
     else if (YY_START == COMMENT)
     {
-        yyextra->diagnostics->report(pp::Diagnostics::PP_EOF_IN_COMMENT,
-                                     pp::SourceLocation(yyfileno, yylineno),
+        yyextra->diagnostics->report(angle::pp::Diagnostics::PP_EOF_IN_COMMENT,
+                                     angle::pp::SourceLocation(yyfileno, yylineno),
                                      "EOF while in a comment");
     }
     yyterminate();
 }
 	YY_BREAK
 case 37:
 YY_RULE_SETUP
 ECHO;
@@ -2971,22 +2964,18 @@ void yyfree (void * ptr , yyscan_t yysca
 	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
 	(void)yyg;
 	free( (char *) ptr );	/* see yyrealloc() for (char *) cast */
 }
 
 
 #define YYTABLES_NAME "yytables"
 
-
-
-
-
-
-
+namespace angle
+{
 
 namespace pp {
 
 Tokenizer::Tokenizer(Diagnostics *diagnostics) : mHandle(nullptr), mMaxTokenSize(256)
 {
     mContext.diagnostics = diagnostics;
 }
 
@@ -3066,9 +3055,9 @@ void Tokenizer::destroyScanner()
         return;
 
     yylex_destroy(mHandle);
     mHandle = nullptr;
 }
 
 }  // namespace pp
 
-
+}  // namespace angle
--- a/gfx/angle/checkout/src/compiler/preprocessor/Tokenizer.h
+++ b/gfx/angle/checkout/src/compiler/preprocessor/Tokenizer.h
@@ -6,16 +6,19 @@
 
 #ifndef COMPILER_PREPROCESSOR_TOKENIZER_H_
 #define COMPILER_PREPROCESSOR_TOKENIZER_H_
 
 #include "common/angleutils.h"
 #include "compiler/preprocessor/Input.h"
 #include "compiler/preprocessor/Lexer.h"
 
+namespace angle
+{
+
 namespace pp
 {
 
 class Diagnostics;
 
 class Tokenizer : public Lexer
 {
   public:
@@ -50,9 +53,11 @@ class Tokenizer : public Lexer
 
     void *mHandle;         // Scanner handle.
     Context mContext;      // Scanner extra.
     size_t mMaxTokenSize;  // Maximum token size
 };
 
 }  // namespace pp
 
+}  // namespace angle
+
 #endif  // COMPILER_PREPROCESSOR_TOKENIZER_H_
--- a/gfx/angle/checkout/src/compiler/preprocessor/Tokenizer.l
+++ b/gfx/angle/checkout/src/compiler/preprocessor/Tokenizer.l
@@ -46,35 +46,35 @@ IF YOU MODIFY THIS FILE YOU ALSO NEED TO
 // Workaround for flex using the register keyword, deprecated in C++11.
 #ifdef __cplusplus
 #if __cplusplus > 199711L
 #define register
 #endif
 #endif
 
 typedef std::string YYSTYPE;
-typedef pp::SourceLocation YYLTYPE;
+typedef angle::pp::SourceLocation YYLTYPE;
 
 // Use the unused yycolumn variable to track file (string) number.
 #define yyfileno yycolumn
 
 #define YY_USER_INIT                   \
     do {                               \
         yyfileno = 0;                  \
         yylineno = 1;                  \
         yyextra->leadingSpace = false; \
         yyextra->lineStart = true;     \
     } while(0);
 
 #define YY_NO_INPUT
 #define YY_USER_ACTION                                              \
     do                                                              \
     {                                                               \
-        pp::Input* input = &yyextra->input;                         \
-        pp::Input::Location* scanLoc = &yyextra->scanLoc;           \
+        angle::pp::Input* input = &yyextra->input;                  \
+        angle::pp::Input::Location* scanLoc = &yyextra->scanLoc;    \
         while ((scanLoc->sIndex < input->count()) &&                \
                (scanLoc->cIndex >= input->length(scanLoc->sIndex))) \
         {                                                           \
             scanLoc->cIndex -= input->length(scanLoc->sIndex++);    \
             ++yyfileno; yylineno = 1;                               \
         }                                                           \
         yylloc->file = yyfileno;                                    \
         yylloc->line = yylineno;                                    \
@@ -84,17 +84,17 @@ typedef pp::SourceLocation YYLTYPE;
 #define YY_INPUT(buf, result, maxSize) \
     result = yyextra->input.read(buf, maxSize, &yylineno);
 
 %}
 
 %option noyywrap nounput never-interactive
 %option reentrant bison-bridge bison-locations
 %option prefix="pp"
-%option extra-type="pp::Tokenizer::Context*"
+%option extra-type="angle::pp::Tokenizer::Context*"
 %x COMMENT
 
 NEWLINE     \n|\r|\r\n
 IDENTIFIER  [_a-zA-Z][_a-zA-Z0-9]*
 PUNCTUATOR  [][<>(){}.+-/*%^|&~=!:;,?]
 
 DECIMAL_CONSTANT      [1-9][0-9]*[uU]?
 OCTAL_CONSTANT        0[0-7]*[uU]?
@@ -114,196 +114,198 @@ FRACTIONAL_CONSTANT  ({DIGIT}*"."{DIGIT}
     /* The comment is replaced by a single space. */
 "/*" { BEGIN(COMMENT); }
 <COMMENT>[^*\r\n]+
 <COMMENT>"*"
 <COMMENT>{NEWLINE} {
     if (yylineno == INT_MAX)
     {
         *yylval = "Integer overflow on line number";
-        return pp::Token::GOT_ERROR;
+        return angle::pp::Token::GOT_ERROR;
     }
     ++yylineno;
 }
 <COMMENT>"*/" {
     yyextra->leadingSpace = true;
     BEGIN(INITIAL);
 }
 
 # {
     // # is only valid at start of line for preprocessor directives.
     yylval->assign(1, yytext[0]);
-    return yyextra->lineStart ? pp::Token::PP_HASH : pp::Token::PP_OTHER;
+    return yyextra->lineStart ? angle::pp::Token::PP_HASH : angle::pp::Token::PP_OTHER;
 }
 
 {IDENTIFIER} {
     yylval->assign(yytext, yyleng);
-    return pp::Token::IDENTIFIER;
+    return angle::pp::Token::IDENTIFIER;
 }
 
 ({DECIMAL_CONSTANT}[uU]?)|({OCTAL_CONSTANT}[uU]?)|({HEXADECIMAL_CONSTANT}[uU]?) {
     yylval->assign(yytext, yyleng);
-    return pp::Token::CONST_INT;
+    return angle::pp::Token::CONST_INT;
 }
 
 ({DIGIT}+{EXPONENT_PART}[fF]?)|({FRACTIONAL_CONSTANT}{EXPONENT_PART}?[fF]?) {
     yylval->assign(yytext, yyleng);
-    return pp::Token::CONST_FLOAT;
+    return angle::pp::Token::CONST_FLOAT;
 }
 
     /* Anything that starts with a {DIGIT} or .{DIGIT} must be a number. */
     /* Rule to catch all invalid integers and floats. */
 ({DIGIT}+[_a-zA-Z0-9.]*)|("."{DIGIT}+[_a-zA-Z0-9.]*) {
     yylval->assign(yytext, yyleng);
-    return pp::Token::PP_NUMBER;
+    return angle::pp::Token::PP_NUMBER;
 }
 
 "++" {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_INC;
+    return angle::pp::Token::OP_INC;
 }
 "--" {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_DEC;
+    return angle::pp::Token::OP_DEC;
 }
 "<<" {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_LEFT;
+    return angle::pp::Token::OP_LEFT;
 }
 ">>" {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_RIGHT;
+    return angle::pp::Token::OP_RIGHT;
 }
 "<=" {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_LE;
+    return angle::pp::Token::OP_LE;
 }
 ">=" {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_GE;
+    return angle::pp::Token::OP_GE;
 }
 "==" {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_EQ;
+    return angle::pp::Token::OP_EQ;
 }
 "!=" {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_NE;
+    return angle::pp::Token::OP_NE;
 }
 "&&" {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_AND;
+    return angle::pp::Token::OP_AND;
 }
 "^^" {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_XOR;
+    return angle::pp::Token::OP_XOR;
 }
 "||" {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_OR;
+    return angle::pp::Token::OP_OR;
 }
 "+=" {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_ADD_ASSIGN;
+    return angle::pp::Token::OP_ADD_ASSIGN;
 }
 "-=" {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_SUB_ASSIGN;
+    return angle::pp::Token::OP_SUB_ASSIGN;
 }
 "*=" {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_MUL_ASSIGN;
+    return angle::pp::Token::OP_MUL_ASSIGN;
 }
 "/=" {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_DIV_ASSIGN;
+    return angle::pp::Token::OP_DIV_ASSIGN;
 }
 "%=" {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_MOD_ASSIGN;
+    return angle::pp::Token::OP_MOD_ASSIGN;
 }
 "<<=" {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_LEFT_ASSIGN;
+    return angle::pp::Token::OP_LEFT_ASSIGN;
 }
 ">>=" {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_RIGHT_ASSIGN;
+    return angle::pp::Token::OP_RIGHT_ASSIGN;
 }
 "&=" {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_AND_ASSIGN;
+    return angle::pp::Token::OP_AND_ASSIGN;
 }
 "^=" {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_XOR_ASSIGN;
+    return angle::pp::Token::OP_XOR_ASSIGN;
 }
 "|=" {
     yylval->assign(yytext, yyleng);
-    return pp::Token::OP_OR_ASSIGN;
+    return angle::pp::Token::OP_OR_ASSIGN;
 }
 
 {PUNCTUATOR} {
     yylval->assign(1, yytext[0]);
     return yytext[0];
 }
 
 [ \t\v\f]+   { yyextra->leadingSpace = true; }
 
 {NEWLINE} {
     if (yylineno == INT_MAX)
     {
         *yylval = "Integer overflow on line number";
-        return pp::Token::GOT_ERROR;
+        return angle::pp::Token::GOT_ERROR;
     }
     ++yylineno;
     yylval->assign(1, '\n');
     return '\n';
 }
 
 . {
     yylval->assign(1, yytext[0]);
-    return pp::Token::PP_OTHER;
+    return angle::pp::Token::PP_OTHER;
 }
 
 <*><<EOF>> {
     // YY_USER_ACTION is not invoked for handling EOF.
     // Set the location for EOF token manually.
-    pp::Input* input = &yyextra->input;
-    pp::Input::Location* scanLoc = &yyextra->scanLoc;
+    angle::pp::Input* input = &yyextra->input;
+    angle::pp::Input::Location* scanLoc = &yyextra->scanLoc;
     yy_size_t sIndexMax = input->count() ? input->count() - 1 : 0;
     if (scanLoc->sIndex != sIndexMax)
     {
         // We can only reach here if there are empty strings at the
         // end of the input.
         scanLoc->sIndex = sIndexMax; scanLoc->cIndex = 0;
         // FIXME: this is not 64-bit clean.
         yyfileno = static_cast<int>(sIndexMax); yylineno = 1;
     }
     yylloc->file = yyfileno;
     yylloc->line = yylineno;
     yylval->clear();
 
     // Line number overflows fake EOFs to exit early, check for this case.
     if (yylineno == INT_MAX) {
-        yyextra->diagnostics->report(pp::Diagnostics::PP_TOKENIZER_ERROR,
-                pp::SourceLocation(yyfileno, yylineno),
+        yyextra->diagnostics->report(angle::pp::Diagnostics::PP_TOKENIZER_ERROR,
+                angle::pp::SourceLocation(yyfileno, yylineno),
                 "Integer overflow on line number");
     }
     else if (YY_START == COMMENT)
     {
-        yyextra->diagnostics->report(pp::Diagnostics::PP_EOF_IN_COMMENT,
-                                     pp::SourceLocation(yyfileno, yylineno),
+        yyextra->diagnostics->report(angle::pp::Diagnostics::PP_EOF_IN_COMMENT,
+                                     angle::pp::SourceLocation(yyfileno, yylineno),
                                      "EOF while in a comment");
     }
     yyterminate();
 }
 
 %%
 
+namespace angle {
+
 namespace pp {
 
 Tokenizer::Tokenizer(Diagnostics *diagnostics) : mHandle(nullptr), mMaxTokenSize(256)
 {
     mContext.diagnostics = diagnostics;
 }
 
 Tokenizer::~Tokenizer()
@@ -382,8 +384,10 @@ void Tokenizer::destroyScanner()
         return;
 
     yylex_destroy(mHandle);
     mHandle = nullptr;
 }
 
 }  // namespace pp
 
+} // namespace angle
+
--- a/gfx/angle/checkout/src/compiler/preprocessor/numeric_lex.h
+++ b/gfx/angle/checkout/src/compiler/preprocessor/numeric_lex.h
@@ -7,16 +7,19 @@
 // numeric_lex.h: Functions to extract numeric values from string.
 
 #ifndef COMPILER_PREPROCESSOR_NUMERICLEX_H_
 #define COMPILER_PREPROCESSOR_NUMERICLEX_H_
 
 #include <cmath>
 #include <sstream>
 
+namespace angle
+{
+
 namespace pp
 {
 
 inline std::ios::fmtflags numeric_base_int(const std::string &str)
 {
     if ((str.size() >= 2) && (str[0] == '0') && (str[1] == 'x' || str[1] == 'X'))
     {
         return std::ios::hex;
@@ -56,11 +59,13 @@ bool numeric_lex_float(const std::string
     // locale.
     stream.imbue(std::locale::classic());
 #endif
 
     stream >> (*value);
     return !stream.fail() && std::isfinite(*value);
 }
 
-}  // namespace pp.
+}  // namespace pp
+
+}  // namespace angle
 
 #endif  // COMPILER_PREPROCESSOR_NUMERICLEX_H_
--- a/gfx/angle/checkout/src/compiler/translator/CollectVariables.cpp
+++ b/gfx/angle/checkout/src/compiler/translator/CollectVariables.cpp
@@ -279,17 +279,17 @@ void CollectVariablesTraverser::recordBu
 {
     ASSERT(varyings);
     if (!(*addedFlag))
     {
         Varying info;
         setBuiltInInfoFromSymbol(variable, &info);
         info.staticUse   = true;
         info.active      = true;
-        info.isInvariant = mSymbolTable->isVaryingInvariant(variable.name());
+        info.isInvariant = mSymbolTable->isVaryingInvariant(variable);
         varyings->push_back(info);
         (*addedFlag) = true;
     }
 }
 
 void CollectVariablesTraverser::recordBuiltInFragmentOutputUsed(const TVariable &variable,
                                                                 bool *addedFlag)
 {
@@ -663,17 +663,17 @@ Varying CollectVariablesTraverser::recor
     {
         case EvqVaryingIn:
         case EvqVaryingOut:
         case EvqVertexOut:
         case EvqSmoothOut:
         case EvqFlatOut:
         case EvqCentroidOut:
         case EvqGeometryOut:
-            if (mSymbolTable->isVaryingInvariant(variable.getName()) || type.isInvariant())
+            if (mSymbolTable->isVaryingInvariant(variable.variable()) || type.isInvariant())
             {
                 varying.isInvariant = true;
             }
             break;
         default:
             break;
     }
 
--- a/gfx/angle/checkout/src/compiler/translator/Compiler.cpp
+++ b/gfx/angle/checkout/src/compiler/translator/Compiler.cpp
@@ -33,16 +33,17 @@
 #include "compiler/translator/tree_ops/PruneEmptyCases.h"
 #include "compiler/translator/tree_ops/PruneNoOps.h"
 #include "compiler/translator/tree_ops/RegenerateStructNames.h"
 #include "compiler/translator/tree_ops/RemoveArrayLengthMethod.h"
 #include "compiler/translator/tree_ops/RemoveInvariantDeclaration.h"
 #include "compiler/translator/tree_ops/RemovePow.h"
 #include "compiler/translator/tree_ops/RemoveUnreferencedVariables.h"
 #include "compiler/translator/tree_ops/RewriteDoWhile.h"
+#include "compiler/translator/tree_ops/RewriteRepeatedAssignToSwizzled.h"
 #include "compiler/translator/tree_ops/ScalarizeVecAndMatConstructorArgs.h"
 #include "compiler/translator/tree_ops/SeparateDeclarations.h"
 #include "compiler/translator/tree_ops/SimplifyLoopConditions.h"
 #include "compiler/translator/tree_ops/SplitSequenceOperator.h"
 #include "compiler/translator/tree_ops/UnfoldShortCircuitAST.h"
 #include "compiler/translator/tree_ops/UseInterfaceBlockFields.h"
 #include "compiler/translator/tree_ops/VectorizeVectorScalarArithmetic.h"
 #include "compiler/translator/tree_util/BuiltIn_autogen.h"
@@ -732,16 +733,21 @@ bool TCompiler::checkAndSimplifyAST(TInt
         ClampPointSize(root, compileResources.MaxPointSize, &getSymbolTable());
     }
 
     if (getShaderType() == GL_FRAGMENT_SHADER && (compileOptions & SH_CLAMP_FRAG_DEPTH))
     {
         ClampFragDepth(root, &getSymbolTable());
     }
 
+    if (compileOptions & SH_REWRITE_REPEATED_ASSIGN_TO_SWIZZLED)
+    {
+        sh::RewriteRepeatedAssignToSwizzled(root);
+    }
+
     if (compileOptions & SH_REWRITE_VECTOR_SCALAR_ARITHMETIC)
     {
         VectorizeVectorScalarArithmetic(root, &getSymbolTable());
     }
 
     return true;
 }
 
--- a/gfx/angle/checkout/src/compiler/translator/ConstantUnion.cpp
+++ b/gfx/angle/checkout/src/compiler/translator/ConstantUnion.cpp
@@ -152,17 +152,26 @@ bool TConstantUnion::cast(TBasicType new
                     break;
                 case EbtUInt:
                     setUConst(static_cast<unsigned int>(constant.getUConst()));
                     break;
                 case EbtBool:
                     setUConst(static_cast<unsigned int>(constant.getBConst()));
                     break;
                 case EbtFloat:
-                    setUConst(static_cast<unsigned int>(constant.getFConst()));
+                    if (constant.getFConst() < 0.0f)
+                    {
+                        // Avoid undefined behavior in C++ by first casting to signed int.
+                        setUConst(
+                            static_cast<unsigned int>(static_cast<int>(constant.getFConst())));
+                    }
+                    else
+                    {
+                        setUConst(static_cast<unsigned int>(constant.getFConst()));
+                    }
                     break;
                 default:
                     return false;
             }
             break;
         case EbtBool:
             switch (constant.type)
             {
--- a/gfx/angle/checkout/src/compiler/translator/Diagnostics.cpp
+++ b/gfx/angle/checkout/src/compiler/translator/Diagnostics.cpp
@@ -19,17 +19,17 @@ TDiagnostics::TDiagnostics(TInfoSinkBase
 {
 }
 
 TDiagnostics::~TDiagnostics()
 {
 }
 
 void TDiagnostics::writeInfo(Severity severity,
-                             const pp::SourceLocation &loc,
+                             const angle::pp::SourceLocation &loc,
                              const char *reason,
                              const char *token)
 {
     switch (severity)
     {
         case SH_ERROR:
             ++mNumErrors;
             break;
@@ -49,43 +49,47 @@ void TDiagnostics::writeInfo(Severity se
 
 void TDiagnostics::globalError(const char *message)
 {
     ++mNumErrors;
     mInfoSink.prefix(SH_ERROR);
     mInfoSink << message << "\n";
 }
 
-void TDiagnostics::error(const pp::SourceLocation &loc, const char *reason, const char *token)
+void TDiagnostics::error(const angle::pp::SourceLocation &loc,
+                         const char *reason,
+                         const char *token)
 {
     writeInfo(SH_ERROR, loc, reason, token);
 }
 
-void TDiagnostics::warning(const pp::SourceLocation &loc, const char *reason, const char *token)
+void TDiagnostics::warning(const angle::pp::SourceLocation &loc,
+                           const char *reason,
+                           const char *token)
 {
     writeInfo(SH_WARNING, loc, reason, token);
 }
 
 void TDiagnostics::error(const TSourceLoc &loc, const char *reason, const char *token)
 {
-    pp::SourceLocation srcLoc;
+    angle::pp::SourceLocation srcLoc;
     srcLoc.file = loc.first_file;
     srcLoc.line = loc.first_line;
     error(srcLoc, reason, token);
 }
 
 void TDiagnostics::warning(const TSourceLoc &loc, const char *reason, const char *token)
 {
-    pp::SourceLocation srcLoc;
+    angle::pp::SourceLocation srcLoc;
     srcLoc.file = loc.first_file;
     srcLoc.line = loc.first_line;
     warning(srcLoc, reason, token);
 }
 
-void TDiagnostics::print(ID id, const pp::SourceLocation &loc, const std::string &text)
+void TDiagnostics::print(ID id, const angle::pp::SourceLocation &loc, const std::string &text)
 {
     writeInfo(isError(id) ? SH_ERROR : SH_WARNING, loc, message(id), text.c_str());
 }
 
 void TDiagnostics::resetErrorCount()
 {
     mNumErrors   = 0;
     mNumWarnings = 0;
--- a/gfx/angle/checkout/src/compiler/translator/Diagnostics.h
+++ b/gfx/angle/checkout/src/compiler/translator/Diagnostics.h
@@ -12,42 +12,42 @@
 #include "compiler/translator/Severity.h"
 
 namespace sh
 {
 
 class TInfoSinkBase;
 struct TSourceLoc;
 
-class TDiagnostics : public pp::Diagnostics, angle::NonCopyable
+class TDiagnostics : public angle::pp::Diagnostics, angle::NonCopyable
 {
   public:
     TDiagnostics(TInfoSinkBase &infoSink);
     ~TDiagnostics() override;
 
     int numErrors() const { return mNumErrors; }
     int numWarnings() const { return mNumWarnings; }
 
-    void error(const pp::SourceLocation &loc, const char *reason, const char *token);
-    void warning(const pp::SourceLocation &loc, const char *reason, const char *token);
+    void error(const angle::pp::SourceLocation &loc, const char *reason, const char *token);
+    void warning(const angle::pp::SourceLocation &loc, const char *reason, const char *token);
 
     void error(const TSourceLoc &loc, const char *reason, const char *token);
     void warning(const TSourceLoc &loc, const char *reason, const char *token);
 
     void globalError(const char *message);
 
     void resetErrorCount();
 
   protected:
     void writeInfo(Severity severity,
-                   const pp::SourceLocation &loc,
+                   const angle::pp::SourceLocation &loc,
                    const char *reason,
                    const char *token);
 
-    void print(ID id, const pp::SourceLocation &loc, const std::string &text) override;
+    void print(ID id, const angle::pp::SourceLocation &loc, const std::string &text) override;
 
   private:
     TInfoSinkBase &mInfoSink;
     int mNumErrors;
     int mNumWarnings;
 };
 
 // Diagnostics wrapper to use when the code is only allowed to generate warnings.
--- a/gfx/angle/checkout/src/compiler/translator/DirectiveHandler.cpp
+++ b/gfx/angle/checkout/src/compiler/translator/DirectiveHandler.cpp
@@ -45,22 +45,22 @@ TDirectiveHandler::TDirectiveHandler(TEx
       mDebugShaderPrecisionSupported(debugShaderPrecisionSupported)
 {
 }
 
 TDirectiveHandler::~TDirectiveHandler()
 {
 }
 
-void TDirectiveHandler::handleError(const pp::SourceLocation &loc, const std::string &msg)
+void TDirectiveHandler::handleError(const angle::pp::SourceLocation &loc, const std::string &msg)
 {
     mDiagnostics.error(loc, msg.c_str(), "");
 }
 
-void TDirectiveHandler::handlePragma(const pp::SourceLocation &loc,
+void TDirectiveHandler::handlePragma(const angle::pp::SourceLocation &loc,
                                      const std::string &name,
                                      const std::string &value,
                                      bool stdgl)
 {
     if (stdgl)
     {
         const char kInvariant[] = "invariant";
         const char kAll[]       = "all";
@@ -114,28 +114,28 @@ void TDirectiveHandler::handlePragma(con
                 mPragma.debugShaderPrecision = true;
             else if (value == kOff)
                 mPragma.debugShaderPrecision = false;
             else
                 invalidValue = true;
         }
         else
         {
-            mDiagnostics.report(pp::Diagnostics::PP_UNRECOGNIZED_PRAGMA, loc, name);
+            mDiagnostics.report(angle::pp::Diagnostics::PP_UNRECOGNIZED_PRAGMA, loc, name);
             return;
         }
 
         if (invalidValue)
         {
             mDiagnostics.error(loc, "invalid pragma value - 'on' or 'off' expected", value.c_str());
         }
     }
 }
 
-void TDirectiveHandler::handleExtension(const pp::SourceLocation &loc,
+void TDirectiveHandler::handleExtension(const angle::pp::SourceLocation &loc,
                                         const std::string &name,
                                         const std::string &behavior)
 {
     const char kExtAll[] = "all";
 
     TBehavior behaviorVal = getBehavior(behavior);
     if (behaviorVal == EBhUndefined)
     {
@@ -180,17 +180,17 @@ void TDirectiveHandler::handleExtension(
             mDiagnostics.warning(loc, "extension is not supported", name.c_str());
             break;
         default:
             UNREACHABLE();
             break;
     }
 }
 
-void TDirectiveHandler::handleVersion(const pp::SourceLocation &loc, int version)
+void TDirectiveHandler::handleVersion(const angle::pp::SourceLocation &loc, int version)
 {
     if (version == 100 || version == 300 || version == 310)
     {
         mShaderVersion = version;
     }
     else
     {
         std::stringstream stream;
--- a/gfx/angle/checkout/src/compiler/translator/DirectiveHandler.h
+++ b/gfx/angle/checkout/src/compiler/translator/DirectiveHandler.h
@@ -12,41 +12,41 @@
 #include "compiler/translator/Pragma.h"
 #include "compiler/preprocessor/DirectiveHandlerBase.h"
 #include "GLSLANG/ShaderLang.h"
 
 namespace sh
 {
 class TDiagnostics;
 
-class TDirectiveHandler : public pp::DirectiveHandler, angle::NonCopyable
+class TDirectiveHandler : public angle::pp::DirectiveHandler, angle::NonCopyable
 {
   public:
     TDirectiveHandler(TExtensionBehavior &extBehavior,
                       TDiagnostics &diagnostics,
                       int &shaderVersion,
                       sh::GLenum shaderType,
                       bool debugShaderPrecisionSupported);
     ~TDirectiveHandler() override;
 
     const TPragma &pragma() const { return mPragma; }
     const TExtensionBehavior &extensionBehavior() const { return mExtensionBehavior; }
 
-    void handleError(const pp::SourceLocation &loc, const std::string &msg) override;
+    void handleError(const angle::pp::SourceLocation &loc, const std::string &msg) override;
 
-    void handlePragma(const pp::SourceLocation &loc,
+    void handlePragma(const angle::pp::SourceLocation &loc,
                       const std::string &name,
                       const std::string &value,
                       bool stdgl) override;
 
-    void handleExtension(const pp::SourceLocation &loc,
+    void handleExtension(const angle::pp::SourceLocation &loc,
                          const std::string &name,
                          const std::string &behavior) override;
 
-    void handleVersion(const pp::SourceLocation &loc, int version) override;
+    void handleVersion(const angle::pp::SourceLocation &loc, int version) override;
 
   private:
     TPragma mPragma;
     TExtensionBehavior &mExtensionBehavior;
     TDiagnostics &mDiagnostics;
     int &mShaderVersion;
     sh::GLenum mShaderType;
     bool mDebugShaderPrecisionSupported;
--- a/gfx/angle/checkout/src/compiler/translator/IntermNode.cpp
+++ b/gfx/angle/checkout/src/compiler/translator/IntermNode.cpp
@@ -1706,16 +1706,42 @@ TIntermTyped *TIntermAggregate::fold(TDi
         }
     }
     const TConstantUnion *constArray = nullptr;
     if (isConstructor())
     {
         if (mType.canReplaceWithConstantUnion())
         {
             constArray = getConstantValue();
+            if (constArray && mType.getBasicType() == EbtUInt)
+            {
+                // Check if we converted a negative float to uint and issue a warning in that case.
+                size_t sizeRemaining = mType.getObjectSize();
+                for (TIntermNode *arg : mArguments)
+                {
+                    TIntermTyped *typedArg = arg->getAsTyped();
+                    if (typedArg->getBasicType() == EbtFloat)
+                    {
+                        const TConstantUnion *argValue = typedArg->getConstantValue();
+                        size_t castSize =
+                            std::min(typedArg->getType().getObjectSize(), sizeRemaining);
+                        for (size_t i = 0; i < castSize; ++i)
+                        {
+                            if (argValue[i].getFConst() < 0.0f)
+                            {
+                                // ESSL 3.00.6 section 5.4.1.
+                                diagnostics->warning(
+                                    mLine, "casting a negative float to uint is undefined",
+                                    mType.getBuiltInTypeNameString());
+                            }
+                        }
+                    }
+                    sizeRemaining -= typedArg->getType().getObjectSize();
+                }
+            }
         }
     }
     else if (CanFoldAggregateBuiltInOp(mOp))
     {
         constArray = TIntermConstantUnion::FoldAggregateBuiltIn(this, diagnostics);
     }
     if (constArray == nullptr)
     {
@@ -1895,21 +1921,21 @@ const TConstantUnion *TIntermConstantUni
                                 }
                             }
                             else
                             {
                                 ASSERT(op == EOpIMod);
                                 if (lhs < 0 || divisor < 0)
                                 {
                                     // ESSL 3.00.6 section 5.9: Results of modulus are undefined
-                                    // when
-                                    // either one of the operands is negative.
+                                    // when either one of the operands is negative.
                                     diagnostics->warning(line,
                                                          "Negative modulus operator operand "
-                                                         "encountered during constant folding",
+                                                         "encountered during constant folding. "
+                                                         "Results are undefined.",
                                                          "%");
                                     resultArray[i].setIConst(0);
                                 }
                                 else
                                 {
                                     resultArray[i].setIConst(lhs % divisor);
                                 }
                             }
--- a/gfx/angle/checkout/src/compiler/translator/OutputGLSLBase.cpp
+++ b/gfx/angle/checkout/src/compiler/translator/OutputGLSLBase.cpp
@@ -209,16 +209,25 @@ void TOutputGLSLBase::writeLayoutQualifi
     if (IsAtomicCounter(type.getBasicType()))
     {
         out << listItemPrefix << "offset = " << layoutQualifier.offset;
     }
 
     out << ") ";
 }
 
+void TOutputGLSLBase::writeQualifier(TQualifier qualifier, const TSymbol *symbol)
+{
+    const char *result = mapQualifierToString(qualifier);
+    if (result && result[0] != '\0')
+    {
+        objSink() << result << " ";
+    }
+}
+
 const char *TOutputGLSLBase::mapQualifierToString(TQualifier qualifier)
 {
     if (sh::IsGLSL410OrOlder(mOutput) && mShaderVersion >= 300 &&
         (mCompileOptions & SH_REMOVE_INVARIANT_AND_CENTROID_FOR_ESSL3) != 0)
     {
         switch (qualifier)
         {
             // The return string is consistent with sh::getQualifierString() from
@@ -245,36 +254,32 @@ const char *TOutputGLSLBase::mapQualifie
                 return "out";
             default:
                 break;
         }
     }
     return sh::getQualifierString(qualifier);
 }
 
-void TOutputGLSLBase::writeVariableType(const TType &type)
+void TOutputGLSLBase::writeVariableType(const TType &type, const TSymbol *symbol)
 {
     TQualifier qualifier = type.getQualifier();
     TInfoSinkBase &out   = objSink();
     if (type.isInvariant())
     {
         writeInvariantQualifier(type);
     }
     if (type.getBasicType() == EbtInterfaceBlock)
     {
         const TInterfaceBlock *interfaceBlock = type.getInterfaceBlock();
         declareInterfaceBlockLayout(interfaceBlock);
     }
     if (qualifier != EvqTemporary && qualifier != EvqGlobal)
     {
-        const char *qualifierString = mapQualifierToString(qualifier);
-        if (qualifierString && qualifierString[0] != '\0')
-        {
-            out << qualifierString << " ";
-        }
+        writeQualifier(qualifier, symbol);
     }
 
     const TMemoryQualifier &memoryQualifier = type.getMemoryQualifier();
     if (memoryQualifier.readonly)
     {
         ASSERT(IsImage(type.getBasicType()));
         out << "readonly ";
     }
@@ -304,21 +309,16 @@ void TOutputGLSLBase::writeVariableType(
     }
 
     // Declare the struct if we have not done so already.
     if (type.getBasicType() == EbtStruct && !structDeclared(type.getStruct()))
     {
         const TStructure *structure = type.getStruct();
 
         declareStruct(structure);
-
-        if (structure->symbolType() != SymbolType::Empty)
-        {
-            mDeclaredStructs.insert(structure->uniqueId().get());
-        }
     }
     else if (type.getBasicType() == EbtInterfaceBlock)
     {
         const TInterfaceBlock *interfaceBlock = type.getInterfaceBlock();
         declareInterfaceBlock(interfaceBlock);
     }
     else
     {
@@ -331,17 +331,17 @@ void TOutputGLSLBase::writeVariableType(
 void TOutputGLSLBase::writeFunctionParameters(const TFunction *func)
 {
     TInfoSinkBase &out = objSink();
     size_t paramCount  = func->getParamCount();
     for (size_t i = 0; i < paramCount; ++i)
     {
         const TVariable *param = func->getParam(i);
         const TType &type      = param->getType();
-        writeVariableType(type);
+        writeVariableType(type, param);
 
         if (param->symbolType() != SymbolType::Empty)
             out << " " << hashName(param);
         if (type.isArray())
             out << ArrayString(type);
 
         // Put a comma if this is not the last argument.
         if (i != paramCount - 1)
@@ -889,17 +889,17 @@ bool TOutputGLSLBase::visitInvariantDecl
     return false;
 }
 
 void TOutputGLSLBase::visitFunctionPrototype(TIntermFunctionPrototype *node)
 {
     TInfoSinkBase &out = objSink();
 
     const TType &type = node->getType();
-    writeVariableType(type);
+    writeVariableType(type, node->getFunction());
     if (type.isArray())
         out << ArrayString(type);
 
     out << " " << hashFunctionNameIfNeeded(node->getFunction());
 
     out << "(";
     writeFunctionParameters(node->getFunction());
     out << ")";
@@ -990,17 +990,18 @@ bool TOutputGLSLBase::visitDeclaration(V
     TInfoSinkBase &out = objSink();
 
     // Variable declaration.
     if (visit == PreVisit)
     {
         const TIntermSequence &sequence = *(node->getSequence());
         TIntermTyped *variable          = sequence.front()->getAsTyped();
         writeLayoutQualifier(variable);
-        writeVariableType(variable->getType());
+        TIntermSymbol *symbolNode = variable->getAsSymbolNode();
+        writeVariableType(variable->getType(), symbolNode ? &symbolNode->variable() : nullptr);
         if (variable->getAsSymbolNode() == nullptr ||
             variable->getAsSymbolNode()->variable().symbolType() != SymbolType::Empty)
         {
             out << " ";
         }
         mDeclaringVariable = true;
     }
     else if (visit == InVisit)
@@ -1169,16 +1170,21 @@ void TOutputGLSLBase::declareStruct(cons
         if (writeVariablePrecision(field->type()->getPrecision()))
             out << " ";
         out << getTypeName(*field->type()) << " " << hashFieldName(structure, field->name());
         if (field->type()->isArray())
             out << ArrayString(*field->type());
         out << ";\n";
     }
     out << "}";
+
+    if (structure->symbolType() != SymbolType::Empty)
+    {
+        mDeclaredStructs.insert(structure->uniqueId().get());
+    }
 }
 
 void TOutputGLSLBase::declareInterfaceBlockLayout(const TInterfaceBlock *interfaceBlock)
 {
     TInfoSinkBase &out = objSink();
 
     out << "layout(";
 
--- a/gfx/angle/checkout/src/compiler/translator/OutputGLSLBase.h
+++ b/gfx/angle/checkout/src/compiler/translator/OutputGLSLBase.h
@@ -37,17 +37,17 @@ class TOutputGLSLBase : public TIntermTr
     ImmutableString hashName(const TSymbol *symbol);
 
   protected:
     TInfoSinkBase &objSink() { return mObjSink; }
     void writeFloat(TInfoSinkBase &out, float f);
     void writeTriplet(Visit visit, const char *preStr, const char *inStr, const char *postStr);
     virtual void writeLayoutQualifier(TIntermTyped *variable);
     void writeInvariantQualifier(const TType &type);
-    void writeVariableType(const TType &type);
+    void writeVariableType(const TType &type, const TSymbol *symbol);
     virtual bool writeVariablePrecision(TPrecision precision) = 0;
     void writeFunctionParameters(const TFunction *func);
     const TConstantUnion *writeConstantUnion(const TType &type, const TConstantUnion *pConstUnion);
     void writeConstructorTriplet(Visit visit, const TType &type);
     ImmutableString getTypeName(const TType &type);
 
     void visitSymbol(TIntermSymbol *node) override;
     void visitConstantUnion(TIntermConstantUnion *node) override;
@@ -72,26 +72,27 @@ class TOutputGLSLBase : public TIntermTr
     ImmutableString hashFieldName(const TSymbol *containingStruct,
                                   const ImmutableString &fieldName);
     // Same as hashName(), but without hashing "main".
     ImmutableString hashFunctionNameIfNeeded(const TFunction *func);
     // Used to translate function names for differences between ESSL and GLSL
     virtual ImmutableString translateTextureFunction(const ImmutableString &name) { return name; }
 
     void declareStruct(const TStructure *structure);
+    virtual void writeQualifier(TQualifier qualifier, const TSymbol *symbol);
+    bool structDeclared(const TStructure *structure) const;
 
   private:
-    bool structDeclared(const TStructure *structure) const;
 
     void declareInterfaceBlockLayout(const TInterfaceBlock *interfaceBlock);
     void declareInterfaceBlock(const TInterfaceBlock *interfaceBlock);
 
     void writeBuiltInFunctionTriplet(Visit visit, TOperator op, bool useEmulatedFunction);
 
-    const char *mapQualifierToString(TQualifier qialifier);
+    const char *mapQualifierToString(TQualifier qualifier);
 
     TInfoSinkBase &mObjSink;
     bool mDeclaringVariable;
 
     // This set contains all the ids of the structs from every scope.
     std::set<int> mDeclaredStructs;
 
     ShArrayIndexClampingStrategy mClampingStrategy;
--- a/gfx/angle/checkout/src/compiler/translator/OutputHLSL.cpp
+++ b/gfx/angle/checkout/src/compiler/translator/OutputHLSL.cpp
@@ -621,24 +621,16 @@ void OutputHLSL::header(TInfoSinkBase &o
 
         if (mUsesDepthRange)
         {
             out << "static gl_DepthRangeParameters gl_DepthRange = {dx_DepthRange.x, "
                    "dx_DepthRange.y, dx_DepthRange.z};\n"
                    "\n";
         }
 
-        if (!mappedStructs.empty())
-        {
-            out << "// Structures from std140 blocks with padding removed\n";
-            out << "\n";
-            out << mappedStructs;
-            out << "\n";
-        }
-
         if (usingMRTExtension && mNumRenderTargets > 1)
         {
             out << "#define GL_USES_MRT\n";
         }
 
         if (mUsesFragColor)
         {
             out << "#define GL_USES_FRAG_COLOR\n";
@@ -733,24 +725,16 @@ void OutputHLSL::header(TInfoSinkBase &o
         }
 
         if (mUsesDepthRange)
         {
             out << "static gl_DepthRangeParameters gl_DepthRange = {dx_DepthRange.x, "
                    "dx_DepthRange.y, dx_DepthRange.z};\n"
                    "\n";
         }
-
-        if (!mappedStructs.empty())
-        {
-            out << "// Structures from std140 blocks with padding removed\n";
-            out << "\n";
-            out << mappedStructs;
-            out << "\n";
-        }
     }
     else  // Compute shader
     {
         ASSERT(mShaderType == GL_COMPUTE_SHADER);
 
         out << "cbuffer DriverConstants : register(b1)\n"
                "{\n";
         if (mUsesNumWorkGroups)
@@ -780,16 +764,24 @@ void OutputHLSL::header(TInfoSinkBase &o
         }
 
         if (mUsesLocalInvocationIndex)
         {
             out << "static uint gl_LocalInvocationIndex = uint(0);\n";
         }
     }
 
+    if (!mappedStructs.empty())
+    {
+        out << "// Structures from std140 blocks with padding removed\n";
+        out << "\n";
+        out << mappedStructs;
+        out << "\n";
+    }
+
     bool getDimensionsIgnoresBaseLevel =
         (mCompileOptions & SH_HLSL_GET_DIMENSIONS_IGNORES_BASE_LEVEL) != 0;
     mTextureFunctionHLSL->textureFunctionHeader(out, mOutputType, getDimensionsIgnoresBaseLevel);
     mImageFunctionHLSL->imageFunctionHeader(out);
 
     if (mUsesFragCoord)
     {
         out << "#define GL_USES_FRAG_COORD\n";
--- a/gfx/angle/checkout/src/compiler/translator/ParseContext.cpp
+++ b/gfx/angle/checkout/src/compiler/translator/ParseContext.cpp
@@ -189,17 +189,17 @@ TParseContext::TParseContext(TSymbolTabl
       mDefaultBufferMatrixPacking(EmpColumnMajor),
       mDefaultBufferBlockStorage(sh::IsWebGLBasedSpec(spec) ? EbsStd140 : EbsShared),
       mDiagnostics(diagnostics),
       mDirectiveHandler(ext,
                         *mDiagnostics,
                         mShaderVersion,
                         mShaderType,
                         resources.WEBGL_debug_shader_precision == 1),
-      mPreprocessor(mDiagnostics, &mDirectiveHandler, pp::PreprocessorSettings()),
+      mPreprocessor(mDiagnostics, &mDirectiveHandler, angle::pp::PreprocessorSettings()),
       mScanner(nullptr),
       mMinProgramTexelOffset(resources.MinProgramTexelOffset),
       mMaxProgramTexelOffset(resources.MaxProgramTexelOffset),
       mMinProgramTextureGatherOffset(resources.MinProgramTextureGatherOffset),
       mMaxProgramTextureGatherOffset(resources.MaxProgramTextureGatherOffset),
       mComputeShaderLocalSizeDeclared(false),
       mComputeShaderLocalSize(-1),
       mNumViews(-1),
@@ -1750,28 +1750,28 @@ bool TParseContext::isExtensionEnabled(T
 {
     return IsExtensionEnabled(extensionBehavior(), extension);
 }
 
 void TParseContext::handleExtensionDirective(const TSourceLoc &loc,
                                              const char *extName,
                                              const char *behavior)
 {
-    pp::SourceLocation srcLoc;
+    angle::pp::SourceLocation srcLoc;
     srcLoc.file = loc.first_file;
     srcLoc.line = loc.first_line;
     mDirectiveHandler.handleExtension(srcLoc, extName, behavior);
 }
 
 void TParseContext::handlePragmaDirective(const TSourceLoc &loc,
                                           const char *name,
                                           const char *value,
                                           bool stdgl)
 {
-    pp::SourceLocation srcLoc;
+    angle::pp::SourceLocation srcLoc;
     srcLoc.file = loc.first_file;
     srcLoc.line = loc.first_line;
     mDirectiveHandler.handlePragma(srcLoc, name, value, stdgl);
 }
 
 sh::WorkGroupSize TParseContext::getComputeShaderLocalSize() const
 {
     sh::WorkGroupSize result(-1);
@@ -2627,17 +2627,17 @@ TIntermInvariantDeclaration *TParseConte
         return nullptr;
     }
     const TType &type = variable->getType();
 
     checkInvariantVariableQualifier(typeQualifier.invariant, type.getQualifier(),
                                     typeQualifier.line);
     checkMemoryQualifierIsNotSpecified(typeQualifier.memoryQualifier, typeQualifier.line);
 
-    symbolTable.addInvariantVarying(identifier);
+    symbolTable.addInvariantVarying(*variable);
 
     TIntermSymbol *intermSymbol = new TIntermSymbol(variable);
     intermSymbol->setLine(identifierLoc);
 
     return new TIntermInvariantDeclaration(intermSymbol, identifierLoc);
 }
 
 void TParseContext::parseDeclarator(TPublicType &publicType,
--- a/gfx/angle/checkout/src/compiler/translator/ParseContext.h
+++ b/gfx/angle/checkout/src/compiler/translator/ParseContext.h
@@ -38,18 +38,18 @@ class TParseContext : angle::NonCopyable
                   sh::GLenum type,
                   ShShaderSpec spec,
                   ShCompileOptions options,
                   bool checksPrecErrors,
                   TDiagnostics *diagnostics,
                   const ShBuiltInResources &resources);
     ~TParseContext();
 
-    const pp::Preprocessor &getPreprocessor() const { return mPreprocessor; }
-    pp::Preprocessor &getPreprocessor() { return mPreprocessor; }
+    const angle::pp::Preprocessor &getPreprocessor() const { return mPreprocessor; }
+    angle::pp::Preprocessor &getPreprocessor() { return mPreprocessor; }
     void *getScanner() const { return mScanner; }
     void setScanner(void *scanner) { mScanner = scanner; }
     int getShaderVersion() const { return mShaderVersion; }
     sh::GLenum getShaderType() const { return mShaderType; }
     ShShaderSpec getShaderSpec() const { return mShaderSpec; }
     int numErrors() const { return mDiagnostics->numErrors(); }
     void error(const TSourceLoc &loc, const char *reason, const char *token);
     void error(const TSourceLoc &loc, const char *reason, const ImmutableString &token);
@@ -602,17 +602,17 @@ class TParseContext : angle::NonCopyable
                                          // ESSL1.
     TLayoutMatrixPacking mDefaultUniformMatrixPacking;
     TLayoutBlockStorage mDefaultUniformBlockStorage;
     TLayoutMatrixPacking mDefaultBufferMatrixPacking;
     TLayoutBlockStorage mDefaultBufferBlockStorage;
     TString mHashErrMsg;
     TDiagnostics *mDiagnostics;
     TDirectiveHandler mDirectiveHandler;
-    pp::Preprocessor mPreprocessor;
+    angle::pp::Preprocessor mPreprocessor;
     void *mScanner;
     int mMinProgramTexelOffset;
     int mMaxProgramTexelOffset;
 
     int mMinProgramTextureGatherOffset;
     int mMaxProgramTextureGatherOffset;
 
     // keep track of local group size declared in layout. It should be declared only once.
--- a/gfx/angle/checkout/src/compiler/translator/Symbol.cpp
+++ b/gfx/angle/checkout/src/compiler/translator/Symbol.cpp
@@ -28,21 +28,23 @@ constexpr const ImmutableString kImageSi
 
 static const char kFunctionMangledNameSeparator = '(';
 
 }  // anonymous namespace
 
 TSymbol::TSymbol(TSymbolTable *symbolTable,
                  const ImmutableString &name,
                  SymbolType symbolType,
+                 SymbolClass symbolClass,
                  TExtension extension)
     : mName(name),
       mUniqueId(symbolTable->nextUniqueId()),
       mSymbolType(symbolType),
-      mExtension(extension)
+      mExtension(extension),
+      mSymbolClass(symbolClass)
 {
     ASSERT(mSymbolType == SymbolType::BuiltIn || mExtension == TExtension::UNDEFINED);
     ASSERT(mName != "" || mSymbolType == SymbolType::AngleInternal ||
            mSymbolType == SymbolType::Empty);
 }
 
 ImmutableString TSymbol::name() const
 {
@@ -57,43 +59,52 @@ ImmutableString TSymbol::name() const
     ImmutableStringBuilder symbolNameOut(sizeof(uniqueId) * 2u + 1u);
     symbolNameOut << 's';
     symbolNameOut.appendHex(mUniqueId.get());
     return symbolNameOut;
 }
 
 ImmutableString TSymbol::getMangledName() const
 {
+    if (mSymbolClass == SymbolClass::Function)
+    {
+        // We do this instead of using proper virtual functions so that we can better support
+        // constexpr symbols.
+        return static_cast<const TFunction *>(this)->getFunctionMangledName();
+    }
     ASSERT(mSymbolType != SymbolType::Empty);
     return name();
 }
 
 TVariable::TVariable(TSymbolTable *symbolTable,
                      const ImmutableString &name,
                      const TType *type,
                      SymbolType symbolType,
                      TExtension extension)
-    : TSymbol(symbolTable, name, symbolType, extension), mType(type), unionArray(nullptr)
+    : TSymbol(symbolTable, name, symbolType, SymbolClass::Variable, extension),
+      mType(type),
+      unionArray(nullptr)
 {
     ASSERT(mType);
 }
 
 TStructure::TStructure(TSymbolTable *symbolTable,
                        const ImmutableString &name,
                        const TFieldList *fields,
                        SymbolType symbolType)
-    : TSymbol(symbolTable, name, symbolType), TFieldListCollection(fields)
+    : TSymbol(symbolTable, name, symbolType, SymbolClass::Struct), TFieldListCollection(fields)
 {
 }
 
 TStructure::TStructure(const TSymbolUniqueId &id,
                        const ImmutableString &name,
                        TExtension extension,
                        const TFieldList *fields)
-    : TSymbol(id, name, SymbolType::BuiltIn, extension), TFieldListCollection(fields)
+    : TSymbol(id, name, SymbolType::BuiltIn, extension, SymbolClass::Struct),
+      TFieldListCollection(fields)
 {
 }
 
 void TStructure::createSamplerSymbols(const char *namePrefix,
                                       const TString &apiNamePrefix,
                                       TVector<const TVariable *> *outputSymbols,
                                       TMap<const TVariable *, TString> *outputSymbolsToAPINames,
                                       TSymbolTable *symbolTable) const
@@ -121,41 +132,41 @@ void TStructure::setName(const Immutable
 }
 
 TInterfaceBlock::TInterfaceBlock(TSymbolTable *symbolTable,
                                  const ImmutableString &name,
                                  const TFieldList *fields,
                                  const TLayoutQualifier &layoutQualifier,
                                  SymbolType symbolType,
                                  TExtension extension)
-    : TSymbol(symbolTable, name, symbolType, extension),
+    : TSymbol(symbolTable, name, symbolType, SymbolClass::InterfaceBlock, extension),
       TFieldListCollection(fields),
       mBlockStorage(layoutQualifier.blockStorage),
       mBinding(layoutQualifier.binding)
 {
     ASSERT(name != nullptr);
 }
 
 TInterfaceBlock::TInterfaceBlock(const TSymbolUniqueId &id,
                                  const ImmutableString &name,
                                  TExtension extension,
                                  const TFieldList *fields)
-    : TSymbol(id, name, SymbolType::BuiltIn, extension),
+    : TSymbol(id, name, SymbolType::BuiltIn, extension, SymbolClass::InterfaceBlock),
       TFieldListCollection(fields),
       mBlockStorage(EbsUnspecified),
       mBinding(0)
 {
 }
 
 TFunction::TFunction(TSymbolTable *symbolTable,
                      const ImmutableString &name,
                      SymbolType symbolType,
                      const TType *retType,
                      bool knownToNotHaveSideEffects)
-    : TSymbol(symbolTable, name, symbolType, TExtension::UNDEFINED),
+    : TSymbol(symbolTable, name, symbolType, SymbolClass::Function, TExtension::UNDEFINED),
       mParametersVector(new TParamVector()),
       mParameters(nullptr),
       mParamCount(0u),
       returnType(retType),
       mMangledName(""),
       mOp(EOpNull),
       defined(false),
       mHasPrototypeDeclaration(false),
--- a/gfx/angle/checkout/src/compiler/translator/Symbol.h
+++ b/gfx/angle/checkout/src/compiler/translator/Symbol.h
@@ -23,86 +23,105 @@ class TSymbolTable;
 enum class SymbolType
 {
     BuiltIn,
     UserDefined,
     AngleInternal,
     Empty  // Meaning symbol without a name.
 };
 
+enum class SymbolClass
+{
+    Function,
+    Variable,
+    Struct,
+    InterfaceBlock
+};
+
 // Symbol base class. (Can build functions or variables out of these...)
 class TSymbol : angle::NonCopyable
 {
   public:
     POOL_ALLOCATOR_NEW_DELETE();
     TSymbol(TSymbolTable *symbolTable,
             const ImmutableString &name,
             SymbolType symbolType,
+            SymbolClass symbolClass,
             TExtension extension = TExtension::UNDEFINED);
 
-    // Note that we don't have a virtual destructor in order to support constexpr symbols. Data is
+    // Note that we can't have a virtual destructor in order to support constexpr symbols. Data is
     // either statically allocated or pool allocated.
     ~TSymbol() = default;
 
     // Calling name() for empty symbols (symbolType == SymbolType::Empty) generates a similar name
     // as for internal variables.
     ImmutableString name() const;
     // Don't call getMangledName() for empty symbols (symbolType == SymbolType::Empty).
-    virtual ImmutableString getMangledName() const;
+    ImmutableString getMangledName() const;
 
-    virtual bool isFunction() const { return false; }
-    virtual bool isVariable() const { return false; }
-    virtual bool isStruct() const { return false; }
+    bool isFunction() const { return mSymbolClass == SymbolClass::Function; }
+    bool isVariable() const { return mSymbolClass == SymbolClass::Variable; }
+    bool isStruct() const { return mSymbolClass == SymbolClass::Struct; }
 
     const TSymbolUniqueId &uniqueId() const { return mUniqueId; }
     SymbolType symbolType() const { return mSymbolType; }
     TExtension extension() const { return mExtension; }
 
   protected:
     constexpr TSymbol(const TSymbolUniqueId &id,
                       const ImmutableString &name,
                       SymbolType symbolType,
-                      TExtension extension)
-        : mName(name), mUniqueId(id), mSymbolType(symbolType), mExtension(extension)
+                      TExtension extension,
+                      SymbolClass symbolClass)
+        : mName(name),
+          mUniqueId(id),
+          mSymbolType(symbolType),
+          mExtension(extension),
+          mSymbolClass(symbolClass)
     {
     }
 
     const ImmutableString mName;
 
   private:
     const TSymbolUniqueId mUniqueId;
     const SymbolType mSymbolType;
     const TExtension mExtension;
+
+    // We use this instead of having virtual functions for querying the class in order to support
+    // constexpr symbols.
+    const SymbolClass mSymbolClass;
 };
 
 // Variable.
 // May store the value of a constant variable of any type (float, int, bool or struct).
 class TVariable : public TSymbol
 {
   public:
     TVariable(TSymbolTable *symbolTable,
               const ImmutableString &name,
               const TType *type,
               SymbolType symbolType,
               TExtension ext = TExtension::UNDEFINED);
 
-    bool isVariable() const override { return true; }
     const TType &getType() const { return *mType; }
 
     const TConstantUnion *getConstPointer() const { return unionArray; }
 
     void shareConstPointer(const TConstantUnion *constArray) { unionArray = constArray; }
 
     // Note: only to be used for built-in variables with autogenerated ids!
     constexpr TVariable(const TSymbolUniqueId &id,
                         const ImmutableString &name,
                         SymbolType symbolType,
                         TExtension extension,
                         const TType *type)
-        : TSymbol(id, name, symbolType, extension), mType(type), unionArray(nullptr)
+        : TSymbol(id, name, symbolType, extension, SymbolClass::Variable),
+          mType(type),
+          unionArray(nullptr)
     {
     }
 
   private:
     const TType *mType;
     const TConstantUnion *unionArray;
 };
 
@@ -110,18 +129,16 @@ class TVariable : public TSymbol
 class TStructure : public TSymbol, public TFieldListCollection
 {
   public:
     TStructure(TSymbolTable *symbolTable,
                const ImmutableString &name,
                const TFieldList *fields,
                SymbolType symbolType);
 
-    bool isStruct() const override { return true; }
-
     // The char arrays passed in must be pool allocated or static.
     void createSamplerSymbols(const char *namePrefix,
                               const TString &apiNamePrefix,
                               TVector<const TVariable *> *outputSymbols,
                               TMap<const TVariable *, TString> *outputSymbolsToAPINames,
                               TSymbolTable *symbolTable) const;
 
     void setAtGlobalScope(bool atGlobalScope) { mAtGlobalScope = atGlobalScope; }
@@ -199,22 +216,20 @@ class TFunction : public TSymbol
   public:
     // User-defined function
     TFunction(TSymbolTable *symbolTable,
               const ImmutableString &name,
               SymbolType symbolType,
               const TType *retType,
               bool knownToNotHaveSideEffects);
 
-    bool isFunction() const override { return true; }
-
     void addParameter(const TVariable *p);
     void shareParameters(const TFunction &parametersSource);
 
-    ImmutableString getMangledName() const override
+    ImmutableString getFunctionMangledName() const
     {
         ASSERT(symbolType() != SymbolType::BuiltIn);
         if (mMangledName.empty())
         {
             mMangledName = buildMangledName();
         }
         return mMangledName;
     }
@@ -240,17 +255,17 @@ class TFunction : public TSymbol
     constexpr TFunction(const TSymbolUniqueId &id,
                         const ImmutableString &name,
                         TExtension extension,
                         const TVariable *const *parameters,
                         size_t paramCount,
                         const TType *retType,
                         TOperator op,
                         bool knownToNotHaveSideEffects)
-        : TSymbol(id, name, SymbolType::BuiltIn, extension),
+        : TSymbol(id, name, SymbolType::BuiltIn, extension, SymbolClass::Function),
           mParametersVector(nullptr),
           mParameters(parameters),
           mParamCount(paramCount),
           returnType(retType),
           mMangledName(nullptr),
           mOp(op),
           defined(false),
           mHasPrototypeDeclaration(false),
--- a/gfx/angle/checkout/src/compiler/translator/SymbolTable.cpp
+++ b/gfx/angle/checkout/src/compiler/translator/SymbolTable.cpp
@@ -8,59 +8,44 @@
 //
 
 #if defined(_MSC_VER)
 #pragma warning(disable : 4718)
 #endif
 
 #include "compiler/translator/SymbolTable.h"
 
-#include <algorithm>
-#include <set>
-
 #include "angle_gl.h"
 #include "compiler/translator/ImmutableString.h"
 #include "compiler/translator/IntermNode.h"
 #include "compiler/translator/StaticType.h"
 
 namespace sh
 {
 
 class TSymbolTable::TSymbolTableLevel
 {
   public:
-    TSymbolTableLevel() : mGlobalInvariant(false) {}
+    TSymbolTableLevel() {}
 
     bool insert(TSymbol *symbol);
 
     // Insert a function using its unmangled name as the key.
     void insertUnmangled(TFunction *function);
 
     TSymbol *find(const ImmutableString &name) const;
 
-    void addInvariantVarying(const ImmutableString &name) { mInvariantVaryings.insert(name); }
-
-    bool isVaryingInvariant(const ImmutableString &name)
-    {
-        return (mGlobalInvariant || mInvariantVaryings.count(name) > 0);
-    }
-
-    void setGlobalInvariant(bool invariant) { mGlobalInvariant = invariant; }
-
   private:
     using tLevel        = TUnorderedMap<ImmutableString,
                                  TSymbol *,
                                  ImmutableString::FowlerNollVoHash<sizeof(size_t)>>;
     using tLevelPair    = const tLevel::value_type;
     using tInsertResult = std::pair<tLevel::iterator, bool>;
 
     tLevel level;
-
-    std::set<ImmutableString> mInvariantVaryings;
-    bool mGlobalInvariant;
 };
 
 bool TSymbolTable::TSymbolTableLevel::insert(TSymbol *symbol)
 {
     // returning true means symbol was added to the table
     tInsertResult result = level.insert(tLevelPair(symbol->getMangledName(), symbol));
     return result.second;
 }
@@ -75,17 +60,20 @@ TSymbol *TSymbolTable::TSymbolTableLevel
     tLevel::const_iterator it = level.find(name);
     if (it == level.end())
         return nullptr;
     else
         return (*it).second;
 }
 
 TSymbolTable::TSymbolTable()
-    : mUniqueIdCounter(0), mShaderType(GL_FRAGMENT_SHADER), mGlInVariableWithArraySize(nullptr)
+    : mGlobalInvariant(false),
+      mUniqueIdCounter(0),
+      mShaderType(GL_FRAGMENT_SHADER),
+      mGlInVariableWithArraySize(nullptr)
 {
 }
 
 TSymbolTable::~TSymbolTable() = default;
 
 bool TSymbolTable::isEmpty() const
 {
     return mTable.empty();
@@ -163,44 +151,69 @@ const TVariable *TSymbolTable::gl_FragDa
     return mVar_gl_FragData;
 }
 
 const TVariable *TSymbolTable::gl_SecondaryFragDataEXT() const
 {
     return mVar_gl_SecondaryFragDataEXT;
 }
 
-void TSymbolTable::markStaticWrite(const TVariable &variable)
-{
-    int id    = variable.uniqueId().get();
+TSymbolTable::VariableMetadata *TSymbolTable::getOrCreateVariableMetadata(const TVariable &variable) {
+    int id = variable.uniqueId().get();
     auto iter = mVariableMetadata.find(id);
     if (iter == mVariableMetadata.end())
     {
         iter = mVariableMetadata.insert(std::make_pair(id, VariableMetadata())).first;
     }
-    iter->second.staticWrite = true;
+    return &iter->second;
+}
+
+void TSymbolTable::markStaticWrite(const TVariable &variable)
+{
+    auto metadata = getOrCreateVariableMetadata(variable);
+    metadata->staticWrite = true;
 }
 
 void TSymbolTable::markStaticRead(const TVariable &variable)
 {
-    int id    = variable.uniqueId().get();
-    auto iter = mVariableMetadata.find(id);
-    if (iter == mVariableMetadata.end())
-    {
-        iter = mVariableMetadata.insert(std::make_pair(id, VariableMetadata())).first;
-    }
-    iter->second.staticRead = true;
+    auto metadata = getOrCreateVariableMetadata(variable);
+    metadata->staticRead = true;
 }
 
 bool TSymbolTable::isStaticallyUsed(const TVariable &variable) const
 {
     ASSERT(!variable.getConstPointer());
     int id    = variable.uniqueId().get();
     auto iter = mVariableMetadata.find(id);
-    return iter != mVariableMetadata.end();
+    return iter != mVariableMetadata.end() && (iter->second.staticRead || iter->second.staticWrite);
+}
+
+void TSymbolTable::addInvariantVarying(const TVariable &variable)
+{
+    ASSERT(atGlobalLevel());
+    auto metadata = getOrCreateVariableMetadata(variable);
+    metadata->invariant = true;
+}
+
+bool TSymbolTable::isVaryingInvariant(const TVariable &variable) const
+{
+    ASSERT(atGlobalLevel());
+    if (mGlobalInvariant)
+    {
+        return true;
+    }
+    int id = variable.uniqueId().get();
+    auto iter = mVariableMetadata.find(id);
+    return iter != mVariableMetadata.end() && iter->second.invariant;
+}
+
+void TSymbolTable::setGlobalInvariant(bool invariant)
+{
+    ASSERT(atGlobalLevel());
+    mGlobalInvariant = invariant;
 }
 
 const TSymbol *TSymbolTable::find(const ImmutableString &name, int shaderVersion) const
 {
     int userDefinedLevel = static_cast<int>(mTable.size()) - 1;
     while (userDefinedLevel >= 0)
     {
         const TSymbol *symbol = mTable[userDefinedLevel]->find(name);
@@ -273,36 +286,19 @@ TPrecision TSymbolTable::getDefaultPreci
             prec = (*it).second;
             break;
         }
         level--;
     }
     return prec;
 }
 
-void TSymbolTable::addInvariantVarying(const ImmutableString &originalName)
-{
-    ASSERT(atGlobalLevel());
-    mTable.back()->addInvariantVarying(originalName);
-}
-
-bool TSymbolTable::isVaryingInvariant(const ImmutableString &originalName) const
-{
-    ASSERT(atGlobalLevel());
-    return mTable.back()->isVaryingInvariant(originalName);
-}
-
-void TSymbolTable::setGlobalInvariant(bool invariant)
-{
-    ASSERT(atGlobalLevel());
-    mTable.back()->setGlobalInvariant(invariant);
-}
-
 void TSymbolTable::clearCompilationResults()
 {
+    mGlobalInvariant = false;
     mUniqueIdCounter = kLastBuiltInId + 1;
     mVariableMetadata.clear();
     mGlInVariableWithArraySize = nullptr;
 
     // User-defined scopes should have already been cleared when the compilation finished.
     ASSERT(mTable.size() == 0u);
 }
 
@@ -355,13 +351,13 @@ void TSymbolTable::initializeBuiltIns(sh
 }
 
 void TSymbolTable::initSamplerDefaultPrecision(TBasicType samplerType)
 {
     ASSERT(samplerType >= EbtGuardSamplerBegin && samplerType <= EbtGuardSamplerEnd);
     setDefaultPrecision(samplerType, EbpLow);
 }
 
-TSymbolTable::VariableMetadata::VariableMetadata() : staticRead(false), staticWrite(false)
+TSymbolTable::VariableMetadata::VariableMetadata() : staticRead(false), staticWrite(false), invariant(false)
 {
 }
 
 }  // namespace sh
--- a/gfx/angle/checkout/src/compiler/translator/SymbolTable.h
+++ b/gfx/angle/checkout/src/compiler/translator/SymbolTable.h
@@ -26,16 +26,17 @@
 //   in the symbol table.  The parser can substitute constants at parse
 //   time, including doing constant folding and constant propagation.
 //
 // * No temporaries:  Temporaries made from operations (+, --, .xy, etc.)
 //   are tracked in the intermediate representation, not the symbol table.
 //
 
 #include <memory>
+#include <set>
 
 #include "common/angleutils.h"
 #include "compiler/translator/ExtensionBehavior.h"
 #include "compiler/translator/ImmutableString.h"
 #include "compiler/translator/InfoSink.h"
 #include "compiler/translator/IntermNode.h"
 #include "compiler/translator/Symbol.h"
 #include "compiler/translator/SymbolTable_autogen.h"
@@ -112,74 +113,76 @@ class TSymbolTable : angle::NonCopyable,
     const TSymbol *findBuiltIn(const ImmutableString &name, int shaderVersion) const;
 
     void setDefaultPrecision(TBasicType type, TPrecision prec);
 
     // Searches down the precisionStack for a precision qualifier
     // for the specified TBasicType
     TPrecision getDefaultPrecision(TBasicType type) const;
 
-    // This records invariant varyings declared through
-    // "invariant varying_name;".
-    void addInvariantVarying(const ImmutableString &originalName);
+    // This records invariant varyings declared through "invariant varying_name;".
+    void addInvariantVarying(const TVariable &variable);
 
-    // If this returns false, the varying could still be invariant
-    // if it is set as invariant during the varying variable
-    // declaration - this piece of information is stored in the
-    // variable's type, not here.
-    bool isVaryingInvariant(const ImmutableString &originalName) const;
+    // If this returns false, the varying could still be invariant if it is set as invariant during the varying variable declaration - this piece of information is stored in the variable's type, not here.
+    bool isVaryingInvariant(const TVariable &variable) const;
 
     void setGlobalInvariant(bool invariant);
 
     const TSymbolUniqueId nextUniqueId() { return TSymbolUniqueId(this); }
 
     // Gets the built-in accessible by a shader with the specified version, if any.
     const UnmangledBuiltIn *getUnmangledBuiltInForShaderVersion(const ImmutableString &name,
                                                                 int shaderVersion);
 
     void initializeBuiltIns(sh::GLenum type,
                             ShShaderSpec spec,
                             const ShBuiltInResources &resources);
     void clearCompilationResults();
 
   private:
     friend class TSymbolUniqueId;
+
+    struct VariableMetadata
+    {
+        VariableMetadata();
+        bool staticRead;
+        bool staticWrite;
+        bool invariant;
+    };
+
     int nextUniqueIdValue();
 
     class TSymbolTableLevel;
 
     TFunction *findUserDefinedFunction(const ImmutableString &name) const;
 
     void initSamplerDefaultPrecision(TBasicType samplerType);
 
     void initializeBuiltInVariables(sh::GLenum shaderType,
                                     ShShaderSpec spec,
                                     const ShBuiltInResources &resources);
 
+    VariableMetadata *getOrCreateVariableMetadata(const TVariable &variable);
+
     std::vector<std::unique_ptr<TSymbolTableLevel>> mTable;
 
     // There's one precision stack level for predefined precisions and then one level for each scope
     // in table.
     typedef TMap<TBasicType, TPrecision> PrecisionStackLevel;
     std::vector<std::unique_ptr<PrecisionStackLevel>> mPrecisionStack;
 
+    bool mGlobalInvariant;
+
     int mUniqueIdCounter;
 
     static const int kLastBuiltInId;
 
     sh::GLenum mShaderType;
     ShBuiltInResources mResources;
 
-    struct VariableMetadata
-    {
-        VariableMetadata();
-        bool staticRead;
-        bool staticWrite;
-    };
-
     // Indexed by unique id. Map instead of vector since the variables are fairly sparse.
     std::map<int, VariableMetadata> mVariableMetadata;
 
     // Store gl_in variable with its array size once the array size can be determined. The array
     // size can also be checked against latter input primitive type declaration.
     TVariable *mGlInVariableWithArraySize;
 };
 
--- a/gfx/angle/checkout/src/compiler/translator/glslang.l
+++ b/gfx/angle/checkout/src/compiler/translator/glslang.l
@@ -61,16 +61,17 @@ using namespace sh;
 
 // Workaround for flex using the register keyword, deprecated in C++11.
 #ifdef __cplusplus
 #if __cplusplus > 199711L
 #define register
 #endif
 #endif
 
+#define YY_NO_INPUT
 #define YY_USER_ACTION                                 \
     yylloc->first_file = yylloc->last_file = yycolumn; \
     yylloc->first_line = yylloc->last_line = yylineno;
 
 #define YY_INPUT(buf, result, max_size) \
     result = string_input(buf, max_size, yyscanner);
 
 static yy_size_t string_input(char* buf, yy_size_t max_size, yyscan_t yyscanner);
@@ -420,19 +421,19 @@ 0{O}+[uU]         { return uint_constant
 
 [ \t\v\n\f\r] { }
 <*><<EOF>>    { yyterminate(); }
 <*>.          { assert(false); return 0; }
 
 %%
 
 yy_size_t string_input(char* buf, yy_size_t max_size, yyscan_t yyscanner) {
-    pp::Token token;
+    angle::pp::Token token;
     yyget_extra(yyscanner)->getPreprocessor().lex(&token);
-    yy_size_t len = token.type == pp::Token::LAST ? 0 : token.text.size();
+    yy_size_t len = token.type == angle::pp::Token::LAST ? 0 : token.text.size();
     if (len < max_size)
         memcpy(buf, token.text.c_str(), len);
     yyset_column(token.location.file, yyscanner);
     yyset_lineno(token.location.line, yyscanner);
 
     if (len >= max_size)
         YY_FATAL_ERROR("Input buffer overflow");
     else if (len > 0)
@@ -674,17 +675,17 @@ int glslang_finalize(TParseContext* cont
 
 int glslang_scan(size_t count, const char* const string[], const int length[],
                  TParseContext* context) {
     yyrestart(NULL, context->getScanner());
     yyset_column(0, context->getScanner());
     yyset_lineno(1, context->getScanner());
 
     // Initialize preprocessor.
-    pp::Preprocessor *preprocessor = &context->getPreprocessor();
+    angle::pp::Preprocessor *preprocessor = &context->getPreprocessor();
 
     if (!preprocessor->init(count, string, length))
         return 1;
 
     // Define extension macros.
     const TExtensionBehavior& extBehavior = context->extensionBehavior();
     for (TExtensionBehavior::const_iterator iter = extBehavior.begin();
          iter != extBehavior.end(); ++iter) {
--- a/gfx/angle/checkout/src/compiler/translator/glslang_lex.cpp
+++ b/gfx/angle/checkout/src/compiler/translator/glslang_lex.cpp
@@ -1200,16 +1200,17 @@ using namespace sh;
 
 // Workaround for flex using the register keyword, deprecated in C++11.
 #ifdef __cplusplus
 #if __cplusplus > 199711L
 #define register
 #endif
 #endif
 
+#define YY_NO_INPUT
 #define YY_USER_ACTION                                 \
     yylloc->first_file = yylloc->last_file = yycolumn; \
     yylloc->first_line = yylloc->last_line = yylineno;
 
 #define YY_INPUT(buf, result, max_size) \
     result = string_input(buf, max_size, yyscanner);
 
 static yy_size_t string_input(char* buf, yy_size_t max_size, yyscan_t yyscanner);
@@ -3776,19 +3777,19 @@ void yyfree (void * ptr , yyscan_t yysca
 
 
 
 
 
 
 
 yy_size_t string_input(char* buf, yy_size_t max_size, yyscan_t yyscanner) {
-    pp::Token token;
+    angle::pp::Token token;
     yyget_extra(yyscanner)->getPreprocessor().lex(&token);
-    yy_size_t len = token.type == pp::Token::LAST ? 0 : token.text.size();
+    yy_size_t len = token.type == angle::pp::Token::LAST ? 0 : token.text.size();
     if (len < max_size)
         memcpy(buf, token.text.c_str(), len);
     yyset_column(token.location.file, yyscanner);
     yyset_lineno(token.location.line, yyscanner);
 
     if (len >= max_size)
         YY_FATAL_ERROR("Input buffer overflow");
     else if (len > 0)
@@ -4030,17 +4031,17 @@ int glslang_finalize(TParseContext* cont
 
 int glslang_scan(size_t count, const char* const string[], const int length[],
                  TParseContext* context) {
     yyrestart(NULL, context->getScanner());
     yyset_column(0, context->getScanner());
     yyset_lineno(1, context->getScanner());
 
     // Initialize preprocessor.
-    pp::Preprocessor *preprocessor = &context->getPreprocessor();
+    angle::pp::Preprocessor *preprocessor = &context->getPreprocessor();
 
     if (!preprocessor->init(count, string, length))
         return 1;
 
     // Define extension macros.
     const TExtensionBehavior& extBehavior = context->extensionBehavior();
     for (TExtensionBehavior::const_iterator iter = extBehavior.begin();
          iter != extBehavior.end(); ++iter) {
new file mode 100644
--- /dev/null
+++ b/gfx/angle/checkout/src/compiler/translator/tree_ops/RewriteRepeatedAssignToSwizzled.cpp
@@ -0,0 +1,93 @@
+//
+// Copyright (c) 2018 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// RewriteRepeatedAssignToSwizzled.cpp: Rewrite expressions that assign an assignment to a swizzled
+// vector, like:
+//     v.x = z = expression;
+// to:
+//     z = expression;
+//     v.x = z;
+//
+// Note that this doesn't handle some corner cases: expressions nested inside other expressions,
+// inside loop headers, or inside if conditions.
+
+#include "compiler/translator/tree_ops/RewriteRepeatedAssignToSwizzled.h"
+
+#include "compiler/translator/tree_util/IntermNode_util.h"
+#include "compiler/translator/tree_util/IntermTraverse.h"
+
+namespace sh
+{
+
+namespace
+{
+
+class RewriteAssignToSwizzledTraverser : public TIntermTraverser
+{
+  public:
+    static void rewrite(TIntermBlock *root);
+
+  private:
+    RewriteAssignToSwizzledTraverser();
+
+    bool visitBinary(Visit, TIntermBinary *node) override;
+
+    void nextIteration();
+
+    bool didRewrite() { return mDidRewrite; }
+
+    bool mDidRewrite;
+};
+
+// static
+void RewriteAssignToSwizzledTraverser::rewrite(TIntermBlock *root)
+{
+    RewriteAssignToSwizzledTraverser rewrite;
+    do
+    {
+        rewrite.nextIteration();
+        root->traverse(&rewrite);
+        rewrite.updateTree();
+    } while (rewrite.didRewrite());
+}
+
+RewriteAssignToSwizzledTraverser::RewriteAssignToSwizzledTraverser()
+    : TIntermTraverser(true, false, false), mDidRewrite(false)
+{
+}
+
+void RewriteAssignToSwizzledTraverser::nextIteration()
+{
+    mDidRewrite = false;
+}
+
+bool RewriteAssignToSwizzledTraverser::visitBinary(Visit, TIntermBinary *node)
+{
+    TIntermBinary *rightBinary = node->getRight()->getAsBinaryNode();
+    TIntermBlock *parentBlock  = getParentNode()->getAsBlock();
+    if (parentBlock && node->isAssignment() && node->getLeft()->getAsSwizzleNode() && rightBinary &&
+        rightBinary->isAssignment())
+    {
+        TIntermSequence replacements;
+        replacements.push_back(rightBinary);
+        TIntermTyped *rightAssignmentTargetCopy = rightBinary->getLeft()->deepCopy();
+        TIntermBinary *lastAssign =
+            new TIntermBinary(EOpAssign, node->getLeft(), rightAssignmentTargetCopy);
+        replacements.push_back(lastAssign);
+        mMultiReplacements.push_back(NodeReplaceWithMultipleEntry(parentBlock, node, replacements));
+        mDidRewrite = true;
+        return false;
+    }
+    return true;
+}
+
+}  // anonymous namespace
+
+void RewriteRepeatedAssignToSwizzled(TIntermBlock *root)
+{
+    RewriteAssignToSwizzledTraverser::rewrite(root);
+}
+
+}  // namespace sh
new file mode 100644
--- /dev/null
+++ b/gfx/angle/checkout/src/compiler/translator/tree_ops/RewriteRepeatedAssignToSwizzled.h
@@ -0,0 +1,28 @@
+//
+// Copyright (c) 2018 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// RewriteRepeatedAssignToSwizzled.h: Rewrite expressions that assign an assignment to a swizzled
+// vector, like:
+//     v.x = z = expression;
+// to:
+//     z = expression;
+//     v.x = z;
+//
+// Note that this doesn't handle some corner cases: expressions nested inside other expressions,
+// inside loop headers, or inside if conditions.
+
+#ifndef COMPILER_TRANSLATOR_TREEOPS_REWRITEREPEATEDASSIGNTOSWIZZLED_H_
+#define COMPILER_TRANSLATOR_TREEOPS_REWRITEREPEATEDASSIGNTOSWIZZLED_H_
+
+namespace sh
+{
+
+class TIntermBlock;
+
+void RewriteRepeatedAssignToSwizzled(TIntermBlock *root);
+
+}  // namespace sh
+
+#endif  // COMPILER_TRANSLATOR_TREEOPS_REWRITEREPEATEDASSIGNTOSWIZZLED_H_
--- a/gfx/angle/checkout/src/compiler/translator/tree_util/IntermTraverse.h
+++ b/gfx/angle/checkout/src/compiler/translator/tree_util/IntermTraverse.h
@@ -28,16 +28,19 @@ enum Visit
 // and then pass an object of the subclass to a traverse method of a node.
 //
 // The traverse*() functions may also be overridden to do other bookkeeping on the tree to provide
 // contextual information to the visit functions, such as whether the node is the target of an
 // assignment. This is complex to maintain and so should only be done in special cases.
 //
 // When using this, just fill in the methods for nodes you want visited.
 // Return false from a pre-visit to skip visiting that node's subtree.
+//
+// See also how to write AST transformations documentation:
+//   https://github.com/google/angle/blob/master/doc/WritingShaderASTTransformations.md
 class TIntermTraverser : angle::NonCopyable
 {
   public:
     POOL_ALLOCATOR_NEW_DELETE();
     TIntermTraverser(bool preVisit,
                      bool inVisit,
                      bool postVisit,
                      TSymbolTable *symbolTable = nullptr);
--- a/gfx/angle/checkout/src/compiler/translator/util.cpp
+++ b/gfx/angle/checkout/src/compiler/translator/util.cpp
@@ -9,17 +9,17 @@
 #include <limits>
 
 #include "common/utilities.h"
 #include "compiler/preprocessor/numeric_lex.h"
 #include "compiler/translator/SymbolTable.h"
 
 bool atoi_clamp(const char *str, unsigned int *value)
 {
-    bool success = pp::numeric_lex_int(str, value);
+    bool success = angle::pp::numeric_lex_int(str, value);
     if (!success)
         *value = std::numeric_limits<unsigned int>::max();
     return success;
 }
 
 namespace sh
 {
 
@@ -179,17 +179,17 @@ float NumericLexFloat32OutOfRangeToInfin
         return 0.0f;
     }
     return static_cast<float>(value);
 }
 
 bool strtof_clamp(const std::string &str, float *value)
 {
     // Try the standard float parsing path first.
-    bool success = pp::numeric_lex_float(str, value);
+    bool success = angle::pp::numeric_lex_float(str, value);
 
     // If the standard path doesn't succeed, take the path that can handle the following corner
     // cases:
     //   1. The decimal mantissa is very small but the exponent is very large, putting the resulting
     //   number inside the float range.
     //   2. The decimal mantissa is very large but the exponent is very small, putting the resulting
     //   number inside the float range.
     //   3. The value is out-of-range and should be evaluated as infinity.
--- a/gfx/angle/checkout/src/gpu_info_util/SystemInfo.h
+++ b/gfx/angle/checkout/src/gpu_info_util/SystemInfo.h
@@ -14,21 +14,16 @@
 #include <vector>
 
 namespace angle
 {
 
 using VendorID = uint32_t;
 using DeviceID = uint32_t;
 
-constexpr VendorID kVendorID_AMD      = 0x1002;
-constexpr VendorID kVendorID_Intel    = 0x8086;
-constexpr VendorID kVendorID_Nvidia   = 0x10DE;
-constexpr VendorID kVendorID_Qualcomm = 0x5143;
-
 struct GPUDeviceInfo
 {
     GPUDeviceInfo();
     ~GPUDeviceInfo();
 
     GPUDeviceInfo(const GPUDeviceInfo &other);
 
     VendorID vendorId = 0;
@@ -42,32 +37,47 @@ struct GPUDeviceInfo
 struct SystemInfo
 {
     SystemInfo();
     ~SystemInfo();
 
     SystemInfo(const SystemInfo &other);
 
     std::vector<GPUDeviceInfo> gpus;
+
+    // Index of the primary GPU (the discrete one on dual GPU systems) in `gpus`.
+    // Will never be -1 after a successful GetSystemInfo.
     int primaryGPUIndex = -1;
+    // Index of the currently active GPU in `gpus`, can be -1 if the active GPU could not be
+    // detected.
     int activeGPUIndex  = -1;
 
     bool isOptimus       = false;
     bool isAMDSwitchable = false;
 
     // Only available on macOS
     std::string machineModelName;
     std::string machineModelVersion;
 
     // Only available on Windows, set even on failure.
     std::string primaryDisplayDeviceId;
 };
 
+// Gathers information about the system without starting a GPU driver and returns them in `info`.
+// Returns true if all info was gathered, false otherwise. Even when false is returned, `info` will
+// be filled with partial information.
 bool GetSystemInfo(SystemInfo *info);
 
+// Known PCI vendor IDs
+constexpr VendorID kVendorID_AMD      = 0x1002;
+constexpr VendorID kVendorID_Intel    = 0x8086;
+constexpr VendorID kVendorID_Nvidia   = 0x10DE;
+constexpr VendorID kVendorID_Qualcomm = 0x5143;
+
+// Predicates on vendor IDs
 bool IsAMD(VendorID vendorId);
 bool IsIntel(VendorID vendorId);
 bool IsNvidia(VendorID vendorId);
 bool IsQualcomm(VendorID vendorId);
 
 }  // namespace angle
 
 #endif  // GPU_INFO_UTIL_SYSTEM_INFO_H_
--- a/gfx/angle/checkout/src/libANGLE/AttributeMap.h
+++ b/gfx/angle/checkout/src/libANGLE/AttributeMap.h
@@ -2,16 +2,17 @@
 // Copyright (c) 2014 The ANGLE Project Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
 
 #ifndef LIBANGLE_ATTRIBUTEMAP_H_
 #define LIBANGLE_ATTRIBUTEMAP_H_
 
+#include "libANGLE/PackedEnums.h"
 
 #include <EGL/egl.h>
 
 #include <map>
 #include <vector>
 
 namespace egl
 {
@@ -20,20 +21,37 @@ class AttributeMap final
 {
   public:
     AttributeMap();
     AttributeMap(const AttributeMap &other);
     ~AttributeMap();
 
     void insert(EGLAttrib key, EGLAttrib value);
     bool contains(EGLAttrib key) const;
+
     EGLAttrib get(EGLAttrib key) const;
     EGLAttrib get(EGLAttrib key, EGLAttrib defaultValue) const;
     EGLint getAsInt(EGLAttrib key) const;
     EGLint getAsInt(EGLAttrib key, EGLint defaultValue) const;
+
+    template <typename PackedEnumT>
+    PackedEnumT getAsPackedEnum(EGLAttrib key) const
+    {
+        return FromEGLenum<PackedEnumT>(static_cast<EGLenum>(get(key)));
+    }
+
+    template <typename PackedEnumT>
+    PackedEnumT getAsPackedEnum(EGLAttrib key, PackedEnumT defaultValue) const
+    {
+        auto iter = mAttributes.find(key);
+        return (mAttributes.find(key) != mAttributes.end())
+                   ? FromEGLenum<PackedEnumT>(static_cast<EGLenum>(iter->second))
+                   : defaultValue;
+    }
+
     bool isEmpty() const;
     std::vector<EGLint> toIntVector() const;
 
     typedef std::map<EGLAttrib, EGLAttrib>::const_iterator const_iterator;
 
     const_iterator begin() const;
     const_iterator end() const;
 
--- a/gfx/angle/checkout/src/libANGLE/Buffer.cpp
+++ b/gfx/angle/checkout/src/libANGLE/Buffer.cpp
@@ -83,18 +83,18 @@ Error Buffer::bufferData(const Context *
     }
 
     ANGLE_TRY(mImpl->setData(context, target, dataForImpl, size, usage));
 
     mIndexRangeCache.clear();
     mState.mUsage = usage;
     mState.mSize  = size;
 
-    // Notify when data changes.
-    mImpl->onStateChange(context, angle::SubjectMessage::CONTENTS_CHANGED);
+    // Notify when storage changes.
+    mImpl->onStateChange(context, angle::SubjectMessage::STORAGE_CHANGED);
 
     return NoError();
 }
 
 Error Buffer::bufferSubData(const Context *context,
                             BufferBinding target,
                             const void *data,
                             GLsizeiptr size,
@@ -238,20 +238,22 @@ bool Buffer::isBound() const
 }
 
 bool Buffer::isBoundForTransformFeedbackAndOtherUse() const
 {
     return mState.mTransformFeedbackBindingCount > 0 &&
            mState.mTransformFeedbackBindingCount != mState.mBindingCount;
 }
 
-void Buffer::onBindingChanged(bool bound, BufferBinding target)
+void Buffer::onBindingChanged(const Context *context, bool bound, BufferBinding target)
 {
     ASSERT(bound || mState.mBindingCount > 0);
     mState.mBindingCount += bound ? 1 : -1;
     if (target == BufferBinding::TransformFeedback)
     {
         ASSERT(bound || mState.mTransformFeedbackBindingCount > 0);
         mState.mTransformFeedbackBindingCount += bound ? 1 : -1;
+
+        mImpl->onStateChange(context, angle::SubjectMessage::BINDING_CHANGED);
     }
 }
 
 }  // namespace gl
--- a/gfx/angle/checkout/src/libANGLE/Buffer.h
+++ b/gfx/angle/checkout/src/libANGLE/Buffer.h
@@ -10,17 +10,17 @@
 
 #ifndef LIBANGLE_BUFFER_H_
 #define LIBANGLE_BUFFER_H_
 
 #include "common/angleutils.h"
 #include "libANGLE/Debug.h"
 #include "libANGLE/Error.h"
 #include "libANGLE/IndexRangeCache.h"
-#include "libANGLE/PackedGLEnums.h"
+#include "libANGLE/PackedEnums.h"
 #include "libANGLE/RefCountObject.h"
 
 namespace rx
 {
 class BufferImpl;
 class GLImplFactory;
 };
 
@@ -111,17 +111,17 @@ class Buffer final : public RefCountObje
     GLint64 getMapOffset() const { return mState.mMapOffset; }
     GLint64 getMapLength() const { return mState.mMapLength; }
     GLint64 getSize() const { return mState.mSize; }
 
     rx::BufferImpl *getImplementation() const { return mImpl; }
 
     bool isBound() const;
     bool isBoundForTransformFeedbackAndOtherUse() const;
-    void onBindingChanged(bool bound, BufferBinding target);
+    void onBindingChanged(const Context *context, bool bound, BufferBinding target);
 
   private:
     BufferState mState;
     rx::BufferImpl *mImpl;
 
     mutable IndexRangeCache mIndexRangeCache;
 };
 
--- a/gfx/angle/checkout/src/libANGLE/Caps.cpp
+++ b/gfx/angle/checkout/src/libANGLE/Caps.cpp
@@ -155,16 +155,26 @@ Extensions::Extensions()
       textureRG(false),
       textureCompressionDXT1(false),
       textureCompressionDXT3(false),
       textureCompressionDXT5(false),
       textureCompressionS3TCsRGB(false),
       textureCompressionASTCHDR(false),
       textureCompressionASTCLDR(false),
       compressedETC1RGB8Texture(false),
+      compressedETC2RGB8Texture(false),
+      compressedETC2sRGB8Texture(false),
+      compressedETC2PunchthroughARGB8Texture(false),
+      compressedETC2PunchthroughAsRGB8AlphaTexture(false),
+      compressedETC2RGBA8Texture(false),
+      compressedETC2sRGB8Alpha8Texture(false),
+      compressedEACR11UnsignedTexture(false),
+      compressedEACR11SignedTexture(false),
+      compressedEACRG11UnsignedTexture(false),
+      compressedEACRG11SignedTexture(false),
       sRGB(false),
       depthTextures(false),
       depth32(false),
       textureStorage(false),
       textureNPOT(false),
       drawBuffers(false),
       textureFilterAnisotropic(false),
       maxTextureAnisotropy(0.0f),
@@ -221,17 +231,21 @@ Extensions::Extensions()
       framebufferMixedSamples(false),
       textureNorm16(false),
       pathRendering(false),
       surfacelessContext(false),
       clientArrays(false),
       robustResourceInitialization(false),
       programCacheControl(false),
       textureRectangle(false),
-      geometryShader(false)
+      geometryShader(false),
+      pointSizeArray(false),
+      textureCubeMap(false),
+      explicitContextGles1(false),
+      explicitContext(false)
 {
 }
 
 std::vector<std::string> Extensions::getStrings() const
 {
     std::vector<std::string> extensionStrings;
 
     for (const auto &extensionInfo : GetExtensionInfoMap())
@@ -485,16 +499,116 @@ static bool DetermineETC1RGB8TextureSupp
 {
     constexpr GLenum requiredFormats[] = {
         GL_ETC1_RGB8_OES,
     };
 
     return GetFormatSupport(textureCaps, requiredFormats, true, true, false);
 }
 
+// Check for OES_compressed_ETC2_RGB8_texture
+static bool DetermineETC2RGB8TextureSupport(const TextureCapsMap &textureCaps)
+{
+    constexpr GLenum requiredFormats[] = {
+        GL_COMPRESSED_RGB8_ETC2,
+    };
+
+    return GetFormatSupport(textureCaps, requiredFormats, true, true, false);
+}
+
+// Check for OES_compressed_ETC2_sRGB8_texture
+static bool DetermineETC2sRGB8TextureSupport(const TextureCapsMap &textureCaps)
+{
+    constexpr GLenum requiredFormats[] = {
+        GL_COMPRESSED_SRGB8_ETC2,
+    };
+
+    return GetFormatSupport(textureCaps, requiredFormats, true, true, false);
+}
+
+// Check for OES_compressed_ETC2_punchthroughA_RGBA8_texture
+static bool DetermineETC2PunchthroughARGB8TextureSupport(const TextureCapsMap &textureCaps)
+{
+    constexpr GLenum requiredFormats[] = {
+        GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,
+    };
+
+    return GetFormatSupport(textureCaps, requiredFormats, true, true, false);
+}
+
+// Check for OES_compressed_ETC2_punchthroughA_sRGB8_alpha_texture
+static bool DetermineETC2PunchthroughAsRGB8AlphaTextureSupport(const TextureCapsMap &textureCaps)
+{
+    constexpr GLenum requiredFormats[] = {
+        GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,
+    };
+
+    return GetFormatSupport(textureCaps, requiredFormats, true, true, false);
+}
+
+// Check for OES_compressed_ETC2_RGBA8_texture
+static bool DetermineETC2RGBA8TextureSupport(const TextureCapsMap &textureCaps)
+{
+    constexpr GLenum requiredFormats[] = {
+        GL_COMPRESSED_RGBA8_ETC2_EAC,
+    };
+
+    return GetFormatSupport(textureCaps, requiredFormats, true, true, false);
+}
+
+// Check for OES_compressed_ETC2_sRGB8_alpha8_texture
+static bool DetermineETC2sRGB8Alpha8TextureSupport(const TextureCapsMap &textureCaps)
+{
+    constexpr GLenum requiredFormats[] = {
+        GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,
+    };
+
+    return GetFormatSupport(textureCaps, requiredFormats, true, true, false);
+}
+
+// Check for OES_compressed_EAC_R11_unsigned_texture
+static bool DetermineEACR11UnsignedTextureSupport(const TextureCapsMap &textureCaps)
+{
+    constexpr GLenum requiredFormats[] = {
+        GL_COMPRESSED_R11_EAC,
+    };
+
+    return GetFormatSupport(textureCaps, requiredFormats, true, true, false);
+}
+
+// Check for OES_compressed_EAC_R11_signed_texture
+static bool DetermineEACR11SignedTextureSupport(const TextureCapsMap &textureCaps)
+{
+    constexpr GLenum requiredFormats[] = {
+        GL_COMPRESSED_SIGNED_R11_EAC,
+    };
+
+    return GetFormatSupport(textureCaps, requiredFormats, true, true, false);
+}
+
+// Check for OES_compressed_EAC_RG11_unsigned_texture
+static bool DetermineEACRG11UnsignedTextureSupport(const TextureCapsMap &textureCaps)
+{
+    constexpr GLenum requiredFormats[] = {
+        GL_COMPRESSED_RG11_EAC,
+    };
+
+    return GetFormatSupport(textureCaps, requiredFormats, true, true, false);
+}
+
+// Check for OES_compressed_EAC_RG11_signed_texture
+static bool DetermineEACRG11SignedTextureSupport(const TextureCapsMap &textureCaps)
+{
+    constexpr GLenum requiredFormats[] = {
+        GL_COMPRESSED_SIGNED_RG11_EAC,
+    };
+
+    return GetFormatSupport(textureCaps, requiredFormats, true, true, false);
+}
+
 // Check for GL_ANGLE_texture_compression_dxt5
 static bool DetermineSRGBTextureSupport(const TextureCapsMap &textureCaps)
 {
     constexpr GLenum requiredFilterFormats[] = {
         GL_SRGB8, GL_SRGB8_ALPHA8,
     };
 
     constexpr GLenum requiredRenderFormats[] = {
@@ -584,16 +698,28 @@ void Extensions::setTextureExtensionSupp
     textureRG              = DetermineRGTextureSupport(textureCaps, textureHalfFloat, textureFloat);
     textureCompressionDXT1 = DetermineDXT1TextureSupport(textureCaps);
     textureCompressionDXT3 = DetermineDXT3TextureSupport(textureCaps);
     textureCompressionDXT5 = DetermineDXT5TextureSupport(textureCaps);
     textureCompressionS3TCsRGB = DetermineS3TCsRGBTextureSupport(textureCaps);
     textureCompressionASTCHDR  = DetermineASTCTextureSupport(textureCaps);
     textureCompressionASTCLDR  = textureCompressionASTCHDR;
     compressedETC1RGB8Texture  = DetermineETC1RGB8TextureSupport(textureCaps);
+    compressedETC2RGB8Texture  = DetermineETC2RGB8TextureSupport(textureCaps);
+    compressedETC2sRGB8Texture = DetermineETC2sRGB8TextureSupport(textureCaps);
+    compressedETC2PunchthroughARGB8Texture =
+        DetermineETC2PunchthroughARGB8TextureSupport(textureCaps);
+    compressedETC2PunchthroughAsRGB8AlphaTexture =
+        DetermineETC2PunchthroughAsRGB8AlphaTextureSupport(textureCaps);
+    compressedETC2RGBA8Texture       = DetermineETC2RGBA8TextureSupport(textureCaps);
+    compressedETC2sRGB8Alpha8Texture = DetermineETC2sRGB8Alpha8TextureSupport(textureCaps);
+    compressedEACR11UnsignedTexture  = DetermineEACR11UnsignedTextureSupport(textureCaps);
+    compressedEACR11SignedTexture    = DetermineEACR11SignedTextureSupport(textureCaps);
+    compressedEACRG11UnsignedTexture = DetermineEACRG11UnsignedTextureSupport(textureCaps);
+    compressedEACRG11SignedTexture   = DetermineEACRG11SignedTextureSupport(textureCaps);
     sRGB                       = DetermineSRGBTextureSupport(textureCaps);
     depthTextures              = DetermineDepthTextureSupport(textureCaps);
     depth32                    = DetermineDepth32Support(textureCaps);
     colorBufferFloatRGB        = DetermineColorBufferFloatRGBSupport(textureCaps);
     colorBufferFloatRGBA       = DetermineColorBufferFloatRGBASupport(textureCaps);
     colorBufferFloat           = DetermineColorBufferFloatSupport(textureCaps);
     textureNorm16              = DetermineTextureNorm16Support(textureCaps);
 }
@@ -633,20 +759,30 @@ const ExtensionInfoMap &GetExtensionInfo
         map["GL_EXT_texture_rg"] = enableableExtension(&Extensions::textureRG);
         map["GL_EXT_texture_compression_dxt1"] = enableableExtension(&Extensions::textureCompressionDXT1);
         map["GL_ANGLE_texture_compression_dxt3"] = enableableExtension(&Extensions::textureCompressionDXT3);
         map["GL_ANGLE_texture_compression_dxt5"] = enableableExtension(&Extensions::textureCompressionDXT5);
         map["GL_EXT_texture_compression_s3tc_srgb"] = enableableExtension(&Extensions::textureCompressionS3TCsRGB);
         map["GL_KHR_texture_compression_astc_hdr"] = enableableExtension(&Extensions::textureCompressionASTCHDR);
         map["GL_KHR_texture_compression_astc_ldr"] = enableableExtension(&Extensions::textureCompressionASTCLDR);
         map["GL_OES_compressed_ETC1_RGB8_texture"] = enableableExtension(&Extensions::compressedETC1RGB8Texture);
+        map["OES_compressed_ETC2_RGB8_texture"] = enableableExtension(&Extensions::compressedETC2RGB8Texture);
+        map["OES_compressed_ETC2_sRGB8_texture"] = enableableExtension(&Extensions::compressedETC2sRGB8Texture);
+        map["OES_compressed_ETC2_punchthroughA_RGBA8_texture"] = enableableExtension(&Extensions::compressedETC2PunchthroughARGB8Texture);
+        map["OES_compressed_ETC2_punchthroughA_sRGB8_alpha_texture"] = enableableExtension(&Extensions::compressedETC2PunchthroughAsRGB8AlphaTexture);
+        map["OES_compressed_ETC2_RGBA8_texture"] = enableableExtension(&Extensions::compressedETC2RGBA8Texture);
+        map["OES_compressed_ETC2_sRGB8_alpha8_texture"] = enableableExtension(&Extensions::compressedETC2sRGB8Alpha8Texture);
+        map["OES_compressed_EAC_R11_unsigned_texture"] = enableableExtension(&Extensions::compressedEACR11UnsignedTexture);
+        map["OES_compressed_EAC_R11_signed_texture"] = enableableExtension(&Extensions::compressedEACR11SignedTexture);
+        map["OES_compressed_EAC_RG11_unsigned_texture"] = enableableExtension(&Extensions::compressedEACRG11UnsignedTexture);
+        map["OES_compressed_EAC_RG11_signed_texture"] = enableableExtension(&Extensions::compressedEACRG11SignedTexture);
         map["GL_EXT_sRGB"] = enableableExtension(&Extensions::sRGB);
         map["GL_ANGLE_depth_texture"] = esOnlyExtension(&Extensions::depthTextures);
         map["GL_OES_depth32"] = esOnlyExtension(&Extensions::depth32);
-        map["GL_EXT_texture_storage"] = esOnlyExtension(&Extensions::textureStorage);
+        map["GL_EXT_texture_storage"] = enableableExtension(&Extensions::textureStorage);
         map["GL_OES_texture_npot"] = enableableExtension(&Extensions::textureNPOT);
         map["GL_EXT_draw_buffers"] = enableableExtension(&Extensions::drawBuffers);
         map["GL_EXT_texture_filter_anisotropic"] = enableableExtension(&Extensions::textureFilterAnisotropic);
         map["GL_EXT_occlusion_query_boolean"] = enableableExtension(&Extensions::occlusionQueryBoolean);
         map["GL_NV_fence"] = esOnlyExtension(&Extensions::fence);
         map["GL_EXT_disjoint_timer_query"] = enableableExtension(&Extensions::disjointTimerQuery);
         map["GL_EXT_robustness"] = esOnlyExtension(&Extensions::robustness);
         map["GL_KHR_robust_buffer_access_behavior"] = esOnlyExtension(&Extensions::robustBufferAccessBehavior);
@@ -659,24 +795,24 @@ const ExtensionInfoMap &GetExtensionInfo
         map["GL_EXT_shader_texture_lod"] = enableableExtension(&Extensions::shaderTextureLOD);
         map["GL_EXT_frag_depth"] = enableableExtension(&Extensions::fragDepth);
         map["GL_ANGLE_multiview"] = enableableExtension(&Extensions::multiview);
         map["GL_ANGLE_texture_usage"] = enableableExtension(&Extensions::textureUsage);
         map["GL_ANGLE_translated_shader_source"] = esOnlyExtension(&Extensions::translatedShaderSource);
         map["GL_OES_fbo_render_mipmap"] = enableableExtension(&Extensions::fboRenderMipmap);
         map["GL_EXT_discard_framebuffer"] = esOnlyExtension(&Extensions::discardFramebuffer);
         map["GL_EXT_debug_marker"] = esOnlyExtension(&Extensions::debugMarker);
-        map["GL_OES_EGL_image"] = esOnlyExtension(&Extensions::eglImage);
-        map["GL_OES_EGL_image_external"] = esOnlyExtension(&Extensions::eglImageExternal);
-        map["GL_OES_EGL_image_external_essl3"] = esOnlyExtension(&Extensions::eglImageExternalEssl3);
-        map["GL_NV_EGL_stream_consumer_external"] = esOnlyExtension(&Extensions::eglStreamConsumerExternal);
+        map["GL_OES_EGL_image"] = enableableExtension(&Extensions::eglImage);
+        map["GL_OES_EGL_image_external"] = enableableExtension(&Extensions::eglImageExternal);
+        map["GL_OES_EGL_image_external_essl3"] = enableableExtension(&Extensions::eglImageExternalEssl3);
+        map["GL_NV_EGL_stream_consumer_external"] = enableableExtension(&Extensions::eglStreamConsumerExternal);
         map["GL_EXT_unpack_subimage"] = enableableExtension(&Extensions::unpackSubimage);
         map["GL_NV_pack_subimage"] = enableableExtension(&Extensions::packSubimage);
         map["GL_EXT_color_buffer_float"] = enableableExtension(&Extensions::colorBufferFloat);
-        map["GL_OES_vertex_array_object"] = esOnlyExtension(&Extensions::vertexArrayObject);
+        map["GL_OES_vertex_array_object"] = enableableExtension(&Extensions::vertexArrayObject);
         map["GL_KHR_debug"] = esOnlyExtension(&Extensions::debug);
         // TODO(jmadill): Enable this when complete.
         //map["GL_KHR_no_error"] = esOnlyExtension(&Extensions::noError);
         map["GL_ANGLE_lossy_etc_decode"] = enableableExtension(&Extensions::lossyETCDecode);
         map["GL_CHROMIUM_bind_uniform_location"] = esOnlyExtension(&Extensions::bindUniformLocation);
         map["GL_CHROMIUM_sync_query"] = enableableExtension(&Extensions::syncQuery);
         map["GL_CHROMIUM_copy_texture"] = esOnlyExtension(&Extensions::copyTexture);
         map["GL_CHROMIUM_copy_compressed_texture"] = esOnlyExtension(&Extensions::copyCompressedTexture);
@@ -693,16 +829,21 @@ const ExtensionInfoMap &GetExtensionInfo
         map["GL_EXT_texture_norm16"] = esOnlyExtension(&Extensions::textureNorm16);
         map["GL_CHROMIUM_path_rendering"] = esOnlyExtension(&Extensions::pathRendering);
         map["GL_OES_surfaceless_context"] = esOnlyExtension(&Extensions::surfacelessContext);
         map["GL_ANGLE_client_arrays"] = esOnlyExtension(&Extensions::clientArrays);
         map["GL_ANGLE_robust_resource_initialization"] = esOnlyExtension(&Extensions::robustResourceInitialization);
         map["GL_ANGLE_program_cache_control"] = esOnlyExtension(&Extensions::programCacheControl);
         map["GL_ANGLE_texture_rectangle"] = enableableExtension(&Extensions::textureRectangle);
         map["GL_EXT_geometry_shader"] = enableableExtension(&Extensions::geometryShader);
+        map["GL_ANGLE_explicit_context_gles1"] = enableableExtension(&Extensions::explicitContextGles1);
+        map["GL_ANGLE_explicit_context"] = enableableExtension(&Extensions::explicitContext);
+        // GLES1 extensinos
+        map["GL_OES_point_size_array"] = enableableExtension(&Extensions::pointSizeArray);
+        map["GL_OES_texture_cube_map"] = enableableExtension(&Extensions::textureCubeMap);
         // clang-format on
 
         return map;
     };
 
     static const ExtensionInfoMap extensionInfo = buildExtensionInfoMap();
     return extensionInfo;
 }
@@ -774,53 +915,52 @@ Caps::Caps()
       // Table 20.41
       maxVertexAttribRelativeOffset(0),
       maxVertexAttribBindings(0),
       maxVertexAttribStride(0),
       maxElementsIndices(0),
       maxElementsVertices(0),
 
       // Table 20.43
+      // Table 20.44
+      // Table 20.45
+      // Table 20.43gs (GL_EXT_geometry_shader)
+      maxShaderUniformBlocks({}),
+      maxShaderTextureImageUnits({}),
+      maxShaderStorageBlocks({}),
+
+      // Table 20.43
       maxVertexAttributes(0),
       maxVertexUniformComponents(0),
       maxVertexUniformVectors(0),
-      maxVertexUniformBlocks(0),
       maxVertexOutputComponents(0),
-      maxVertexTextureImageUnits(0),
       maxVertexAtomicCounterBuffers(0),
       maxVertexAtomicCounters(0),
       maxVertexImageUniforms(0),
-      maxVertexShaderStorageBlocks(0),
 
       // Table 20.44
       maxFragmentUniformComponents(0),
       maxFragmentUniformVectors(0),
-      maxFragmentUniformBlocks(0),
       maxFragmentInputComponents(0),
-      maxTextureImageUnits(0),
       maxFragmentAtomicCounterBuffers(0),
       maxFragmentAtomicCounters(0),
       maxFragmentImageUniforms(0),
-      maxFragmentShaderStorageBlocks(0),
       minProgramTextureGatherOffset(0),
       maxProgramTextureGatherOffset(0),
       minProgramTexelOffset(0),
       maxProgramTexelOffset(0),
 
       // Table 20.45
       maxComputeWorkGroupInvocations(0),
-      maxComputeUniformBlocks(0),
-      maxComputeTextureImageUnits(0),
       maxComputeSharedMemorySize(0),
       maxComputeUniformComponents(0),
       maxComputeAtomicCounterBuffers(0),
       maxComputeAtomicCounters(0),
       maxComputeImageUniforms(0),
       maxCombinedComputeUniformComponents(0),
-      maxComputeShaderStorageBlocks(0),
 
       // Table 20.46
       maxUniformBufferBindings(0),
       maxUniformBlockSize(0),
       uniformBufferOffsetAlignment(0),
       maxCombinedUniformBlocks(0),
       maxCombinedVertexUniformComponents(0),
       maxCombinedFragmentUniformComponents(0),
@@ -851,25 +991,22 @@ Caps::Caps()
       maxSamples(0),
 
       // Table 20.40 (cont.) (GL_EXT_geometry_shader)
       maxFramebufferLayers(0),
       layerProvokingVertex(0),
 
       // Table 20.43gs (GL_EXT_geometry_shader)
       maxGeometryUniformComponents(0),
-      maxGeometryUniformBlocks(0),
       maxGeometryInputComponents(0),
       maxGeometryOutputComponents(0),
       maxGeometryOutputVertices(0),
       maxGeometryTotalOutputComponents(0),
-      maxGeometryTextureImageUnits(0),
       maxGeometryAtomicCounterBuffers(0),
       maxGeometryAtomicCounters(0),
-      maxGeometryShaderStorageBlocks(0),
       maxGeometryShaderInvocations(0),
 
       // Table 20.46 (GL_EXT_geometry_shader)
       maxGeometryImageUniforms(0),
       maxCombinedGeometryUniformComponents(0),
 
       // GLES1 emulation: Table 6.20 / 6.22 (ES 1.1 spec)
       maxMultitextureUnits(0),
@@ -932,17 +1069,17 @@ Caps GenerateMinimumCaps(const Version &
         caps.fragmentMediumpInt.setSimulatedInt(10);
         caps.fragmentLowpInt.setSimulatedInt(8);
 
         // Table 6.20
         caps.maxVertexAttributes          = 8;
         caps.maxVertexUniformVectors      = 128;
         caps.maxVaryingVectors            = 8;
         caps.maxCombinedTextureImageUnits = 8;
-        caps.maxTextureImageUnits         = 8;
+        caps.maxShaderTextureImageUnits[ShaderType::Fragment] = 8;
         caps.maxFragmentUniformVectors    = 16;
         caps.maxRenderbufferSize          = 1;
     }
 
     if (clientVersion >= Version(3, 0))
     {
         // Table 6.28
         caps.maxElementIndex       = (1 << 24) - 1;
@@ -977,39 +1114,39 @@ Caps GenerateMinimumCaps(const Version &
         caps.fragmentMediumpInt.setTwosComplementInt(16);
         caps.fragmentLowpInt.setTwosComplementInt(8);
         caps.maxServerWaitTimeout = 0;
 
         // Table 6.31
         caps.maxVertexAttributes        = 16;
         caps.maxVertexUniformComponents = 1024;
         caps.maxVertexUniformVectors    = 256;
-        caps.maxVertexUniformBlocks     = 12;
+        caps.maxShaderUniformBlocks[ShaderType::Vertex]     = 12;
         caps.maxVertexOutputComponents  = 64;
-        caps.maxVertexTextureImageUnits = 16;
+        caps.maxShaderTextureImageUnits[ShaderType::Vertex] = 16;
 
         // Table 6.32
         caps.maxFragmentUniformComponents = 896;
         caps.maxFragmentUniformVectors    = 224;
-        caps.maxFragmentUniformBlocks     = 12;
+        caps.maxShaderUniformBlocks[ShaderType::Fragment]     = 12;
         caps.maxFragmentInputComponents   = 60;
-        caps.maxTextureImageUnits         = 16;
+        caps.maxShaderTextureImageUnits[ShaderType::Fragment] = 16;
         caps.minProgramTexelOffset        = -8;
         caps.maxProgramTexelOffset        = 7;
 
         // Table 6.33
         caps.maxUniformBufferBindings     = 24;
         caps.maxUniformBlockSize          = 16384;
         caps.uniformBufferOffsetAlignment = 256;
         caps.maxCombinedUniformBlocks     = 24;
         caps.maxCombinedVertexUniformComponents =
-            caps.maxVertexUniformBlocks * (caps.maxUniformBlockSize / 4) +
+            caps.maxShaderUniformBlocks[ShaderType::Vertex] * (caps.maxUniformBlockSize / 4) +
             caps.maxVertexUniformComponents;
         caps.maxCombinedFragmentUniformComponents =
-            caps.maxFragmentUniformBlocks * (caps.maxUniformBlockSize / 4) +
+            caps.maxShaderUniformBlocks[ShaderType::Fragment] * (caps.maxUniformBlockSize / 4) +
             caps.maxFragmentUniformComponents;
         caps.maxVaryingComponents         = 60;
         caps.maxVaryingVectors            = 15;
         caps.maxCombinedTextureImageUnits = 32;
 
         // Table 6.34
         caps.maxTransformFeedbackInterleavedComponents = 64;
         caps.maxTransformFeedbackSeparateAttributes    = 4;
@@ -1034,48 +1171,49 @@ Caps GenerateMinimumCaps(const Version &
         caps.maxVertexAttribRelativeOffset = 2047;
         caps.maxVertexAttribBindings       = 16;
         caps.maxVertexAttribStride         = 2048;
 
         // Table 20.43
         caps.maxVertexAtomicCounterBuffers = 0;
         caps.maxVertexAtomicCounters       = 0;
         caps.maxVertexImageUniforms        = 0;
-        caps.maxVertexShaderStorageBlocks  = 0;
+        caps.maxShaderStorageBlocks[ShaderType::Vertex] = 0;
 
         // Table 20.44
         caps.maxFragmentUniformComponents    = 1024;
         caps.maxFragmentUniformVectors       = 256;
         caps.maxFragmentAtomicCounterBuffers = 0;
         caps.maxFragmentAtomicCounters       = 0;
         caps.maxFragmentImageUniforms        = 0;
-        caps.maxFragmentShaderStorageBlocks  = 0;
+        caps.maxShaderStorageBlocks[ShaderType::Fragment] = 0;
         caps.minProgramTextureGatherOffset   = 0;
         caps.maxProgramTextureGatherOffset   = 0;
 
         // Table 20.45
         caps.maxComputeWorkGroupCount       = {{65535, 65535, 65535}};
         caps.maxComputeWorkGroupSize        = {{128, 128, 64}};
         caps.maxComputeWorkGroupInvocations = 12;
-        caps.maxComputeUniformBlocks        = 12;
-        caps.maxComputeTextureImageUnits    = 16;
+        caps.maxShaderUniformBlocks[ShaderType::Compute]     = 12;
+        caps.maxShaderTextureImageUnits[ShaderType::Compute] = 16;
         caps.maxComputeSharedMemorySize     = 16384;
         caps.maxComputeUniformComponents    = 1024;
         caps.maxComputeAtomicCounterBuffers = 1;
         caps.maxComputeAtomicCounters       = 8;
         caps.maxComputeImageUniforms        = 4;
         caps.maxCombinedComputeUniformComponents =
-            caps.maxComputeUniformBlocks * static_cast<GLuint>(caps.maxUniformBlockSize / 4) +
+            caps.maxShaderUniformBlocks[ShaderType::Compute] *
+                static_cast<GLuint>(caps.maxUniformBlockSize / 4) +
             caps.maxComputeUniformComponents;
-        caps.maxComputeShaderStorageBlocks = 4;
+        caps.maxShaderStorageBlocks[ShaderType::Compute] = 4;
 
         // Table 20.46
         caps.maxUniformBufferBindings = 36;
         caps.maxCombinedFragmentUniformComponents =
-            caps.maxFragmentUniformBlocks * (caps.maxUniformBlockSize / 4) +
+            caps.maxShaderUniformBlocks[ShaderType::Fragment] * (caps.maxUniformBlockSize / 4) +
             caps.maxFragmentUniformComponents;
         caps.maxCombinedTextureImageUnits     = 48;
         caps.maxCombinedShaderOutputResources = 4;
 
         // Table 20.47
         caps.maxUniformLocations                = 1024;
         caps.maxAtomicCounterBufferBindings     = 1;
         caps.maxAtomicCounterBufferSize         = 32;
@@ -1097,31 +1235,32 @@ Caps GenerateMinimumCaps(const Version &
     if (extensions.geometryShader)
     {
         // Table 20.40 (GL_EXT_geometry_shader)
         caps.maxFramebufferLayers = 256;
         caps.layerProvokingVertex = GL_LAST_VERTEX_CONVENTION_EXT;
 
         // Table 20.43gs (GL_EXT_geometry_shader)
         caps.maxGeometryUniformComponents     = 1024;
-        caps.maxGeometryUniformBlocks         = 12;
+        caps.maxShaderUniformBlocks[ShaderType::Geometry]     = 12;
         caps.maxGeometryInputComponents       = 64;
         caps.maxGeometryOutputComponents      = 64;
         caps.maxGeometryOutputVertices        = 256;
         caps.maxGeometryTotalOutputComponents = 1024;
-        caps.maxGeometryTextureImageUnits     = 16;
+        caps.maxShaderTextureImageUnits[ShaderType::Geometry] = 16;
         caps.maxGeometryAtomicCounterBuffers  = 0;
         caps.maxGeometryAtomicCounters        = 0;
-        caps.maxGeometryShaderStorageBlocks   = 0;
+        caps.maxShaderStorageBlocks[ShaderType::Geometry]     = 0;
         caps.maxGeometryShaderInvocations     = 32;
 
         // Table 20.46 (GL_EXT_geometry_shader)
         caps.maxGeometryImageUniforms = 0;
         caps.maxCombinedGeometryUniformComponents =
-            caps.maxGeometryUniformBlocks * static_cast<GLuint>(caps.maxUniformBlockSize / 4) +
+            caps.maxShaderUniformBlocks[ShaderType::Geometry] *
+                static_cast<GLuint>(caps.maxUniformBlockSize / 4) +
             caps.maxGeometryUniformComponents;
 
         // Table 20.46 (GL_EXT_geometry_shader)
         caps.maxUniformBufferBindings     = 48;
         caps.maxCombinedUniformBlocks     = 36;
         caps.maxCombinedTextureImageUnits = 64;
     }
 
@@ -1251,17 +1390,18 @@ ClientExtensions::ClientExtensions()
       platformANGLE(false),
       platformANGLED3D(false),
       platformANGLEOpenGL(false),
       platformANGLEVulkan(false),
       deviceCreation(false),
       deviceCreationD3D11(false),
       x11Visual(false),
       experimentalPresentPath(false),
-      clientGetAllProcAddresses(false)
+      clientGetAllProcAddresses(false),
+      explicitContext(false)
 {
 }
 
 ClientExtensions::ClientExtensions(const ClientExtensions &other) = default;
 
 std::vector<std::string> ClientExtensions::getStrings() const
 {
     std::vector<std::string> extensionStrings;
@@ -1276,14 +1416,15 @@ std::vector<std::string> ClientExtension
     InsertExtensionString("EGL_ANGLE_platform_angle_opengl",       platformANGLEOpenGL,       &extensionStrings);
     InsertExtensionString("EGL_ANGLE_platform_angle_null",         platformANGLENULL,         &extensionStrings);
     InsertExtensionString("EGL_ANGLE_platform_angle_vulkan",       platformANGLEVulkan,       &extensionStrings);
     InsertExtensionString("EGL_ANGLE_device_creation",             deviceCreation,            &extensionStrings);
     InsertExtensionString("EGL_ANGLE_device_creation_d3d11",       deviceCreationD3D11,       &extensionStrings);
     InsertExtensionString("EGL_ANGLE_x11_visual",                  x11Visual,                 &extensionStrings);
     InsertExtensionString("EGL_ANGLE_experimental_present_path",   experimentalPresentPath,   &extensionStrings);
     InsertExtensionString("EGL_KHR_client_get_all_proc_addresses", clientGetAllProcAddresses, &extensionStrings);
+    InsertExtensionString("EGL_ANGLE_explicit_context",            explicitContext,           &extensionStrings);
     // clang-format on
 
     return extensionStrings;
 }
 
 }  // namespace egl
--- a/gfx/angle/checkout/src/libANGLE/Caps.h
+++ b/gfx/angle/checkout/src/libANGLE/Caps.h
@@ -178,16 +178,46 @@ struct Extensions
 
     // GL_KHR_texture_compression_astc_ldr
     bool textureCompressionASTCLDR;
 
     // GL_OES_compressed_ETC1_RGB8_texture
     // Implies that TextureCaps for GL_ETC1_RGB8_OES exist
     bool compressedETC1RGB8Texture;
 
+    // OES_compressed_ETC2_RGB8_texture
+    bool compressedETC2RGB8Texture;
+
+    // OES_compressed_ETC2_sRGB8_texture
+    bool compressedETC2sRGB8Texture;
+
+    // OES_compressed_ETC2_punchthroughA_RGBA8_texture
+    bool compressedETC2PunchthroughARGB8Texture;
+
+    // OES_compressed_ETC2_punchthroughA_sRGB8_alpha_texture
+    bool compressedETC2PunchthroughAsRGB8AlphaTexture;
+
+    // OES_compressed_ETC2_RGBA8_texture
+    bool compressedETC2RGBA8Texture;
+
+    // OES_compressed_ETC2_sRGB8_alpha8_texture
+    bool compressedETC2sRGB8Alpha8Texture;
+
+    // OES_compressed_EAC_R11_unsigned_texture
+    bool compressedEACR11UnsignedTexture;
+
+    // OES_compressed_EAC_R11_signed_texture
+    bool compressedEACR11SignedTexture;
+
+    // OES_compressed_EAC_RG11_unsigned_texture
+    bool compressedEACRG11UnsignedTexture;
+
+    // OES_compressed_EAC_RG11_signed_texture
+    bool compressedEACRG11SignedTexture;
+
     // GL_EXT_sRGB
     // Implies that TextureCaps for GL_SRGB8_ALPHA8 and GL_SRGB8 exist
     // TODO: Don't advertise this extension in ES3
     bool sRGB;
 
     // GL_ANGLE_depth_texture
     bool depthTextures;
 
@@ -369,16 +399,28 @@ struct Extensions
     // GL_ANGLE_program_cache_control
     bool programCacheControl;
 
     // GL_ANGLE_texture_rectangle
     bool textureRectangle;
 
     // GL_EXT_geometry_shader
     bool geometryShader;
+
+    // GLES1 emulation: GLES1 extensions
+    // GL_OES_point_size_array
+    bool pointSizeArray;
+    // GL_OES_texture_cube_map
+    bool textureCubeMap;
+
+    // EGL_ANGLE_explicit_context GL subextensions
+    // GL_ANGLE_explicit_context_gles1
+    bool explicitContextGles1;
+    // GL_ANGLE_explicit_context
+    bool explicitContext;
 };
 
 struct ExtensionInfo
 {
     // If this extension can be enabled with glRequestExtension (GL_ANGLE_request_extension)
     bool Requestable = false;
 
     // Pointer to a boolean member of the Extensions struct
@@ -483,56 +525,58 @@ struct Caps
     TypePrecision vertexLowpInt;
     TypePrecision fragmentHighpFloat;
     TypePrecision fragmentMediumpFloat;
     TypePrecision fragmentLowpFloat;
     TypePrecision fragmentHighpInt;
     TypePrecision fragmentMediumpInt;
     TypePrecision fragmentLowpInt;
 
+    // Implementation dependent limits required on all shader types.
+    // TODO(jiawei.shao@intel.com): organize all such limits into ShaderMap.
+    // ES 3.1 (April 29, 2015) Table 20.43: Implementation dependent Vertex shader limits
+    // ES 3.1 (April 29, 2015) Table 20.44: Implementation dependent Fragment shader limits
+    // ES 3.1 (April 29, 2015) Table 20.45: implementation dependent compute shader limits
+    // GL_EXT_geometry_shader (May 31, 2016) Table 20.43gs: Implementation dependent geometry shader
+    // limits
+    ShaderMap<GLuint> maxShaderUniformBlocks;
+    ShaderMap<GLuint> maxShaderTextureImageUnits;
+    ShaderMap<GLuint> maxShaderStorageBlocks;
+
     // ES 3.1 (April 29, 2015) Table 20.43: Implementation dependent Vertex shader limits
     GLuint maxVertexAttributes;
     GLuint maxVertexUniformComponents;
     GLuint maxVertexUniformVectors;
-    GLuint maxVertexUniformBlocks;
     GLuint maxVertexOutputComponents;
-    GLuint maxVertexTextureImageUnits;
     GLuint maxVertexAtomicCounterBuffers;
     GLuint maxVertexAtomicCounters;
     GLuint maxVertexImageUniforms;
-    GLuint maxVertexShaderStorageBlocks;
 
     // ES 3.1 (April 29, 2015) Table 20.44: Implementation dependent Fragment shader limits
     GLuint maxFragmentUniformComponents;
     GLuint maxFragmentUniformVectors;
-    GLuint maxFragmentUniformBlocks;
     GLuint maxFragmentInputComponents;
-    GLuint maxTextureImageUnits;
     GLuint maxFragmentAtomicCounterBuffers;
     GLuint maxFragmentAtomicCounters;
     GLuint maxFragmentImageUniforms;
-    GLuint maxFragmentShaderStorageBlocks;
     GLint minProgramTextureGatherOffset;
     GLuint maxProgramTextureGatherOffset;
     GLint minProgramTexelOffset;
     GLint maxProgramTexelOffset;
 
     // ES 3.1 (April 29, 2015) Table 20.45: implementation dependent compute shader limits
     std::array<GLuint, 3> maxComputeWorkGroupCount;
     std::array<GLuint, 3> maxComputeWorkGroupSize;
     GLuint maxComputeWorkGroupInvocations;
-    GLuint maxComputeUniformBlocks;
-    GLuint maxComputeTextureImageUnits;
     GLuint maxComputeSharedMemorySize;
     GLuint maxComputeUniformComponents;
     GLuint maxComputeAtomicCounterBuffers;
     GLuint maxComputeAtomicCounters;
     GLuint maxComputeImageUniforms;
     GLuint maxCombinedComputeUniformComponents;
-    GLuint maxComputeShaderStorageBlocks;
 
     // ES 3.1 (April 29, 2015) Table 20.46: implementation dependent aggregate shader limits
     GLuint maxUniformBufferBindings;
     GLuint64 maxUniformBlockSize;
     GLuint uniformBufferOffsetAlignment;
     GLuint maxCombinedUniformBlocks;
     GLuint64 maxCombinedVertexUniformComponents;
     GLuint64 maxCombinedFragmentUniformComponents;
@@ -564,25 +608,22 @@ struct Caps
 
     // GL_EXT_geometry_shader (May 31, 2016) Table 20.40: Implementation-Dependent Values (cont.)
     GLuint maxFramebufferLayers;
     GLuint layerProvokingVertex;
 
     // GL_EXT_geometry_shader (May 31, 2016) Table 20.43gs: Implementation dependent geometry shader
     // limits
     GLuint maxGeometryUniformComponents;
-    GLuint maxGeometryUniformBlocks;
     GLuint maxGeometryInputComponents;
     GLuint maxGeometryOutputComponents;
     GLuint maxGeometryOutputVertices;
     GLuint maxGeometryTotalOutputComponents;
-    GLuint maxGeometryTextureImageUnits;
     GLuint maxGeometryAtomicCounterBuffers;
     GLuint maxGeometryAtomicCounters;
-    GLuint maxGeometryShaderStorageBlocks;
     GLuint maxGeometryShaderInvocations;
 
     // GL_EXT_geometry_shader (May 31, 2016) Table 20.46: Implementation dependent aggregate shader
     // limits
     GLuint maxGeometryImageUniforms;
     GLuint maxCombinedGeometryUniformComponents;
 
     // GLES1 emulation: Caps for ES 1.1. Taken from Table 6.20 / 6.22 in the OpenGL ES 1.1 spec.
@@ -783,13 +824,16 @@ struct ClientExtensions
     // EGL_ANGLE_x11_visual
     bool x11Visual;
 
     // EGL_ANGLE_experimental_present_path
     bool experimentalPresentPath;
 
     // EGL_KHR_client_get_all_proc_addresses
     bool clientGetAllProcAddresses;
+
+    // EGL_ANGLE_explicit_context
+    bool explicitContext;
 };
 
 }  // namespace egl
 
 #endif  // LIBANGLE_CAPS_H_
--- a/gfx/angle/checkout/src/libANGLE/Compiler.cpp
+++ b/gfx/angle/checkout/src/libANGLE/Compiler.cpp
@@ -50,40 +50,38 @@ ShShaderSpec SelectShaderSpec(GLint majo
 
 Compiler::Compiler(rx::GLImplFactory *implFactory, const ContextState &state)
     : mImplementation(implFactory->createCompiler()),
       mSpec(SelectShaderSpec(state.getClientMajorVersion(),
                              state.getClientMinorVersion(),
                              state.getExtensions().webglCompatibility)),
       mOutputType(mImplementation->getTranslatorOutputType()),
       mResources(),
-      mFragmentCompiler(nullptr),
-      mVertexCompiler(nullptr),
-      mComputeCompiler(nullptr),
-      mGeometryCompiler(nullptr)
+      mShaderCompilers({})
 {
-    ASSERT(state.getClientMajorVersion() == 2 || state.getClientMajorVersion() == 3);
+    ASSERT(state.getClientMajorVersion() == 1 || state.getClientMajorVersion() == 2 ||
+           state.getClientMajorVersion() == 3);
 
     const gl::Caps &caps             = state.getCaps();
     const gl::Extensions &extensions = state.getExtensions();
 
     sh::InitBuiltInResources(&mResources);
     mResources.MaxVertexAttribs             = caps.maxVertexAttributes;
     mResources.MaxVertexUniformVectors      = caps.maxVertexUniformVectors;
     mResources.MaxVaryingVectors            = caps.maxVaryingVectors;
-    mResources.MaxVertexTextureImageUnits   = caps.maxVertexTextureImageUnits;
+    mResources.MaxVertexTextureImageUnits   = caps.maxShaderTextureImageUnits[ShaderType::Vertex];
     mResources.MaxCombinedTextureImageUnits = caps.maxCombinedTextureImageUnits;
-    mResources.MaxTextureImageUnits         = caps.maxTextureImageUnits;
+    mResources.MaxTextureImageUnits         = caps.maxShaderTextureImageUnits[ShaderType::Fragment];
     mResources.MaxFragmentUniformVectors    = caps.maxFragmentUniformVectors;
     mResources.MaxDrawBuffers               = caps.maxDrawBuffers;
     mResources.OES_standard_derivatives     = extensions.standardDerivatives;
     mResources.EXT_draw_buffers             = extensions.drawBuffers;
     mResources.EXT_shader_texture_lod       = extensions.shaderTextureLOD;
-    mResources.OES_EGL_image_external          = extensions.eglImageExternal;
-    mResources.OES_EGL_image_external_essl3    = extensions.eglImageExternalEssl3;
+    mResources.OES_EGL_image_external       = extensions.eglImageExternal;
+    mResources.OES_EGL_image_external_essl3 = extensions.eglImageExternalEssl3;
     mResources.NV_EGL_stream_consumer_external = extensions.eglStreamConsumerExternal;
     mResources.ARB_texture_rectangle           = extensions.textureRectangle;
     // TODO: use shader precision caps to determine if high precision is supported?
     mResources.FragmentPrecisionHigh = 1;
     mResources.EXT_frag_depth        = extensions.fragDepth;
 
     // OVR_multiview state
     mResources.OVR_multiview = extensions.multiview;
@@ -108,125 +106,84 @@ Compiler::Compiler(rx::GLImplFactory *im
 
     for (size_t index = 0u; index < 3u; ++index)
     {
         mResources.MaxComputeWorkGroupCount[index] = caps.maxComputeWorkGroupCount[index];
         mResources.MaxComputeWorkGroupSize[index]  = caps.maxComputeWorkGroupSize[index];
     }
 
     mResources.MaxComputeUniformComponents = caps.maxComputeUniformComponents;
-    mResources.MaxComputeTextureImageUnits = caps.maxComputeTextureImageUnits;
+    mResources.MaxComputeTextureImageUnits = caps.maxShaderTextureImageUnits[ShaderType::Compute];
 
     mResources.MaxComputeAtomicCounters       = caps.maxComputeAtomicCounters;
     mResources.MaxComputeAtomicCounterBuffers = caps.maxComputeAtomicCounterBuffers;
 
     mResources.MaxVertexAtomicCounters         = caps.maxVertexAtomicCounters;
     mResources.MaxFragmentAtomicCounters       = caps.maxFragmentAtomicCounters;
     mResources.MaxCombinedAtomicCounters       = caps.maxCombinedAtomicCounters;
     mResources.MaxAtomicCounterBindings        = caps.maxAtomicCounterBufferBindings;
     mResources.MaxVertexAtomicCounterBuffers   = caps.maxVertexAtomicCounterBuffers;
     mResources.MaxFragmentAtomicCounterBuffers = caps.maxFragmentAtomicCounterBuffers;
     mResources.MaxCombinedAtomicCounterBuffers = caps.maxCombinedAtomicCounterBuffers;
     mResources.MaxAtomicCounterBufferSize      = caps.maxAtomicCounterBufferSize;
 
-    mResources.MaxUniformBufferBindings = caps.maxUniformBufferBindings;
+    mResources.MaxUniformBufferBindings       = caps.maxUniformBufferBindings;
     mResources.MaxShaderStorageBufferBindings = caps.maxShaderStorageBufferBindings;
 
     // Needed by point size clamping workaround
     mResources.MaxPointSize = caps.maxAliasedPointSize;
 
     if (state.getClientMajorVersion() == 2 && !extensions.drawBuffers)
     {
         mResources.MaxDrawBuffers = 1;
     }
 
     // Geometry Shader constants
     mResources.EXT_geometry_shader              = extensions.geometryShader;
     mResources.MaxGeometryUniformComponents     = caps.maxGeometryUniformComponents;
-    mResources.MaxGeometryUniformBlocks         = caps.maxGeometryUniformBlocks;
+    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.maxGeometryTextureImageUnits;
-    mResources.MaxGeometryAtomicCounterBuffers  = caps.maxGeometryAtomicCounterBuffers;
-    mResources.MaxGeometryAtomicCounters        = caps.maxGeometryAtomicCounters;
-    mResources.MaxGeometryShaderStorageBlocks   = caps.maxGeometryShaderStorageBlocks;
-    mResources.MaxGeometryShaderInvocations     = caps.maxGeometryShaderInvocations;
-    mResources.MaxGeometryImageUniforms         = caps.maxGeometryImageUniforms;
+    mResources.MaxGeometryTextureImageUnits = caps.maxShaderTextureImageUnits[ShaderType::Geometry];
+    mResources.MaxGeometryAtomicCounterBuffers = caps.maxGeometryAtomicCounterBuffers;
+    mResources.MaxGeometryAtomicCounters       = caps.maxGeometryAtomicCounters;
+    mResources.MaxGeometryShaderStorageBlocks  = caps.maxShaderStorageBlocks[ShaderType::Geometry];
+    mResources.MaxGeometryShaderInvocations    = caps.maxGeometryShaderInvocations;
+    mResources.MaxGeometryImageUniforms        = caps.maxGeometryImageUniforms;
 }
 
 Compiler::~Compiler()
 {
-    if (mFragmentCompiler)
+    for (ShaderType shaderType : AllShaderTypes())
     {
-        sh::Destruct(mFragmentCompiler);
-        mFragmentCompiler = nullptr;
-
-        ASSERT(activeCompilerHandles > 0);
-        activeCompilerHandles--;
-    }
-
-    if (mVertexCompiler)
-    {
-        sh::Destruct(mVertexCompiler);
-        mVertexCompiler = nullptr;
+        ShHandle compilerHandle = mShaderCompilers[shaderType];
+        if (compilerHandle)
+        {
+            sh::Destruct(compilerHandle);
+            mShaderCompilers[shaderType] = nullptr;
 
-        ASSERT(activeCompilerHandles > 0);
-        activeCompilerHandles--;
-    }
-
-    if (mComputeCompiler)
-    {
-        sh::Destruct(mComputeCompiler);
-        mComputeCompiler = nullptr;
-
-        ASSERT(activeCompilerHandles > 0);
-        activeCompilerHandles--;
-    }
-
-    if (mGeometryCompiler)
-    {
-        sh::Destruct(mGeometryCompiler);
-        mGeometryCompiler = nullptr;
-
-        ASSERT(activeCompilerHandles > 0);
-        activeCompilerHandles--;
+            ASSERT(activeCompilerHandles > 0);
+            activeCompilerHandles--;
+        }
     }
 
     if (activeCompilerHandles == 0)
     {
         sh::Finalize();
     }
 
     ANGLE_SWALLOW_ERR(mImplementation->release());
 }
 
 ShHandle Compiler::getCompilerHandle(ShaderType type)
 {
-    ShHandle *compiler = nullptr;
-    switch (type)
-    {
-        case ShaderType::Vertex:
-            compiler = &mVertexCompiler;
-            break;
-
-        case ShaderType::Fragment:
-            compiler = &mFragmentCompiler;
-            break;
-        case ShaderType::Compute:
-            compiler = &mComputeCompiler;
-            break;
-        case ShaderType::Geometry:
-            compiler = &mGeometryCompiler;
-            break;
-        default:
-            UNREACHABLE();
-            return nullptr;
-    }
+    ASSERT(type != ShaderType::InvalidEnum);
+    ShHandle *compiler = &mShaderCompilers[type];
 
     if (!(*compiler))
     {
         if (activeCompilerHandles == 0)
         {
             sh::Initialize();
         }
 
--- a/gfx/angle/checkout/src/libANGLE/Compiler.h
+++ b/gfx/angle/checkout/src/libANGLE/Compiler.h
@@ -7,17 +7,17 @@
 // Compiler.h: Defines the gl::Compiler class, abstracting the ESSL compiler
 // that a GL context holds.
 
 #ifndef LIBANGLE_COMPILER_H_
 #define LIBANGLE_COMPILER_H_
 
 #include "GLSLANG/ShaderLang.h"
 #include "libANGLE/Error.h"
-#include "libANGLE/PackedGLEnums_autogen.h"
+#include "libANGLE/PackedEnums.h"
 #include "libANGLE/RefCountObject.h"
 
 namespace rx
 {
 class CompilerImpl;
 class GLImplFactory;
 }
 
@@ -36,17 +36,14 @@ class Compiler final : public RefCountOb
 
   private:
     ~Compiler() override;
     std::unique_ptr<rx::CompilerImpl> mImplementation;
     ShShaderSpec mSpec;
     ShShaderOutput mOutputType;
     ShBuiltInResources mResources;
 
-    ShHandle mFragmentCompiler;
-    ShHandle mVertexCompiler;
-    ShHandle mComputeCompiler;
-    ShHandle mGeometryCompiler;
+    ShaderMap<ShHandle> mShaderCompilers;
 };
 
 }  // namespace gl
 
 #endif // LIBANGLE_COMPILER_H_
--- a/gfx/angle/checkout/src/libANGLE/Context.cpp
+++ b/gfx/angle/checkout/src/libANGLE/Context.cpp
@@ -19,16 +19,17 @@
 #include "common/utilities.h"
 #include "common/version.h"
 #include "libANGLE/Buffer.h"
 #include "libANGLE/Compiler.h"
 #include "libANGLE/Display.h"
 #include "libANGLE/Fence.h"
 #include "libANGLE/Framebuffer.h"
 #include "libANGLE/FramebufferAttachment.h"
+#include "libANGLE/GLES1Renderer.h"
 #include "libANGLE/Path.h"
 #include "libANGLE/Program.h"
 #include "libANGLE/ProgramPipeline.h"
 #include "libANGLE/Query.h"
 #include "libANGLE/Renderbuffer.h"
 #include "libANGLE/ResourceManager.h"
 #include "libANGLE/Sampler.h"
 #include "libANGLE/Surface.h"
@@ -259,17 +260,18 @@ namespace gl
 {
 
 Context::Context(rx::EGLImplFactory *implFactory,
                  const egl::Config *config,
                  const Context *shareContext,
                  TextureManager *shareTextures,
                  MemoryProgramCache *memoryProgramCache,
                  const egl::AttributeMap &attribs,
-                 const egl::DisplayExtensions &displayExtensions)
+                 const egl::DisplayExtensions &displayExtensions,
+                 const egl::ClientExtensions &clientExtensions)
     : mState(reinterpret_cast<ContextID>(this),
              shareContext ? &shareContext->mState : nullptr,
              shareTextures,
              GetClientVersion(attribs),
              &mGLState,
              mCaps,
              mTextureCaps,
              mExtensions,
@@ -292,23 +294,23 @@ Context::Context(rx::EGLImplFactory *imp
       mSurfacelessFramebuffer(nullptr),
       mWebGLContext(GetWebGLContext(attribs)),
       mExtensionsEnabled(GetExtensionsEnabled(attribs, mWebGLContext)),
       mMemoryProgramCache(memoryProgramCache),
       mScratchBuffer(1000u),
       mZeroFilledBuffer(1000u)
 {
     // Needed to solve a Clang warning of unused variables.
-    UNUSED_VARIABLE(mSavedArgsType);
-    UNUSED_VARIABLE(mParamsBuffer);
+    ANGLE_UNUSED_VARIABLE(mSavedArgsType);
+    ANGLE_UNUSED_VARIABLE(mParamsBuffer);
 
     mImplementation->setMemoryProgramCache(memoryProgramCache);
 
     bool robustResourceInit = GetRobustResourceInit(attribs);
-    initCaps(displayExtensions, robustResourceInit);
+    initCaps(displayExtensions, clientExtensions, robustResourceInit);
     initWorkarounds();
 
     mGLState.initialize(this, GetDebug(attribs), GetBindGeneratesResource(attribs),
                         GetClientArraysEnabled(attribs), robustResourceInit,
                         mMemoryProgramCache != nullptr);
 
     mFenceNVHandleAllocator.setBaseHandle(0);
 
@@ -345,25 +347,24 @@ Context::Context(rx::EGLImplFactory *imp
         }
 
         for (unsigned int i = 0; i < mCaps.maxShaderStorageBufferBindings; i++)
         {
             bindBufferRange(BufferBinding::ShaderStorage, i, 0, 0, 0);
         }
     }
 
-    const Extensions &nativeExtensions = mImplementation->getNativeExtensions();
-    if (nativeExtensions.textureRectangle)
+    if (mSupportedExtensions.textureRectangle)
     {
         Texture *zeroTextureRectangle =
             new Texture(mImplementation.get(), 0, TextureType::Rectangle);
         mZeroTextures[TextureType::Rectangle].set(this, zeroTextureRectangle);
     }
 
-    if (nativeExtensions.eglImageExternal || nativeExtensions.eglStreamConsumerExternal)
+    if (mSupportedExtensions.eglImageExternal || mSupportedExtensions.eglStreamConsumerExternal)
     {
         Texture *zeroTextureExternal = new Texture(mImplementation.get(), 0, TextureType::External);
         mZeroTextures[TextureType::External].set(this, zeroTextureExternal);
     }
 
     mGLState.initializeZeroTextures(this, mZeroTextures);
 
     bindVertexArray(0);
@@ -384,16 +385,22 @@ Context::Context(rx::EGLImplFactory *imp
 
     bindRenderbuffer(GL_RENDERBUFFER, 0);
 
     for (unsigned int i = 0; i < mCaps.maxUniformBufferBindings; i++)
     {
         bindBufferRange(BufferBinding::Uniform, i, 0, 0, -1);
     }
 
+    // Initialize GLES1 renderer if appropriate.
+    if (getClientVersion() < Version(2, 0))
+    {
+        mGLES1Renderer.reset(new GLES1Renderer());
+    }
+
     // Initialize dirty bit masks
     mTexImageDirtyBits.set(State::DIRTY_BIT_UNPACK_STATE);
     mTexImageDirtyBits.set(State::DIRTY_BIT_UNPACK_BUFFER_BINDING);
     // No dirty objects.
 
     // Readpixels uses the pack state and read FBO
     mReadPixelsDirtyBits.set(State::DIRTY_BIT_PACK_STATE);
     mReadPixelsDirtyBits.set(State::DIRTY_BIT_PACK_BUFFER_BINDING);
@@ -427,18 +434,27 @@ Context::Context(rx::EGLImplFactory *imp
     mComputeDirtyBits.set(State::DIRTY_BIT_DISPATCH_INDIRECT_BUFFER_BINDING);
     mComputeDirtyObjects.set(State::DIRTY_OBJECT_PROGRAM_TEXTURES);
 
     handleError(mImplementation->initialize());
 }
 
 egl::Error Context::onDestroy(const egl::Display *display)
 {
+    if (mGLES1Renderer)
+    {
+        mGLES1Renderer->onDestroy(this, &mGLState);
+    }
+
     // Delete the Surface first to trigger a finish() in Vulkan.
-    SafeDelete(mSurfacelessFramebuffer);
+    if (mSurfacelessFramebuffer)
+    {
+        mSurfacelessFramebuffer->onDestroy(this);
+        SafeDelete(mSurfacelessFramebuffer);
+    }
 
     ANGLE_TRY(releaseSurface(display));
 
     for (auto fence : mFenceNVMap)
     {
         SafeDelete(fence.second);
     }
     mFenceNVMap.clear();
@@ -1008,17 +1024,17 @@ void Context::bindDrawFramebuffer(GLuint
     Framebuffer *framebuffer = mState.mFramebuffers->checkFramebufferAllocation(
         mImplementation.get(), mCaps, framebufferHandle);
     mGLState.setDrawFramebufferBinding(framebuffer);
 }
 
 void Context::bindVertexArray(GLuint vertexArrayHandle)
 {
     VertexArray *vertexArray = checkVertexArrayAllocation(vertexArrayHandle);
-    mGLState.setVertexArrayBinding(vertexArray);
+    mGLState.setVertexArrayBinding(this, vertexArray);
 }
 
 void Context::bindVertexBuffer(GLuint bindingIndex,
                                GLuint bufferHandle,
                                GLintptr offset,
                                GLsizei stride)
 {
     Buffer *buffer = mState.mBuffers->checkBufferAllocation(mImplementation.get(), bufferHandle);
@@ -1065,78 +1081,78 @@ void Context::bindTransformFeedback(GLen
 
 void Context::bindProgramPipeline(GLuint pipelineHandle)
 {
     ProgramPipeline *pipeline =
         mState.mPipelines->checkProgramPipelineAllocation(mImplementation.get(), pipelineHandle);
     mGLState.setProgramPipelineBinding(this, pipeline);
 }
 
-void Context::beginQuery(GLenum target, GLuint query)
+void Context::beginQuery(QueryType target, GLuint query)
 {
     Query *queryObject = getQuery(query, true, target);
     ASSERT(queryObject);
 
     // begin query
     ANGLE_CONTEXT_TRY(queryObject->begin());
 
     // set query as active for specified target only if begin succeeded
     mGLState.setActiveQuery(this, target, queryObject);
 }
 
-void Context::endQuery(GLenum target)
+void Context::endQuery(QueryType target)
 {
     Query *queryObject = mGLState.getActiveQuery(target);
     ASSERT(queryObject);
 
     handleError(queryObject->end());
 
     // Always unbind the query, even if there was an error. This may delete the query object.
     mGLState.setActiveQuery(this, target, nullptr);
 }
 
-void Context::queryCounter(GLuint id, GLenum target)
-{
-    ASSERT(target == GL_TIMESTAMP_EXT);
+void Context::queryCounter(GLuint id, QueryType target)
+{
+    ASSERT(target == QueryType::Timestamp);
 
     Query *queryObject = getQuery(id, true, target);
     ASSERT(queryObject);
 
     handleError(queryObject->queryCounter());
 }
 
-void Context::getQueryiv(GLenum target, GLenum pname, GLint *params)
+void Context::getQueryiv(QueryType target, GLenum pname, GLint *params)
 {
     switch (pname)
     {
         case GL_CURRENT_QUERY_EXT:
             params[0] = mGLState.getActiveQueryId(target);
             break;
         case GL_QUERY_COUNTER_BITS_EXT:
             switch (target)
             {
-                case GL_TIME_ELAPSED_EXT:
+                case QueryType::TimeElapsed:
                     params[0] = getExtensions().queryCounterBitsTimeElapsed;
                     break;
-                case GL_TIMESTAMP_EXT:
+                case QueryType::Timestamp:
                     params[0] = getExtensions().queryCounterBitsTimestamp;
                     break;
                 default:
                     UNREACHABLE();
                     params[0] = 0;
                     break;
             }
             break;
         default:
             UNREACHABLE();
             return;
     }
 }
 
-void Context::getQueryivRobust(GLenum target,
+void Context::getQueryivRobust(QueryType target,
                                GLenum pname,
                                GLsizei bufSize,
                                GLsizei *length,
                                GLint *params)
 {
     getQueryiv(target, pname, params);
 }
 
@@ -1201,26 +1217,27 @@ Framebuffer *Context::getFramebuffer(GLu
     return mState.mFramebuffers->getFramebuffer(handle);
 }
 
 FenceNV *Context::getFenceNV(GLuint handle)
 {
     return mFenceNVMap.query(handle);
 }
 
-Query *Context::getQuery(GLuint handle, bool create, GLenum type)
+Query *Context::getQuery(GLuint handle, bool create, QueryType type)
 {
     if (!mQueryMap.contains(handle))
     {
         return nullptr;
     }
 
     Query *query = mQueryMap.query(handle);
     if (!query && create)
     {
+        ASSERT(type != QueryType::InvalidEnum);
         query = new Query(mImplementation->createQuery(type), handle);
         query->addRef();
         mQueryMap.assign(handle, query);
     }
     return query;
 }
 
 Query *Context::getQuery(GLuint handle) const
@@ -1331,20 +1348,20 @@ void Context::getIntegervImpl(GLenum pna
             break;
         case GL_MAX_VARYING_COMPONENTS:
             *params = mCaps.maxVertexOutputComponents;
             break;
         case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS:
             *params = mCaps.maxCombinedTextureImageUnits;
             break;
         case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS:
-            *params = mCaps.maxVertexTextureImageUnits;
+            *params = mCaps.maxShaderTextureImageUnits[ShaderType::Vertex];
             break;
         case GL_MAX_TEXTURE_IMAGE_UNITS:
-            *params = mCaps.maxTextureImageUnits;
+            *params = mCaps.maxShaderTextureImageUnits[ShaderType::Fragment];
             break;
         case GL_MAX_FRAGMENT_UNIFORM_VECTORS:
             *params = mCaps.maxFragmentUniformVectors;
             break;
         case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS:
             *params = mCaps.maxFragmentUniformComponents;
             break;
         case GL_MAX_RENDERBUFFER_SIZE:
@@ -1378,20 +1395,20 @@ void Context::getIntegervImpl(GLenum pna
             break;
         case GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT:
             *params = mCaps.uniformBufferOffsetAlignment;
             break;
         case GL_MAX_UNIFORM_BUFFER_BINDINGS:
             *params = mCaps.maxUniformBufferBindings;
             break;
         case GL_MAX_VERTEX_UNIFORM_BLOCKS:
-            *params = mCaps.maxVertexUniformBlocks;
+            *params = mCaps.maxShaderUniformBlocks[ShaderType::Vertex];
             break;
         case GL_MAX_FRAGMENT_UNIFORM_BLOCKS:
-            *params = mCaps.maxFragmentUniformBlocks;
+            *params = mCaps.maxShaderUniformBlocks[ShaderType::Fragment];
             break;
         case GL_MAX_COMBINED_UNIFORM_BLOCKS:
             *params = mCaps.maxCombinedTextureImageUnits;
             break;
         case GL_MAX_VERTEX_OUTPUT_COMPONENTS:
             *params = mCaps.maxVertexOutputComponents;
             break;
         case GL_MAX_FRAGMENT_INPUT_COMPONENTS:
@@ -1517,44 +1534,44 @@ void Context::getIntegervImpl(GLenum pna
             break;
         case GL_MAX_VERTEX_ATOMIC_COUNTERS:
             *params = mCaps.maxVertexAtomicCounters;
             break;
         case GL_MAX_VERTEX_IMAGE_UNIFORMS:
             *params = mCaps.maxVertexImageUniforms;
             break;
         case GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS:
-            *params = mCaps.maxVertexShaderStorageBlocks;
+            *params = mCaps.maxShaderStorageBlocks[ShaderType::Vertex];
             break;
         case GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS:
             *params = mCaps.maxFragmentAtomicCounterBuffers;
             break;
         case GL_MAX_FRAGMENT_ATOMIC_COUNTERS:
             *params = mCaps.maxFragmentAtomicCounters;
             break;
         case GL_MAX_FRAGMENT_IMAGE_UNIFORMS:
             *params = mCaps.maxFragmentImageUniforms;
             break;
         case GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS:
-            *params = mCaps.maxFragmentShaderStorageBlocks;
+            *params = mCaps.maxShaderStorageBlocks[ShaderType::Fragment];
             break;
         case GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET:
             *params = mCaps.minProgramTextureGatherOffset;
             break;
         case GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET:
             *params = mCaps.maxProgramTextureGatherOffset;
             break;
         case GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS:
             *params = mCaps.maxComputeWorkGroupInvocations;
             break;
         case GL_MAX_COMPUTE_UNIFORM_BLOCKS:
-            *params = mCaps.maxComputeUniformBlocks;
+            *params = mCaps.maxShaderUniformBlocks[ShaderType::Compute];
             break;
         case GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS:
-            *params = mCaps.maxComputeTextureImageUnits;
+            *params = mCaps.maxShaderTextureImageUnits[ShaderType::Compute];
             break;
         case GL_MAX_COMPUTE_SHARED_MEMORY_SIZE:
             *params = mCaps.maxComputeSharedMemorySize;
             break;
         case GL_MAX_COMPUTE_UNIFORM_COMPONENTS:
             *params = mCaps.maxComputeUniformComponents;
             break;
         case GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS:
@@ -1565,17 +1582,17 @@ void Context::getIntegervImpl(GLenum pna
             break;
         case GL_MAX_COMPUTE_IMAGE_UNIFORMS:
             *params = mCaps.maxComputeImageUniforms;
             break;
         case GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS:
             *params = mCaps.maxCombinedComputeUniformComponents;
             break;
         case GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS:
-            *params = mCaps.maxComputeShaderStorageBlocks;
+            *params = mCaps.maxShaderStorageBlocks[ShaderType::Compute];
             break;
         case GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES:
             *params = mCaps.maxCombinedShaderOutputResources;
             break;
         case GL_MAX_UNIFORM_LOCATIONS:
             *params = mCaps.maxUniformLocations;
             break;
         case GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS:
@@ -1612,17 +1629,17 @@ void Context::getIntegervImpl(GLenum pna
             break;
         case GL_LAYER_PROVOKING_VERTEX_EXT:
             *params = mCaps.layerProvokingVertex;
             break;
         case GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT:
             *params = mCaps.maxGeometryUniformComponents;
             break;
         case GL_MAX_GEOMETRY_UNIFORM_BLOCKS_EXT:
-            *params = mCaps.maxGeometryUniformBlocks;
+            *params = mCaps.maxShaderUniformBlocks[ShaderType::Geometry];
             break;
         case GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS_EXT:
             *params = mCaps.maxCombinedGeometryUniformComponents;
             break;
         case GL_MAX_GEOMETRY_INPUT_COMPONENTS_EXT:
             *params = mCaps.maxGeometryInputComponents;
             break;
         case GL_MAX_GEOMETRY_OUTPUT_COMPONENTS_EXT:
@@ -1633,43 +1650,75 @@ void Context::getIntegervImpl(GLenum pna
             break;
         case GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT:
             *params = mCaps.maxGeometryTotalOutputComponents;
             break;
         case GL_MAX_GEOMETRY_SHADER_INVOCATIONS_EXT:
             *params = mCaps.maxGeometryShaderInvocations;
             break;
         case GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT:
-            *params = mCaps.maxGeometryTextureImageUnits;
+            *params = mCaps.maxShaderTextureImageUnits[ShaderType::Geometry];
             break;
         case GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_EXT:
             *params = mCaps.maxGeometryAtomicCounterBuffers;
             break;
         case GL_MAX_GEOMETRY_ATOMIC_COUNTERS_EXT:
             *params = mCaps.maxGeometryAtomicCounters;
             break;
         case GL_MAX_GEOMETRY_IMAGE_UNIFORMS_EXT:
             *params = mCaps.maxGeometryImageUniforms;
             break;
         case GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS_EXT:
-            *params = mCaps.maxGeometryShaderStorageBlocks;
+            *params = mCaps.maxShaderStorageBlocks[ShaderType::Geometry];
             break;
         // GLES1 emulation: Caps queries
         case GL_MAX_TEXTURE_UNITS:
             *params = mCaps.maxMultitextureUnits;
             break;
         case GL_MAX_MODELVIEW_STACK_DEPTH:
             *params = mCaps.maxModelviewMatrixStackDepth;
             break;
         case GL_MAX_PROJECTION_STACK_DEPTH:
             *params = mCaps.maxProjectionMatrixStackDepth;
             break;
         case GL_MAX_TEXTURE_STACK_DEPTH:
             *params = mCaps.maxTextureMatrixStackDepth;
             break;
+        // GLES1 emulation: Vertex attribute queries
+        case GL_VERTEX_ARRAY_BUFFER_BINDING:
+        case GL_NORMAL_ARRAY_BUFFER_BINDING:
+        case GL_COLOR_ARRAY_BUFFER_BINDING:
+        case GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES:
+        case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING:
+            getVertexAttribiv(static_cast<GLuint>(vertexArrayIndex(ParamToVertexArrayType(pname))),
+                              GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING, params);
+            break;
+        case GL_VERTEX_ARRAY_STRIDE:
+        case GL_NORMAL_ARRAY_STRIDE:
+        case GL_COLOR_ARRAY_STRIDE:
+        case GL_POINT_SIZE_ARRAY_STRIDE_OES:
+        case GL_TEXTURE_COORD_ARRAY_STRIDE:
+            getVertexAttribiv(static_cast<GLuint>(vertexArrayIndex(ParamToVertexArrayType(pname))),
+                              GL_VERTEX_ATTRIB_ARRAY_STRIDE, params);
+            break;
+        case GL_VERTEX_ARRAY_SIZE:
+        case GL_COLOR_ARRAY_SIZE:
+        case GL_TEXTURE_COORD_ARRAY_SIZE:
+            getVertexAttribiv(static_cast<GLuint>(vertexArrayIndex(ParamToVertexArrayType(pname))),
+                              GL_VERTEX_ATTRIB_ARRAY_SIZE, params);
+            break;
+        case GL_VERTEX_ARRAY_TYPE:
+        case GL_COLOR_ARRAY_TYPE:
+        case GL_NORMAL_ARRAY_TYPE:
+        case GL_POINT_SIZE_ARRAY_TYPE_OES:
+        case GL_TEXTURE_COORD_ARRAY_TYPE:
+            getVertexAttribiv(static_cast<GLuint>(vertexArrayIndex(ParamToVertexArrayType(pname))),
+                              GL_VERTEX_ATTRIB_ARRAY_TYPE, params);
+            break;
+
         default:
             handleError(mGLState.getIntegerv(this, pname, params));
             break;
     }
 }
 
 void Context::getInteger64vImpl(GLenum pname, GLint64 *params)
 {
@@ -1704,17 +1753,17 @@ void Context::getInteger64vImpl(GLenum p
         default:
             UNREACHABLE();
             break;
     }
 }
 
 void Context::getPointerv(GLenum pname, void **params) const
 {
-    mGLState.getPointerv(pname, params);
+    mGLState.getPointerv(this, pname, params);
 }
 
 void Context::getPointervRobustANGLERobust(GLenum pname,
                                            GLsizei bufSize,
                                            GLsizei *length,
                                            void **params)
 {
     UNIMPLEMENTED();
@@ -2415,19 +2464,19 @@ void Context::getProgramInterfaceivRobus
                                           GLenum pname,
                                           GLsizei bufSize,
                                           GLsizei *length,
                                           GLint *params)
 {
     UNIMPLEMENTED();
 }
 
-void Context::handleError(const Error &error)
-{
-    if (error.isError())
+void Context::handleError(const Error &error) const
+{
+    if (ANGLE_UNLIKELY(error.isError()))
     {
         GLenum code = error.getCode();
         mErrors.insert(code);
         if (code == GL_OUT_OF_MEMORY && getWorkarounds().loseContextOnOutOfMemory)
         {
             markContextLost();
         }
 
@@ -2449,27 +2498,27 @@ GLenum Context::getError()
     {
         GLenum error = *mErrors.begin();
         mErrors.erase(mErrors.begin());
         return error;
     }
 }
 
 // NOTE: this function should not assume that this context is current!
-void Context::markContextLost()
+void Context::markContextLost() const
 {
     if (mResetStrategy == GL_LOSE_CONTEXT_ON_RESET_EXT)
     {
         mResetStatus       = GL_UNKNOWN_CONTEXT_RESET_EXT;
         mContextLostForced = true;
     }
     mContextLost = true;
 }
 
-bool Context::isContextLost()
+bool Context::isContextLost() const
 {
     return mContextLost;
 }
 
 GLenum Context::getGraphicsResetStatus()
 {
     // Even if the application doesn't want to know about resets, we want to know
     // as it will allow us to skip all the calls.
@@ -2633,17 +2682,17 @@ void Context::detachVertexArray(GLuint v
 {
     // Vertex array detachment is handled by Context, because 0 is a valid
     // VAO, and a pointer to it must be passed from Context to State at
     // binding time.
 
     // [OpenGL ES 3.0.2] section 2.10 page 43:
     // If a vertex array object that is currently bound is deleted, the binding
     // for that object reverts to zero and the default vertex array becomes current.
-    if (mGLState.removeVertexArrayBinding(vertexArray))
+    if (mGLState.removeVertexArrayBinding(this, vertexArray))
     {
         bindVertexArray(0);
     }
 }
 
 void Context::detachTransformFeedback(GLuint transformFeedback)
 {
     // Transform feedback detachment is handled by Context, because 0 is a valid
@@ -2834,24 +2883,22 @@ void Context::initExtensionStrings()
 
     mExtensionStrings.clear();
     for (const auto &extensionString : mExtensions.getStrings())
     {
         mExtensionStrings.push_back(MakeStaticString(extensionString));
     }
     mExtensionString = mergeExtensionStrings(mExtensionStrings);
 
-    const gl::Extensions &nativeExtensions = mImplementation->getNativeExtensions();
-
     mRequestableExtensionStrings.clear();
     for (const auto &extensionInfo : GetExtensionInfoMap())
     {
         if (extensionInfo.second.Requestable &&
             !(mExtensions.*(extensionInfo.second.ExtensionsMember)) &&
-            nativeExtensions.*(extensionInfo.second.ExtensionsMember))
+            mSupportedExtensions.*(extensionInfo.second.ExtensionsMember))
         {
             mRequestableExtensionStrings.push_back(MakeStaticString(extensionInfo.first));
         }
     }
     mRequestableExtensionString = mergeExtensionStrings(mRequestableExtensionStrings);
 }
 
 const GLubyte *Context::getString(GLenum name) const
@@ -2903,28 +2950,27 @@ size_t Context::getExtensionStringCount(
     return mExtensionStrings.size();
 }
 
 bool Context::isExtensionRequestable(const char *name)
 {
     const ExtensionInfoMap &extensionInfos = GetExtensionInfoMap();
     auto extension                         = extensionInfos.find(name);
 
-    const Extensions &nativeExtensions = mImplementation->getNativeExtensions();
     return extension != extensionInfos.end() && extension->second.Requestable &&
-           nativeExtensions.*(extension->second.ExtensionsMember);
+           mSupportedExtensions.*(extension->second.ExtensionsMember);
 }
 
 void Context::requestExtension(const char *name)
 {
     const ExtensionInfoMap &extensionInfos = GetExtensionInfoMap();
     ASSERT(extensionInfos.find(name) != extensionInfos.end());
     const auto &extension = extensionInfos.at(name);
     ASSERT(extension.Requestable);
-    ASSERT(mImplementation->getNativeExtensions().*(extension.ExtensionsMember));
+    ASSERT(isExtensionRequestable(name));
 
     if (mExtensions.*(extension.ExtensionsMember))
     {
         // Extension already enabled
         return;
     }
 
     mExtensions.*(extension.ExtensionsMember) = true;
@@ -2969,111 +3015,143 @@ bool Context::hasActiveTransformFeedback
         if (pair.second != nullptr && pair.second->hasBoundProgram(program))
         {
             return true;
         }
     }
     return false;
 }
 
-void Context::initCaps(const egl::DisplayExtensions &displayExtensions, bool robustResourceInit)
+Extensions Context::generateSupportedExtensions(const egl::DisplayExtensions &displayExtensions,
+                                                const egl::ClientExtensions &clientExtensions,
+                                                bool robustResourceInit) const
+{
+    Extensions supportedExtensions = mImplementation->getNativeExtensions();
+
+    if (getClientVersion() < ES_2_0)
+    {
+        // Default extensions for GLES1
+        supportedExtensions.pointSizeArray = true;
+        supportedExtensions.textureCubeMap = true;
+    }
+
+    if (getClientVersion() < ES_3_0)
+    {
+        // Disable ES3+ extensions
+        supportedExtensions.colorBufferFloat      = false;
+        supportedExtensions.eglImageExternalEssl3 = false;
+        supportedExtensions.textureNorm16         = false;
+        supportedExtensions.multiview             = false;
+        supportedExtensions.maxViews              = 1u;
+    }
+
+    if (getClientVersion() < ES_3_1)
+    {
+        // Disable ES3.1+ extensions
+        supportedExtensions.geometryShader = false;
+    }
+
+    if (getClientVersion() > ES_2_0)
+    {
+        // FIXME(geofflang): Don't support EXT_sRGB in non-ES2 contexts
+        // supportedExtensions.sRGB = false;
+    }
+
+    // Some extensions are always available because they are implemented in the GL layer.
+    supportedExtensions.bindUniformLocation   = true;
+    supportedExtensions.vertexArrayObject     = true;
+    supportedExtensions.bindGeneratesResource = true;
+    supportedExtensions.clientArrays          = true;
+    supportedExtensions.requestExtension      = true;
+
+    // Enable the no error extension if the context was created with the flag.
+    supportedExtensions.noError = mSkipValidation;
+
+    // Enable surfaceless to advertise we'll have the correct behavior when there is no default FBO
+    supportedExtensions.surfacelessContext = displayExtensions.surfacelessContext;
+
+    // Explicitly enable GL_KHR_debug
+    supportedExtensions.debug                   = true;
+    supportedExtensions.maxDebugMessageLength   = 1024;
+    supportedExtensions.maxDebugLoggedMessages  = 1024;
+    supportedExtensions.maxDebugGroupStackDepth = 1024;
+    supportedExtensions.maxLabelLength          = 1024;
+
+    // Explicitly enable GL_ANGLE_robust_client_memory
+    supportedExtensions.robustClientMemory = true;
+
+    // Determine robust resource init availability from EGL.
+    supportedExtensions.robustResourceInitialization = robustResourceInit;
+
+    // mExtensions.robustBufferAccessBehavior is true only if robust access is true and the backend
+    // supports it.
+    supportedExtensions.robustBufferAccessBehavior =
+        mRobustAccess && supportedExtensions.robustBufferAccessBehavior;
+
+    // Enable the cache control query unconditionally.
+    supportedExtensions.programCacheControl = true;
+
+    // Enable EGL_ANGLE_explicit_context subextensions
+    if (clientExtensions.explicitContext)
+    {
+        // GL_ANGLE_explicit_context_gles1
+        supportedExtensions.explicitContextGles1 = true;
+        // GL_ANGLE_explicit_context
+        supportedExtensions.explicitContext = true;
+    }
+
+    return supportedExtensions;
+}
+
+void Context::initCaps(const egl::DisplayExtensions &displayExtensions,
+                       const egl::ClientExtensions &clientExtensions,
+                       bool robustResourceInit)
 {
     mCaps = mImplementation->getNativeCaps();
 
+    mSupportedExtensions =
+        generateSupportedExtensions(displayExtensions, clientExtensions, robustResourceInit);
+    mExtensions          = mSupportedExtensions;
+
+    mLimitations = mImplementation->getNativeLimitations();
+
     // GLES1 emulation: Initialize caps (Table 6.20 / 6.22 in the ES 1.1 spec)
     if (getClientVersion() < Version(2, 0))
     {
         mCaps.maxMultitextureUnits          = 4;
         mCaps.maxClipPlanes                 = 6;
         mCaps.maxLights                     = 8;
         mCaps.maxModelviewMatrixStackDepth  = Caps::GlobalMatrixStackDepth;
         mCaps.maxProjectionMatrixStackDepth = Caps::GlobalMatrixStackDepth;
         mCaps.maxTextureMatrixStackDepth    = Caps::GlobalMatrixStackDepth;
     }
 
-    mExtensions = mImplementation->getNativeExtensions();
-
-    mLimitations = mImplementation->getNativeLimitations();
-
-    if (getClientVersion() < Version(3, 0))
-    {
-        // Disable ES3+ extensions
-        mExtensions.colorBufferFloat      = false;
-        mExtensions.eglImageExternalEssl3 = false;
-        mExtensions.textureNorm16         = false;
-        mExtensions.multiview             = false;
-        mExtensions.maxViews              = 1u;
-    }
-
-    if (getClientVersion() < ES_3_1)
-    {
-        // Disable ES3.1+ extensions
-        mExtensions.geometryShader = false;
-    }
-
-    if (getClientVersion() > Version(2, 0))
-    {
-        // FIXME(geofflang): Don't support EXT_sRGB in non-ES2 contexts
-        // mExtensions.sRGB = false;
-    }
-
-    // Some extensions are always available because they are implemented in the GL layer.
-    mExtensions.bindUniformLocation   = true;
-    mExtensions.vertexArrayObject     = true;
-    mExtensions.bindGeneratesResource = true;
-    mExtensions.clientArrays          = true;
-    mExtensions.requestExtension      = true;
-
-    // Enable the no error extension if the context was created with the flag.
-    mExtensions.noError = mSkipValidation;
-
-    // Enable surfaceless to advertise we'll have the correct behavior when there is no default FBO
-    mExtensions.surfacelessContext = displayExtensions.surfacelessContext;
-
-    // Explicitly enable GL_KHR_debug
-    mExtensions.debug                   = true;
-    mExtensions.maxDebugMessageLength   = 1024;
-    mExtensions.maxDebugLoggedMessages  = 1024;
-    mExtensions.maxDebugGroupStackDepth = 1024;
-    mExtensions.maxLabelLength          = 1024;
-
-    // Explicitly enable GL_ANGLE_robust_client_memory
-    mExtensions.robustClientMemory = true;
-
-    // Determine robust resource init availability from EGL.
-    mExtensions.robustResourceInitialization = robustResourceInit;
-
-    // mExtensions.robustBufferAccessBehavior is true only if robust access is true and the backend
-    // supports it.
-    mExtensions.robustBufferAccessBehavior =
-        mRobustAccess && mExtensions.robustBufferAccessBehavior;
-
-    // Enable the cache control query unconditionally.
-    mExtensions.programCacheControl = true;
-
     // Apply implementation limits
     LimitCap(&mCaps.maxVertexAttributes, MAX_VERTEX_ATTRIBS);
 
     if (getClientVersion() < ES_3_1)
     {
         mCaps.maxVertexAttribBindings = mCaps.maxVertexAttributes;
     }
     else
     {
         LimitCap(&mCaps.maxVertexAttribBindings, MAX_VERTEX_ATTRIB_BINDINGS);
     }
 
-    LimitCap(&mCaps.maxVertexUniformBlocks, IMPLEMENTATION_MAX_VERTEX_SHADER_UNIFORM_BUFFERS);
+    LimitCap(&mCaps.maxShaderUniformBlocks[ShaderType::Vertex],
+             IMPLEMENTATION_MAX_VERTEX_SHADER_UNIFORM_BUFFERS);
     LimitCap(&mCaps.maxVertexOutputComponents, IMPLEMENTATION_MAX_VARYING_VECTORS * 4);
     LimitCap(&mCaps.maxFragmentInputComponents, IMPLEMENTATION_MAX_VARYING_VECTORS * 4);
 
     // Limit textures as well, so we can use fast bitsets with texture bindings.
     LimitCap(&mCaps.maxCombinedTextureImageUnits, IMPLEMENTATION_MAX_ACTIVE_TEXTURES);
-    LimitCap(&mCaps.maxVertexTextureImageUnits, IMPLEMENTATION_MAX_ACTIVE_TEXTURES / 2);
-    LimitCap(&mCaps.maxTextureImageUnits, IMPLEMENTATION_MAX_ACTIVE_TEXTURES / 2);
+    LimitCap(&mCaps.maxShaderTextureImageUnits[ShaderType::Vertex],
+             IMPLEMENTATION_MAX_ACTIVE_TEXTURES / 2);
+    LimitCap(&mCaps.maxShaderTextureImageUnits[ShaderType::Fragment],
+             IMPLEMENTATION_MAX_ACTIVE_TEXTURES / 2);
 
     mCaps.maxSampleMaskWords = std::min<GLuint>(mCaps.maxSampleMaskWords, MAX_SAMPLE_MASK_WORDS);
 
     // WebGL compatibility
     mExtensions.webglCompatibility = mWebGLContext;
     for (const auto &extensionInfo : GetExtensionInfoMap())
     {
         // If the user has requested that extensions start disabled and they are requestable,
@@ -3167,17 +3245,17 @@ void Context::updateCaps()
         {
             mCaps.compressedTextureFormats.push_back(sizedInternalFormat);
         }
 
         mTextureCaps.insert(sizedInternalFormat, formatCaps);
     }
 
     // If program binary is disabled, blank out the memory cache pointer.
-    if (!mImplementation->getNativeExtensions().getProgramBinary)
+    if (!mSupportedExtensions.getProgramBinary)
     {
         mMemoryProgramCache = nullptr;
     }
 
     // Compute which buffer types are allowed
     mValidBufferBindings.reset();
     mValidBufferBindings.set(BufferBinding::ElementArray);
     mValidBufferBindings.set(BufferBinding::Array);
@@ -3212,16 +3290,21 @@ void Context::initWorkarounds()
 
     // Lose the context upon out of memory error if the application is
     // expecting to watch for those events.
     mWorkarounds.loseContextOnOutOfMemory = (mResetStrategy == GL_LOSE_CONTEXT_ON_RESET_EXT);
 }
 
 Error Context::prepareForDraw()
 {
+    if (mGLES1Renderer)
+    {
+        ANGLE_TRY(mGLES1Renderer->prepareForDraw(this, &mGLState));
+    }
+
     ANGLE_TRY(syncDirtyObjects());
 
     if (isRobustResourceInitEnabled())
     {
         ANGLE_TRY(mGLState.clearUnclearedActiveTextures(this));
         ANGLE_TRY(mGLState.getDrawFramebuffer()->ensureDrawAttachmentsInitialized(this));
     }
 
@@ -3488,38 +3571,17 @@ void Context::framebufferTexture2D(GLenu
                                    GLint level)
 {
     Framebuffer *framebuffer = mGLState.getTargetFramebuffer(target);
     ASSERT(framebuffer);
 
     if (texture != 0)
     {
         Texture *textureObj = getTexture(texture);
-
-        ImageIndex index = ImageIndex::MakeInvalid();
-
-        if (textarget == TextureTarget::_2D)
-        {
-            index = ImageIndex::Make2D(level);
-        }
-        else if (textarget == TextureTarget::Rectangle)
-        {