Backed out 7 changesets (bug 1494809) for build bustage at build/src/dom/canvas/WebGLTextureUpload.cpp on a CLOSED TREE
authorCoroiu Cristina <ccoroiu@mozilla.com>
Wed, 10 Oct 2018 08:15:09 +0300
changeset 440493 e031a41a8250a927ab1cb21e7b4092b3e2c9638f
parent 440492 89e092c992ae26d44f3956ffd1c850a8bfcbed9f
child 440494 3c7e04f374581d49a8c710b03fbfb8fa0909051a
push id34821
push userryanvm@gmail.com
push dateWed, 10 Oct 2018 16:31:04 +0000
treeherdermozilla-central@1a9cbc785296 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1494809
milestone64.0a1
backs out89e092c992ae26d44f3956ffd1c850a8bfcbed9f
076aed819da6fe4a762fe294937afea76f888b0b
101b4c98aad89ed6153c599b0f4ed50ca60d7aa8
a2612f006753ef6bc9be791b71d524c813d9195b
be2ec3c05d105ce3717199a61166330b9cd88299
6106836daf58aaf6174bdc7c9b8c9f88af158565
e98c2a51aa8f3490cf929ae04c8dcb017db11242
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
Backed out 7 changesets (bug 1494809) for build bustage at build/src/dom/canvas/WebGLTextureUpload.cpp on a CLOSED TREE Backed out changeset 89e092c992ae (bug 1494809) Backed out changeset 076aed819da6 (bug 1494809) Backed out changeset 101b4c98aad8 (bug 1494809) Backed out changeset a2612f006753 (bug 1494809) Backed out changeset be2ec3c05d10 (bug 1494809) Backed out changeset 6106836daf58 (bug 1494809) Backed out changeset e98c2a51aa8f (bug 1494809)
dom/bindings/Bindings.conf
dom/canvas/TexUnpackBlob.cpp
dom/canvas/WebGL2ContextRenderbuffers.cpp
dom/canvas/WebGLContext.cpp
dom/canvas/WebGLContext.h
dom/canvas/WebGLContextExtensions.cpp
dom/canvas/WebGLContextFramebufferOperations.cpp
dom/canvas/WebGLContextUtils.cpp
dom/canvas/WebGLExtensionColorBufferFloat.cpp
dom/canvas/WebGLExtensionColorBufferHalfFloat.cpp
dom/canvas/WebGLExtensionCompressedTextureASTC.cpp
dom/canvas/WebGLExtensionCompressedTextureATC.cpp
dom/canvas/WebGLExtensionCompressedTextureBPTC.cpp
dom/canvas/WebGLExtensionCompressedTextureES3.cpp
dom/canvas/WebGLExtensionCompressedTextureETC1.cpp
dom/canvas/WebGLExtensionCompressedTexturePVRTC.cpp
dom/canvas/WebGLExtensionCompressedTextureRGTC.cpp
dom/canvas/WebGLExtensionCompressedTextureS3TC.cpp
dom/canvas/WebGLExtensionCompressedTextureS3TC_SRGB.cpp
dom/canvas/WebGLExtensions.h
dom/canvas/WebGLFormats.cpp
dom/canvas/WebGLFormats.h
dom/canvas/WebGLRenderbuffer.cpp
dom/canvas/WebGLStrongTypes.h
dom/canvas/WebGLTexture.cpp
dom/canvas/WebGLTextureUpload.cpp
dom/canvas/WebGLTypes.h
dom/canvas/moz.build
dom/canvas/test/webgl-mochitest/ensure-exts/test_EXT_texture_compression_bptc.html
dom/canvas/test/webgl-mochitest/ensure-exts/test_EXT_texture_compression_rgtc.html
dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_astc.html
dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_atc.html
dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_es3.html
dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_etc.html
dom/canvas/test/webgl-mochitest/ensure-exts/test_common.html
dom/canvas/test/webgl-mochitest/mochitest.ini
dom/canvas/test/webgl-mochitest/test_webgl_compressed_texture_es3.html
dom/webidl/WebGLRenderingContext.webidl
gfx/gl/GLConsts.h
gfx/gl/GLContext.cpp
gfx/gl/GLContext.h
gfx/gl/GLContextFeatures.cpp
gfx/gl/GLParseRegistryXML.py
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -1109,28 +1109,23 @@ DOMInterfaces = {
     'headerFile': 'WebGLActiveInfo.h'
 },
 
 'WebGLBuffer': {
     'nativeType': 'mozilla::WebGLBuffer',
     'headerFile': 'WebGLBuffer.h'
 },
 
-'EXT_texture_compression_bptc': {
-    'nativeType': 'mozilla::WebGLExtensionCompressedTextureBPTC',
+'WEBGL_compressed_texture_astc': {
+    'nativeType': 'mozilla::WebGLExtensionCompressedTextureASTC',
     'headerFile': 'WebGLExtensions.h'
 },
 
-'EXT_texture_compression_rgtc': {
-    'nativeType': 'mozilla::WebGLExtensionCompressedTextureRGTC',
-    'headerFile': 'WebGLExtensions.h'
-},
-
-'WEBGL_compressed_texture_astc': {
-    'nativeType': 'mozilla::WebGLExtensionCompressedTextureASTC',
+'WEBGL_compressed_texture_atc': {
+    'nativeType': 'mozilla::WebGLExtensionCompressedTextureATC',
     'headerFile': 'WebGLExtensions.h'
 },
 
 'WEBGL_compressed_texture_etc': {
     'nativeType': 'mozilla::WebGLExtensionCompressedTextureES3',
     'headerFile': 'WebGLExtensions.h'
 },
 
--- a/dom/canvas/TexUnpackBlob.cpp
+++ b/dom/canvas/TexUnpackBlob.cpp
@@ -8,17 +8,16 @@
 #include "GLBlitHelper.h"
 #include "GLContext.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/HTMLCanvasElement.h"
 #include "mozilla/RefPtr.h"
 #include "nsLayoutUtils.h"
 #include "WebGLBuffer.h"
 #include "WebGLContext.h"
-#include "WebGLFormats.h"
 #include "WebGLTexelConversions.h"
 #include "WebGLTexture.h"
 
 namespace mozilla {
 namespace webgl {
 
 static bool
 IsPIValidForDOM(const webgl::PackingInfo& pi)
--- a/dom/canvas/WebGL2ContextRenderbuffers.cpp
+++ b/dom/canvas/WebGL2ContextRenderbuffers.cpp
@@ -3,17 +3,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "WebGL2Context.h"
 
 #include "GLContext.h"
 #include "WebGLContextUtils.h"
-#include "WebGLFormats.h"
 
 namespace mozilla {
 
 void
 WebGL2Context::GetInternalformatParameter(JSContext* cx, GLenum target,
                                           GLenum internalformat, GLenum pname,
                                           JS::MutableHandleValue retval,
                                           ErrorResult& out_rv)
--- a/dom/canvas/WebGLContext.cpp
+++ b/dom/canvas/WebGLContext.cpp
@@ -58,17 +58,16 @@
 // Local
 #include "CanvasUtils.h"
 #include "WebGL1Context.h"
 #include "WebGLActiveInfo.h"
 #include "WebGLBuffer.h"
 #include "WebGLContextLossHandler.h"
 #include "WebGLContextUtils.h"
 #include "WebGLExtensions.h"
-#include "WebGLFormats.h"
 #include "WebGLFramebuffer.h"
 #include "WebGLMemoryTracker.h"
 #include "WebGLObjectModel.h"
 #include "WebGLProgram.h"
 #include "WebGLQuery.h"
 #include "WebGLSampler.h"
 #include "WebGLShader.h"
 #include "WebGLSync.h"
--- a/dom/canvas/WebGLContext.h
+++ b/dom/canvas/WebGLContext.h
@@ -29,16 +29,17 @@
 #include "SurfaceTypes.h"
 #include "ScopedGLHelpers.h"
 #include "TexUnpackBlob.h"
 
 // Local
 #include "CacheMap.h"
 #include "WebGLContextLossHandler.h"
 #include "WebGLContextUnchecked.h"
+#include "WebGLFormats.h"
 #include "WebGLObjectModel.h"
 #include "WebGLStrongTypes.h"
 #include "WebGLTexture.h"
 
 // Generated
 #include "nsIDOMEventListener.h"
 #include "nsICanvasRenderingContextInternal.h"
 #include "nsIObserver.h"
@@ -96,19 +97,16 @@ class VRLayerChild;
 namespace gl {
 class GLScreenBuffer;
 class MozFramebuffer;
 } // namespace gl
 
 namespace webgl {
 class AvailabilityRunnable;
 struct CachedDrawFetchLimits;
-struct FormatInfo;
-class FormatUsageAuthority;
-struct FormatUsageInfo;
 struct LinkedProgramInfo;
 class ShaderValidator;
 class TexUnpackBlob;
 struct UniformInfo;
 struct UniformBlockInfo;
 } // namespace webgl
 
 WebGLTexelFormat GetWebGLTexelFormat(TexInternalFormat format);
@@ -285,21 +283,20 @@ class WebGLContext
 {
     friend class ScopedDrawCallWrapper;
     friend class ScopedDrawWithTransformFeedback;
     friend class ScopedFakeVertexAttrib0;
     friend class ScopedFBRebinder;
     friend class WebGL2Context;
     friend class WebGLContextUserData;
     friend class WebGLExtensionCompressedTextureASTC;
-    friend class WebGLExtensionCompressedTextureBPTC;
+    friend class WebGLExtensionCompressedTextureATC;
     friend class WebGLExtensionCompressedTextureES3;
     friend class WebGLExtensionCompressedTextureETC1;
     friend class WebGLExtensionCompressedTexturePVRTC;
-    friend class WebGLExtensionCompressedTextureRGTC;
     friend class WebGLExtensionCompressedTextureS3TC;
     friend class WebGLExtensionCompressedTextureS3TC_SRGB;
     friend class WebGLExtensionDepthTexture;
     friend class WebGLExtensionDisjointTimerQuery;
     friend class WebGLExtensionDrawBuffers;
     friend class WebGLExtensionLoseContext;
     friend class WebGLExtensionMOZDebug;
     friend class WebGLExtensionVertexArray;
--- a/dom/canvas/WebGLContextExtensions.cpp
+++ b/dom/canvas/WebGLContextExtensions.cpp
@@ -34,30 +34,29 @@ WebGLContext::GetExtensionString(WebGLEx
 
         WEBGL_EXTENSION_IDENTIFIER(ANGLE_instanced_arrays)
         WEBGL_EXTENSION_IDENTIFIER(EXT_blend_minmax)
         WEBGL_EXTENSION_IDENTIFIER(EXT_color_buffer_float)
         WEBGL_EXTENSION_IDENTIFIER(EXT_color_buffer_half_float)
         WEBGL_EXTENSION_IDENTIFIER(EXT_frag_depth)
         WEBGL_EXTENSION_IDENTIFIER(EXT_shader_texture_lod)
         WEBGL_EXTENSION_IDENTIFIER(EXT_sRGB)
-        WEBGL_EXTENSION_IDENTIFIER(EXT_texture_compression_bptc)
-        WEBGL_EXTENSION_IDENTIFIER(EXT_texture_compression_rgtc)
         WEBGL_EXTENSION_IDENTIFIER(EXT_texture_filter_anisotropic)
         WEBGL_EXTENSION_IDENTIFIER(EXT_disjoint_timer_query)
         WEBGL_EXTENSION_IDENTIFIER(MOZ_debug)
         WEBGL_EXTENSION_IDENTIFIER(OES_element_index_uint)
         WEBGL_EXTENSION_IDENTIFIER(OES_standard_derivatives)
         WEBGL_EXTENSION_IDENTIFIER(OES_texture_float)
         WEBGL_EXTENSION_IDENTIFIER(OES_texture_float_linear)
         WEBGL_EXTENSION_IDENTIFIER(OES_texture_half_float)
         WEBGL_EXTENSION_IDENTIFIER(OES_texture_half_float_linear)
         WEBGL_EXTENSION_IDENTIFIER(OES_vertex_array_object)
         WEBGL_EXTENSION_IDENTIFIER(WEBGL_color_buffer_float)
         WEBGL_EXTENSION_IDENTIFIER(WEBGL_compressed_texture_astc)
+        WEBGL_EXTENSION_IDENTIFIER(WEBGL_compressed_texture_atc)
         WEBGL_EXTENSION_IDENTIFIER(WEBGL_compressed_texture_etc)
         WEBGL_EXTENSION_IDENTIFIER(WEBGL_compressed_texture_etc1)
         WEBGL_EXTENSION_IDENTIFIER(WEBGL_compressed_texture_pvrtc)
         WEBGL_EXTENSION_IDENTIFIER(WEBGL_compressed_texture_s3tc)
         WEBGL_EXTENSION_IDENTIFIER(WEBGL_compressed_texture_s3tc_srgb)
         WEBGL_EXTENSION_IDENTIFIER(WEBGL_debug_renderer_info)
         WEBGL_EXTENSION_IDENTIFIER(WEBGL_debug_shaders)
         WEBGL_EXTENSION_IDENTIFIER(WEBGL_depth_texture)
@@ -116,36 +115,28 @@ WebGLContext::IsExtensionSupported(WebGL
 {
     if (mDisableExtensions)
         return false;
 
     // Extensions for both WebGL 1 and 2.
     switch (ext) {
     // In alphabetical order
     // EXT_
-    case WebGLExtensionID::EXT_texture_compression_bptc:
-        if (!gfxPrefs::WebGLDraftExtensionsEnabled())
-            return false;
-        return WebGLExtensionCompressedTextureBPTC::IsSupported(this);
-
-    case WebGLExtensionID::EXT_texture_compression_rgtc:
-        if (!gfxPrefs::WebGLDraftExtensionsEnabled())
-            return false;
-        return WebGLExtensionCompressedTextureRGTC::IsSupported(this);
-
     case WebGLExtensionID::EXT_texture_filter_anisotropic:
         return gl->IsExtensionSupported(gl::GLContext::EXT_texture_filter_anisotropic);
 
     // OES_
     case WebGLExtensionID::OES_texture_float_linear:
         return gl->IsSupported(gl::GLFeature::texture_float_linear);
 
     // WEBGL_
     case WebGLExtensionID::WEBGL_compressed_texture_astc:
         return WebGLExtensionCompressedTextureASTC::IsSupported(this);
+    case WebGLExtensionID::WEBGL_compressed_texture_atc:
+        return gl->IsExtensionSupported(gl::GLContext::AMD_compressed_ATC_texture);
     case WebGLExtensionID::WEBGL_compressed_texture_etc:
         return gl->IsSupported(gl::GLFeature::ES3_compatibility) &&
                !gl->IsANGLE();
     case WebGLExtensionID::WEBGL_compressed_texture_etc1:
         return gl->IsExtensionSupported(gl::GLContext::OES_compressed_ETC1_RGB8_texture) &&
                !gl->IsANGLE();
     case WebGLExtensionID::WEBGL_compressed_texture_pvrtc:
         return gl->IsExtensionSupported(gl::GLContext::IMG_texture_compression_pvrtc);
@@ -349,22 +340,16 @@ WebGLContext::EnableExtension(WebGLExten
         obj = new WebGLExtensionFragDepth(this);
         break;
     case WebGLExtensionID::EXT_shader_texture_lod:
         obj = new WebGLExtensionShaderTextureLod(this);
         break;
     case WebGLExtensionID::EXT_sRGB:
         obj = new WebGLExtensionSRGB(this);
         break;
-    case WebGLExtensionID::EXT_texture_compression_bptc:
-        obj = new WebGLExtensionCompressedTextureBPTC(this);
-        break;
-    case WebGLExtensionID::EXT_texture_compression_rgtc:
-        obj = new WebGLExtensionCompressedTextureRGTC(this);
-        break;
     case WebGLExtensionID::EXT_texture_filter_anisotropic:
         obj = new WebGLExtensionTextureFilterAnisotropic(this);
         break;
 
     // MOZ_
     case WebGLExtensionID::MOZ_debug:
         obj = new WebGLExtensionMOZDebug(this);
         break;
@@ -394,16 +379,19 @@ WebGLContext::EnableExtension(WebGLExten
 
     // WEBGL_
     case WebGLExtensionID::WEBGL_color_buffer_float:
         obj = new WebGLExtensionColorBufferFloat(this);
         break;
     case WebGLExtensionID::WEBGL_compressed_texture_astc:
         obj = new WebGLExtensionCompressedTextureASTC(this);
         break;
+    case WebGLExtensionID::WEBGL_compressed_texture_atc:
+        obj = new WebGLExtensionCompressedTextureATC(this);
+        break;
     case WebGLExtensionID::WEBGL_compressed_texture_etc:
         obj = new WebGLExtensionCompressedTextureES3(this);
         break;
     case WebGLExtensionID::WEBGL_compressed_texture_etc1:
         obj = new WebGLExtensionCompressedTextureETC1(this);
         break;
     case WebGLExtensionID::WEBGL_compressed_texture_pvrtc:
         obj = new WebGLExtensionCompressedTexturePVRTC(this);
--- a/dom/canvas/WebGLContextFramebufferOperations.cpp
+++ b/dom/canvas/WebGLContextFramebufferOperations.cpp
@@ -1,21 +1,19 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "WebGLContext.h"
-
+#include "WebGLTexture.h"
+#include "WebGLRenderbuffer.h"
+#include "WebGLFramebuffer.h"
 #include "GLContext.h"
 #include "GLScreenBuffer.h"
-#include "WebGLFormats.h"
-#include "WebGLFramebuffer.h"
-#include "WebGLRenderbuffer.h"
-#include "WebGLTexture.h"
 
 namespace mozilla {
 
 void
 WebGLContext::Clear(GLbitfield mask)
 {
     const FuncScope funcScope(*this, "clear");
     if (IsContextLost())
--- a/dom/canvas/WebGLContextUtils.cpp
+++ b/dom/canvas/WebGLContextUtils.cpp
@@ -276,16 +276,19 @@ WebGLContext::ErrorName(GLenum error)
 // This version is fallible and will return nullptr if unrecognized.
 const char*
 GetEnumName(const GLenum val, const char* const defaultRet)
 {
     switch (val) {
 #define XX(x) case LOCAL_GL_##x: return #x
         XX(NONE);
         XX(ALPHA);
+        XX(ATC_RGB);
+        XX(ATC_RGBA_EXPLICIT_ALPHA);
+        XX(ATC_RGBA_INTERPOLATED_ALPHA);
         XX(COMPRESSED_RGBA_PVRTC_2BPPV1);
         XX(COMPRESSED_RGBA_PVRTC_4BPPV1);
         XX(COMPRESSED_RGBA_S3TC_DXT1_EXT);
         XX(COMPRESSED_RGBA_S3TC_DXT3_EXT);
         XX(COMPRESSED_RGBA_S3TC_DXT5_EXT);
         XX(COMPRESSED_RGB_PVRTC_2BPPV1);
         XX(COMPRESSED_RGB_PVRTC_4BPPV1);
         XX(COMPRESSED_RGB_S3TC_DXT1_EXT);
@@ -627,16 +630,59 @@ EnumString(const GLenum val)
 void
 WebGLContext::ErrorInvalidEnumArg(const char* argName, GLenum val) const
 {
     nsCString enumName;
     EnumName(val, &enumName);
     ErrorInvalidEnum("Bad `%s`: %s", argName, enumName.BeginReading());
 }
 
+bool
+IsCompressedTextureFormat(GLenum format)
+{
+    switch (format) {
+    case LOCAL_GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
+    case LOCAL_GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
+    case LOCAL_GL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
+    case LOCAL_GL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
+    case LOCAL_GL_COMPRESSED_SRGB_S3TC_DXT1_EXT:
+    case LOCAL_GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:
+    case LOCAL_GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:
+    case LOCAL_GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
+    case LOCAL_GL_ATC_RGB:
+    case LOCAL_GL_ATC_RGBA_EXPLICIT_ALPHA:
+    case LOCAL_GL_ATC_RGBA_INTERPOLATED_ALPHA:
+    case LOCAL_GL_COMPRESSED_RGB_PVRTC_4BPPV1:
+    case LOCAL_GL_COMPRESSED_RGB_PVRTC_2BPPV1:
+    case LOCAL_GL_COMPRESSED_RGBA_PVRTC_4BPPV1:
+    case LOCAL_GL_COMPRESSED_RGBA_PVRTC_2BPPV1:
+    case LOCAL_GL_ETC1_RGB8_OES:
+    case LOCAL_GL_COMPRESSED_R11_EAC:
+    case LOCAL_GL_COMPRESSED_SIGNED_R11_EAC:
+    case LOCAL_GL_COMPRESSED_RG11_EAC:
+    case LOCAL_GL_COMPRESSED_SIGNED_RG11_EAC:
+    case LOCAL_GL_COMPRESSED_RGB8_ETC2:
+    case LOCAL_GL_COMPRESSED_SRGB8_ETC2:
+    case LOCAL_GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:
+    case LOCAL_GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:
+    case LOCAL_GL_COMPRESSED_RGBA8_ETC2_EAC:
+    case LOCAL_GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:
+        return true;
+    default:
+        return false;
+    }
+}
+
+
+bool
+IsTextureFormatCompressed(TexInternalFormat format)
+{
+    return IsCompressedTextureFormat(format.get());
+}
+
 GLenum
 WebGLContext::GetAndFlushUnderlyingGLErrors() const
 {
     // Get and clear GL error in ALL cases.
     GLenum error = gl->fGetError();
 
     // Only store in mUnderlyingGLError if is hasn't already recorded an
     // error.
--- a/dom/canvas/WebGLExtensionColorBufferFloat.cpp
+++ b/dom/canvas/WebGLExtensionColorBufferFloat.cpp
@@ -4,16 +4,20 @@
 
 #include "WebGLExtensions.h"
 
 #include "GLContext.h"
 #include "mozilla/dom/WebGLRenderingContextBinding.h"
 #include "WebGLContext.h"
 #include "WebGLFormats.h"
 
+#ifdef FOO
+#error FOO is already defined! We use FOO() macros to keep things succinct in this file.
+#endif
+
 namespace mozilla {
 
 WebGLExtensionColorBufferFloat::WebGLExtensionColorBufferFloat(WebGLContext* webgl)
     : WebGLExtensionBase(webgl)
 {
     MOZ_ASSERT(IsSupported(webgl), "Don't construct extension if unsupported.");
 
     auto& fua = webgl->mFormatUsage;
--- a/dom/canvas/WebGLExtensionColorBufferHalfFloat.cpp
+++ b/dom/canvas/WebGLExtensionColorBufferHalfFloat.cpp
@@ -4,16 +4,20 @@
 
 #include "WebGLExtensions.h"
 
 #include "GLContext.h"
 #include "mozilla/dom/WebGLRenderingContextBinding.h"
 #include "WebGLContext.h"
 #include "WebGLFormats.h"
 
+#ifdef FOO
+#error FOO is already defined! We use FOO() macros to keep things succinct in this file.
+#endif
+
 namespace mozilla {
 
 WebGLExtensionColorBufferHalfFloat::WebGLExtensionColorBufferHalfFloat(WebGLContext* webgl)
     : WebGLExtensionBase(webgl)
 {
     MOZ_ASSERT(IsSupported(webgl), "Don't construct extension if unsupported.");
 
     auto& fua = webgl->mFormatUsage;
--- a/dom/canvas/WebGLExtensionCompressedTextureASTC.cpp
+++ b/dom/canvas/WebGLExtensionCompressedTextureASTC.cpp
@@ -2,17 +2,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "WebGLExtensions.h"
 
 #include "GLContext.h"
 #include "mozilla/dom/WebGLRenderingContextBinding.h"
 #include "WebGLContext.h"
-#include "WebGLFormats.h"
 
 namespace mozilla {
 
 WebGLExtensionCompressedTextureASTC::WebGLExtensionCompressedTextureASTC(WebGLContext* webgl)
     : WebGLExtensionBase(webgl)
 {
     MOZ_ASSERT(IsSupported(webgl), "Don't construct extension if unsupported.");
 
new file mode 100644
--- /dev/null
+++ b/dom/canvas/WebGLExtensionCompressedTextureATC.cpp
@@ -0,0 +1,46 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include "WebGLExtensions.h"
+
+#include "GLContext.h"
+#include "mozilla/dom/WebGLRenderingContextBinding.h"
+#include "WebGLContext.h"
+
+#ifdef FOO
+#error FOO is already defined! We use FOO() macros to keep things succinct in this file.
+#endif
+
+namespace mozilla {
+
+WebGLExtensionCompressedTextureATC::WebGLExtensionCompressedTextureATC(WebGLContext* webgl)
+    : WebGLExtensionBase(webgl)
+{
+    RefPtr<WebGLContext> webgl_ = webgl; // Bug 1201275
+    const auto fnAdd = [&webgl_](GLenum sizedFormat, webgl::EffectiveFormat effFormat) {
+        auto& fua = webgl_->mFormatUsage;
+
+        auto usage = fua->EditUsage(effFormat);
+        usage->isFilterable = true;
+        fua->AllowSizedTexFormat(sizedFormat, usage);
+
+        webgl_->mCompressedTextureFormats.AppendElement(sizedFormat);
+    };
+
+#define FOO(x) LOCAL_GL_ ## x, webgl::EffectiveFormat::x
+
+    fnAdd(FOO(ATC_RGB_AMD));
+    fnAdd(FOO(ATC_RGBA_EXPLICIT_ALPHA_AMD));
+    fnAdd(FOO(ATC_RGBA_INTERPOLATED_ALPHA_AMD));
+
+#undef FOO
+}
+
+WebGLExtensionCompressedTextureATC::~WebGLExtensionCompressedTextureATC()
+{
+}
+
+IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionCompressedTextureATC, WEBGL_compressed_texture_atc)
+
+} // namespace mozilla
deleted file mode 100644
--- a/dom/canvas/WebGLExtensionCompressedTextureBPTC.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "WebGLExtensions.h"
-
-#include "GLContext.h"
-#include "mozilla/dom/WebGLRenderingContextBinding.h"
-#include "WebGLContext.h"
-#include "WebGLFormats.h"
-
-namespace mozilla {
-
-WebGLExtensionCompressedTextureBPTC::WebGLExtensionCompressedTextureBPTC(WebGLContext* const webgl)
-    : WebGLExtensionBase(webgl)
-{
-    MOZ_ASSERT(IsSupported(webgl), "Don't construct extension if unsupported.");
-
-    auto& fua = webgl->mFormatUsage;
-
-    const auto fnAdd = [&](const GLenum sizedFormat,
-                           const webgl::EffectiveFormat effFormat)
-    {
-        auto usage = fua->EditUsage(effFormat);
-        usage->isFilterable = true;
-        fua->AllowSizedTexFormat(sizedFormat, usage);
-
-        webgl->mCompressedTextureFormats.AppendElement(sizedFormat);
-    };
-
-#define _(X) LOCAL_GL_ ## X, webgl::EffectiveFormat::X
-
-    fnAdd(_(COMPRESSED_RGBA_BPTC_UNORM));
-    fnAdd(_(COMPRESSED_SRGB_ALPHA_BPTC_UNORM));
-    fnAdd(_(COMPRESSED_RGB_BPTC_SIGNED_FLOAT));
-    fnAdd(_(COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT));
-
-#undef _
-}
-
-bool
-WebGLExtensionCompressedTextureBPTC::IsSupported(const WebGLContext* const webgl)
-{
-    return webgl->gl->IsSupported(gl::GLFeature::texture_compression_bptc);
-}
-
-IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionCompressedTextureBPTC, EXT_texture_compression_bptc)
-
-} // namespace mozilla
--- a/dom/canvas/WebGLExtensionCompressedTextureES3.cpp
+++ b/dom/canvas/WebGLExtensionCompressedTextureES3.cpp
@@ -2,17 +2,20 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "WebGLExtensions.h"
 
 #include "GLContext.h"
 #include "mozilla/dom/WebGLRenderingContextBinding.h"
 #include "WebGLContext.h"
-#include "WebGLFormats.h"
+
+#ifdef FOO
+#error FOO is already defined! We use FOO() macros to keep things succinct in this file.
+#endif
 
 namespace mozilla {
 
 WebGLExtensionCompressedTextureES3::WebGLExtensionCompressedTextureES3(WebGLContext* webgl)
     : WebGLExtensionBase(webgl)
 {
     // GLES 3.0.4, p147, table 3.19
     // GLES 3.0.4, p286+, $C.1 "ETC Compressed Texture Image Formats"
--- a/dom/canvas/WebGLExtensionCompressedTextureETC1.cpp
+++ b/dom/canvas/WebGLExtensionCompressedTextureETC1.cpp
@@ -2,17 +2,20 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "WebGLExtensions.h"
 
 #include "GLContext.h"
 #include "mozilla/dom/WebGLRenderingContextBinding.h"
 #include "WebGLContext.h"
-#include "WebGLFormats.h"
+
+#ifdef FOO
+#error FOO is already defined! We use FOO() macros to keep things succinct in this file.
+#endif
 
 namespace mozilla {
 
 WebGLExtensionCompressedTextureETC1::WebGLExtensionCompressedTextureETC1(WebGLContext* webgl)
     : WebGLExtensionBase(webgl)
 {
     RefPtr<WebGLContext> webgl_ = webgl; // Bug 1201275
     const auto fnAdd = [&webgl_](GLenum sizedFormat, webgl::EffectiveFormat effFormat) {
--- a/dom/canvas/WebGLExtensionCompressedTexturePVRTC.cpp
+++ b/dom/canvas/WebGLExtensionCompressedTexturePVRTC.cpp
@@ -2,17 +2,20 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "WebGLExtensions.h"
 
 #include "GLContext.h"
 #include "mozilla/dom/WebGLRenderingContextBinding.h"
 #include "WebGLContext.h"
-#include "WebGLFormats.h"
+
+#ifdef FOO
+#error FOO is already defined! We use FOO() macros to keep things succinct in this file.
+#endif
 
 namespace mozilla {
 
 WebGLExtensionCompressedTexturePVRTC::WebGLExtensionCompressedTexturePVRTC(WebGLContext* webgl)
     : WebGLExtensionBase(webgl)
 {
     RefPtr<WebGLContext> webgl_ = webgl; // Bug 1201275
     const auto fnAdd = [&webgl_](GLenum sizedFormat, webgl::EffectiveFormat effFormat) {
deleted file mode 100644
--- a/dom/canvas/WebGLExtensionCompressedTextureRGTC.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "WebGLExtensions.h"
-
-#include "GLContext.h"
-#include "mozilla/dom/WebGLRenderingContextBinding.h"
-#include "WebGLContext.h"
-#include "WebGLFormats.h"
-
-namespace mozilla {
-
-WebGLExtensionCompressedTextureRGTC::WebGLExtensionCompressedTextureRGTC(WebGLContext* const webgl)
-    : WebGLExtensionBase(webgl)
-{
-    MOZ_ASSERT(IsSupported(webgl), "Don't construct extension if unsupported.");
-
-    auto& fua = webgl->mFormatUsage;
-
-    const auto fnAdd = [&](const GLenum sizedFormat,
-                           const webgl::EffectiveFormat effFormat)
-    {
-        auto usage = fua->EditUsage(effFormat);
-        usage->isFilterable = true;
-        fua->AllowSizedTexFormat(sizedFormat, usage);
-
-        webgl->mCompressedTextureFormats.AppendElement(sizedFormat);
-    };
-
-#define _(X) LOCAL_GL_ ## X, webgl::EffectiveFormat::X
-
-    fnAdd(_(COMPRESSED_RED_RGTC1));
-    fnAdd(_(COMPRESSED_SIGNED_RED_RGTC1));
-    fnAdd(_(COMPRESSED_RG_RGTC2));
-    fnAdd(_(COMPRESSED_SIGNED_RG_RGTC2));
-
-#undef _
-}
-
-bool
-WebGLExtensionCompressedTextureRGTC::IsSupported(const WebGLContext* const webgl)
-{
-    return webgl->gl->IsSupported(gl::GLFeature::texture_compression_rgtc);
-}
-
-IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionCompressedTextureRGTC, EXT_texture_compression_rgtc)
-
-} // namespace mozilla
--- a/dom/canvas/WebGLExtensionCompressedTextureS3TC.cpp
+++ b/dom/canvas/WebGLExtensionCompressedTextureS3TC.cpp
@@ -2,17 +2,20 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "WebGLExtensions.h"
 
 #include "GLContext.h"
 #include "mozilla/dom/WebGLRenderingContextBinding.h"
 #include "WebGLContext.h"
-#include "WebGLFormats.h"
+
+#ifdef FOO
+#error FOO is already defined! We use FOO() macros to keep things succinct in this file.
+#endif
 
 namespace mozilla {
 
 WebGLExtensionCompressedTextureS3TC::WebGLExtensionCompressedTextureS3TC(WebGLContext* webgl)
     : WebGLExtensionBase(webgl)
 {
     RefPtr<WebGLContext> webgl_ = webgl; // Bug 1201275
     const auto fnAdd = [&webgl_](GLenum sizedFormat, webgl::EffectiveFormat effFormat) {
--- a/dom/canvas/WebGLExtensionCompressedTextureS3TC_SRGB.cpp
+++ b/dom/canvas/WebGLExtensionCompressedTextureS3TC_SRGB.cpp
@@ -2,17 +2,20 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "WebGLExtensions.h"
 
 #include "GLContext.h"
 #include "mozilla/dom/WebGLRenderingContextBinding.h"
 #include "WebGLContext.h"
-#include "WebGLFormats.h"
+
+#ifdef FOO
+#error FOO is already defined! We use FOO() macros to keep things succinct in this file.
+#endif
 
 namespace mozilla {
 
 WebGLExtensionCompressedTextureS3TC_SRGB::WebGLExtensionCompressedTextureS3TC_SRGB(WebGLContext* webgl)
     : WebGLExtensionBase(webgl)
 {
     RefPtr<WebGLContext> webgl_ = webgl; // Bug 1201275
     const auto fnAdd = [&webgl_](GLenum sizedFormat, webgl::EffectiveFormat effFormat) {
--- a/dom/canvas/WebGLExtensions.h
+++ b/dom/canvas/WebGLExtensions.h
@@ -74,23 +74,22 @@ public:
 
     void GetSupportedProfiles(dom::Nullable< nsTArray<nsString> >& retval) const;
 
     static bool IsSupported(const WebGLContext* webgl);
 
     DECL_WEBGL_EXTENSION_GOOP
 };
 
-class WebGLExtensionCompressedTextureBPTC final
+class WebGLExtensionCompressedTextureATC
     : public WebGLExtensionBase
 {
 public:
-    explicit WebGLExtensionCompressedTextureBPTC(WebGLContext* webgl);
-
-    static bool IsSupported(const WebGLContext* webgl);
+    explicit WebGLExtensionCompressedTextureATC(WebGLContext*);
+    virtual ~WebGLExtensionCompressedTextureATC();
 
     DECL_WEBGL_EXTENSION_GOOP
 };
 
 class WebGLExtensionCompressedTextureES3
     : public WebGLExtensionBase
 {
 public:
@@ -115,27 +114,16 @@ class WebGLExtensionCompressedTexturePVR
 {
 public:
     explicit WebGLExtensionCompressedTexturePVRTC(WebGLContext*);
     virtual ~WebGLExtensionCompressedTexturePVRTC();
 
     DECL_WEBGL_EXTENSION_GOOP
 };
 
-class WebGLExtensionCompressedTextureRGTC final
-    : public WebGLExtensionBase
-{
-public:
-    explicit WebGLExtensionCompressedTextureRGTC(WebGLContext* webgl);
-
-    static bool IsSupported(const WebGLContext* webgl);
-
-    DECL_WEBGL_EXTENSION_GOOP
-};
-
 class WebGLExtensionCompressedTextureS3TC
     : public WebGLExtensionBase
 {
 public:
     explicit WebGLExtensionCompressedTextureS3TC(WebGLContext*);
     virtual ~WebGLExtensionCompressedTextureS3TC();
 
     static bool IsSupported(const WebGLContext*);
--- a/dom/canvas/WebGLFormats.cpp
+++ b/dom/canvas/WebGLFormats.cpp
@@ -6,16 +6,20 @@
 #include "WebGLFormats.h"
 
 #include "gfxPrefs.h"
 #include "GLContext.h"
 #include "GLDefs.h"
 #include "mozilla/gfx/Logging.h"
 #include "mozilla/StaticMutex.h"
 
+#ifdef FOO
+#error FOO is already defined! We use FOO() macros to keep things succinct in this file.
+#endif
+
 namespace mozilla {
 namespace webgl {
 
 template<typename K, typename V, typename K2, typename V2>
 static inline void
 AlwaysInsert(std::map<K,V>& dest, const K2& key, const V2& val)
 {
     auto res = dest.insert({ key, val });
@@ -93,27 +97,20 @@ InitCompressedFormatInfo()
     AddCompressedFormatInfo(EffectiveFormat::COMPRESSED_SRGB8_ALPHA8_ETC2_EAC         , 128, 4, 4, CompressionFamily::ES3);
     AddCompressedFormatInfo(EffectiveFormat::COMPRESSED_R11_EAC                       ,  64, 4, 4, CompressionFamily::ES3);
     AddCompressedFormatInfo(EffectiveFormat::COMPRESSED_RG11_EAC                      , 128, 4, 4, CompressionFamily::ES3);
     AddCompressedFormatInfo(EffectiveFormat::COMPRESSED_SIGNED_R11_EAC                ,  64, 4, 4, CompressionFamily::ES3);
     AddCompressedFormatInfo(EffectiveFormat::COMPRESSED_SIGNED_RG11_EAC               , 128, 4, 4, CompressionFamily::ES3);
     AddCompressedFormatInfo(EffectiveFormat::COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 ,  64, 4, 4, CompressionFamily::ES3);
     AddCompressedFormatInfo(EffectiveFormat::COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,  64, 4, 4, CompressionFamily::ES3);
 
-    // EXT_texture_compression_bptc
-    AddCompressedFormatInfo(EffectiveFormat::COMPRESSED_RGBA_BPTC_UNORM        , 16*8, 4, 4, CompressionFamily::BPTC);
-    AddCompressedFormatInfo(EffectiveFormat::COMPRESSED_SRGB_ALPHA_BPTC_UNORM  , 16*8, 4, 4, CompressionFamily::BPTC);
-    AddCompressedFormatInfo(EffectiveFormat::COMPRESSED_RGB_BPTC_SIGNED_FLOAT  , 16*8, 4, 4, CompressionFamily::BPTC);
-    AddCompressedFormatInfo(EffectiveFormat::COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT, 16*8, 4, 4, CompressionFamily::BPTC);
-
-    // EXT_texture_compression_rgtc
-    AddCompressedFormatInfo(EffectiveFormat::COMPRESSED_RED_RGTC1       ,  8*8, 4, 4, CompressionFamily::RGTC);
-    AddCompressedFormatInfo(EffectiveFormat::COMPRESSED_SIGNED_RED_RGTC1,  8*8, 4, 4, CompressionFamily::RGTC);
-    AddCompressedFormatInfo(EffectiveFormat::COMPRESSED_RG_RGTC2        , 16*8, 4, 4, CompressionFamily::RGTC);
-    AddCompressedFormatInfo(EffectiveFormat::COMPRESSED_SIGNED_RG_RGTC2 , 16*8, 4, 4, CompressionFamily::RGTC);
+    // AMD_compressed_ATC_texture
+    AddCompressedFormatInfo(EffectiveFormat::ATC_RGB_AMD                    ,  64, 4, 4, CompressionFamily::ATC);
+    AddCompressedFormatInfo(EffectiveFormat::ATC_RGBA_EXPLICIT_ALPHA_AMD    , 128, 4, 4, CompressionFamily::ATC);
+    AddCompressedFormatInfo(EffectiveFormat::ATC_RGBA_INTERPOLATED_ALPHA_AMD, 128, 4, 4, CompressionFamily::ATC);
 
     // EXT_texture_compression_s3tc
     AddCompressedFormatInfo(EffectiveFormat::COMPRESSED_RGB_S3TC_DXT1_EXT ,  64, 4, 4, CompressionFamily::S3TC);
     AddCompressedFormatInfo(EffectiveFormat::COMPRESSED_RGBA_S3TC_DXT1_EXT,  64, 4, 4, CompressionFamily::S3TC);
     AddCompressedFormatInfo(EffectiveFormat::COMPRESSED_RGBA_S3TC_DXT3_EXT, 128, 4, 4, CompressionFamily::S3TC);
     AddCompressedFormatInfo(EffectiveFormat::COMPRESSED_RGBA_S3TC_DXT5_EXT, 128, 4, 4, CompressionFamily::S3TC);
 
     // EXT_texture_compression_s3tc_srgb
@@ -316,27 +313,20 @@ InitFormatInfo()
     AddFormatInfo(FOO(COMPRESSED_SRGB8_ALPHA8_ETC2_EAC         ), 0, 1,1,1,1, 0,0, UnsizedFormat::RGBA, true , ComponentType::NormUInt);
     AddFormatInfo(FOO(COMPRESSED_R11_EAC                       ), 0, 1,0,0,0, 0,0, UnsizedFormat::R   , false, ComponentType::NormUInt);
     AddFormatInfo(FOO(COMPRESSED_RG11_EAC                      ), 0, 1,1,0,0, 0,0, UnsizedFormat::RG  , false, ComponentType::NormUInt);
     AddFormatInfo(FOO(COMPRESSED_SIGNED_R11_EAC                ), 0, 1,0,0,0, 0,0, UnsizedFormat::R   , false, ComponentType::NormInt );
     AddFormatInfo(FOO(COMPRESSED_SIGNED_RG11_EAC               ), 0, 1,1,0,0, 0,0, UnsizedFormat::RG  , false, ComponentType::NormInt );
     AddFormatInfo(FOO(COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 ), 0, 1,1,1,1, 0,0, UnsizedFormat::RGBA, false, ComponentType::NormUInt);
     AddFormatInfo(FOO(COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2), 0, 1,1,1,1, 0,0, UnsizedFormat::RGBA, true , ComponentType::NormUInt);
 
-    // EXT_texture_compression_bptc
-    AddFormatInfo(FOO(COMPRESSED_RGBA_BPTC_UNORM        ), 0, 1,1,1,1, 0,0, UnsizedFormat::RGBA, false, ComponentType::NormUInt);
-    AddFormatInfo(FOO(COMPRESSED_SRGB_ALPHA_BPTC_UNORM  ), 0, 1,1,1,1, 0,0, UnsizedFormat::RGBA, true , ComponentType::NormUInt);
-    AddFormatInfo(FOO(COMPRESSED_RGB_BPTC_SIGNED_FLOAT  ), 0, 1,1,1,0, 0,0, UnsizedFormat::RGB , false, ComponentType::Float   );
-    AddFormatInfo(FOO(COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT), 0, 1,1,1,0, 0,0, UnsizedFormat::RGB , false, ComponentType::Float   );
-
-    // EXT_texture_compression_rgtc
-    AddFormatInfo(FOO(COMPRESSED_RED_RGTC1       ), 0, 1,0,0,0, 0,0, UnsizedFormat::R , false, ComponentType::NormUInt);
-    AddFormatInfo(FOO(COMPRESSED_SIGNED_RED_RGTC1), 0, 1,0,0,0, 0,0, UnsizedFormat::R , false, ComponentType::NormInt );
-    AddFormatInfo(FOO(COMPRESSED_RG_RGTC2        ), 0, 1,1,0,0, 0,0, UnsizedFormat::RG, false, ComponentType::NormUInt);
-    AddFormatInfo(FOO(COMPRESSED_SIGNED_RG_RGTC2 ), 0, 1,1,0,0, 0,0, UnsizedFormat::RG, false, ComponentType::NormInt );
+    // AMD_compressed_ATC_texture
+    AddFormatInfo(FOO(ATC_RGB_AMD                    ), 0, 1,1,1,0, 0,0, UnsizedFormat::RGB , false, ComponentType::NormUInt);
+    AddFormatInfo(FOO(ATC_RGBA_EXPLICIT_ALPHA_AMD    ), 0, 1,1,1,1, 0,0, UnsizedFormat::RGBA, false, ComponentType::NormUInt);
+    AddFormatInfo(FOO(ATC_RGBA_INTERPOLATED_ALPHA_AMD), 0, 1,1,1,1, 0,0, UnsizedFormat::RGBA, false, ComponentType::NormUInt);
 
     // EXT_texture_compression_s3tc
     AddFormatInfo(FOO(COMPRESSED_RGB_S3TC_DXT1_EXT ), 0, 1,1,1,0, 0,0, UnsizedFormat::RGB , false, ComponentType::NormUInt);
     AddFormatInfo(FOO(COMPRESSED_RGBA_S3TC_DXT1_EXT), 0, 1,1,1,1, 0,0, UnsizedFormat::RGBA, false, ComponentType::NormUInt);
     AddFormatInfo(FOO(COMPRESSED_RGBA_S3TC_DXT3_EXT), 0, 1,1,1,1, 0,0, UnsizedFormat::RGBA, false, ComponentType::NormUInt);
     AddFormatInfo(FOO(COMPRESSED_RGBA_S3TC_DXT5_EXT), 0, 1,1,1,1, 0,0, UnsizedFormat::RGBA, false, ComponentType::NormUInt);
 
     // EXT_texture_compression_s3tc_srgb
--- a/dom/canvas/WebGLFormats.h
+++ b/dom/canvas/WebGLFormats.h
@@ -103,27 +103,20 @@ enum class EffectiveFormat : EffectiveFo
     COMPRESSED_SIGNED_RG11_EAC,
     COMPRESSED_RGB8_ETC2,
     COMPRESSED_SRGB8_ETC2,
     COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,
     COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,
     COMPRESSED_RGBA8_ETC2_EAC,
     COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,
 
-    // EXT_texture_compression_bptc
-    COMPRESSED_RGBA_BPTC_UNORM,
-    COMPRESSED_SRGB_ALPHA_BPTC_UNORM,
-    COMPRESSED_RGB_BPTC_SIGNED_FLOAT,
-    COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT,
-
-    // EXT_texture_compression_rgtc
-    COMPRESSED_RED_RGTC1,
-    COMPRESSED_SIGNED_RED_RGTC1,
-    COMPRESSED_RG_RGTC2,
-    COMPRESSED_SIGNED_RG_RGTC2,
+    // AMD_compressed_ATC_texture
+    ATC_RGB_AMD,
+    ATC_RGBA_EXPLICIT_ALPHA_AMD,
+    ATC_RGBA_INTERPOLATED_ALPHA_AMD,
 
     // EXT_texture_compression_s3tc
     COMPRESSED_RGB_S3TC_DXT1_EXT,
     COMPRESSED_RGBA_S3TC_DXT1_EXT,
     COMPRESSED_RGBA_S3TC_DXT3_EXT,
     COMPRESSED_RGBA_S3TC_DXT5_EXT,
 
     // EXT_texture_sRGB
@@ -213,21 +206,20 @@ enum class ComponentType : uint8_t {
     NormInt,      // RGBA8_SNORM
     NormUInt,     // RGBA8, DEPTH_COMPONENT16
     Float,        // RGBA32F
     Special,      // DEPTH24_STENCIL8
 };
 
 enum class CompressionFamily : uint8_t {
     ASTC,
-    BPTC,
+    ATC,
     ES3, // ETC2 or EAC
     ETC1,
     PVRTC,
-    RGTC,
     S3TC,
 };
 
 ////////////////////////////////////////////////////////////////////////////////
 
 struct CompressedFormatInfo
 {
     const EffectiveFormat effectiveFormat;
--- a/dom/canvas/WebGLRenderbuffer.cpp
+++ b/dom/canvas/WebGLRenderbuffer.cpp
@@ -4,17 +4,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "WebGLRenderbuffer.h"
 
 #include "GLContext.h"
 #include "mozilla/dom/WebGLRenderingContextBinding.h"
 #include "ScopedGLHelpers.h"
 #include "WebGLContext.h"
-#include "WebGLFormats.h"
 #include "WebGLStrongTypes.h"
 #include "WebGLTexture.h"
 
 namespace mozilla {
 
 static GLenum
 DepthFormatForDepthStencilEmu(gl::GLContext* gl)
 {
--- a/dom/canvas/WebGLStrongTypes.h
+++ b/dom/canvas/WebGLStrongTypes.h
@@ -345,16 +345,17 @@ STRONG_GLENUM_BEGIN(TexInternalFormat)
     STRONG_GLENUM_VALUE(COMPRESSED_RGBA_S3TC_DXT1_EXT),
     STRONG_GLENUM_VALUE(COMPRESSED_RGBA_S3TC_DXT3_EXT),
     STRONG_GLENUM_VALUE(COMPRESSED_RGBA_S3TC_DXT5_EXT),
     STRONG_GLENUM_VALUE(COMPRESSED_SRGB_S3TC_DXT1_EXT),
     STRONG_GLENUM_VALUE(COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT),
     STRONG_GLENUM_VALUE(COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT),
     STRONG_GLENUM_VALUE(COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT),
     STRONG_GLENUM_VALUE(DEPTH_STENCIL),
+    STRONG_GLENUM_VALUE(ATC_RGBA_INTERPOLATED_ALPHA),
     STRONG_GLENUM_VALUE(RGBA32F),
     STRONG_GLENUM_VALUE(RGB32F),
     STRONG_GLENUM_VALUE(ALPHA32F_EXT),
     STRONG_GLENUM_VALUE(LUMINANCE32F_EXT),
     STRONG_GLENUM_VALUE(LUMINANCE_ALPHA32F_EXT),
     STRONG_GLENUM_VALUE(RGBA16F),
     STRONG_GLENUM_VALUE(RGB16F),
     STRONG_GLENUM_VALUE(ALPHA16F_EXT),
@@ -366,16 +367,18 @@ STRONG_GLENUM_BEGIN(TexInternalFormat)
     STRONG_GLENUM_VALUE(COMPRESSED_RGBA_PVRTC_4BPPV1),
     STRONG_GLENUM_VALUE(COMPRESSED_RGBA_PVRTC_2BPPV1),
     STRONG_GLENUM_VALUE(R11F_G11F_B10F),
     STRONG_GLENUM_VALUE(RGB9_E5),
     STRONG_GLENUM_VALUE(SRGB),
     STRONG_GLENUM_VALUE(SRGB8),
     STRONG_GLENUM_VALUE(SRGB_ALPHA),
     STRONG_GLENUM_VALUE(SRGB8_ALPHA8),
+    STRONG_GLENUM_VALUE(ATC_RGB),
+    STRONG_GLENUM_VALUE(ATC_RGBA_EXPLICIT_ALPHA),
     STRONG_GLENUM_VALUE(DEPTH_COMPONENT32F),
     STRONG_GLENUM_VALUE(DEPTH32F_STENCIL8),
     STRONG_GLENUM_VALUE(RGB565),
     STRONG_GLENUM_VALUE(ETC1_RGB8_OES),
     STRONG_GLENUM_VALUE(RGBA32UI),
     STRONG_GLENUM_VALUE(RGB32UI),
     STRONG_GLENUM_VALUE(RGBA16UI),
     STRONG_GLENUM_VALUE(RGB16UI),
--- a/dom/canvas/WebGLTexture.cpp
+++ b/dom/canvas/WebGLTexture.cpp
@@ -10,17 +10,16 @@
 #include "mozilla/dom/WebGLRenderingContextBinding.h"
 #include "mozilla/gfx/Logging.h"
 #include "mozilla/MathAlgorithms.h"
 #include "mozilla/Scoped.h"
 #include "mozilla/Unused.h"
 #include "ScopedGLHelpers.h"
 #include "WebGLContext.h"
 #include "WebGLContextUtils.h"
-#include "WebGLFormats.h"
 #include "WebGLFramebuffer.h"
 #include "WebGLSampler.h"
 #include "WebGLTexelConversions.h"
 
 namespace mozilla {
 
 /*static*/ const WebGLTexture::ImageInfo WebGLTexture::ImageInfo::kUndefined;
 
--- a/dom/canvas/WebGLTextureUpload.cpp
+++ b/dom/canvas/WebGLTextureUpload.cpp
@@ -997,63 +997,88 @@ ValidateCompressedTexImageRestrictions(W
                                          " or 2.",
                                          format->name);
             return false;
         }
 
         break;
 
     // Default: There are no restrictions on CompressedTexImage.
-    default: // ETC1, ES3
+    default: // ATC, ETC1, ES3
         break;
     }
 
     return true;
 }
 
 static bool
 ValidateTargetForFormat(WebGLContext* webgl, TexImageTarget target,
                         const webgl::FormatInfo* format)
 {
     // GLES 3.0.4 p127:
     // "Textures with a base internal format of DEPTH_COMPONENT or DEPTH_STENCIL are
     //  supported by texture image specification commands only if `target` is TEXTURE_2D,
     //  TEXTURE_2D_ARRAY, or TEXTURE_CUBE_MAP. Using these formats in conjunction with any
     //  other `target` will result in an INVALID_OPERATION error."
-    const bool ok = [&]() {
-        if (format->d & target == LOCAL_GL_TEXTURE_3D)
-            return false;
-
-        if (format->compression) {
-            switch (format->compression->family) {
-            case webgl::CompressionFamily::ES3:
-            case webgl::CompressionFamily::S3TC:
-                if (target == LOCAL_GL_TEXTURE_3D)
-                    return false;
-                break;
 
-            case webgl::CompressionFamily::ETC1:
-            case webgl::CompressionFamily::PVRTC:
-            case webgl::CompressionFamily::RGTC:
-                if (target == LOCAL_GL_TEXTURE_3D ||
-                    target == LOCAL_GL_TEXTURE_2D_ARRAY)
-                {
-                    return false;
-                }
-                break;
-            default:
-                break;
-            }
+    switch (format->effectiveFormat) {
+    // TEXTURE_2D_ARRAY but not TEXTURE_3D:
+    // D and DS formats
+    case webgl::EffectiveFormat::DEPTH_COMPONENT16:
+    case webgl::EffectiveFormat::DEPTH_COMPONENT24:
+    case webgl::EffectiveFormat::DEPTH_COMPONENT32F:
+    case webgl::EffectiveFormat::DEPTH24_STENCIL8:
+    case webgl::EffectiveFormat::DEPTH32F_STENCIL8:
+    // CompressionFamily::ES3
+    case webgl::EffectiveFormat::COMPRESSED_R11_EAC:
+    case webgl::EffectiveFormat::COMPRESSED_SIGNED_R11_EAC:
+    case webgl::EffectiveFormat::COMPRESSED_RG11_EAC:
+    case webgl::EffectiveFormat::COMPRESSED_SIGNED_RG11_EAC:
+    case webgl::EffectiveFormat::COMPRESSED_RGB8_ETC2:
+    case webgl::EffectiveFormat::COMPRESSED_SRGB8_ETC2:
+    case webgl::EffectiveFormat::COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:
+    case webgl::EffectiveFormat::COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:
+    case webgl::EffectiveFormat::COMPRESSED_RGBA8_ETC2_EAC:
+    case webgl::EffectiveFormat::COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:
+    // CompressionFamily::S3TC
+    case webgl::EffectiveFormat::COMPRESSED_RGB_S3TC_DXT1_EXT:
+    case webgl::EffectiveFormat::COMPRESSED_RGBA_S3TC_DXT1_EXT:
+    case webgl::EffectiveFormat::COMPRESSED_RGBA_S3TC_DXT3_EXT:
+    case webgl::EffectiveFormat::COMPRESSED_RGBA_S3TC_DXT5_EXT:
+        if (target == LOCAL_GL_TEXTURE_3D) {
+            webgl->ErrorInvalidOperation("Format %s cannot be used with TEXTURE_3D.",
+                                         format->name);
+            return false;
         }
-        return true;
-    }();
-    if (!ok) {
-        webgl->ErrorInvalidOperation("Format %s cannot be used with target %s.",
-                                     format->name, GetEnumName(target.get()));
-        return false;
+        break;
+
+    // No 3D targets:
+    // CompressionFamily::ATC
+    case webgl::EffectiveFormat::ATC_RGB_AMD:
+    case webgl::EffectiveFormat::ATC_RGBA_EXPLICIT_ALPHA_AMD:
+    case webgl::EffectiveFormat::ATC_RGBA_INTERPOLATED_ALPHA_AMD:
+    // CompressionFamily::PVRTC
+    case webgl::EffectiveFormat::COMPRESSED_RGB_PVRTC_4BPPV1:
+    case webgl::EffectiveFormat::COMPRESSED_RGBA_PVRTC_4BPPV1:
+    case webgl::EffectiveFormat::COMPRESSED_RGB_PVRTC_2BPPV1:
+    case webgl::EffectiveFormat::COMPRESSED_RGBA_PVRTC_2BPPV1:
+    // CompressionFamily::ETC1
+    case webgl::EffectiveFormat::ETC1_RGB8_OES:
+        if (target == LOCAL_GL_TEXTURE_3D ||
+            target == LOCAL_GL_TEXTURE_2D_ARRAY)
+        {
+            webgl->ErrorInvalidOperation("Format %s cannot be used with TEXTURE_3D or"
+                                         " TEXTURE_2D_ARRAY.",
+                                         format->name);
+            return false;
+        }
+        break;
+
+    default:
+        break;
     }
 
     return true;
 }
 
 void
 WebGLTexture::TexStorage(TexTarget target, GLsizei levels,
                          GLenum sizedFormat, GLsizei width, GLsizei height, GLsizei depth)
@@ -1560,25 +1585,24 @@ WebGLTexture::CompressedTexSubImage(TexI
     }
 
     ////////////////////////////////////
     // Check that source is compatible with dest
 
     switch (format->compression->family) {
     // Forbidden:
     case webgl::CompressionFamily::ETC1:
+    case webgl::CompressionFamily::ATC:
         mContext->ErrorInvalidOperation("Format does not allow sub-image"
                                         " updates.");
         return;
 
     // Block-aligned:
     case webgl::CompressionFamily::ES3:  // Yes, the ES3 formats don't match the ES3
     case webgl::CompressionFamily::S3TC: // default behavior.
-    case webgl::CompressionFamily::BPTC:
-    case webgl::CompressionFamily::RGTC:
         if (!IsSubImageBlockAligned(dstFormat->compression, imageInfo, xOffset, yOffset,
                                     blob->mWidth, blob->mHeight))
         {
             mContext->ErrorInvalidOperation("Format requires block-aligned sub-image"
                                             " updates.");
             return;
         }
         break;
--- a/dom/canvas/WebGLTypes.h
+++ b/dom/canvas/WebGLTypes.h
@@ -139,33 +139,32 @@ enum class WebGLTexDimensions : uint8_t 
 };
 
 // Please keep extensions in alphabetic order.
 enum class WebGLExtensionID : uint8_t {
     ANGLE_instanced_arrays,
     EXT_blend_minmax,
     EXT_color_buffer_float,
     EXT_color_buffer_half_float,
-    EXT_texture_compression_bptc,
-    EXT_texture_compression_rgtc,
     EXT_frag_depth,
     EXT_sRGB,
     EXT_shader_texture_lod,
     EXT_texture_filter_anisotropic,
     EXT_disjoint_timer_query,
     MOZ_debug,
     OES_element_index_uint,
     OES_standard_derivatives,
     OES_texture_float,
     OES_texture_float_linear,
     OES_texture_half_float,
     OES_texture_half_float_linear,
     OES_vertex_array_object,
     WEBGL_color_buffer_float,
     WEBGL_compressed_texture_astc,
+    WEBGL_compressed_texture_atc,
     WEBGL_compressed_texture_etc,
     WEBGL_compressed_texture_etc1,
     WEBGL_compressed_texture_pvrtc,
     WEBGL_compressed_texture_s3tc,
     WEBGL_compressed_texture_s3tc_srgb,
     WEBGL_debug_renderer_info,
     WEBGL_debug_shaders,
     WEBGL_depth_texture,
--- a/dom/canvas/moz.build
+++ b/dom/canvas/moz.build
@@ -120,21 +120,20 @@ UNIFIED_SOURCES += [
     'WebGLContextValidate.cpp',
     'WebGLContextVertexArray.cpp',
     'WebGLContextVertices.cpp',
     'WebGLExtensionBase.cpp',
     'WebGLExtensionBlendMinMax.cpp',
     'WebGLExtensionColorBufferFloat.cpp',
     'WebGLExtensionColorBufferHalfFloat.cpp',
     'WebGLExtensionCompressedTextureASTC.cpp',
-    'WebGLExtensionCompressedTextureBPTC.cpp',
+    'WebGLExtensionCompressedTextureATC.cpp',
     'WebGLExtensionCompressedTextureES3.cpp',
     'WebGLExtensionCompressedTextureETC1.cpp',
     'WebGLExtensionCompressedTexturePVRTC.cpp',
-    'WebGLExtensionCompressedTextureRGTC.cpp',
     'WebGLExtensionCompressedTextureS3TC.cpp',
     'WebGLExtensionCompressedTextureS3TC_SRGB.cpp',
     'WebGLExtensionDebugRendererInfo.cpp',
     'WebGLExtensionDebugShaders.cpp',
     'WebGLExtensionDepthTexture.cpp',
     'WebGLExtensionDisjointTimerQuery.cpp',
     'WebGLExtensionDrawBuffers.cpp',
     'WebGLExtensionElementIndexUint.cpp',
deleted file mode 100644
--- a/dom/canvas/test/webgl-mochitest/ensure-exts/test_EXT_texture_compression_bptc.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-  <head>
-    <meta charset='utf-8'/>
-    <script src='/tests/SimpleTest/SimpleTest.js'></script>
-    <link rel='stylesheet' href='/tests/SimpleTest/test.css'>
-    <script src='ensure-ext.js'></script>
-  </head>
-  <body>
-    <script>
-
-'use strict';
-EnsureExt('EXT_texture_compression_bptc', false);
-
-Lastly_WithDraftExtsEnabled(() => {
-  EnsureExt('EXT_texture_compression_bptc', true);
-});
-    </script>
-  </body>
-</html>
deleted file mode 100644
--- a/dom/canvas/test/webgl-mochitest/ensure-exts/test_EXT_texture_compression_rgtc.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-  <head>
-    <meta charset='utf-8'/>
-    <script src='/tests/SimpleTest/SimpleTest.js'></script>
-    <link rel='stylesheet' href='/tests/SimpleTest/test.css'>
-    <script src='ensure-ext.js'></script>
-  </head>
-  <body>
-    <script>
-
-'use strict';
-EnsureExt('EXT_texture_compression_rgtc', false);
-
-Lastly_WithDraftExtsEnabled(() => {
-  EnsureExt('EXT_texture_compression_rgtc', true);
-});
-
-    </script>
-  </body>
-</html>
deleted file mode 100644
--- a/dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_astc.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-  <head>
-    <meta charset='utf-8'/>
-    <script src='/tests/SimpleTest/SimpleTest.js'></script>
-    <link rel='stylesheet' href='/tests/SimpleTest/test.css'>
-    <script src='ensure-ext.js'></script>
-  </head>
-  <body>
-    <script>
-
-'use strict';
-EnsureExt('WEBGL_compressed_texture_astc');
-
-    </script>
-  </body>
-</html>
new file mode 100644
--- /dev/null
+++ b/dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_atc.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<html>
+  <head>
+    <meta charset='utf-8'/>
+    <script src='/tests/SimpleTest/SimpleTest.js'></script>
+    <link rel='stylesheet' href='/tests/SimpleTest/test.css'>
+    <script src='ensure-ext.js'></script>
+  </head>
+  <body>
+    <script>
+
+'use strict';
+EnsureExt('WEBGL_compressed_texture_atc');
+
+    </script>
+  </body>
+</html>
rename from dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_etc.html
rename to dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_es3.html
--- a/dom/canvas/test/webgl-mochitest/ensure-exts/test_common.html
+++ b/dom/canvas/test/webgl-mochitest/ensure-exts/test_common.html
@@ -14,16 +14,17 @@
 var ENSURE = 'ENSURE'; // Works on all test machines.
 var FORBID = 'FORBID'; // Should not work on any test machine.
 var MACHINE_SPECIFIC = 'MACHINE_SPECIFIC';
 
 var defaultExts = [
     // Ratified
     ['ANGLE_instanced_arrays'        , [MACHINE_SPECIFIC, FORBID          ]],
     ['EXT_blend_minmax'              , [MACHINE_SPECIFIC, FORBID          ]],
+    ['EXT_disjoint_timer_query'      , [MACHINE_SPECIFIC, MACHINE_SPECIFIC]],
     ['EXT_frag_depth'                , [MACHINE_SPECIFIC, FORBID          ]],
     ['EXT_shader_texture_lod'        , [MACHINE_SPECIFIC, FORBID          ]],
     ['EXT_texture_filter_anisotropic', [MACHINE_SPECIFIC, MACHINE_SPECIFIC]],
     ['OES_element_index_uint'        , [ENSURE          , FORBID          ]],
     ['OES_standard_derivatives'      , [MACHINE_SPECIFIC, FORBID          ]],
     ['OES_texture_float'             , [ENSURE          , FORBID          ]],
     ['OES_texture_float_linear'      , [ENSURE          , ENSURE          ]],
     ['OES_texture_half_float'        , [ENSURE          , FORBID          ]],
@@ -32,36 +33,32 @@ var defaultExts = [
     ['WEBGL_compressed_texture_s3tc' , [MACHINE_SPECIFIC, MACHINE_SPECIFIC]],
     ['WEBGL_debug_renderer_info'     , [ENSURE          , ENSURE          ]],
     ['WEBGL_debug_shaders'           , [ENSURE          , ENSURE          ]],
     ['WEBGL_depth_texture'           , [MACHINE_SPECIFIC, FORBID          ]],
     ['WEBGL_draw_buffers'            , [MACHINE_SPECIFIC, FORBID          ]],
     ['WEBGL_lose_context'            , [ENSURE          , ENSURE          ]],
 
     // Community Approved
-    ['EXT_color_buffer_float'            , [FORBID          , ENSURE          ]],
-    ['EXT_color_buffer_half_float'       , [MACHINE_SPECIFIC, FORBID          ]],
-    ['EXT_disjoint_timer_query'          , [MACHINE_SPECIFIC, MACHINE_SPECIFIC]],
-    ['EXT_sRGB'                          , [MACHINE_SPECIFIC, FORBID          ]],
-    ['WEBGL_color_buffer_float'          , [MACHINE_SPECIFIC, FORBID          ]],
-    ['WEBGL_compressed_texture_astc'     , [MACHINE_SPECIFIC, MACHINE_SPECIFIC]],
-    ['WEBGL_compressed_texture_atc'      , [MACHINE_SPECIFIC, MACHINE_SPECIFIC]],
-    ['WEBGL_compressed_texture_etc'      , [MACHINE_SPECIFIC, MACHINE_SPECIFIC]],
-    ['WEBGL_compressed_texture_etc1'     , [MACHINE_SPECIFIC, MACHINE_SPECIFIC]],
-    ['WEBGL_compressed_texture_pvrtc'    , [MACHINE_SPECIFIC, MACHINE_SPECIFIC]],
-    ['WEBGL_compressed_texture_s3tc_srgb', [MACHINE_SPECIFIC, MACHINE_SPECIFIC]],
+    ['EXT_color_buffer_float'        , [FORBID          , ENSURE          ]],
+    ['EXT_color_buffer_half_float'   , [MACHINE_SPECIFIC, FORBID          ]],
+    ['EXT_sRGB'                      , [MACHINE_SPECIFIC, FORBID          ]],
+    ['WEBGL_color_buffer_float'      , [MACHINE_SPECIFIC, FORBID          ]],
+    ['WEBGL_compressed_texture_atc'  , [MACHINE_SPECIFIC, MACHINE_SPECIFIC]],
+    ['WEBGL_compressed_texture_etc1' , [MACHINE_SPECIFIC, MACHINE_SPECIFIC]],
+    ['WEBGL_compressed_texture_pvrtc', [MACHINE_SPECIFIC, MACHINE_SPECIFIC]],
 ];
 
 var draftExts = [
-    ['EXT_texture_compression_bptc', [MACHINE_SPECIFIC, MACHINE_SPECIFIC]],
-    ['EXT_texture_compression_rgtc', [MACHINE_SPECIFIC, MACHINE_SPECIFIC]],
+    ['WEBGL_compressed_texture_es3', [MACHINE_SPECIFIC, MACHINE_SPECIFIC]],
 ];
 
 var nonImplementedExts = [
     'OES_fbo_render_mipmap',
+    'WEBGL_compressed_texture_astc',
     'WEBGL_security_sensitive_resources',
     'WEBGL_shared_resources',
 ];
 
 ////////////////////
 
 function TestExtFor(contextType, extName, status) {
     switch (status) {
--- a/dom/canvas/test/webgl-mochitest/mochitest.ini
+++ b/dom/canvas/test/webgl-mochitest/mochitest.ini
@@ -21,29 +21,25 @@ fail-if = (os == 'android')
 [ensure-exts/test_EXT_disjoint_timer_query.html]
 fail-if = 1
 [ensure-exts/test_EXT_frag_depth.html]
 fail-if = (os == 'android')
 [ensure-exts/test_EXT_sRGB.html]
 fail-if = (os == 'android')
 [ensure-exts/test_EXT_shader_texture_lod.html]
 fail-if = (os == 'android')
-[ensure-exts/test_EXT_texture_compression_bptc.html]
-fail-if = (os == 'android') || (os == 'linux') || (os == 'mac') || (os == 'win')
-[ensure-exts/test_EXT_texture_compression_rgtc.html]
-fail-if = (os == 'android') || (os == 'win')
 [ensure-exts/test_EXT_texture_filter_anisotropic.html]
 fail-if = (os == 'android') || (os == 'linux')
 [ensure-exts/test_OES_standard_derivatives.html]
 fail-if = (os == 'android')
 [ensure-exts/test_WEBGL_color_buffer_float.html]
 fail-if = (os == 'android')
-[ensure-exts/test_WEBGL_compressed_texture_astc.html]
+[ensure-exts/test_WEBGL_compressed_texture_atc.html]
 fail-if = (os == 'android') || (os == 'linux') || (os == 'mac') || (os == 'win')
-[ensure-exts/test_WEBGL_compressed_texture_etc.html]
+[ensure-exts/test_WEBGL_compressed_texture_es3.html]
 fail-if = (os == 'android') || (os == 'mac') || (os == 'win')
 [ensure-exts/test_WEBGL_compressed_texture_etc1.html]
 fail-if = (os == 'linux') || (os == 'mac') || (os == 'win')
 [ensure-exts/test_WEBGL_compressed_texture_pvrtc.html]
 fail-if = (os == 'android') || (os == 'linux') || (os == 'mac') || (os == 'win')
 [ensure-exts/test_WEBGL_compressed_texture_s3tc.html]
 fail-if = (os == 'android')
 [ensure-exts/test_WEBGL_depth_texture.html]
--- a/dom/canvas/test/webgl-mochitest/test_webgl_compressed_texture_es3.html
+++ b/dom/canvas/test/webgl-mochitest/test_webgl_compressed_texture_es3.html
@@ -1,17 +1,17 @@
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <script src="/tests/SimpleTest/SimpleTest.js"></script>
 <link rel="stylesheet" href="/tests/SimpleTest/test.css">
 <script src="webgl-util.js"></script>
 <script src="es3-data.js"></script>
-<title>WebGL test: test WEBGL_compressed_texture_etc extension</title>
+<title>WebGL test: test WEBGL_compressed_texture_es3 extension</title>
 <style>
 img {
  border: 1px solid black;
  margin-right: 1em;
 }
 .testimages {
 }
 
@@ -119,43 +119,43 @@ function runTest() {
     } else {
         ok(true, "WebGL context exists");
         setupUnitQuad();
 
         // Run tests with extension disabled
         runTestDisabled();
 
         // Query the extension and store globally so shouldBe can access it
-        ext = gl.getExtension("WEBGL_compressed_texture_etc");
+        ext = gl.getExtension("WEBGL_compressed_texture_es3");
         if (!ext) {
-            ok(true, "No WEBGL_compressed_texture_etc support -- this is legal");
+            ok(true, "No WEBGL_compressed_texture_es3 support -- this is legal");
             runSupportedTest(false);
         } else {
-            ok(true, "Successfully enabled WEBGL_compressed_texture_etc extension");
+            ok(true, "Successfully enabled WEBGL_compressed_texture_es3 extension");
 
             runSupportedTest(true);
             runTestExtension();
         }
     }
     SimpleTest.finish();
 }
 
 function runSupportedTest(extensionEnabled) {
     var supported = gl.getSupportedExtensions();
-    if (supported.includes("WEBGL_compressed_texture_etc")) {
+    if (supported.includes("WEBGL_compressed_texture_es3")) {
         if (extensionEnabled) {
-            ok(true, "WEBGL_compressed_texture_etc listed as supported and getExtension succeeded");
+            ok(true, "WEBGL_compressed_texture_es3 listed as supported and getExtension succeeded");
         } else {
-            ok(false, "WEBGL_compressed_texture_etc listed as supported but getExtension failed");
+            ok(false, "WEBGL_compressed_texture_es3 listed as supported but getExtension failed");
         }
     } else {
         if (extensionEnabled) {
-            ok(false, "WEBGL_compressed_texture_etc not listed as supported but getExtension succeeded");
+            ok(false, "WEBGL_compressed_texture_es3 not listed as supported but getExtension succeeded");
         } else {
-            ok(true, "WEBGL_compressed_texture_etc not listed as supported and getExtension failed -- this is legal");
+            ok(true, "WEBGL_compressed_texture_es3 not listed as supported and getExtension failed -- this is legal");
         }
     }
 }
 
 function runTestDisabled() {
     is(gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS).length, 0,
        "Should be no compressed texture formats");
 }
--- a/dom/webidl/WebGLRenderingContext.webidl
+++ b/dom/webidl/WebGLRenderingContext.webidl
@@ -811,32 +811,16 @@ partial interface WebGLRenderingContext 
     [Func="mozilla::dom::DOMPrefs::gfx_offscreencanvas_enabled"]
     void commit();
 };
 
 ////////////////////////////////////////
 // specific extension interfaces
 
 [NoInterfaceObject]
-interface EXT_texture_compression_bptc {
-    const GLenum COMPRESSED_RGBA_BPTC_UNORM_EXT = 0x8E8C;
-    const GLenum COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT = 0x8E8D;
-    const GLenum COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT = 0x8E8E;
-    const GLenum COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT = 0x8E8F;
-};
-
-[NoInterfaceObject]
-interface EXT_texture_compression_rgtc {
-    const GLenum COMPRESSED_RED_RGTC1_EXT = 0x8DBB;
-    const GLenum COMPRESSED_SIGNED_RED_RGTC1_EXT = 0x8DBC;
-    const GLenum COMPRESSED_RED_GREEN_RGTC2_EXT = 0x8DBD;
-    const GLenum COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT = 0x8DBE;
-};
-
-[NoInterfaceObject]
 interface WEBGL_compressed_texture_s3tc
 {
     const GLenum COMPRESSED_RGB_S3TC_DXT1_EXT  = 0x83F0;
     const GLenum COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1;
     const GLenum COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2;
     const GLenum COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3;
 };
 
@@ -882,16 +866,24 @@ interface WEBGL_compressed_texture_astc 
     const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR = 0x93DC;
     const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR = 0x93DD;
 
     // Profile query support.
     sequence<DOMString>? getSupportedProfiles();
 };
 
 [NoInterfaceObject]
+interface WEBGL_compressed_texture_atc
+{
+    const GLenum COMPRESSED_RGB_ATC_WEBGL                     = 0x8C92;
+    const GLenum COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL     = 0x8C93;
+    const GLenum COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL = 0x87EE;
+};
+
+[NoInterfaceObject]
 interface WEBGL_compressed_texture_etc
 {
     const GLenum COMPRESSED_R11_EAC                                 = 0x9270;
     const GLenum COMPRESSED_SIGNED_R11_EAC                          = 0x9271;
     const GLenum COMPRESSED_RG11_EAC                                = 0x9272;
     const GLenum COMPRESSED_SIGNED_RG11_EAC                         = 0x9273;
     const GLenum COMPRESSED_RGB8_ETC2                               = 0x9274;
     const GLenum COMPRESSED_SRGB8_ETC2                              = 0x9275;
--- a/gfx/gl/GLConsts.h
+++ b/gfx/gl/GLConsts.h
@@ -188,25 +188,21 @@
 #define LOCAL_GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS        0x92C5
 #define LOCAL_GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6
 #define LOCAL_GL_ATOMIC_COUNTER_BUFFER_BINDING               0x92C1
 #define LOCAL_GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE             0x92C4
 #define LOCAL_GL_ATOMIC_COUNTER_BUFFER_INDEX                 0x9301
 #define LOCAL_GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER  0x90ED
 #define LOCAL_GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB
 #define LOCAL_GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA
-#define LOCAL_GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_MESH_SHADER_NV  0x959E
-#define LOCAL_GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TASK_SHADER_NV  0x959F
 #define LOCAL_GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER     0x92C8
 #define LOCAL_GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER  0x92C9
 #define LOCAL_GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER   0x92C7
 #define LOCAL_GL_ATOMIC_COUNTER_BUFFER_SIZE                  0x92C3
 #define LOCAL_GL_ATOMIC_COUNTER_BUFFER_START                 0x92C2
-#define LOCAL_GL_ATTACHED_MEMORY_OBJECT_NV                   0x95A4
-#define LOCAL_GL_ATTACHED_MEMORY_OFFSET_NV                   0x95A5
 #define LOCAL_GL_ATTACHED_SHADERS                            0x8B85
 #define LOCAL_GL_ATTENUATION_EXT                             0x834D
 #define LOCAL_GL_ATTRIBUTE_ADDRESS_COMMAND_NV                0x0009
 #define LOCAL_GL_ATTRIB_ARRAY_POINTER_NV                     0x8645
 #define LOCAL_GL_ATTRIB_ARRAY_SIZE_NV                        0x8623
 #define LOCAL_GL_ATTRIB_ARRAY_STRIDE_NV                      0x8624
 #define LOCAL_GL_ATTRIB_ARRAY_TYPE_NV                        0x8625
 #define LOCAL_GL_ATTRIB_STACK_DEPTH                          0x0BB0
@@ -241,17 +237,16 @@
 #define LOCAL_GL_BIAS_BY_NEGATIVE_ONE_HALF_NV                0x8541
 #define LOCAL_GL_BINNING_CONTROL_HINT_QCOM                   0x8FB0
 #define LOCAL_GL_BINORMAL_ARRAY_EXT                          0x843A
 #define LOCAL_GL_BINORMAL_ARRAY_POINTER_EXT                  0x8443
 #define LOCAL_GL_BINORMAL_ARRAY_STRIDE_EXT                   0x8441
 #define LOCAL_GL_BINORMAL_ARRAY_TYPE_EXT                     0x8440
 #define LOCAL_GL_BITMAP                                      0x1A00
 #define LOCAL_GL_BITMAP_TOKEN                                0x0704
-#define LOCAL_GL_BLACKHOLE_RENDER_INTEL                      0x83FC
 #define LOCAL_GL_BLEND                                       0x0BE2
 #define LOCAL_GL_BLEND_ADVANCED_COHERENT_KHR                 0x9285
 #define LOCAL_GL_BLEND_ADVANCED_COHERENT_NV                  0x9285
 #define LOCAL_GL_BLEND_COLOR                                 0x8005
 #define LOCAL_GL_BLEND_COLOR_COMMAND_NV                      0x000B
 #define LOCAL_GL_BLEND_COLOR_EXT                             0x8005
 #define LOCAL_GL_BLEND_DST                                   0x0BE0
 #define LOCAL_GL_BLEND_DST_ALPHA                             0x80CA
@@ -373,22 +368,19 @@
 #define LOCAL_GL_CLIENT_ALL_ATTRIB_BITS                      0xFFFFFFFF
 #define LOCAL_GL_CLIENT_ATTRIB_STACK_DEPTH                   0x0BB1
 #define LOCAL_GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT            0x00004000
 #define LOCAL_GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT_EXT        0x00004000
 #define LOCAL_GL_CLIENT_PIXEL_STORE_BIT                      0x00000001
 #define LOCAL_GL_CLIENT_STORAGE_BIT                          0x0200
 #define LOCAL_GL_CLIENT_STORAGE_BIT_EXT                      0x0200
 #define LOCAL_GL_CLIENT_VERTEX_ARRAY_BIT                     0x00000002
-#define LOCAL_GL_CLIPPING_INPUT_PRIMITIVES                   0x82F6
 #define LOCAL_GL_CLIPPING_INPUT_PRIMITIVES_ARB               0x82F6
-#define LOCAL_GL_CLIPPING_OUTPUT_PRIMITIVES                  0x82F7
 #define LOCAL_GL_CLIPPING_OUTPUT_PRIMITIVES_ARB              0x82F7
 #define LOCAL_GL_CLIP_DEPTH_MODE                             0x935D
-#define LOCAL_GL_CLIP_DEPTH_MODE_EXT                         0x935D
 #define LOCAL_GL_CLIP_DISTANCE0                              0x3000
 #define LOCAL_GL_CLIP_DISTANCE0_APPLE                        0x3000
 #define LOCAL_GL_CLIP_DISTANCE0_EXT                          0x3000
 #define LOCAL_GL_CLIP_DISTANCE1                              0x3001
 #define LOCAL_GL_CLIP_DISTANCE1_APPLE                        0x3001
 #define LOCAL_GL_CLIP_DISTANCE1_EXT                          0x3001
 #define LOCAL_GL_CLIP_DISTANCE2                              0x3002
 #define LOCAL_GL_CLIP_DISTANCE2_APPLE                        0x3002
@@ -407,17 +399,16 @@
 #define LOCAL_GL_CLIP_DISTANCE6_EXT                          0x3006
 #define LOCAL_GL_CLIP_DISTANCE7                              0x3007
 #define LOCAL_GL_CLIP_DISTANCE7_APPLE                        0x3007
 #define LOCAL_GL_CLIP_DISTANCE7_EXT                          0x3007
 #define LOCAL_GL_CLIP_DISTANCE_NV                            0x8C7A
 #define LOCAL_GL_CLIP_FAR_HINT_PGI                           0x1A221
 #define LOCAL_GL_CLIP_NEAR_HINT_PGI                          0x1A220
 #define LOCAL_GL_CLIP_ORIGIN                                 0x935C
-#define LOCAL_GL_CLIP_ORIGIN_EXT                             0x935C
 #define LOCAL_GL_CLIP_PLANE0                                 0x3000
 #define LOCAL_GL_CLIP_PLANE0_IMG                             0x3000
 #define LOCAL_GL_CLIP_PLANE1                                 0x3001
 #define LOCAL_GL_CLIP_PLANE1_IMG                             0x3001
 #define LOCAL_GL_CLIP_PLANE2                                 0x3002
 #define LOCAL_GL_CLIP_PLANE2_IMG                             0x3002
 #define LOCAL_GL_CLIP_PLANE3                                 0x3003
 #define LOCAL_GL_CLIP_PLANE3_IMG                             0x3003
@@ -622,17 +613,16 @@
 #define LOCAL_GL_COMPARE_REF_TO_TEXTURE_EXT                  0x884E
 #define LOCAL_GL_COMPARE_R_TO_TEXTURE                        0x884E
 #define LOCAL_GL_COMPARE_R_TO_TEXTURE_ARB                    0x884E
 #define LOCAL_GL_COMPATIBLE_SUBROUTINES                      0x8E4B
 #define LOCAL_GL_COMPILE                                     0x1300
 #define LOCAL_GL_COMPILE_AND_EXECUTE                         0x1301
 #define LOCAL_GL_COMPILE_STATUS                              0x8B81
 #define LOCAL_GL_COMPLETION_STATUS_ARB                       0x91B1
-#define LOCAL_GL_COMPLETION_STATUS_KHR                       0x91B1
 #define LOCAL_GL_COMPRESSED_ALPHA                            0x84E9
 #define LOCAL_GL_COMPRESSED_ALPHA_ARB                        0x84E9
 #define LOCAL_GL_COMPRESSED_INTENSITY                        0x84EC
 #define LOCAL_GL_COMPRESSED_INTENSITY_ARB                    0x84EC
 #define LOCAL_GL_COMPRESSED_LUMINANCE                        0x84EA
 #define LOCAL_GL_COMPRESSED_LUMINANCE_ALPHA                  0x84EB
 #define LOCAL_GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI          0x8837
 #define LOCAL_GL_COMPRESSED_LUMINANCE_ALPHA_ARB              0x84EB
@@ -692,34 +682,31 @@
 #define LOCAL_GL_COMPRESSED_RGBA_ASTC_8x5                    0x93B5
 #define LOCAL_GL_COMPRESSED_RGBA_ASTC_8x5_KHR                0x93B5
 #define LOCAL_GL_COMPRESSED_RGBA_ASTC_8x6                    0x93B6
 #define LOCAL_GL_COMPRESSED_RGBA_ASTC_8x6_KHR                0x93B6
 #define LOCAL_GL_COMPRESSED_RGBA_ASTC_8x8                    0x93B7
 #define LOCAL_GL_COMPRESSED_RGBA_ASTC_8x8_KHR                0x93B7
 #define LOCAL_GL_COMPRESSED_RGBA_BPTC_UNORM                  0x8E8C
 #define LOCAL_GL_COMPRESSED_RGBA_BPTC_UNORM_ARB              0x8E8C
-#define LOCAL_GL_COMPRESSED_RGBA_BPTC_UNORM_EXT              0x8E8C
 #define LOCAL_GL_COMPRESSED_RGBA_FXT1_3DFX                   0x86B1
 #define LOCAL_GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG            0x8C03
 #define LOCAL_GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG            0x9137
 #define LOCAL_GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG            0x8C02
 #define LOCAL_GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG            0x9138
 #define LOCAL_GL_COMPRESSED_RGBA_S3TC_DXT1_EXT               0x83F1
 #define LOCAL_GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE             0x83F2
 #define LOCAL_GL_COMPRESSED_RGBA_S3TC_DXT3_EXT               0x83F2
 #define LOCAL_GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE             0x83F3
 #define LOCAL_GL_COMPRESSED_RGBA_S3TC_DXT5_EXT               0x83F3
 #define LOCAL_GL_COMPRESSED_RGB_ARB                          0x84ED
 #define LOCAL_GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT            0x8E8E
 #define LOCAL_GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB        0x8E8E
-#define LOCAL_GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT        0x8E8E
 #define LOCAL_GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT          0x8E8F
 #define LOCAL_GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB      0x8E8F
-#define LOCAL_GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT      0x8E8F
 #define LOCAL_GL_COMPRESSED_RGB_FXT1_3DFX                    0x86B0
 #define LOCAL_GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG             0x8C01
 #define LOCAL_GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG             0x8C00
 #define LOCAL_GL_COMPRESSED_RGB_S3TC_DXT1_EXT                0x83F0
 #define LOCAL_GL_COMPRESSED_RG_RGTC2                         0x8DBD
 #define LOCAL_GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73
 #define LOCAL_GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT       0x8C71
 #define LOCAL_GL_COMPRESSED_SIGNED_R11_EAC                   0x9271
@@ -777,17 +764,16 @@
 #define LOCAL_GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC_OES        0x9279
 #define LOCAL_GL_COMPRESSED_SRGB8_ETC2                       0x9275
 #define LOCAL_GL_COMPRESSED_SRGB8_ETC2_OES                   0x9275
 #define LOCAL_GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2   0x9277
 #define LOCAL_GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2_OES       0x9277
 #define LOCAL_GL_COMPRESSED_SRGB_ALPHA                       0x8C49
 #define LOCAL_GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM            0x8E8D
 #define LOCAL_GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB        0x8E8D
-#define LOCAL_GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT        0x8E8D
 #define LOCAL_GL_COMPRESSED_SRGB_ALPHA_EXT                   0x8C49
 #define LOCAL_GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT      0x8A56
 #define LOCAL_GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV2_IMG      0x93F0
 #define LOCAL_GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT      0x8A57
 #define LOCAL_GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV2_IMG      0x93F1
 #define LOCAL_GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT         0x8C4D
 #define LOCAL_GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV          0x8C4D
 #define LOCAL_GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT         0x8C4E
@@ -800,17 +786,16 @@
 #define LOCAL_GL_COMPRESSED_SRGB_S3TC_DXT1_EXT               0x8C4C
 #define LOCAL_GL_COMPRESSED_SRGB_S3TC_DXT1_NV                0x8C4C
 #define LOCAL_GL_COMPRESSED_TEXTURE_FORMATS                  0x86A3
 #define LOCAL_GL_COMPRESSED_TEXTURE_FORMATS_ARB              0x86A3
 #define LOCAL_GL_COMPUTE_PROGRAM_NV                          0x90FB
 #define LOCAL_GL_COMPUTE_PROGRAM_PARAMETER_BUFFER_NV         0x90FC
 #define LOCAL_GL_COMPUTE_SHADER                              0x91B9
 #define LOCAL_GL_COMPUTE_SHADER_BIT                          0x00000020
-#define LOCAL_GL_COMPUTE_SHADER_INVOCATIONS                  0x82F5
 #define LOCAL_GL_COMPUTE_SHADER_INVOCATIONS_ARB              0x82F5
 #define LOCAL_GL_COMPUTE_SUBROUTINE                          0x92ED
 #define LOCAL_GL_COMPUTE_SUBROUTINE_UNIFORM                  0x92F3
 #define LOCAL_GL_COMPUTE_TEXTURE                             0x82A0
 #define LOCAL_GL_COMPUTE_WORK_GROUP_SIZE                     0x8267
 #define LOCAL_GL_COMP_BIT_ATI                                0x00000002
 #define LOCAL_GL_CONDITION_SATISFIED                         0x911C
 #define LOCAL_GL_CONDITION_SATISFIED_APPLE                   0x911C
@@ -819,17 +804,16 @@
 #define LOCAL_GL_CONJOINT_NV                                 0x9284
 #define LOCAL_GL_CONSERVATIVE_RASTERIZATION_INTEL            0x83FE
 #define LOCAL_GL_CONSERVATIVE_RASTERIZATION_NV               0x9346
 #define LOCAL_GL_CONSERVATIVE_RASTER_DILATE_GRANULARITY_NV   0x937B
 #define LOCAL_GL_CONSERVATIVE_RASTER_DILATE_NV               0x9379
 #define LOCAL_GL_CONSERVATIVE_RASTER_DILATE_RANGE_NV         0x937A
 #define LOCAL_GL_CONSERVATIVE_RASTER_MODE_NV                 0x954D
 #define LOCAL_GL_CONSERVATIVE_RASTER_MODE_POST_SNAP_NV       0x954E
-#define LOCAL_GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_NV        0x9550
 #define LOCAL_GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_TRIANGLES_NV      0x954F
 #define LOCAL_GL_CONSERVE_MEMORY_HINT_PGI                    0x1A1FD
 #define LOCAL_GL_CONSTANT                                    0x8576
 #define LOCAL_GL_CONSTANT_ALPHA                              0x8003
 #define LOCAL_GL_CONSTANT_ALPHA_EXT                          0x8003
 #define LOCAL_GL_CONSTANT_ARB                                0x8576
 #define LOCAL_GL_CONSTANT_ATTENUATION                        0x1207
 #define LOCAL_GL_CONSTANT_BORDER                             0x8151
@@ -842,17 +826,16 @@
 #define LOCAL_GL_CONSTANT_NV                                 0x8576
 #define LOCAL_GL_CONST_EYE_NV                                0x86E5
 #define LOCAL_GL_CONTEXT_COMPATIBILITY_PROFILE_BIT           0x00000002
 #define LOCAL_GL_CONTEXT_CORE_PROFILE_BIT                    0x00000001
 #define LOCAL_GL_CONTEXT_FLAGS                               0x821E
 #define LOCAL_GL_CONTEXT_FLAG_DEBUG_BIT                      0x00000002
 #define LOCAL_GL_CONTEXT_FLAG_DEBUG_BIT_KHR                  0x00000002
 #define LOCAL_GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT         0x00000001
-#define LOCAL_GL_CONTEXT_FLAG_NO_ERROR_BIT                   0x00000008
 #define LOCAL_GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR               0x00000008
 #define LOCAL_GL_CONTEXT_FLAG_PROTECTED_CONTENT_BIT_EXT      0x00000010
 #define LOCAL_GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT              0x00000004
 #define LOCAL_GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB          0x00000004
 #define LOCAL_GL_CONTEXT_LOST                                0x0507
 #define LOCAL_GL_CONTEXT_LOST_KHR                            0x0507
 #define LOCAL_GL_CONTEXT_LOST_WEBGL                          0x9242
 #define LOCAL_GL_CONTEXT_PROFILE_MASK                        0x9126
@@ -1169,19 +1152,16 @@
 #define LOCAL_GL_DEPTH_STENCIL_OES                           0x84F9
 #define LOCAL_GL_DEPTH_STENCIL_TEXTURE_MODE                  0x90EA
 #define LOCAL_GL_DEPTH_STENCIL_TO_BGRA_NV                    0x886F
 #define LOCAL_GL_DEPTH_STENCIL_TO_RGBA_NV                    0x886E
 #define LOCAL_GL_DEPTH_TEST                                  0x0B71
 #define LOCAL_GL_DEPTH_TEXTURE_MODE                          0x884B
 #define LOCAL_GL_DEPTH_TEXTURE_MODE_ARB                      0x884B
 #define LOCAL_GL_DEPTH_WRITEMASK                             0x0B72
-#define LOCAL_GL_DETACHED_BUFFERS_NV                         0x95AB
-#define LOCAL_GL_DETACHED_MEMORY_INCARNATION_NV              0x95A9
-#define LOCAL_GL_DETACHED_TEXTURES_NV                        0x95AA
 #define LOCAL_GL_DETAIL_TEXTURE_2D_BINDING_SGIS              0x8096
 #define LOCAL_GL_DETAIL_TEXTURE_2D_SGIS                      0x8095
 #define LOCAL_GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS             0x809C
 #define LOCAL_GL_DETAIL_TEXTURE_LEVEL_SGIS                   0x809A
 #define LOCAL_GL_DETAIL_TEXTURE_MODE_SGIS                    0x809B
 #define LOCAL_GL_DEVICE_LUID_EXT                             0x9599
 #define LOCAL_GL_DEVICE_NODE_MASK_EXT                        0x959A
 #define LOCAL_GL_DEVICE_UUID_EXT                             0x9597
@@ -1470,17 +1450,16 @@
 #define LOCAL_GL_EXCLUSION_KHR                               0x92A0
 #define LOCAL_GL_EXCLUSION_NV                                0x92A0
 #define LOCAL_GL_EXCLUSIVE_EXT                               0x8F11
 #define LOCAL_GL_EXP                                         0x0800
 #define LOCAL_GL_EXP2                                        0x0801
 #define LOCAL_GL_EXPAND_NEGATE_NV                            0x8539
 #define LOCAL_GL_EXPAND_NORMAL_NV                            0x8538
 #define LOCAL_GL_EXTENSIONS                                  0x1F03
-#define LOCAL_GL_EXTERNAL_STORAGE_BIT_NVX                    0x2000
 #define LOCAL_GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD          0x9160
 #define LOCAL_GL_EYE_DISTANCE_TO_LINE_SGIS                   0x81F2
 #define LOCAL_GL_EYE_DISTANCE_TO_POINT_SGIS                  0x81F0
 #define LOCAL_GL_EYE_LINEAR                                  0x2400
 #define LOCAL_GL_EYE_LINEAR_NV                               0x2400
 #define LOCAL_GL_EYE_LINE_SGIS                               0x81F6
 #define LOCAL_GL_EYE_PLANE                                   0x2502
 #define LOCAL_GL_EYE_PLANE_ABSOLUTE_NV                       0x855C
@@ -1631,17 +1610,16 @@
 #define LOCAL_GL_FONT_X_MIN_BOUNDS_BIT_NV                    0x00010000
 #define LOCAL_GL_FONT_Y_MAX_BOUNDS_BIT_NV                    0x00080000
 #define LOCAL_GL_FONT_Y_MIN_BOUNDS_BIT_NV                    0x00020000
 #define LOCAL_GL_FORCE_BLUE_TO_ONE_NV                        0x8860
 #define LOCAL_GL_FORMAT_SUBSAMPLE_244_244_OML                0x8983
 #define LOCAL_GL_FORMAT_SUBSAMPLE_24_24_OML                  0x8982
 #define LOCAL_GL_FOVEATION_ENABLE_BIT_QCOM                   0x00000001
 #define LOCAL_GL_FOVEATION_SCALED_BIN_METHOD_BIT_QCOM        0x00000002
-#define LOCAL_GL_FOVEATION_SUBSAMPLED_LAYOUT_METHOD_BIT_QCOM 0x00000004
 #define LOCAL_GL_FRACTIONAL_EVEN                             0x8E7C
 #define LOCAL_GL_FRACTIONAL_EVEN_EXT                         0x8E7C
 #define LOCAL_GL_FRACTIONAL_EVEN_OES                         0x8E7C
 #define LOCAL_GL_FRACTIONAL_ODD                              0x8E7B
 #define LOCAL_GL_FRACTIONAL_ODD_EXT                          0x8E7B
 #define LOCAL_GL_FRACTIONAL_ODD_OES                          0x8E7B
 #define LOCAL_GL_FRAGMENTS_INSTRUMENT_COUNTERS_SGIX          0x8314
 #define LOCAL_GL_FRAGMENTS_INSTRUMENT_MAX_SGIX               0x8315
@@ -1687,17 +1665,16 @@
 #define LOCAL_GL_FRAGMENT_SHADER_ATI                         0x8920
 #define LOCAL_GL_FRAGMENT_SHADER_BIT                         0x00000002
 #define LOCAL_GL_FRAGMENT_SHADER_BIT_EXT                     0x00000002
 #define LOCAL_GL_FRAGMENT_SHADER_DERIVATIVE_HINT             0x8B8B
 #define LOCAL_GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB         0x8B8B
 #define LOCAL_GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES         0x8B8B
 #define LOCAL_GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT        0x8A52
 #define LOCAL_GL_FRAGMENT_SHADER_FRAMEBUFFER_FETCH_MRT_ARM   0x8F66
-#define LOCAL_GL_FRAGMENT_SHADER_INVOCATIONS                 0x82F4
 #define LOCAL_GL_FRAGMENT_SHADER_INVOCATIONS_ARB             0x82F4
 #define LOCAL_GL_FRAGMENT_SUBROUTINE                         0x92EC
 #define LOCAL_GL_FRAGMENT_SUBROUTINE_UNIFORM                 0x92F2
 #define LOCAL_GL_FRAGMENT_TEXTURE                            0x829F
 #define LOCAL_GL_FRAMEBUFFER                                 0x8D40
 #define LOCAL_GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE           0x8215
 #define LOCAL_GL_FRAMEBUFFER_ATTACHMENT_ANGLE                0x93A3
 #define LOCAL_GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE            0x8214
@@ -1748,29 +1725,27 @@
 #define LOCAL_GL_FRAMEBUFFER_DEFAULT_HEIGHT                  0x9311
 #define LOCAL_GL_FRAMEBUFFER_DEFAULT_LAYERS                  0x9312
 #define LOCAL_GL_FRAMEBUFFER_DEFAULT_LAYERS_EXT              0x9312
 #define LOCAL_GL_FRAMEBUFFER_DEFAULT_LAYERS_OES              0x9312
 #define LOCAL_GL_FRAMEBUFFER_DEFAULT_SAMPLES                 0x9313
 #define LOCAL_GL_FRAMEBUFFER_DEFAULT_WIDTH                   0x9310
 #define LOCAL_GL_FRAMEBUFFER_EXT                             0x8D40
 #define LOCAL_GL_FRAMEBUFFER_FETCH_NONCOHERENT_QCOM          0x96A2
-#define LOCAL_GL_FRAMEBUFFER_FLIP_Y_MESA                     0x8BBB
 #define LOCAL_GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT           0x8CD6
 #define LOCAL_GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT       0x8CD6
 #define LOCAL_GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES       0x8CD6
 #define LOCAL_GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS           0x8CD9
 #define LOCAL_GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT       0x8CD9
 #define LOCAL_GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES       0x8CD9
 #define LOCAL_GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER          0x8CDB
 #define LOCAL_GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT      0x8CDB
 #define LOCAL_GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_OES      0x8CDB
 #define LOCAL_GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT          0x8CDA
 #define LOCAL_GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES          0x8CDA
-#define LOCAL_GL_FRAMEBUFFER_INCOMPLETE_FOVEATION_QCOM       0x8BFF
 #define LOCAL_GL_FRAMEBUFFER_INCOMPLETE_INSUFFICIENT_SHADER_COMBINED_LOCAL_STORAGE_EXT       0x9652
 #define LOCAL_GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB      0x8DA9
 #define LOCAL_GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT      0x8DA9
 #define LOCAL_GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS        0x8DA8
 #define LOCAL_GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB    0x8DA8
 #define LOCAL_GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT    0x8DA8
 #define LOCAL_GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_OES    0x8DA8
 #define LOCAL_GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT   0x8CD7
@@ -1850,17 +1825,16 @@
 #define LOCAL_GL_GEOMETRY_SHADER_BIT                         0x00000004
 #define LOCAL_GL_GEOMETRY_SHADER_BIT_EXT                     0x00000004
 #define LOCAL_GL_GEOMETRY_SHADER_BIT_OES                     0x00000004
 #define LOCAL_GL_GEOMETRY_SHADER_EXT                         0x8DD9
 #define LOCAL_GL_GEOMETRY_SHADER_INVOCATIONS                 0x887F
 #define LOCAL_GL_GEOMETRY_SHADER_INVOCATIONS_EXT             0x887F
 #define LOCAL_GL_GEOMETRY_SHADER_INVOCATIONS_OES             0x887F
 #define LOCAL_GL_GEOMETRY_SHADER_OES                         0x8DD9
-#define LOCAL_GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED          0x82F3
 #define LOCAL_GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB      0x82F3
 #define LOCAL_GL_GEOMETRY_SUBROUTINE                         0x92EB
 #define LOCAL_GL_GEOMETRY_SUBROUTINE_UNIFORM                 0x92F1
 #define LOCAL_GL_GEOMETRY_TEXTURE                            0x829E
 #define LOCAL_GL_GEOMETRY_VERTICES_OUT                       0x8916
 #define LOCAL_GL_GEOMETRY_VERTICES_OUT_ARB                   0x8DDA
 #define LOCAL_GL_GEOMETRY_VERTICES_OUT_EXT                   0x8DDA
 #define LOCAL_GL_GEQUAL                                      0x0206
@@ -2236,18 +2210,16 @@
 #define LOCAL_GL_LAST_VERTEX_CONVENTION_OES                  0x8E4E
 #define LOCAL_GL_LAST_VIDEO_CAPTURE_STATUS_NV                0x9027
 #define LOCAL_GL_LAYER_NV                                    0x8DAA
 #define LOCAL_GL_LAYER_PROVOKING_VERTEX                      0x825E
 #define LOCAL_GL_LAYER_PROVOKING_VERTEX_EXT                  0x825E
 #define LOCAL_GL_LAYER_PROVOKING_VERTEX_OES                  0x825E
 #define LOCAL_GL_LAYOUT_COLOR_ATTACHMENT_EXT                 0x958E
 #define LOCAL_GL_LAYOUT_DEFAULT_INTEL                        0
-#define LOCAL_GL_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_EXT       0x9531
-#define LOCAL_GL_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_EXT       0x9530
 #define LOCAL_GL_LAYOUT_DEPTH_STENCIL_ATTACHMENT_EXT         0x958F
 #define LOCAL_GL_LAYOUT_DEPTH_STENCIL_READ_ONLY_EXT          0x9590
 #define LOCAL_GL_LAYOUT_GENERAL_EXT                          0x958D
 #define LOCAL_GL_LAYOUT_LINEAR_CPU_CACHED_INTEL              2
 #define LOCAL_GL_LAYOUT_LINEAR_INTEL                         1
 #define LOCAL_GL_LAYOUT_SHADER_READ_ONLY_EXT                 0x9591
 #define LOCAL_GL_LAYOUT_TRANSFER_DST_EXT                     0x9593
 #define LOCAL_GL_LAYOUT_TRANSFER_SRC_EXT                     0x9592
@@ -2336,17 +2308,16 @@
 #define LOCAL_GL_LOCATION_INDEX_EXT                          0x930F
 #define LOCAL_GL_LOGIC_OP                                    0x0BF1
 #define LOCAL_GL_LOGIC_OP_MODE                               0x0BF0
 #define LOCAL_GL_LOSE_CONTEXT_ON_RESET                       0x8252
 #define LOCAL_GL_LOSE_CONTEXT_ON_RESET_ARB                   0x8252
 #define LOCAL_GL_LOSE_CONTEXT_ON_RESET_EXT                   0x8252
 #define LOCAL_GL_LOSE_CONTEXT_ON_RESET_KHR                   0x8252
 #define LOCAL_GL_LOWER_LEFT                                  0x8CA1
-#define LOCAL_GL_LOWER_LEFT_EXT                              0x8CA1
 #define LOCAL_GL_LOW_FLOAT                                   0x8DF0
 #define LOCAL_GL_LOW_INT                                     0x8DF3
 #define LOCAL_GL_LO_BIAS_NV                                  0x8715
 #define LOCAL_GL_LO_SCALE_NV                                 0x870F
 #define LOCAL_GL_LUID_SIZE_EXT                               8
 #define LOCAL_GL_LUMINANCE                                   0x1909
 #define LOCAL_GL_LUMINANCE12                                 0x8041
 #define LOCAL_GL_LUMINANCE12_ALPHA12                         0x8047
@@ -2577,42 +2548,37 @@
 #define LOCAL_GL_MAX_CLIENT_ATTRIB_STACK_DEPTH               0x0D3B
 #define LOCAL_GL_MAX_CLIPMAP_DEPTH_SGIX                      0x8177
 #define LOCAL_GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX              0x8178
 #define LOCAL_GL_MAX_CLIP_DISTANCES                          0x0D32
 #define LOCAL_GL_MAX_CLIP_DISTANCES_APPLE                    0x0D32
 #define LOCAL_GL_MAX_CLIP_DISTANCES_EXT                      0x0D32
 #define LOCAL_GL_MAX_CLIP_PLANES                             0x0D32
 #define LOCAL_GL_MAX_CLIP_PLANES_IMG                         0x0D32
-#define LOCAL_GL_MAX_COARSE_FRAGMENT_SAMPLES_NV              0x955F
 #define LOCAL_GL_MAX_COLOR_ATTACHMENTS                       0x8CDF
 #define LOCAL_GL_MAX_COLOR_ATTACHMENTS_EXT                   0x8CDF
 #define LOCAL_GL_MAX_COLOR_ATTACHMENTS_NV                    0x8CDF
-#define LOCAL_GL_MAX_COLOR_FRAMEBUFFER_SAMPLES_AMD           0x91B3
-#define LOCAL_GL_MAX_COLOR_FRAMEBUFFER_STORAGE_SAMPLES_AMD   0x91B4
 #define LOCAL_GL_MAX_COLOR_MATRIX_STACK_DEPTH                0x80B3
 #define LOCAL_GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI            0x80B3
 #define LOCAL_GL_MAX_COLOR_TEXTURE_SAMPLES                   0x910E
 #define LOCAL_GL_MAX_COMBINED_ATOMIC_COUNTERS                0x92D7
 #define LOCAL_GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS         0x92D1
 #define LOCAL_GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES        0x82FA
 #define LOCAL_GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES_EXT    0x82FA
 #define LOCAL_GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS     0x8266
 #define LOCAL_GL_MAX_COMBINED_DIMENSIONS                     0x8282
 #define LOCAL_GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS    0x8A33
 #define LOCAL_GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS    0x8A32
 #define LOCAL_GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS_EXT        0x8A32
 #define LOCAL_GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS_OES        0x8A32
 #define LOCAL_GL_MAX_COMBINED_IMAGE_UNIFORMS                 0x90CF
 #define LOCAL_GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS       0x8F39
 #define LOCAL_GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT   0x8F39
-#define LOCAL_GL_MAX_COMBINED_MESH_UNIFORM_COMPONENTS_NV     0x8E67
 #define LOCAL_GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES        0x8F39
 #define LOCAL_GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS          0x90DC
-#define LOCAL_GL_MAX_COMBINED_TASK_UNIFORM_COMPONENTS_NV     0x8E6F
 #define LOCAL_GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS        0x8E1E
 #define LOCAL_GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS_EXT    0x8E1E
 #define LOCAL_GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS_OES    0x8E1E
 #define LOCAL_GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS     0x8E1F
 #define LOCAL_GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT 0x8E1F
 #define LOCAL_GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS_OES 0x8E1F
 #define LOCAL_GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS            0x8B4D
 #define LOCAL_GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB        0x8B4D
@@ -2652,26 +2618,22 @@
 #define LOCAL_GL_MAX_DEBUG_MESSAGE_LENGTH                    0x9143
 #define LOCAL_GL_MAX_DEBUG_MESSAGE_LENGTH_AMD                0x9143
 #define LOCAL_GL_MAX_DEBUG_MESSAGE_LENGTH_ARB                0x9143
 #define LOCAL_GL_MAX_DEBUG_MESSAGE_LENGTH_KHR                0x9143
 #define LOCAL_GL_MAX_DEEP_3D_TEXTURE_DEPTH_NV                0x90D1
 #define LOCAL_GL_MAX_DEEP_3D_TEXTURE_WIDTH_HEIGHT_NV         0x90D0
 #define LOCAL_GL_MAX_DEFORMATION_ORDER_SGIX                  0x8197
 #define LOCAL_GL_MAX_DEPTH                                   0x8280
-#define LOCAL_GL_MAX_DEPTH_STENCIL_FRAMEBUFFER_SAMPLES_AMD   0x91B5
 #define LOCAL_GL_MAX_DEPTH_TEXTURE_SAMPLES                   0x910F
-#define LOCAL_GL_MAX_DETACHED_BUFFERS_NV                     0x95AD
-#define LOCAL_GL_MAX_DETACHED_TEXTURES_NV                    0x95AC
 #define LOCAL_GL_MAX_DRAW_BUFFERS                            0x8824
 #define LOCAL_GL_MAX_DRAW_BUFFERS_ARB                        0x8824
 #define LOCAL_GL_MAX_DRAW_BUFFERS_ATI                        0x8824
 #define LOCAL_GL_MAX_DRAW_BUFFERS_EXT                        0x8824
 #define LOCAL_GL_MAX_DRAW_BUFFERS_NV                         0x8824
-#define LOCAL_GL_MAX_DRAW_MESH_TASKS_COUNT_NV                0x953D
 #define LOCAL_GL_MAX_DUAL_SOURCE_DRAW_BUFFERS                0x88FC
 #define LOCAL_GL_MAX_DUAL_SOURCE_DRAW_BUFFERS_EXT            0x88FC
 #define LOCAL_GL_MAX_ELEMENTS_INDICES                        0x80E9
 #define LOCAL_GL_MAX_ELEMENTS_INDICES_EXT                    0x80E9
 #define LOCAL_GL_MAX_ELEMENTS_VERTICES                       0x80E8
 #define LOCAL_GL_MAX_ELEMENTS_VERTICES_EXT                   0x80E8
 #define LOCAL_GL_MAX_ELEMENT_INDEX                           0x8D6B
 #define LOCAL_GL_MAX_EVAL_ORDER                              0x0D30
@@ -2753,29 +2715,16 @@
 #define LOCAL_GL_MAX_LABEL_LENGTH                            0x82E8
 #define LOCAL_GL_MAX_LABEL_LENGTH_KHR                        0x82E8
 #define LOCAL_GL_MAX_LAYERS                                  0x8281
 #define LOCAL_GL_MAX_LGPU_GPUS_NVX                           0x92BA
 #define LOCAL_GL_MAX_LIGHTS                                  0x0D31
 #define LOCAL_GL_MAX_LIST_NESTING                            0x0B31
 #define LOCAL_GL_MAX_MAP_TESSELLATION_NV                     0x86D6
 #define LOCAL_GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB          0x8841
-#define LOCAL_GL_MAX_MESH_ATOMIC_COUNTERS_NV                 0x8E65
-#define LOCAL_GL_MAX_MESH_ATOMIC_COUNTER_BUFFERS_NV          0x8E64
-#define LOCAL_GL_MAX_MESH_IMAGE_UNIFORMS_NV                  0x8E62
-#define LOCAL_GL_MAX_MESH_OUTPUT_PRIMITIVES_NV               0x9539
-#define LOCAL_GL_MAX_MESH_OUTPUT_VERTICES_NV                 0x9538
-#define LOCAL_GL_MAX_MESH_SHADER_STORAGE_BLOCKS_NV           0x8E66
-#define LOCAL_GL_MAX_MESH_TEXTURE_IMAGE_UNITS_NV             0x8E61
-#define LOCAL_GL_MAX_MESH_TOTAL_MEMORY_SIZE_NV               0x9536
-#define LOCAL_GL_MAX_MESH_UNIFORM_BLOCKS_NV                  0x8E60
-#define LOCAL_GL_MAX_MESH_UNIFORM_COMPONENTS_NV              0x8E63
-#define LOCAL_GL_MAX_MESH_VIEWS_NV                           0x9557
-#define LOCAL_GL_MAX_MESH_WORK_GROUP_INVOCATIONS_NV          0x95A2
-#define LOCAL_GL_MAX_MESH_WORK_GROUP_SIZE_NV                 0x953B
 #define LOCAL_GL_MAX_MODELVIEW_STACK_DEPTH                   0x0D36
 #define LOCAL_GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV           0x8E11
 #define LOCAL_GL_MAX_MULTIVIEW_BUFFERS_EXT                   0x90F2
 #define LOCAL_GL_MAX_NAME_LENGTH                             0x92F6
 #define LOCAL_GL_MAX_NAME_STACK_DEPTH                        0x0D37
 #define LOCAL_GL_MAX_NUM_ACTIVE_VARIABLES                    0x92F7
 #define LOCAL_GL_MAX_NUM_COMPATIBLE_SUBROUTINES              0x92F8
 #define LOCAL_GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT        0x87CA
@@ -2852,47 +2801,34 @@
 #define LOCAL_GL_MAX_SAMPLE_MASK_WORDS                       0x8E59
 #define LOCAL_GL_MAX_SAMPLE_MASK_WORDS_NV                    0x8E59
 #define LOCAL_GL_MAX_SERVER_WAIT_TIMEOUT                     0x9111
 #define LOCAL_GL_MAX_SERVER_WAIT_TIMEOUT_APPLE               0x9111
 #define LOCAL_GL_MAX_SHADER_BUFFER_ADDRESS_NV                0x8F35
 #define LOCAL_GL_MAX_SHADER_COMBINED_LOCAL_STORAGE_FAST_SIZE_EXT     0x9650
 #define LOCAL_GL_MAX_SHADER_COMBINED_LOCAL_STORAGE_SIZE_EXT  0x9651
 #define LOCAL_GL_MAX_SHADER_COMPILER_THREADS_ARB             0x91B0
-#define LOCAL_GL_MAX_SHADER_COMPILER_THREADS_KHR             0x91B0
 #define LOCAL_GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT        0x8F63
 #define LOCAL_GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_SIZE_EXT     0x8F67
 #define LOCAL_GL_MAX_SHADER_STORAGE_BLOCK_SIZE               0x90DE
 #define LOCAL_GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS          0x90DD
-#define LOCAL_GL_MAX_SHADER_SUBSAMPLED_IMAGE_UNITS_QCOM      0x8FA1
 #define LOCAL_GL_MAX_SHININESS_NV                            0x8504
 #define LOCAL_GL_MAX_SPARSE_3D_TEXTURE_SIZE_AMD              0x9199
 #define LOCAL_GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB              0x9199
 #define LOCAL_GL_MAX_SPARSE_3D_TEXTURE_SIZE_EXT              0x9199
 #define LOCAL_GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS             0x919A
 #define LOCAL_GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB         0x919A
 #define LOCAL_GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_EXT         0x919A
 #define LOCAL_GL_MAX_SPARSE_TEXTURE_SIZE_AMD                 0x9198
 #define LOCAL_GL_MAX_SPARSE_TEXTURE_SIZE_ARB                 0x9198
 #define LOCAL_GL_MAX_SPARSE_TEXTURE_SIZE_EXT                 0x9198
 #define LOCAL_GL_MAX_SPOT_EXPONENT_NV                        0x8505
 #define LOCAL_GL_MAX_SUBPIXEL_PRECISION_BIAS_BITS_NV         0x9349
 #define LOCAL_GL_MAX_SUBROUTINES                             0x8DE7
 #define LOCAL_GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS            0x8DE8
-#define LOCAL_GL_MAX_TASK_ATOMIC_COUNTERS_NV                 0x8E6D
-#define LOCAL_GL_MAX_TASK_ATOMIC_COUNTER_BUFFERS_NV          0x8E6C
-#define LOCAL_GL_MAX_TASK_IMAGE_UNIFORMS_NV                  0x8E6A
-#define LOCAL_GL_MAX_TASK_OUTPUT_COUNT_NV                    0x953A
-#define LOCAL_GL_MAX_TASK_SHADER_STORAGE_BLOCKS_NV           0x8E6E
-#define LOCAL_GL_MAX_TASK_TEXTURE_IMAGE_UNITS_NV             0x8E69
-#define LOCAL_GL_MAX_TASK_TOTAL_MEMORY_SIZE_NV               0x9537
-#define LOCAL_GL_MAX_TASK_UNIFORM_BLOCKS_NV                  0x8E68
-#define LOCAL_GL_MAX_TASK_UNIFORM_COMPONENTS_NV              0x8E6B
-#define LOCAL_GL_MAX_TASK_WORK_GROUP_INVOCATIONS_NV          0x95A3
-#define LOCAL_GL_MAX_TASK_WORK_GROUP_SIZE_NV                 0x953C
 #define LOCAL_GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS            0x92D3
 #define LOCAL_GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS_EXT        0x92D3
 #define LOCAL_GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS_OES        0x92D3
 #define LOCAL_GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS     0x92CD
 #define LOCAL_GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS_EXT 0x92CD
 #define LOCAL_GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS_OES 0x92CD
 #define LOCAL_GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS             0x90CB
 #define LOCAL_GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS_EXT         0x90CB
@@ -2958,17 +2894,16 @@
 #define LOCAL_GL_MAX_TEXTURE_COORDS                          0x8871
 #define LOCAL_GL_MAX_TEXTURE_COORDS_ARB                      0x8871
 #define LOCAL_GL_MAX_TEXTURE_COORDS_NV                       0x8871
 #define LOCAL_GL_MAX_TEXTURE_IMAGE_UNITS                     0x8872
 #define LOCAL_GL_MAX_TEXTURE_IMAGE_UNITS_ARB                 0x8872
 #define LOCAL_GL_MAX_TEXTURE_IMAGE_UNITS_NV                  0x8872
 #define LOCAL_GL_MAX_TEXTURE_LOD_BIAS                        0x84FD
 #define LOCAL_GL_MAX_TEXTURE_LOD_BIAS_EXT                    0x84FD
-#define LOCAL_GL_MAX_TEXTURE_MAX_ANISOTROPY                  0x84FF
 #define LOCAL_GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT              0x84FF
 #define LOCAL_GL_MAX_TEXTURE_SIZE                            0x0D33
 #define LOCAL_GL_MAX_TEXTURE_STACK_DEPTH                     0x0D39
 #define LOCAL_GL_MAX_TEXTURE_UNITS                           0x84E2
 #define LOCAL_GL_MAX_TEXTURE_UNITS_ARB                       0x84E2
 #define LOCAL_GL_MAX_TRACK_MATRICES_NV                       0x862F
 #define LOCAL_GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV             0x862E
 #define LOCAL_GL_MAX_TRANSFORM_FEEDBACK_BUFFERS              0x8E70
@@ -3023,29 +2958,16 @@
 #define LOCAL_GL_MAX_VIEWPORTS_NV                            0x825B
 #define LOCAL_GL_MAX_VIEWPORTS_OES                           0x825B
 #define LOCAL_GL_MAX_VIEWPORT_DIMS                           0x0D3A
 #define LOCAL_GL_MAX_VIEWS_OVR                               0x9631
 #define LOCAL_GL_MAX_WIDTH                                   0x827E
 #define LOCAL_GL_MAX_WINDOW_RECTANGLES_EXT                   0x8F14
 #define LOCAL_GL_MEDIUM_FLOAT                                0x8DF1
 #define LOCAL_GL_MEDIUM_INT                                  0x8DF4
-#define LOCAL_GL_MEMORY_ATTACHABLE_ALIGNMENT_NV              0x95A6
-#define LOCAL_GL_MEMORY_ATTACHABLE_NV                        0x95A8
-#define LOCAL_GL_MEMORY_ATTACHABLE_SIZE_NV                   0x95A7
-#define LOCAL_GL_MESH_OUTPUT_PER_PRIMITIVE_GRANULARITY_NV    0x9543
-#define LOCAL_GL_MESH_OUTPUT_PER_VERTEX_GRANULARITY_NV       0x92DF
-#define LOCAL_GL_MESH_OUTPUT_TYPE_NV                         0x957B
-#define LOCAL_GL_MESH_PRIMITIVES_OUT_NV                      0x957A
-#define LOCAL_GL_MESH_SHADER_BIT_NV                          0x00000040
-#define LOCAL_GL_MESH_SHADER_NV                              0x9559
-#define LOCAL_GL_MESH_SUBROUTINE_NV                          0x957C
-#define LOCAL_GL_MESH_SUBROUTINE_UNIFORM_NV                  0x957E
-#define LOCAL_GL_MESH_VERTICES_OUT_NV                        0x9579
-#define LOCAL_GL_MESH_WORK_GROUP_SIZE_NV                     0x953E
 #define LOCAL_GL_MIN                                         0x8007
 #define LOCAL_GL_MINMAX                                      0x802E
 #define LOCAL_GL_MINMAX_EXT                                  0x802E
 #define LOCAL_GL_MINMAX_FORMAT                               0x802F
 #define LOCAL_GL_MINMAX_FORMAT_EXT                           0x802F
 #define LOCAL_GL_MINMAX_SINK                                 0x8030
 #define LOCAL_GL_MINMAX_SINK_EXT                             0x8030
 #define LOCAL_GL_MINOR_VERSION                               0x821C
@@ -3180,17 +3102,16 @@
 #define LOCAL_GL_NEAREST                                     0x2600
 #define LOCAL_GL_NEAREST_CLIPMAP_LINEAR_SGIX                 0x844E
 #define LOCAL_GL_NEAREST_CLIPMAP_NEAREST_SGIX                0x844D
 #define LOCAL_GL_NEAREST_MIPMAP_LINEAR                       0x2702
 #define LOCAL_GL_NEAREST_MIPMAP_NEAREST                      0x2700
 #define LOCAL_GL_NEGATE_BIT_ATI                              0x00000004
 #define LOCAL_GL_NEGATIVE_ONE_EXT                            0x87DF
 #define LOCAL_GL_NEGATIVE_ONE_TO_ONE                         0x935E
-#define LOCAL_GL_NEGATIVE_ONE_TO_ONE_EXT                     0x935E
 #define LOCAL_GL_NEGATIVE_W_EXT                              0x87DC
 #define LOCAL_GL_NEGATIVE_X_EXT                              0x87D9
 #define LOCAL_GL_NEGATIVE_Y_EXT                              0x87DA
 #define LOCAL_GL_NEGATIVE_Z_EXT                              0x87DB
 #define LOCAL_GL_NEVER                                       0x0200
 #define LOCAL_GL_NEXT_BUFFER_NV                              -2
 #define LOCAL_GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV         0x9025
 #define LOCAL_GL_NICEST                                      0x1102
@@ -3247,18 +3168,16 @@
 #define LOCAL_GL_NUM_PASSES_ATI                              0x8970
 #define LOCAL_GL_NUM_PROGRAM_BINARY_FORMATS                  0x87FE
 #define LOCAL_GL_NUM_PROGRAM_BINARY_FORMATS_OES              0x87FE
 #define LOCAL_GL_NUM_SAMPLE_COUNTS                           0x9380
 #define LOCAL_GL_NUM_SHADER_BINARY_FORMATS                   0x8DF9
 #define LOCAL_GL_NUM_SHADING_LANGUAGE_VERSIONS               0x82E9
 #define LOCAL_GL_NUM_SPARSE_LEVELS_ARB                       0x91AA
 #define LOCAL_GL_NUM_SPARSE_LEVELS_EXT                       0x91AA
-#define LOCAL_GL_NUM_SPIR_V_EXTENSIONS                       0x9554
-#define LOCAL_GL_NUM_SUPPORTED_MULTISAMPLE_MODES_AMD         0x91B6
 #define LOCAL_GL_NUM_TILING_TYPES_EXT                        0x9582
 #define LOCAL_GL_NUM_VIDEO_CAPTURE_STREAMS_NV                0x9024
 #define LOCAL_GL_NUM_VIRTUAL_PAGE_SIZES_ARB                  0x91A8
 #define LOCAL_GL_NUM_VIRTUAL_PAGE_SIZES_EXT                  0x91A8
 #define LOCAL_GL_NUM_WINDOW_RECTANGLES_EXT                   0x8F15
 #define LOCAL_GL_OBJECT_ACTIVE_ATTRIBUTES_ARB                0x8B89
 #define LOCAL_GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB      0x8B8A
 #define LOCAL_GL_OBJECT_ACTIVE_UNIFORMS_ARB                  0x8B86
@@ -3438,19 +3357,17 @@
 #define LOCAL_GL_PALETTE4_RGBA4_OES                          0x8B93
 #define LOCAL_GL_PALETTE4_RGBA8_OES                          0x8B91
 #define LOCAL_GL_PALETTE8_R5_G6_B5_OES                       0x8B97
 #define LOCAL_GL_PALETTE8_RGB5_A1_OES                        0x8B99
 #define LOCAL_GL_PALETTE8_RGB8_OES                           0x8B95
 #define LOCAL_GL_PALETTE8_RGBA4_OES                          0x8B98
 #define LOCAL_GL_PALETTE8_RGBA8_OES                          0x8B96
 #define LOCAL_GL_PARALLEL_ARRAYS_INTEL                       0x83F4
-#define LOCAL_GL_PARAMETER_BUFFER                            0x80EE
 #define LOCAL_GL_PARAMETER_BUFFER_ARB                        0x80EE
-#define LOCAL_GL_PARAMETER_BUFFER_BINDING                    0x80EF
 #define LOCAL_GL_PARAMETER_BUFFER_BINDING_ARB                0x80EF
 #define LOCAL_GL_PARTIAL_SUCCESS_NV                          0x902E
 #define LOCAL_GL_PASS_THROUGH_NV                             0x86E6
 #define LOCAL_GL_PASS_THROUGH_TOKEN                          0x0700
 #define LOCAL_GL_PATCHES                                     0x000E
 #define LOCAL_GL_PATCHES_EXT                                 0x000E
 #define LOCAL_GL_PATCHES_OES                                 0x000E
 #define LOCAL_GL_PATCH_DEFAULT_INNER_LEVEL                   0x8E73
@@ -3576,19 +3493,17 @@
 #define LOCAL_GL_PIXEL_MAP_S_TO_S_SIZE                       0x0CB1
 #define LOCAL_GL_PIXEL_MIN_FILTER_EXT                        0x8332
 #define LOCAL_GL_PIXEL_MODE_BIT                              0x00000020
 #define LOCAL_GL_PIXEL_PACK_BUFFER                           0x88EB
 #define LOCAL_GL_PIXEL_PACK_BUFFER_ARB                       0x88EB
 #define LOCAL_GL_PIXEL_PACK_BUFFER_BINDING                   0x88ED
 #define LOCAL_GL_PIXEL_PACK_BUFFER_BINDING_ARB               0x88ED
 #define LOCAL_GL_PIXEL_PACK_BUFFER_BINDING_EXT               0x88ED
-#define LOCAL_GL_PIXEL_PACK_BUFFER_BINDING_NV                0x88ED
 #define LOCAL_GL_PIXEL_PACK_BUFFER_EXT                       0x88EB
-#define LOCAL_GL_PIXEL_PACK_BUFFER_NV                        0x88EB
 #define LOCAL_GL_PIXEL_SUBSAMPLE_2424_SGIX                   0x85A3
 #define LOCAL_GL_PIXEL_SUBSAMPLE_4242_SGIX                   0x85A4
 #define LOCAL_GL_PIXEL_SUBSAMPLE_4444_SGIX                   0x85A2
 #define LOCAL_GL_PIXEL_TEXTURE_SGIS                          0x8353
 #define LOCAL_GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX                 0x8189
 #define LOCAL_GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX                 0x818A
 #define LOCAL_GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX         0x8188
 #define LOCAL_GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX            0x8187
@@ -3608,19 +3523,17 @@
 #define LOCAL_GL_PIXEL_TRANSFORM_2D_EXT                      0x8330
 #define LOCAL_GL_PIXEL_TRANSFORM_2D_MATRIX_EXT               0x8338
 #define LOCAL_GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT          0x8336
 #define LOCAL_GL_PIXEL_UNPACK_BUFFER                         0x88EC
 #define LOCAL_GL_PIXEL_UNPACK_BUFFER_ARB                     0x88EC
 #define LOCAL_GL_PIXEL_UNPACK_BUFFER_BINDING                 0x88EF
 #define LOCAL_GL_PIXEL_UNPACK_BUFFER_BINDING_ARB             0x88EF
 #define LOCAL_GL_PIXEL_UNPACK_BUFFER_BINDING_EXT             0x88EF
-#define LOCAL_GL_PIXEL_UNPACK_BUFFER_BINDING_NV              0x88EF
 #define LOCAL_GL_PIXEL_UNPACK_BUFFER_EXT                     0x88EC
-#define LOCAL_GL_PIXEL_UNPACK_BUFFER_NV                      0x88EC
 #define LOCAL_GL_PLUS_CLAMPED_ALPHA_NV                       0x92B2
 #define LOCAL_GL_PLUS_CLAMPED_NV                             0x92B1
 #define LOCAL_GL_PLUS_DARKER_NV                              0x9292
 #define LOCAL_GL_PLUS_NV                                     0x9291
 #define LOCAL_GL_PN_TRIANGLES_ATI                            0x87F0
 #define LOCAL_GL_PN_TRIANGLES_NORMAL_MODE_ATI                0x87F3
 #define LOCAL_GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI         0x87F7
 #define LOCAL_GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI      0x87F8
@@ -3663,17 +3576,16 @@
 #define LOCAL_GL_POINT_SPRITE_OES                            0x8861
 #define LOCAL_GL_POINT_SPRITE_R_MODE_NV                      0x8863
 #define LOCAL_GL_POINT_TOKEN                                 0x0701
 #define LOCAL_GL_POLYGON                                     0x0009
 #define LOCAL_GL_POLYGON_BIT                                 0x00000008
 #define LOCAL_GL_POLYGON_MODE                                0x0B40
 #define LOCAL_GL_POLYGON_MODE_NV                             0x0B40
 #define LOCAL_GL_POLYGON_OFFSET_BIAS_EXT                     0x8039
-#define LOCAL_GL_POLYGON_OFFSET_CLAMP                        0x8E1B
 #define LOCAL_GL_POLYGON_OFFSET_CLAMP_EXT                    0x8E1B
 #define LOCAL_GL_POLYGON_OFFSET_COMMAND_NV                   0x000E
 #define LOCAL_GL_POLYGON_OFFSET_EXT                          0x8037
 #define LOCAL_GL_POLYGON_OFFSET_FACTOR                       0x8038
 #define LOCAL_GL_POLYGON_OFFSET_FACTOR_EXT                   0x8038
 #define LOCAL_GL_POLYGON_OFFSET_FILL                         0x8037
 #define LOCAL_GL_POLYGON_OFFSET_LINE                         0x2A02
 #define LOCAL_GL_POLYGON_OFFSET_LINE_NV                      0x2A02
@@ -3738,17 +3650,16 @@
 #define LOCAL_GL_PRIMARY_COLOR                               0x8577
 #define LOCAL_GL_PRIMARY_COLOR_ARB                           0x8577
 #define LOCAL_GL_PRIMARY_COLOR_EXT                           0x8577
 #define LOCAL_GL_PRIMARY_COLOR_NV                            0x852C
 #define LOCAL_GL_PRIMITIVES_GENERATED                        0x8C87
 #define LOCAL_GL_PRIMITIVES_GENERATED_EXT                    0x8C87
 #define LOCAL_GL_PRIMITIVES_GENERATED_NV                     0x8C87
 #define LOCAL_GL_PRIMITIVES_GENERATED_OES                    0x8C87
-#define LOCAL_GL_PRIMITIVES_SUBMITTED                        0x82EF
 #define LOCAL_GL_PRIMITIVES_SUBMITTED_ARB                    0x82EF
 #define LOCAL_GL_PRIMITIVE_BOUNDING_BOX                      0x92BE
 #define LOCAL_GL_PRIMITIVE_BOUNDING_BOX_ARB                  0x92BE
 #define LOCAL_GL_PRIMITIVE_BOUNDING_BOX_EXT                  0x92BE
 #define LOCAL_GL_PRIMITIVE_BOUNDING_BOX_OES                  0x92BE
 #define LOCAL_GL_PRIMITIVE_ID_NV                             0x8C7C
 #define LOCAL_GL_PRIMITIVE_RESTART                           0x8F9D
 #define LOCAL_GL_PRIMITIVE_RESTART_FIXED_INDEX               0x8D69
@@ -3764,17 +3675,16 @@
 #define LOCAL_GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NV  0x9340
 #define LOCAL_GL_PROGRAM_ADDRESS_REGISTERS_ARB               0x88B0
 #define LOCAL_GL_PROGRAM_ALU_INSTRUCTIONS_ARB                0x8805
 #define LOCAL_GL_PROGRAM_ATTRIBS_ARB                         0x88AC
 #define LOCAL_GL_PROGRAM_ATTRIB_COMPONENTS_NV                0x8906
 #define LOCAL_GL_PROGRAM_BINARY_ANGLE                        0x93A6
 #define LOCAL_GL_PROGRAM_BINARY_FORMATS                      0x87FF
 #define LOCAL_GL_PROGRAM_BINARY_FORMATS_OES                  0x87FF
-#define LOCAL_GL_PROGRAM_BINARY_FORMAT_MESA                  0x875F
 #define LOCAL_GL_PROGRAM_BINARY_LENGTH                       0x8741
 #define LOCAL_GL_PROGRAM_BINARY_LENGTH_OES                   0x8741
 #define LOCAL_GL_PROGRAM_BINARY_RETRIEVABLE_HINT             0x8257
 #define LOCAL_GL_PROGRAM_BINDING_ARB                         0x8677
 #define LOCAL_GL_PROGRAM_ERROR_POSITION_ARB                  0x864B
 #define LOCAL_GL_PROGRAM_ERROR_POSITION_NV                   0x864B
 #define LOCAL_GL_PROGRAM_ERROR_STRING_ARB                    0x8874
 #define LOCAL_GL_PROGRAM_ERROR_STRING_NV                     0x8874
@@ -3899,22 +3809,16 @@
 #define LOCAL_GL_QUERY_DEPTH_FAIL_EVENT_BIT_AMD              0x00000002
 #define LOCAL_GL_QUERY_DEPTH_PASS_EVENT_BIT_AMD              0x00000001
 #define LOCAL_GL_QUERY_KHR                                   0x82E3
 #define LOCAL_GL_QUERY_NO_WAIT                               0x8E14
 #define LOCAL_GL_QUERY_NO_WAIT_INVERTED                      0x8E18
 #define LOCAL_GL_QUERY_NO_WAIT_NV                            0x8E14
 #define LOCAL_GL_QUERY_OBJECT_AMD                            0x9153
 #define LOCAL_GL_QUERY_OBJECT_EXT                            0x9153
-#define LOCAL_GL_QUERY_RESOURCE_BUFFEROBJECT_NV              0x9547
-#define LOCAL_GL_QUERY_RESOURCE_MEMTYPE_VIDMEM_NV            0x9542
-#define LOCAL_GL_QUERY_RESOURCE_RENDERBUFFER_NV              0x9546
-#define LOCAL_GL_QUERY_RESOURCE_SYS_RESERVED_NV              0x9544
-#define LOCAL_GL_QUERY_RESOURCE_TEXTURE_NV                   0x9545
-#define LOCAL_GL_QUERY_RESOURCE_TYPE_VIDMEM_ALLOC_NV         0x9540
 #define LOCAL_GL_QUERY_RESULT                                0x8866
 #define LOCAL_GL_QUERY_RESULT_ARB                            0x8866
 #define LOCAL_GL_QUERY_RESULT_AVAILABLE                      0x8867
 #define LOCAL_GL_QUERY_RESULT_AVAILABLE_ARB                  0x8867
 #define LOCAL_GL_QUERY_RESULT_AVAILABLE_EXT                  0x8867
 #define LOCAL_GL_QUERY_RESULT_EXT                            0x8866
 #define LOCAL_GL_QUERY_RESULT_NO_WAIT                        0x9194
 #define LOCAL_GL_QUERY_RESULT_NO_WAIT_AMD                    0x9194
@@ -4000,18 +3904,16 @@
 #define LOCAL_GL_RED_NV                                      0x1903
 #define LOCAL_GL_RED_SCALE                                   0x0D14
 #define LOCAL_GL_RED_SNORM                                   0x8F90
 #define LOCAL_GL_REFERENCED_BY_COMPUTE_SHADER                0x930B
 #define LOCAL_GL_REFERENCED_BY_FRAGMENT_SHADER               0x930A
 #define LOCAL_GL_REFERENCED_BY_GEOMETRY_SHADER               0x9309
 #define LOCAL_GL_REFERENCED_BY_GEOMETRY_SHADER_EXT           0x9309
 #define LOCAL_GL_REFERENCED_BY_GEOMETRY_SHADER_OES           0x9309
-#define LOCAL_GL_REFERENCED_BY_MESH_SHADER_NV                0x95A0
-#define LOCAL_GL_REFERENCED_BY_TASK_SHADER_NV                0x95A1
 #define LOCAL_GL_REFERENCED_BY_TESS_CONTROL_SHADER           0x9307
 #define LOCAL_GL_REFERENCED_BY_TESS_CONTROL_SHADER_EXT       0x9307
 #define LOCAL_GL_REFERENCED_BY_TESS_CONTROL_SHADER_OES       0x9307
 #define LOCAL_GL_REFERENCED_BY_TESS_EVALUATION_SHADER        0x9308
 #define LOCAL_GL_REFERENCED_BY_TESS_EVALUATION_SHADER_EXT    0x9308
 #define LOCAL_GL_REFERENCED_BY_TESS_EVALUATION_SHADER_OES    0x9308
 #define LOCAL_GL_REFERENCED_BY_VERTEX_SHADER                 0x9306
 #define LOCAL_GL_REFERENCE_PLANE_EQUATION_SGIX               0x817E
@@ -4110,17 +4012,16 @@
 #define LOCAL_GL_RENDERBUFFER_SAMPLES_ANGLE                  0x8CAB
 #define LOCAL_GL_RENDERBUFFER_SAMPLES_APPLE                  0x8CAB
 #define LOCAL_GL_RENDERBUFFER_SAMPLES_EXT                    0x8CAB
 #define LOCAL_GL_RENDERBUFFER_SAMPLES_IMG                    0x9133
 #define LOCAL_GL_RENDERBUFFER_SAMPLES_NV                     0x8CAB
 #define LOCAL_GL_RENDERBUFFER_STENCIL_SIZE                   0x8D55
 #define LOCAL_GL_RENDERBUFFER_STENCIL_SIZE_EXT               0x8D55
 #define LOCAL_GL_RENDERBUFFER_STENCIL_SIZE_OES               0x8D55
-#define LOCAL_GL_RENDERBUFFER_STORAGE_SAMPLES_AMD            0x91B2
 #define LOCAL_GL_RENDERBUFFER_WIDTH                          0x8D42
 #define LOCAL_GL_RENDERBUFFER_WIDTH_EXT                      0x8D42
 #define LOCAL_GL_RENDERBUFFER_WIDTH_OES                      0x8D42
 #define LOCAL_GL_RENDERER                                    0x1F01
 #define LOCAL_GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM           0x8FB3
 #define LOCAL_GL_RENDER_GPU_MASK_NV                          0x9558
 #define LOCAL_GL_RENDER_MODE                                 0x0C40
 #define LOCAL_GL_REPEAT                                      0x2901
@@ -4131,17 +4032,16 @@
 #define LOCAL_GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN             0x85C1
 #define LOCAL_GL_REPLACEMENT_CODE_SUN                        0x81D8
 #define LOCAL_GL_REPLACE_EXT                                 0x8062
 #define LOCAL_GL_REPLACE_MIDDLE_SUN                          0x0002
 #define LOCAL_GL_REPLACE_OLDEST_SUN                          0x0003
 #define LOCAL_GL_REPLACE_VALUE_AMD                           0x874B
 #define LOCAL_GL_REPLICATE_BORDER                            0x8153
 #define LOCAL_GL_REPLICATE_BORDER_HP                         0x8153
-#define LOCAL_GL_REPRESENTATIVE_FRAGMENT_TEST_NV             0x937F
 #define LOCAL_GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES            0x8D68
 #define LOCAL_GL_RESAMPLE_AVERAGE_OML                        0x8988
 #define LOCAL_GL_RESAMPLE_DECIMATE_OML                       0x8989
 #define LOCAL_GL_RESAMPLE_DECIMATE_SGIX                      0x8430
 #define LOCAL_GL_RESAMPLE_REPLICATE_OML                      0x8986
 #define LOCAL_GL_RESAMPLE_REPLICATE_SGIX                     0x8433
 #define LOCAL_GL_RESAMPLE_ZERO_FILL_OML                      0x8987
 #define LOCAL_GL_RESAMPLE_ZERO_FILL_SGIX                     0x8434
@@ -4284,17 +4184,16 @@
 #define LOCAL_GL_RGB_SCALE                                   0x8573
 #define LOCAL_GL_RGB_SCALE_ARB                               0x8573
 #define LOCAL_GL_RGB_SCALE_EXT                               0x8573
 #define LOCAL_GL_RGB_SNORM                                   0x8F92
 #define LOCAL_GL_RG_EXT                                      0x8227
 #define LOCAL_GL_RG_INTEGER                                  0x8228
 #define LOCAL_GL_RG_SNORM                                    0x8F91
 #define LOCAL_GL_RIGHT                                       0x0407
-#define LOCAL_GL_ROBUST_GPU_TIMEOUT_MS_KHR                   0x82FD
 #define LOCAL_GL_ROUNDED_RECT2_NV                            0xEA
 #define LOCAL_GL_ROUNDED_RECT4_NV                            0xEC
 #define LOCAL_GL_ROUNDED_RECT8_NV                            0xEE
 #define LOCAL_GL_ROUNDED_RECT_NV                             0xE8
 #define LOCAL_GL_ROUND_NV                                    0x90A4
 #define LOCAL_GL_S                                           0x2000
 #define LOCAL_GL_SAMPLER                                     0x82E6
 #define LOCAL_GL_SAMPLER_1D                                  0x8B5D
@@ -4404,20 +4303,18 @@
 #define LOCAL_GL_SCALEBIAS_HINT_SGIX                         0x8322
 #define LOCAL_GL_SCALED_RESOLVE_FASTEST_EXT                  0x90BA
 #define LOCAL_GL_SCALED_RESOLVE_NICEST_EXT                   0x90BB
 #define LOCAL_GL_SCALE_BY_FOUR_NV                            0x853F
 #define LOCAL_GL_SCALE_BY_ONE_HALF_NV                        0x8540
 #define LOCAL_GL_SCALE_BY_TWO_NV                             0x853E
 #define LOCAL_GL_SCISSOR_BIT                                 0x00080000
 #define LOCAL_GL_SCISSOR_BOX                                 0x0C10
-#define LOCAL_GL_SCISSOR_BOX_EXCLUSIVE_NV                    0x9556
 #define LOCAL_GL_SCISSOR_COMMAND_NV                          0x0011
 #define LOCAL_GL_SCISSOR_TEST                                0x0C11
-#define LOCAL_GL_SCISSOR_TEST_EXCLUSIVE_NV                   0x9555
 #define LOCAL_GL_SCREEN                                      0x9295
 #define LOCAL_GL_SCREEN_COORDINATES_REND                     0x8490
 #define LOCAL_GL_SCREEN_KHR                                  0x9295
 #define LOCAL_GL_SCREEN_NV                                   0x9295
 #define LOCAL_GL_SECONDARY_COLOR_ARRAY                       0x845E
 #define LOCAL_GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV            0x8F27
 #define LOCAL_GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING        0x889C
 #define LOCAL_GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB    0x889C
@@ -4447,17 +4344,16 @@
 #define LOCAL_GL_SEPARATE_SPECULAR_COLOR_EXT                 0x81FA
 #define LOCAL_GL_SET                                         0x150F
 #define LOCAL_GL_SET_AMD                                     0x874A
 #define LOCAL_GL_SGX_BINARY_IMG                              0x8C0A
 #define LOCAL_GL_SGX_PROGRAM_BINARY_IMG                      0x9130
 #define LOCAL_GL_SHADER                                      0x82E1
 #define LOCAL_GL_SHADER_BINARY_DMP                           0x9250
 #define LOCAL_GL_SHADER_BINARY_FORMATS                       0x8DF8
-#define LOCAL_GL_SHADER_BINARY_FORMAT_SPIR_V                 0x9551
 #define LOCAL_GL_SHADER_BINARY_FORMAT_SPIR_V_ARB             0x9551
 #define LOCAL_GL_SHADER_BINARY_VIV                           0x8FC4
 #define LOCAL_GL_SHADER_COMPILER                             0x8DFA
 #define LOCAL_GL_SHADER_CONSISTENT_NV                        0x86DD
 #define LOCAL_GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV         0x00000010
 #define LOCAL_GL_SHADER_IMAGE_ACCESS_BARRIER_BIT             0x00000020
 #define LOCAL_GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT         0x00000020
 #define LOCAL_GL_SHADER_IMAGE_ATOMIC                         0x82A6
@@ -4476,36 +4372,16 @@
 #define LOCAL_GL_SHADER_STORAGE_BUFFER_BINDING               0x90D3
 #define LOCAL_GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT      0x90DF
 #define LOCAL_GL_SHADER_STORAGE_BUFFER_SIZE                  0x90D5
 #define LOCAL_GL_SHADER_STORAGE_BUFFER_START                 0x90D4
 #define LOCAL_GL_SHADER_TYPE                                 0x8B4F
 #define LOCAL_GL_SHADE_MODEL                                 0x0B54
 #define LOCAL_GL_SHADING_LANGUAGE_VERSION                    0x8B8C
 #define LOCAL_GL_SHADING_LANGUAGE_VERSION_ARB                0x8B8C
-#define LOCAL_GL_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV    0x956F
-#define LOCAL_GL_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV 0x9566
-#define LOCAL_GL_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV 0x9567
-#define LOCAL_GL_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV 0x9568
-#define LOCAL_GL_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV 0x9569
-#define LOCAL_GL_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV 0x956A
-#define LOCAL_GL_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV 0x956B
-#define LOCAL_GL_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV      0x9565
-#define LOCAL_GL_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV     0x956C
-#define LOCAL_GL_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV     0x956D
-#define LOCAL_GL_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV     0x956E
-#define LOCAL_GL_SHADING_RATE_IMAGE_BINDING_NV               0x955B
-#define LOCAL_GL_SHADING_RATE_IMAGE_NV                       0x9563
-#define LOCAL_GL_SHADING_RATE_IMAGE_PALETTE_SIZE_NV          0x955E
-#define LOCAL_GL_SHADING_RATE_IMAGE_TEXEL_HEIGHT_NV          0x955D
-#define LOCAL_GL_SHADING_RATE_IMAGE_TEXEL_WIDTH_NV           0x955C
-#define LOCAL_GL_SHADING_RATE_NO_INVOCATIONS_NV              0x9564
-#define LOCAL_GL_SHADING_RATE_SAMPLE_ORDER_DEFAULT_NV        0x95AE
-#define LOCAL_GL_SHADING_RATE_SAMPLE_ORDER_PIXEL_MAJOR_NV    0x95AF
-#define LOCAL_GL_SHADING_RATE_SAMPLE_ORDER_SAMPLE_MAJOR_NV   0x95B0
 #define LOCAL_GL_SHADOW_AMBIENT_SGIX                         0x80BF
 #define LOCAL_GL_SHADOW_ATTENUATION_EXT                      0x834E
 #define LOCAL_GL_SHARED_EDGE_NV                              0xC0
 #define LOCAL_GL_SHARED_TEXTURE_PALETTE_EXT                  0x81FB
 #define LOCAL_GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS            0x80B0
 #define LOCAL_GL_SHININESS                                   0x1601
 #define LOCAL_GL_SHORT                                       0x1402
 #define LOCAL_GL_SIGNALED                                    0x9119
@@ -4597,19 +4473,17 @@
 #define LOCAL_GL_SPARE0_PLUS_SECONDARY_COLOR_NV              0x8532
 #define LOCAL_GL_SPARE1_NV                                   0x852F
 #define LOCAL_GL_SPARSE_BUFFER_PAGE_SIZE_ARB                 0x82F8
 #define LOCAL_GL_SPARSE_STORAGE_BIT_ARB                      0x0400
 #define LOCAL_GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB  0x91A9
 #define LOCAL_GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_EXT  0x91A9
 #define LOCAL_GL_SPECULAR                                    0x1202
 #define LOCAL_GL_SPHERE_MAP                                  0x2402
-#define LOCAL_GL_SPIR_V_BINARY                               0x9552
 #define LOCAL_GL_SPIR_V_BINARY_ARB                           0x9552
-#define LOCAL_GL_SPIR_V_EXTENSIONS                           0x9553
 #define LOCAL_GL_SPOT_CUTOFF                                 0x1206
 #define LOCAL_GL_SPOT_DIRECTION                              0x1204
 #define LOCAL_GL_SPOT_EXPONENT                               0x1205
 #define LOCAL_GL_SPRITE_AXIAL_SGIX                           0x814C
 #define LOCAL_GL_SPRITE_AXIS_SGIX                            0x814A
 #define LOCAL_GL_SPRITE_EYE_ALIGNED_SGIX                     0x814E
 #define LOCAL_GL_SPRITE_MODE_SGIX                            0x8149
 #define LOCAL_GL_SPRITE_OBJECT_ALIGNED_SGIX                  0x814D
@@ -4740,17 +4614,16 @@
 #define LOCAL_GL_SUBPIXEL_PRECISION_BIAS_Y_BITS_NV           0x9348
 #define LOCAL_GL_SUBSAMPLE_DISTANCE_AMD                      0x883F
 #define LOCAL_GL_SUBTRACT                                    0x84E7
 #define LOCAL_GL_SUBTRACT_ARB                                0x84E7
 #define LOCAL_GL_SUB_ATI                                     0x8965
 #define LOCAL_GL_SUCCESS_NV                                  0x902F
 #define LOCAL_GL_SUPERSAMPLE_SCALE_X_NV                      0x9372
 #define LOCAL_GL_SUPERSAMPLE_SCALE_Y_NV                      0x9373
-#define LOCAL_GL_SUPPORTED_MULTISAMPLE_MODES_AMD             0x91B7
 #define LOCAL_GL_SURFACE_MAPPED_NV                           0x8700
 #define LOCAL_GL_SURFACE_REGISTERED_NV                       0x86FD
 #define LOCAL_GL_SURFACE_STATE_NV                            0x86EB
 #define LOCAL_GL_SWIZZLE_STQ_ATI                             0x8977
 #define LOCAL_GL_SWIZZLE_STQ_DQ_ATI                          0x8979
 #define LOCAL_GL_SWIZZLE_STRQ_ATI                            0x897A
 #define LOCAL_GL_SWIZZLE_STRQ_DQ_ATI                         0x897B
 #define LOCAL_GL_SWIZZLE_STR_ATI                             0x8976
@@ -4785,48 +4658,41 @@
 #define LOCAL_GL_T4F_C4F_N3F_V4F                             0x2A2D
 #define LOCAL_GL_T4F_V4F                                     0x2A28
 #define LOCAL_GL_TABLE_TOO_LARGE                             0x8031
 #define LOCAL_GL_TABLE_TOO_LARGE_EXT                         0x8031
 #define LOCAL_GL_TANGENT_ARRAY_EXT                           0x8439
 #define LOCAL_GL_TANGENT_ARRAY_POINTER_EXT                   0x8442
 #define LOCAL_GL_TANGENT_ARRAY_STRIDE_EXT                    0x843F
 #define LOCAL_GL_TANGENT_ARRAY_TYPE_EXT                      0x843E
-#define LOCAL_GL_TASK_SHADER_BIT_NV                          0x00000080
-#define LOCAL_GL_TASK_SHADER_NV                              0x955A
-#define LOCAL_GL_TASK_SUBROUTINE_NV                          0x957D
-#define LOCAL_GL_TASK_SUBROUTINE_UNIFORM_NV                  0x957F
-#define LOCAL_GL_TASK_WORK_GROUP_SIZE_NV                     0x953F
 #define LOCAL_GL_TERMINATE_SEQUENCE_COMMAND_NV               0x0000
 #define LOCAL_GL_TESSELLATION_FACTOR_AMD                     0x9005
 #define LOCAL_GL_TESSELLATION_MODE_AMD                       0x9004
 #define LOCAL_GL_TESS_CONTROL_OUTPUT_VERTICES                0x8E75
 #define LOCAL_GL_TESS_CONTROL_OUTPUT_VERTICES_EXT            0x8E75
 #define LOCAL_GL_TESS_CONTROL_OUTPUT_VERTICES_OES            0x8E75
 #define LOCAL_GL_TESS_CONTROL_PROGRAM_NV                     0x891E
 #define LOCAL_GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV    0x8C74
 #define LOCAL_GL_TESS_CONTROL_SHADER                         0x8E88
 #define LOCAL_GL_TESS_CONTROL_SHADER_BIT                     0x00000008
 #define LOCAL_GL_TESS_CONTROL_SHADER_BIT_EXT                 0x00000008
 #define LOCAL_GL_TESS_CONTROL_SHADER_BIT_OES                 0x00000008
 #define LOCAL_GL_TESS_CONTROL_SHADER_EXT                     0x8E88
 #define LOCAL_GL_TESS_CONTROL_SHADER_OES                     0x8E88
-#define LOCAL_GL_TESS_CONTROL_SHADER_PATCHES                 0x82F1
 #define LOCAL_GL_TESS_CONTROL_SHADER_PATCHES_ARB             0x82F1
 #define LOCAL_GL_TESS_CONTROL_SUBROUTINE                     0x92E9
 #define LOCAL_GL_TESS_CONTROL_SUBROUTINE_UNIFORM             0x92EF
 #define LOCAL_GL_TESS_CONTROL_TEXTURE                        0x829C
 #define LOCAL_GL_TESS_EVALUATION_PROGRAM_NV                  0x891F
 #define LOCAL_GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV 0x8C75
 #define LOCAL_GL_TESS_EVALUATION_SHADER                      0x8E87
 #define LOCAL_GL_TESS_EVALUATION_SHADER_BIT                  0x00000010
 #define LOCAL_GL_TESS_EVALUATION_SHADER_BIT_EXT              0x00000010
 #define LOCAL_GL_TESS_EVALUATION_SHADER_BIT_OES              0x00000010
 #define LOCAL_GL_TESS_EVALUATION_SHADER_EXT                  0x8E87
-#define LOCAL_GL_TESS_EVALUATION_SHADER_INVOCATIONS          0x82F2
 #define LOCAL_GL_TESS_EVALUATION_SHADER_INVOCATIONS_ARB      0x82F2
 #define LOCAL_GL_TESS_EVALUATION_SHADER_OES                  0x8E87
 #define LOCAL_GL_TESS_EVALUATION_SUBROUTINE                  0x92EA
 #define LOCAL_GL_TESS_EVALUATION_SUBROUTINE_UNIFORM          0x92F0
 #define LOCAL_GL_TESS_EVALUATION_TEXTURE                     0x829D
 #define LOCAL_GL_TESS_GEN_MODE                               0x8E76
 #define LOCAL_GL_TESS_GEN_MODE_EXT                           0x8E76
 #define LOCAL_GL_TESS_GEN_MODE_OES                           0x8E76
@@ -5103,21 +4969,16 @@
 #define LOCAL_GL_TEXTURE_FETCH_BARRIER_BIT                   0x00000008
 #define LOCAL_GL_TEXTURE_FETCH_BARRIER_BIT_EXT               0x00000008
 #define LOCAL_GL_TEXTURE_FILTER4_SIZE_SGIS                   0x8147
 #define LOCAL_GL_TEXTURE_FILTER_CONTROL                      0x8500
 #define LOCAL_GL_TEXTURE_FILTER_CONTROL_EXT                  0x8500
 #define LOCAL_GL_TEXTURE_FIXED_SAMPLE_LOCATIONS              0x9107
 #define LOCAL_GL_TEXTURE_FLOAT_COMPONENTS_NV                 0x888C
 #define LOCAL_GL_TEXTURE_FORMAT_QCOM                         0x8BD6
-#define LOCAL_GL_TEXTURE_FORMAT_SRGB_OVERRIDE_EXT            0x8FBF
-#define LOCAL_GL_TEXTURE_FOVEATED_FEATURE_BITS_QCOM          0x8BFB
-#define LOCAL_GL_TEXTURE_FOVEATED_FEATURE_QUERY_QCOM         0x8BFD
-#define LOCAL_GL_TEXTURE_FOVEATED_MIN_PIXEL_DENSITY_QCOM     0x8BFC
-#define LOCAL_GL_TEXTURE_FOVEATED_NUM_FOCAL_POINTS_QUERY_QCOM        0x8BFE
 #define LOCAL_GL_TEXTURE_FREE_MEMORY_ATI                     0x87FC
 #define LOCAL_GL_TEXTURE_GATHER                              0x82A2
 #define LOCAL_GL_TEXTURE_GATHER_SHADOW                       0x82A3
 #define LOCAL_GL_TEXTURE_GEN_MODE                            0x2500
 #define LOCAL_GL_TEXTURE_GEN_MODE_OES                        0x2500
 #define LOCAL_GL_TEXTURE_GEN_Q                               0x0C63
 #define LOCAL_GL_TEXTURE_GEN_R                               0x0C62
 #define LOCAL_GL_TEXTURE_GEN_S                               0x0C60
@@ -5158,17 +5019,16 @@
 #define LOCAL_GL_TEXTURE_LUMINANCE_TYPE                      0x8C14
 #define LOCAL_GL_TEXTURE_LUMINANCE_TYPE_ARB                  0x8C14
 #define LOCAL_GL_TEXTURE_MAG_FILTER                          0x2800
 #define LOCAL_GL_TEXTURE_MAG_SIZE_NV                         0x871F
 #define LOCAL_GL_TEXTURE_MATERIAL_FACE_EXT                   0x8351
 #define LOCAL_GL_TEXTURE_MATERIAL_PARAMETER_EXT              0x8352
 #define LOCAL_GL_TEXTURE_MATRIX                              0x0BA8
 #define LOCAL_GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES        0x898F
-#define LOCAL_GL_TEXTURE_MAX_ANISOTROPY                      0x84FE
 #define LOCAL_GL_TEXTURE_MAX_ANISOTROPY_EXT                  0x84FE
 #define LOCAL_GL_TEXTURE_MAX_CLAMP_R_SGIX                    0x836B
 #define LOCAL_GL_TEXTURE_MAX_CLAMP_S_SGIX                    0x8369
 #define LOCAL_GL_TEXTURE_MAX_CLAMP_T_SGIX                    0x836A
 #define LOCAL_GL_TEXTURE_MAX_LEVEL                           0x813D
 #define LOCAL_GL_TEXTURE_MAX_LEVEL_APPLE                     0x813D
 #define LOCAL_GL_TEXTURE_MAX_LEVEL_SGIS                      0x813D
 #define LOCAL_GL_TEXTURE_MAX_LOD                             0x813B
@@ -5187,17 +5047,16 @@
 #define LOCAL_GL_TEXTURE_PRIORITY_EXT                        0x8066
 #define LOCAL_GL_TEXTURE_PROTECTED_EXT                       0x8BFA
 #define LOCAL_GL_TEXTURE_RANGE_LENGTH_APPLE                  0x85B7
 #define LOCAL_GL_TEXTURE_RANGE_POINTER_APPLE                 0x85B8
 #define LOCAL_GL_TEXTURE_RECTANGLE                           0x84F5
 #define LOCAL_GL_TEXTURE_RECTANGLE_ARB                       0x84F5
 #define LOCAL_GL_TEXTURE_RECTANGLE_NV                        0x84F5
 #define LOCAL_GL_TEXTURE_REDUCTION_MODE_ARB                  0x9366
-#define LOCAL_GL_TEXTURE_REDUCTION_MODE_EXT                  0x9366
 #define LOCAL_GL_TEXTURE_RED_SIZE                            0x805C
 #define LOCAL_GL_TEXTURE_RED_SIZE_EXT                        0x805C
 #define LOCAL_GL_TEXTURE_RED_TYPE                            0x8C10
 #define LOCAL_GL_TEXTURE_RED_TYPE_ARB                        0x8C10
 #define LOCAL_GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV  0x8E54
 #define LOCAL_GL_TEXTURE_RENDERBUFFER_NV                     0x8E55
 #define LOCAL_GL_TEXTURE_RESIDENT                            0x8067
 #define LOCAL_GL_TEXTURE_RESIDENT_EXT                        0x8067
@@ -5251,19 +5110,16 @@
 #define LOCAL_GL_TEXTURE_WIDTH_QCOM                          0x8BD2
 #define LOCAL_GL_TEXTURE_WRAP_Q_SGIS                         0x8137
 #define LOCAL_GL_TEXTURE_WRAP_R                              0x8072
 #define LOCAL_GL_TEXTURE_WRAP_R_EXT                          0x8072
 #define LOCAL_GL_TEXTURE_WRAP_R_OES                          0x8072
 #define LOCAL_GL_TEXTURE_WRAP_S                              0x2802
 #define LOCAL_GL_TEXTURE_WRAP_T                              0x2803
 #define LOCAL_GL_TEXT_FRAGMENT_SHADER_ATI                    0x8200
-#define LOCAL_GL_TILE_RASTER_ORDER_FIXED_MESA                0x8BB8
-#define LOCAL_GL_TILE_RASTER_ORDER_INCREASING_X_MESA         0x8BB9
-#define LOCAL_GL_TILE_RASTER_ORDER_INCREASING_Y_MESA         0x8BBA
 #define LOCAL_GL_TILING_TYPES_EXT                            0x9583
 #define LOCAL_GL_TIMEOUT_EXPIRED                             0x911B
 #define LOCAL_GL_TIMEOUT_EXPIRED_APPLE                       0x911B
 #define LOCAL_GL_TIMEOUT_IGNORED                             0xFFFFFFFFFFFFFFFF
 #define LOCAL_GL_TIMEOUT_IGNORED_APPLE                       0xFFFFFFFFFFFFFFFF
 #define LOCAL_GL_TIMESTAMP                                   0x8E28
 #define LOCAL_GL_TIMESTAMP_EXT                               0x8E28
 #define LOCAL_GL_TIME_ELAPSED                                0x88BF
@@ -5306,24 +5162,22 @@
 #define LOCAL_GL_TRANSFORM_FEEDBACK_BUFFER_SIZE              0x8C85
 #define LOCAL_GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT          0x8C85
 #define LOCAL_GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV           0x8C85
 #define LOCAL_GL_TRANSFORM_FEEDBACK_BUFFER_START             0x8C84
 #define LOCAL_GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT         0x8C84
 #define LOCAL_GL_TRANSFORM_FEEDBACK_BUFFER_START_NV          0x8C84
 #define LOCAL_GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE            0x934C
 #define LOCAL_GL_TRANSFORM_FEEDBACK_NV                       0x8E22
-#define LOCAL_GL_TRANSFORM_FEEDBACK_OVERFLOW                 0x82EC
 #define LOCAL_GL_TRANSFORM_FEEDBACK_OVERFLOW_ARB             0x82EC
 #define LOCAL_GL_TRANSFORM_FEEDBACK_PAUSED                   0x8E23
 #define LOCAL_GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN       0x8C88
 #define LOCAL_GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT   0x8C88
 #define LOCAL_GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV    0x8C88
 #define LOCAL_GL_TRANSFORM_FEEDBACK_RECORD_NV                0x8C86
-#define LOCAL_GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW          0x82ED
 #define LOCAL_GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB      0x82ED
 #define LOCAL_GL_TRANSFORM_FEEDBACK_VARYING                  0x92F4
 #define LOCAL_GL_TRANSFORM_FEEDBACK_VARYINGS                 0x8C83
 #define LOCAL_GL_TRANSFORM_FEEDBACK_VARYINGS_EXT             0x8C83
 #define LOCAL_GL_TRANSFORM_FEEDBACK_VARYINGS_NV              0x8C83
 #define LOCAL_GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH       0x8C76
 #define LOCAL_GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT   0x8C76
 #define LOCAL_GL_TRANSFORM_HINT_APPLE                        0x85B1
@@ -5377,18 +5231,16 @@
 #define LOCAL_GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES        0x8A43
 #define LOCAL_GL_UNIFORM_BLOCK_BINDING                       0x8A3F
 #define LOCAL_GL_UNIFORM_BLOCK_DATA_SIZE                     0x8A40
 #define LOCAL_GL_UNIFORM_BLOCK_INDEX                         0x8A3A
 #define LOCAL_GL_UNIFORM_BLOCK_NAME_LENGTH                   0x8A41
 #define LOCAL_GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER  0x90EC
 #define LOCAL_GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46
 #define LOCAL_GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45
-#define LOCAL_GL_UNIFORM_BLOCK_REFERENCED_BY_MESH_SHADER_NV  0x959C
-#define LOCAL_GL_UNIFORM_BLOCK_REFERENCED_BY_TASK_SHADER_NV  0x959D
 #define LOCAL_GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER     0x84F0
 #define LOCAL_GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER  0x84F1
 #define LOCAL_GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER   0x8A44
 #define LOCAL_GL_UNIFORM_BUFFER                              0x8A11
 #define LOCAL_GL_UNIFORM_BUFFER_ADDRESS_NV                   0x936F
 #define LOCAL_GL_UNIFORM_BUFFER_BINDING                      0x8A28
 #define LOCAL_GL_UNIFORM_BUFFER_BINDING_EXT                  0x8DEF
 #define LOCAL_GL_UNIFORM_BUFFER_EXT                          0x8DEE
@@ -5563,17 +5415,16 @@
 #define LOCAL_GL_UNSIGNED_SHORT_5_6_5_EXT                    0x8363
 #define LOCAL_GL_UNSIGNED_SHORT_5_6_5_REV                    0x8364
 #define LOCAL_GL_UNSIGNED_SHORT_5_6_5_REV_EXT                0x8364
 #define LOCAL_GL_UNSIGNED_SHORT_8_8_APPLE                    0x85BA
 #define LOCAL_GL_UNSIGNED_SHORT_8_8_MESA                     0x85BA
 #define LOCAL_GL_UNSIGNED_SHORT_8_8_REV_APPLE                0x85BB
 #define LOCAL_GL_UNSIGNED_SHORT_8_8_REV_MESA                 0x85BB
 #define LOCAL_GL_UPPER_LEFT                                  0x8CA2
-#define LOCAL_GL_UPPER_LEFT_EXT                              0x8CA2
 #define LOCAL_GL_USE_MISSING_GLYPH_NV                        0x90AA
 #define LOCAL_GL_UTF16_NV                                    0x909B
 #define LOCAL_GL_UTF8_NV                                     0x909A
 #define LOCAL_GL_UUID_SIZE_EXT                               16
 #define LOCAL_GL_V2F                                         0x2A20
 #define LOCAL_GL_V3F                                         0x2A21
 #define LOCAL_GL_VALIDATE_STATUS                             0x8B83
 #define LOCAL_GL_VARIABLE_A_NV                               0x8523
@@ -5717,17 +5568,16 @@
 #define LOCAL_GL_VERTEX_SHADER                               0x8B31
 #define LOCAL_GL_VERTEX_SHADER_ARB                           0x8B31
 #define LOCAL_GL_VERTEX_SHADER_BINDING_EXT                   0x8781
 #define LOCAL_GL_VERTEX_SHADER_BIT                           0x00000001
 #define LOCAL_GL_VERTEX_SHADER_BIT_EXT                       0x00000001
 #define LOCAL_GL_VERTEX_SHADER_EXT                           0x8780
 #define LOCAL_GL_VERTEX_SHADER_INSTRUCTIONS_EXT              0x87CF
 #define LOCAL_GL_VERTEX_SHADER_INVARIANTS_EXT                0x87D1
-#define LOCAL_GL_VERTEX_SHADER_INVOCATIONS                   0x82F0
 #define LOCAL_GL_VERTEX_SHADER_INVOCATIONS_ARB               0x82F0
 #define LOCAL_GL_VERTEX_SHADER_LOCALS_EXT                    0x87D3
 #define LOCAL_GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT           0x87D2
 #define LOCAL_GL_VERTEX_SHADER_OPTIMIZED_EXT                 0x87D4
 #define LOCAL_GL_VERTEX_SHADER_VARIANTS_EXT                  0x87D0
 #define LOCAL_GL_VERTEX_SOURCE_ATI                           0x8774
 #define LOCAL_GL_VERTEX_STATE_PROGRAM_NV                     0x8621
 #define LOCAL_GL_VERTEX_STREAM0_ATI                          0x876C
@@ -5743,17 +5593,16 @@
 #define LOCAL_GL_VERTEX_TEXTURE                              0x829B
 #define LOCAL_GL_VERTEX_WEIGHTING_EXT                        0x8509
 #define LOCAL_GL_VERTEX_WEIGHT_ARRAY_EXT                     0x850C
 #define LOCAL_GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT             0x8510
 #define LOCAL_GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT                0x850D
 #define LOCAL_GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT              0x850F
 #define LOCAL_GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT                0x850E
 #define LOCAL_GL_VERTICAL_LINE_TO_NV                         0x08
-#define LOCAL_GL_VERTICES_SUBMITTED                          0x82EE
 #define LOCAL_GL_VERTICES_SUBMITTED_ARB                      0x82EE
 #define LOCAL_GL_VIBRANCE_BIAS_NV                            0x8719
 #define LOCAL_GL_VIBRANCE_SCALE_NV                           0x8713
 #define LOCAL_GL_VIDEO_BUFFER_BINDING_NV                     0x9021
 #define LOCAL_GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV             0x902D
 #define LOCAL_GL_VIDEO_BUFFER_NV                             0x9020
 #define LOCAL_GL_VIDEO_BUFFER_PITCH_NV                       0x9028
 #define LOCAL_GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV         0x903B
@@ -5826,17 +5675,16 @@
 #define LOCAL_GL_VIRTUAL_PAGE_SIZE_Z_EXT                     0x9197
 #define LOCAL_GL_VIVIDLIGHT_NV                               0x92A6
 #define LOCAL_GL_VOLATILE_APPLE                              0x8A1A
 #define LOCAL_GL_WAIT_FAILED                                 0x911D
 #define LOCAL_GL_WAIT_FAILED_APPLE                           0x911D
 #define LOCAL_GL_WARPS_PER_SM_NV                             0x933A
 #define LOCAL_GL_WARP_SIZE_NV                                0x9339
 #define LOCAL_GL_WEIGHTED_AVERAGE_ARB                        0x9367
-#define LOCAL_GL_WEIGHTED_AVERAGE_EXT                        0x9367
 #define LOCAL_GL_WEIGHT_ARRAY_ARB                            0x86AD
 #define LOCAL_GL_WEIGHT_ARRAY_BUFFER_BINDING                 0x889E
 #define LOCAL_GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB             0x889E
 #define LOCAL_GL_WEIGHT_ARRAY_BUFFER_BINDING_OES             0x889E
 #define LOCAL_GL_WEIGHT_ARRAY_OES                            0x86AD
 #define LOCAL_GL_WEIGHT_ARRAY_POINTER_ARB                    0x86AC
 #define LOCAL_GL_WEIGHT_ARRAY_POINTER_OES                    0x86AC
 #define LOCAL_GL_WEIGHT_ARRAY_SIZE_ARB                       0x86AB
@@ -5875,17 +5723,16 @@
 #define LOCAL_GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV    0x9036
 #define LOCAL_GL_Z4Y12Z4CB12Z4CR12_444_NV                    0x9037
 #define LOCAL_GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV               0x9035
 #define LOCAL_GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV    0x9034
 #define LOCAL_GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV               0x9033
 #define LOCAL_GL_ZERO                                        0
 #define LOCAL_GL_ZERO_EXT                                    0x87DD
 #define LOCAL_GL_ZERO_TO_ONE                                 0x935F
-#define LOCAL_GL_ZERO_TO_ONE_EXT                             0x935F
 #define LOCAL_GL_ZOOM_X                                      0x0D16
 #define LOCAL_GL_ZOOM_Y                                      0x0D17
 #define LOCAL_GL_Z_EXT                                       0x87D7
 
 
 // EGL
 #define LOCAL_EGL_ALPHA_FORMAT                               0x3088
 #define LOCAL_EGL_ALPHA_FORMAT_NONPRE                        0x308B
@@ -5940,20 +5787,16 @@
 #define LOCAL_EGL_COLOR_ARGB_HI                              0x8F73
 #define LOCAL_EGL_COLOR_BUFFER_TYPE                          0x303F
 #define LOCAL_EGL_COLOR_COMPONENT_TYPE_EXT                   0x3339
 #define LOCAL_EGL_COLOR_COMPONENT_TYPE_FIXED_EXT             0x333A
 #define LOCAL_EGL_COLOR_COMPONENT_TYPE_FLOAT_EXT             0x333B
 #define LOCAL_EGL_COLOR_FORMAT_HI                            0x8F70
 #define LOCAL_EGL_COLOR_RGBA_HI                              0x8F72
 #define LOCAL_EGL_COLOR_RGB_HI                               0x8F71
-#define LOCAL_EGL_COMPOSITE_DEADLINE_ANDROID                 0x3431
-#define LOCAL_EGL_COMPOSITE_INTERVAL_ANDROID                 0x3432
-#define LOCAL_EGL_COMPOSITE_TO_PRESENT_LATENCY_ANDROID       0x3433
-#define LOCAL_EGL_COMPOSITION_LATCH_TIME_ANDROID             0x3436
 #define LOCAL_EGL_COMPOSITOR_DROP_NEWEST_FRAME_EXT           0x3462
 #define LOCAL_EGL_COMPOSITOR_KEEP_NEWEST_FRAME_EXT           0x3463
 #define LOCAL_EGL_CONDITION_SATISFIED                        0x30F6
 #define LOCAL_EGL_CONDITION_SATISFIED_KHR                    0x30F6
 #define LOCAL_EGL_CONDITION_SATISFIED_NV                     0x30EC
 #define LOCAL_EGL_CONFIG_CAVEAT                              0x3027
 #define LOCAL_EGL_CONFIG_ID                                  0x3028
 #define LOCAL_EGL_CONFORMANT                                 0x3042
@@ -5987,17 +5830,16 @@
 #define LOCAL_EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR     0x31BD
 #define LOCAL_EGL_CONTEXT_OPENGL_ROBUST_ACCESS               0x31B2
 #define LOCAL_EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR       0x00000004
 #define LOCAL_EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT           0x30BF
 #define LOCAL_EGL_CONTEXT_PRIORITY_HIGH_IMG                  0x3101
 #define LOCAL_EGL_CONTEXT_PRIORITY_LEVEL_IMG                 0x3100
 #define LOCAL_EGL_CONTEXT_PRIORITY_LOW_IMG                   0x3103
 #define LOCAL_EGL_CONTEXT_PRIORITY_MEDIUM_IMG                0x3102
-#define LOCAL_EGL_CONTEXT_PRIORITY_REALTIME_NV               0x3357
 #define LOCAL_EGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_KHR         0x2098
 #define LOCAL_EGL_CONTEXT_RELEASE_BEHAVIOR_KHR               0x2097
 #define LOCAL_EGL_CONTEXT_RELEASE_BEHAVIOR_NONE_KHR          0
 #define LOCAL_EGL_CORE_NATIVE_ENGINE                         0x305B
 #define LOCAL_EGL_COVERAGE_BUFFERS_NV                        0x30E0
 #define LOCAL_EGL_COVERAGE_SAMPLES_NV                        0x30E1
 #define LOCAL_EGL_COVERAGE_SAMPLE_RESOLVE_DEFAULT_NV         0x3132
 #define LOCAL_EGL_COVERAGE_SAMPLE_RESOLVE_NONE_NV            0x3133
@@ -6014,20 +5856,18 @@
 #define LOCAL_EGL_DEBUG_MSG_ERROR_KHR                        0x33BA
 #define LOCAL_EGL_DEBUG_MSG_INFO_KHR                         0x33BC
 #define LOCAL_EGL_DEBUG_MSG_WARN_KHR                         0x33BB
 #define LOCAL_EGL_DEFAULT_DISPLAY                            EGL_CAST(EGLNativeDisplayType,0)
 #define LOCAL_EGL_DEPTH_ENCODING_NONE_NV                     0
 #define LOCAL_EGL_DEPTH_ENCODING_NONLINEAR_NV                0x30E3
 #define LOCAL_EGL_DEPTH_ENCODING_NV                          0x30E2
 #define LOCAL_EGL_DEPTH_SIZE                                 0x3025
-#define LOCAL_EGL_DEQUEUE_READY_TIME_ANDROID                 0x343B
 #define LOCAL_EGL_DEVICE_EXT                                 0x322C
 #define LOCAL_EGL_DISCARD_SAMPLES_ARM                        0x3286
-#define LOCAL_EGL_DISPLAY_PRESENT_TIME_ANDROID               0x343A
 #define LOCAL_EGL_DISPLAY_SCALING                            10000
 #define LOCAL_EGL_DMA_BUF_PLANE0_FD_EXT                      0x3272
 #define LOCAL_EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT             0x3444
 #define LOCAL_EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT             0x3443
 #define LOCAL_EGL_DMA_BUF_PLANE0_OFFSET_EXT                  0x3273
 #define LOCAL_EGL_DMA_BUF_PLANE0_PITCH_EXT                   0x3274
 #define LOCAL_EGL_DMA_BUF_PLANE1_FD_EXT                      0x3275
 #define LOCAL_EGL_DMA_BUF_PLANE1_MODIFIER_HI_EXT             0x3446
@@ -6045,51 +5885,45 @@
 #define LOCAL_EGL_DMA_BUF_PLANE3_OFFSET_EXT                  0x3441
 #define LOCAL_EGL_DMA_BUF_PLANE3_PITCH_EXT                   0x3442
 #define LOCAL_EGL_DONT_CARE                                  EGL_CAST(EGLint,-1)
 #define LOCAL_EGL_DRAW                                       0x3059
 #define LOCAL_EGL_DRM_BUFFER_FORMAT_ARGB32_MESA              0x31D2
 #define LOCAL_EGL_DRM_BUFFER_FORMAT_MESA                     0x31D0
 #define LOCAL_EGL_DRM_BUFFER_MESA                            0x31D3
 #define LOCAL_EGL_DRM_BUFFER_STRIDE_MESA                     0x31D4
-#define LOCAL_EGL_DRM_BUFFER_USE_CURSOR_MESA                 0x00000004
 #define LOCAL_EGL_DRM_BUFFER_USE_MESA                        0x31D1
 #define LOCAL_EGL_DRM_BUFFER_USE_SCANOUT_MESA                0x00000001
 #define LOCAL_EGL_DRM_BUFFER_USE_SHARE_MESA                  0x00000002
 #define LOCAL_EGL_DRM_CONNECTOR_EXT                          0x3236
 #define LOCAL_EGL_DRM_CRTC_EXT                               0x3234
 #define LOCAL_EGL_DRM_DEVICE_FILE_EXT                        0x3233
 #define LOCAL_EGL_DRM_PLANE_EXT                              0x3235
 #define LOCAL_EGL_EXTENSIONS                                 0x3055
 #define LOCAL_EGL_EXTERNAL_REF_ID_EXT                        0x3461
 #define LOCAL_EGL_FALSE                                      0
-#define LOCAL_EGL_FIRST_COMPOSITION_GPU_FINISHED_TIME_ANDROID        0x3439
-#define LOCAL_EGL_FIRST_COMPOSITION_START_TIME_ANDROID       0x3437
 #define LOCAL_EGL_FIXED_SIZE_ANGLE                           0x3201
 #define LOCAL_EGL_FOREVER                                    0xFFFFFFFFFFFFFFFF
 #define LOCAL_EGL_FOREVER_KHR                                0xFFFFFFFFFFFFFFFF
 #define LOCAL_EGL_FOREVER_NV                                 0xFFFFFFFFFFFFFFFF
 #define LOCAL_EGL_FORMAT_RGBA_8888_EXACT_KHR                 0x30C2
 #define LOCAL_EGL_FORMAT_RGBA_8888_KHR                       0x30C3
 #define LOCAL_EGL_FORMAT_RGB_565_EXACT_KHR                   0x30C0
 #define LOCAL_EGL_FORMAT_RGB_565_KHR                         0x30C1
 #define LOCAL_EGL_FRAMEBUFFER_TARGET_ANDROID                 0x3147
 #define LOCAL_EGL_FRONT_BUFFER_AUTO_REFRESH_ANDROID          0x314C
-#define LOCAL_EGL_FRONT_BUFFER_EXT                           0x3464
 #define LOCAL_EGL_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV    0x334C
 #define LOCAL_EGL_GL_COLORSPACE                              0x309D
 #define LOCAL_EGL_GL_COLORSPACE_BT2020_LINEAR_EXT            0x333F
 #define LOCAL_EGL_GL_COLORSPACE_BT2020_PQ_EXT                0x3340
-#define LOCAL_EGL_GL_COLORSPACE_DEFAULT_EXT                  0x314D
 #define LOCAL_EGL_GL_COLORSPACE_DISPLAY_P3_EXT               0x3363
 #define LOCAL_EGL_GL_COLORSPACE_DISPLAY_P3_LINEAR_EXT        0x3362
 #define LOCAL_EGL_GL_COLORSPACE_KHR                          0x309D
 #define LOCAL_EGL_GL_COLORSPACE_LINEAR                       0x308A
 #define LOCAL_EGL_GL_COLORSPACE_LINEAR_KHR                   0x308A
-#define LOCAL_EGL_GL_COLORSPACE_SCRGB_EXT                    0x3351
 #define LOCAL_EGL_GL_COLORSPACE_SCRGB_LINEAR_EXT             0x3350
 #define LOCAL_EGL_GL_COLORSPACE_SRGB                         0x3089
 #define LOCAL_EGL_GL_COLORSPACE_SRGB_KHR                     0x3089
 #define LOCAL_EGL_GL_RENDERBUFFER                            0x30B9
 #define LOCAL_EGL_GL_RENDERBUFFER_KHR                        0x30B9
 #define LOCAL_EGL_GL_TEXTURE_2D                              0x30B1
 #define LOCAL_EGL_GL_TEXTURE_2D_KHR                          0x30B1
 #define LOCAL_EGL_GL_TEXTURE_3D                              0x30B2
@@ -6110,25 +5944,21 @@
 #define LOCAL_EGL_GL_TEXTURE_LEVEL_KHR                       0x30BC
 #define LOCAL_EGL_GL_TEXTURE_ZOFFSET                         0x30BD
 #define LOCAL_EGL_GL_TEXTURE_ZOFFSET_KHR                     0x30BD
 #define LOCAL_EGL_GREEN_SIZE                                 0x3023
 #define LOCAL_EGL_HEIGHT                                     0x3056
 #define LOCAL_EGL_HORIZONTAL_RESOLUTION                      0x3090
 #define LOCAL_EGL_IMAGE_PRESERVED                            0x30D2
 #define LOCAL_EGL_IMAGE_PRESERVED_KHR                        0x30D2
-#define LOCAL_EGL_IMPORT_EXPLICIT_SYNC_EXT                   0x3472
-#define LOCAL_EGL_IMPORT_IMPLICIT_SYNC_EXT                   0x3471
-#define LOCAL_EGL_IMPORT_SYNC_TYPE_EXT                       0x3470
 #define LOCAL_EGL_INTEROP_BIT_KHR                            0x0010
 #define LOCAL_EGL_ITU_REC2020_EXT                            0x3281
 #define LOCAL_EGL_ITU_REC601_EXT                             0x327F
 #define LOCAL_EGL_ITU_REC709_EXT                             0x3280
 #define LOCAL_EGL_LARGEST_PBUFFER                            0x3058
-#define LOCAL_EGL_LAST_COMPOSITION_START_TIME_ANDROID        0x3438
 #define LOCAL_EGL_LEVEL                                      0x3029
 #define LOCAL_EGL_LINUX_DMA_BUF_EXT                          0x3270
 #define LOCAL_EGL_LINUX_DRM_FOURCC_EXT                       0x3271
 #define LOCAL_EGL_LOCK_SURFACE_BIT_KHR                       0x0080
 #define LOCAL_EGL_LOCK_USAGE_HINT_KHR                        0x30C5
 #define LOCAL_EGL_LOSE_CONTEXT_ON_RESET                      0x31BF
 #define LOCAL_EGL_LOSE_CONTEXT_ON_RESET_EXT                  0x31BF
 #define LOCAL_EGL_LOSE_CONTEXT_ON_RESET_KHR                  0x31BF
@@ -6240,24 +6070,21 @@
 #define LOCAL_EGL_PLATFORM_X11_SCREEN_KHR                    0x31D6
 #define LOCAL_EGL_POST_SUB_BUFFER_SUPPORTED_NV               0x30BE
 #define LOCAL_EGL_PRIMARY_COMPOSITOR_CONTEXT_EXT             0x3460
 #define LOCAL_EGL_PRODUCER_FRAME_KHR                         0x3212
 #define LOCAL_EGL_PRODUCER_MAX_FRAME_HINT_NV                 0x3337
 #define LOCAL_EGL_PRODUCER_METADATA_NV                       0x3253
 #define LOCAL_EGL_PROTECTED_CONTENT_EXT                      0x32C0
 #define LOCAL_EGL_READ                                       0x305A
-#define LOCAL_EGL_READS_DONE_TIME_ANDROID                    0x343C
 #define LOCAL_EGL_READ_SURFACE_BIT_KHR                       0x0001
 #define LOCAL_EGL_RECORDABLE_ANDROID                         0x3142
 #define LOCAL_EGL_RED_SIZE                                   0x3024
 #define LOCAL_EGL_RENDERABLE_TYPE                            0x3040
-#define LOCAL_EGL_RENDERING_COMPLETE_TIME_ANDROID            0x3435
 #define LOCAL_EGL_RENDER_BUFFER                              0x3086
-#define LOCAL_EGL_REQUESTED_PRESENT_TIME_ANDROID             0x3434
 #define LOCAL_EGL_RGB_BUFFER                                 0x308E
 #define LOCAL_EGL_SAMPLES                                    0x3031
 #define LOCAL_EGL_SAMPLE_BUFFERS                             0x3032
 #define LOCAL_EGL_SAMPLE_RANGE_HINT_EXT                      0x327C
 #define LOCAL_EGL_SHARED_IMAGE_NOK                           0x30DA
 #define LOCAL_EGL_SIGNALED                                   0x30F2
 #define LOCAL_EGL_SIGNALED_KHR                               0x30F2
 #define LOCAL_EGL_SIGNALED_NV                                0x30E8
@@ -6308,18 +6135,16 @@
 #define LOCAL_EGL_STREAM_TYPE_NV                             0x3241
 #define LOCAL_EGL_SUCCESS                                    0x3000
 #define LOCAL_EGL_SUPPORT_RESET_NV                           0x3334
 #define LOCAL_EGL_SUPPORT_REUSE_NV                           0x3335
 #define LOCAL_EGL_SURFACE_TYPE                               0x3033
 #define LOCAL_EGL_SWAP_BEHAVIOR                              0x3093
 #define LOCAL_EGL_SWAP_BEHAVIOR_PRESERVED_BIT                0x0400
 #define LOCAL_EGL_SWAP_INTERVAL_EXT                          0x322F
-#define LOCAL_EGL_SYNC_CLIENT_EXT                            0x3364
-#define LOCAL_EGL_SYNC_CLIENT_SIGNAL_EXT                     0x3365
 #define LOCAL_EGL_SYNC_CL_EVENT                              0x30FE
 #define LOCAL_EGL_SYNC_CL_EVENT_COMPLETE                     0x30FF
 #define LOCAL_EGL_SYNC_CL_EVENT_COMPLETE_KHR                 0x30FF
 #define LOCAL_EGL_SYNC_CL_EVENT_KHR                          0x30FE
 #define LOCAL_EGL_SYNC_CONDITION                             0x30F8
 #define LOCAL_EGL_SYNC_CONDITION_KHR                         0x30F8
 #define LOCAL_EGL_SYNC_CONDITION_NV                          0x30EE
 #define LOCAL_EGL_SYNC_CUDA_EVENT_COMPLETE_NV                0x323D
@@ -6348,19 +6173,16 @@
 #define LOCAL_EGL_TEXTURE_2D                                 0x305F
 #define LOCAL_EGL_TEXTURE_FORMAT                             0x3080
 #define LOCAL_EGL_TEXTURE_RGB                                0x305D
 #define LOCAL_EGL_TEXTURE_RGBA                               0x305E
 #define LOCAL_EGL_TEXTURE_TARGET                             0x3081
 #define LOCAL_EGL_TIMEOUT_EXPIRED                            0x30F5
 #define LOCAL_EGL_TIMEOUT_EXPIRED_KHR                        0x30F5
 #define LOCAL_EGL_TIMEOUT_EXPIRED_NV                         0x30EB
-#define LOCAL_EGL_TIMESTAMPS_ANDROID                         0x3430
-#define LOCAL_EGL_TIMESTAMP_INVALID_ANDROID                  EGL_CAST(EGLnsecsANDROID,-1)
-#define LOCAL_EGL_TIMESTAMP_PENDING_ANDROID                  EGL_CAST(EGLnsecsANDROID,-2)
 #define LOCAL_EGL_TRACK_REFERENCES_KHR                       0x3352
 #define LOCAL_EGL_TRANSPARENT_BLUE_VALUE                     0x3035
 #define LOCAL_EGL_TRANSPARENT_GREEN_VALUE                    0x3036
 #define LOCAL_EGL_TRANSPARENT_RED_VALUE                      0x3037
 #define LOCAL_EGL_TRANSPARENT_RGB                            0x3052
 #define LOCAL_EGL_TRANSPARENT_TYPE                           0x3034
 #define LOCAL_EGL_TRUE                                       1
 #define LOCAL_EGL_UNKNOWN                                    EGL_CAST(EGLint,-1)
@@ -6758,17 +6580,17 @@
 #define LOCAL_WGL_BIND_TO_TEXTURE_RGB_ARB                    0x2070
 #define LOCAL_WGL_BIND_TO_VIDEO_RGBA_NV                      0x20C1
 #define LOCAL_WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV             0x20C2
 #define LOCAL_WGL_BIND_TO_VIDEO_RGB_NV                       0x20C0
 #define LOCAL_WGL_BLUE_BITS_ARB                              0x2019
 #define LOCAL_WGL_BLUE_BITS_EXT                              0x2019
 #define LOCAL_WGL_BLUE_SHIFT_ARB                             0x201A
 #define LOCAL_WGL_BLUE_SHIFT_EXT                             0x201A
-#define LOCAL_WGL_COLORSPACE_EXT                             0x309D
+#define LOCAL_WGL_COLORSPACE_EXT                             0x3087
 #define LOCAL_WGL_COLORSPACE_LINEAR_EXT                      0x308A
 #define LOCAL_WGL_COLORSPACE_SRGB_EXT                        0x3089
 #define LOCAL_WGL_COLOR_BITS_ARB                             0x2014
 #define LOCAL_WGL_COLOR_BITS_EXT                             0x2014
 #define LOCAL_WGL_COLOR_SAMPLES_NV                           0x20B9
 #define LOCAL_WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB      0x00000002
 #define LOCAL_WGL_CONTEXT_CORE_PROFILE_BIT_ARB               0x00000001
 #define LOCAL_WGL_CONTEXT_DEBUG_BIT_ARB                      0x00000001
@@ -6962,17 +6784,16 @@
 #define LOCAL_WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB            0x207F
 #define LOCAL_WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB            0x2081
 #define LOCAL_WGL_TEXTURE_DEPTH_COMPONENT_NV                 0x20A6
 #define LOCAL_WGL_TEXTURE_FLOAT_RGBA_NV                      0x20B8
 #define LOCAL_WGL_TEXTURE_FLOAT_RGB_NV                       0x20B7
 #define LOCAL_WGL_TEXTURE_FLOAT_RG_NV                        0x20B6
 #define LOCAL_WGL_TEXTURE_FLOAT_R_NV                         0x20B5
 #define LOCAL_WGL_TEXTURE_FORMAT_ARB                         0x2072
-#define LOCAL_WGL_TEXTURE_RECTANGLE_ATI                      0x21A5
 #define LOCAL_WGL_TEXTURE_RECTANGLE_NV                       0x20A2
 #define LOCAL_WGL_TEXTURE_RGBA_ARB                           0x2076
 #define LOCAL_WGL_TEXTURE_RGB_ARB                            0x2075
 #define LOCAL_WGL_TEXTURE_TARGET_ARB                         0x2073
 #define LOCAL_WGL_TRANSPARENT_ALPHA_VALUE_ARB                0x203A
 #define LOCAL_WGL_TRANSPARENT_ARB                            0x200A
 #define LOCAL_WGL_TRANSPARENT_BLUE_VALUE_ARB                 0x2039
 #define LOCAL_WGL_TRANSPARENT_EXT                            0x200A
--- a/gfx/gl/GLContext.cpp
+++ b/gfx/gl/GLContext.cpp
@@ -106,18 +106,16 @@ static const char* const sExtensionNames
     "GL_ARB_pixel_buffer_object",
     "GL_ARB_robust_buffer_access_behavior",
     "GL_ARB_robustness",
     "GL_ARB_sampler_objects",
     "GL_ARB_seamless_cube_map",
     "GL_ARB_shader_texture_lod",
     "GL_ARB_sync",
     "GL_ARB_texture_compression",
-    "GL_ARB_texture_compression_bptc",
-    "GL_ARB_texture_compression_rgtc",
     "GL_ARB_texture_float",
     "GL_ARB_texture_non_power_of_two",
     "GL_ARB_texture_rectangle",
     "GL_ARB_texture_rg",
     "GL_ARB_texture_storage",
     "GL_ARB_texture_swizzle",
     "GL_ARB_timer_query",
     "GL_ARB_transform_feedback2",
@@ -143,19 +141,17 @@ static const char* const sExtensionNames
     "GL_EXT_occlusion_query_boolean",
     "GL_EXT_packed_depth_stencil",
     "GL_EXT_read_format_bgra",
     "GL_EXT_robustness",
     "GL_EXT_sRGB",
     "GL_EXT_sRGB_write_control",
     "GL_EXT_shader_texture_lod",
     "GL_EXT_texture3D",
-    "GL_EXT_texture_compression_bptc",
     "GL_EXT_texture_compression_dxt1",
-    "GL_EXT_texture_compression_rgtc",
     "GL_EXT_texture_compression_s3tc",
     "GL_EXT_texture_compression_s3tc_srgb",
     "GL_EXT_texture_filter_anisotropic",
     "GL_EXT_texture_format_BGRA8888",
     "GL_EXT_texture_sRGB",
     "GL_EXT_texture_storage",
     "GL_EXT_timer_query",
     "GL_EXT_transform_feedback",
--- a/gfx/gl/GLContext.h
+++ b/gfx/gl/GLContext.h
@@ -127,18 +127,16 @@ enum class GLFeature {
     seamless_cube_map_opt_in,
     shader_texture_lod,
     split_framebuffer,
     standard_derivatives,
     sync,
     texture_3D,
     texture_3D_compressed,
     texture_3D_copy,
-    texture_compression_bptc,
-    texture_compression_rgtc,
     texture_float,
     texture_float_linear,
     texture_half_float,
     texture_half_float_linear,
     texture_non_power_of_two,
     texture_rg,
     texture_storage,
     texture_swizzle,
@@ -407,18 +405,16 @@ public:
         ARB_pixel_buffer_object,
         ARB_robust_buffer_access_behavior,
         ARB_robustness,
         ARB_sampler_objects,
         ARB_seamless_cube_map,
         ARB_shader_texture_lod,
         ARB_sync,
         ARB_texture_compression,
-        ARB_texture_compression_bptc,
-        ARB_texture_compression_rgtc,
         ARB_texture_float,
         ARB_texture_non_power_of_two,
         ARB_texture_rectangle,
         ARB_texture_rg,
         ARB_texture_storage,
         ARB_texture_swizzle,
         ARB_timer_query,
         ARB_transform_feedback2,
@@ -444,19 +440,17 @@ public:
         EXT_occlusion_query_boolean,
         EXT_packed_depth_stencil,
         EXT_read_format_bgra,
         EXT_robustness,
         EXT_sRGB,
         EXT_sRGB_write_control,
         EXT_shader_texture_lod,
         EXT_texture3D,
-        EXT_texture_compression_bptc,
         EXT_texture_compression_dxt1,
-        EXT_texture_compression_rgtc,
         EXT_texture_compression_s3tc,
         EXT_texture_compression_s3tc_srgb,
         EXT_texture_filter_anisotropic,
         EXT_texture_format_BGRA8888,
         EXT_texture_sRGB,
         EXT_texture_storage,
         EXT_timer_query,
         EXT_transform_feedback,
--- a/gfx/gl/GLContextFeatures.cpp
+++ b/gfx/gl/GLContextFeatures.cpp
@@ -649,38 +649,16 @@ static const FeatureInfo sFeatureInfoArr
         GLContext::Extension_None,
         {
             GLContext::EXT_copy_texture,
             GLContext::OES_texture_3D,
             GLContext::Extensions_End
         }
     },
     {
-        "texture_compression_bptc",
-        GLVersion::GL4_2,
-        GLESVersion::NONE,
-        GLContext::Extension_None,
-        {
-            GLContext::ARB_texture_compression_bptc,
-            GLContext::EXT_texture_compression_bptc,
-            GLContext::Extensions_End
-        }
-    },
-    {
-        "texture_compression_rgtc",
-        GLVersion::GL3,
-        GLESVersion::NONE,
-        GLContext::Extension_None,
-        {
-            GLContext::ARB_texture_compression_rgtc,
-            GLContext::EXT_texture_compression_rgtc,
-            GLContext::Extensions_End
-        }
-    },
-    {
         "texture_float",
         GLVersion::GL3,
         GLESVersion::ES3,
         GLContext::Extension_None,
         {
             GLContext::ARB_texture_float,
             GLContext::OES_texture_float,
             GLContext::Extensions_End
--- a/gfx/gl/GLParseRegistryXML.py
+++ b/gfx/gl/GLParseRegistryXML.py
@@ -1,9 +1,11 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python
+# coding=utf8
+
 
 ################################################################################
 # TUTORIAL
 # This script will generate GLConsts.h
 #
 # Step 1:
 #   Download the last gl.xml, egl.xml, glx.xml and wgl.xml from
 #   http://www.opengl.org/registry/#specfiles into a directory of your choice
@@ -20,25 +22,20 @@
 ################################################################################
 
 # includes
 from __future__ import print_function
 import os
 import sys
 import xml.etree.ElementTree
 
-assert len(sys.argv) == 3, (
-       'Usage: ./GLParseRegistryXML.py path/to/OpenGL-Registry path/to/EGL-Registry')
-
-(_, GL_REGISTRY_PATH, EGL_REGISTRY_PATH) = sys.argv
 
 ################################################################################
 # export management
 
-
 class GLConstHeader:
     def __init__(self, f):
         self.f = f
 
     def write(self, arg):
         if isinstance(arg, list):
             self.f.write('\n'.join(arg) + '\n')
         elif isinstance(arg, (int, long)):
@@ -95,16 +92,27 @@ class GLConstHeader:
 
 ################################################################################
 # underground code
 
 def getScriptDir():
     return os.path.dirname(__file__) + '/'
 
 
+def getXMLDir():
+    if len(sys.argv) == 1:
+        return './'
+
+    dirPath = sys.argv[1]
+    if dirPath[-1] != '/':
+        dirPath += '/'
+
+    return dirPath
+
+
 class GLConst:
     def __init__(self, lib, name, value, type):
         self.lib = lib
         self.name = name
         self.value = value
         self.type = type
 
 
@@ -114,17 +122,19 @@ class GLDatabase:
 
     def __init__(self):
         self.consts = {}
         self.libs = set(GLDatabase.LIBS)
         self.vendors = set(['EXT', 'ATI'])
         # there is no vendor="EXT" and vendor="ATI" in gl.xml,
         # so we manualy declare them
 
-    def loadXML(self, xmlPath):
+    def loadXML(self, path):
+        xmlPath = getXMLDir() + path
+
         if not os.path.isfile(xmlPath):
             print('missing file "' + xmlPath + '"')
             return False
 
         tree = xml.etree.ElementTree.parse(xmlPath)
         root = tree.getroot()
 
         for enums in root.iter('enums'):
@@ -159,17 +169,17 @@ class GLDatabase:
                     # if no type specified, we get the namespace's default type
                     type = namespaceType
 
                 self.consts[lib + '_' + name] = GLConst(lib, name, value, type)
 
         return True
 
     def exportConsts(self, path):
-        with open(getScriptDir() + path, 'wb') as f:
+        with open(getScriptDir() + path, 'w') as f:
 
             headerFile = GLConstHeader(f)
             headerFile.formatFileBegin()
 
             constNames = self.consts.keys()
             constNames.sort()
 
             for lib in GLDatabase.LIBS:
@@ -185,15 +195,15 @@ class GLDatabase:
 
                 headerFile.formatLibEnd(lib)
 
             headerFile.formatFileEnd()
 
 
 glDatabase = GLDatabase()
 
-success = glDatabase.loadXML(GL_REGISTRY_PATH + '/xml/gl.xml')
-success = success and glDatabase.loadXML(GL_REGISTRY_PATH + '/xml/glx.xml')
-success = success and glDatabase.loadXML(GL_REGISTRY_PATH + '/xml/wgl.xml')
-success = success and glDatabase.loadXML(EGL_REGISTRY_PATH + '/api/egl.xml')
+success = glDatabase.loadXML('gl.xml')
+success = success and glDatabase.loadXML('egl.xml')
+success = success and glDatabase.loadXML('glx.xml')
+success = success and glDatabase.loadXML('wgl.xml')
 
 if success:
     glDatabase.exportConsts('GLConsts.h')