Bug 1452603 - Update Cargo lockfiles and re-vendor rust dependencies. r=jrmuizel
authorKartikaya Gupta <kgupta@mozilla.com>
Thu, 12 Apr 2018 11:06:59 -0400
changeset 466569 0f807beef229718c015553bac09e4f638ca2add1
parent 466568 dd843b50cd362c62e56036daec5075859794fa98
child 466570 df7030abb8e1da3c943e4e112e5567b2df2c49c1
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1452603
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1452603 - Update Cargo lockfiles and re-vendor rust dependencies. r=jrmuizel MozReview-Commit-ID: A0PVWw50OX5
Cargo.lock
third_party/rust/gl_generator/.cargo-checksum.json
third_party/rust/gl_generator/Cargo.toml
third_party/rust/gl_generator/generators/debug_struct_gen.rs
third_party/rust/gl_generator/generators/global_gen.rs
third_party/rust/gl_generator/generators/mod.rs
third_party/rust/gl_generator/generators/struct_gen.rs
third_party/rust/gl_generator/registry/parse.rs
third_party/rust/gleam/.cargo-checksum.json
third_party/rust/gleam/Cargo.toml
third_party/rust/gleam/build.rs
third_party/rust/gleam/src/gl.rs
third_party/rust/gleam/src/gl_fns.rs
third_party/rust/gleam/src/gles_fns.rs
third_party/rust/khronos_api/.cargo-checksum.json
third_party/rust/khronos_api/Cargo.toml
third_party/rust/khronos_api/README.md
third_party/rust/khronos_api/api_webgl/extensions/ANGLE_instanced_arrays/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/EXT_blend_minmax/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/EXT_color_buffer_float/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/EXT_color_buffer_half_float/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/EXT_disjoint_timer_query/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/EXT_disjoint_timer_query_webgl2/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/EXT_float_blend/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/EXT_frag_depth/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/EXT_sRGB/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/EXT_shader_texture_lod/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/EXT_texture_filter_anisotropic/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/OES_element_index_uint/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/OES_fbo_render_mipmap/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/OES_standard_derivatives/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/OES_texture_float/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/OES_texture_float_linear/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/OES_texture_half_float/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/OES_texture_half_float_linear/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/OES_vertex_array_object/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/WEBGL_color_buffer_float/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/WEBGL_compressed_texture_astc/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/WEBGL_compressed_texture_atc/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/WEBGL_compressed_texture_etc/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/WEBGL_compressed_texture_etc1/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/WEBGL_compressed_texture_pvrtc/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/WEBGL_compressed_texture_s3tc/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/WEBGL_compressed_texture_s3tc_srgb/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/WEBGL_debug_renderer_info/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/WEBGL_debug_shaders/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/WEBGL_depth_texture/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/WEBGL_draw_buffers/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/WEBGL_get_buffer_sub_data_async/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/WEBGL_lose_context/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/WEBGL_multiview/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/WEBGL_security_sensitive_resources/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/WEBGL_shared_resources/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/proposals/EXT_clip_cull_distance/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/proposals/WEBGL_debug/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/proposals/WEBGL_dynamic_texture/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/proposals/WEBGL_subarray_uploads/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/proposals/WEBGL_texture_multisample/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/proposals/WEBGL_texture_source_iframe/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/proposals/WEBGL_video_texture/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/rejected/EXT_texture_storage/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/rejected/OES_depth24/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/rejected/WEBGL_debug_shader_precision/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/rejected/WEBGL_draw_elements_no_range_check/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/rejected/WEBGL_subscribe_uniform/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/rejected/WEBGL_texture_from_depth_video/extension.xml
third_party/rust/khronos_api/api_webgl/extensions/template/extension.xml
third_party/rust/khronos_api/api_webgl/specs/latest/1.0/webgl.idl
third_party/rust/khronos_api/api_webgl/specs/latest/2.0/webgl2.idl
third_party/rust/khronos_api/build.rs
third_party/rust/khronos_api/src/lib.rs
third_party/rust/serde/.cargo-checksum.json
third_party/rust/serde/Cargo.toml
third_party/rust/serde/README.md
third_party/rust/serde/src/de/from_primitive.rs
third_party/rust/serde/src/de/impls.rs
third_party/rust/serde/src/de/value.rs
third_party/rust/serde/src/lib.rs
third_party/rust/serde/src/private/de.rs
third_party/rust/serde/src/private/mod.rs
third_party/rust/serde/src/private/ser.rs
third_party/rust/serde/src/ser/impls.rs
third_party/rust/serde_derive/.cargo-checksum.json
third_party/rust/serde_derive/Cargo.toml
third_party/rust/serde_derive/README.md
third_party/rust/serde_derive/src/bound.rs
third_party/rust/serde_derive/src/de.rs
third_party/rust/serde_derive/src/lib.rs
third_party/rust/serde_derive/src/ser.rs
third_party/rust/serde_derive_internals/.cargo-checksum.json
third_party/rust/serde_derive_internals/Cargo.toml
third_party/rust/serde_derive_internals/README.md
third_party/rust/serde_derive_internals/src/ast.rs
third_party/rust/serde_derive_internals/src/attr.rs
third_party/rust/serde_derive_internals/src/check.rs
third_party/rust/serde_derive_internals/src/lib.rs
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -26,17 +26,17 @@ version = "0.10.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "app_units"
 version = "0.6.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "arrayvec"
 version = "0.4.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -84,18 +84,18 @@ dependencies = [
  "cubeb 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
  "iovec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
  "memmap 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_derive 1.0.35 (git+https://github.com/servo/serde?branch=deserialize_from_enums5)",
+ "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.37 (git+https://github.com/servo/serde?branch=deserialize_from_enums6)",
  "tokio-core 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio-io 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio-uds 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "audioipc-client"
 version = "0.4.0"
@@ -143,17 +143,17 @@ version = "0.1.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "bincode"
 version = "1.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "bindgen"
 version = "0.33.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "cexpr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -559,18 +559,18 @@ source = "registry+https://github.com/ru
 
 [[package]]
 name = "docopt"
 version = "0.8.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_derive 1.0.35 (git+https://github.com/servo/serde?branch=deserialize_from_enums5)",
+ "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.37 (git+https://github.com/servo/serde?branch=deserialize_from_enums6)",
  "strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "dtoa"
 version = "0.4.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
@@ -586,18 +586,18 @@ dependencies = [
 name = "dwrote"
 version = "0.4.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_derive 1.0.35 (git+https://github.com/servo/serde?branch=deserialize_from_enums5)",
+ "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.37 (git+https://github.com/servo/serde?branch=deserialize_from_enums6)",
  "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "either"
 version = "1.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
@@ -650,17 +650,17 @@ version = "0.11.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "euclid"
 version = "0.17.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "fallible"
 version = "0.0.1"
 dependencies = [
  "hashglobe 0.1.0",
  "smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -839,31 +839,30 @@ dependencies = [
  "rsdparsa_capi 0.1.0",
  "u2fhid 0.1.0",
  "webrender_bindings 0.1.0",
  "xpcom 0.1.0",
 ]
 
 [[package]]
 name = "gl_generator"
-version = "0.8.0"
+version = "0.9.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "khronos_api 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "khronos_api 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "gleam"
-version = "0.4.20"
+version = "0.4.32"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "gl_generator 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "glob"
 version = "0.2.11"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
@@ -975,17 +974,17 @@ version = "0.2.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "khronos_api"
-version = "2.0.0"
+version = "2.2.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "lalrpop"
 version = "0.15.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "ascii-canvas 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -995,18 +994,18 @@ dependencies = [
  "docopt 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "ena 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "itertools 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "lalrpop-snap 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "lalrpop-util 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "petgraph 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
  "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_derive 1.0.35 (git+https://github.com/servo/serde?branch=deserialize_from_enums5)",
+ "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.37 (git+https://github.com/servo/serde?branch=deserialize_from_enums6)",
  "string_cache 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "lalrpop-intern"
 version = "0.15.1"
@@ -1661,17 +1660,17 @@ name = "regex-syntax"
 version = "0.4.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "ron"
 version = "0.1.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "rsdparsa"
 version = "0.1.0"
 
 [[package]]
 name = "rsdparsa_capi"
@@ -1750,48 +1749,48 @@ dependencies = [
 
 [[package]]
 name = "semver-parser"
 version = "0.7.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "serde"
-version = "1.0.35"
+version = "1.0.37"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "serde_derive 1.0.35 (git+https://github.com/servo/serde?branch=deserialize_from_enums5)",
+ "serde_derive 1.0.37 (git+https://github.com/servo/serde?branch=deserialize_from_enums6)",
 ]
 
 [[package]]
 name = "serde_bytes"
 version = "0.10.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "serde_derive"
-version = "1.0.35"
-source = "git+https://github.com/servo/serde?branch=deserialize_from_enums5#de4534b21f263752ed3b641c3c07e012574985bf"
+version = "1.0.37"
+source = "git+https://github.com/servo/serde?branch=deserialize_from_enums6#b8d39b013bec85b6146dfb1061e0e8fc55e99b5e"
 dependencies = [
- "proc-macro2 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_derive_internals 0.22.1 (git+https://github.com/servo/serde?branch=deserialize_from_enums5)",
- "syn 0.12.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "proc-macro2 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive_internals 0.23.0 (git+https://github.com/servo/serde?branch=deserialize_from_enums6)",
+ "syn 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "serde_derive_internals"
-version = "0.22.1"
-source = "git+https://github.com/servo/serde?branch=deserialize_from_enums5#de4534b21f263752ed3b641c3c07e012574985bf"
+version = "0.23.0"
+source = "git+https://github.com/servo/serde?branch=deserialize_from_enums6#b8d39b013bec85b6146dfb1061e0e8fc55e99b5e"
 dependencies = [
- "proc-macro2 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "syn 0.12.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "proc-macro2 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "servo_arc"
 version = "0.1.1"
 dependencies = [
  "nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
  "stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1835,17 +1834,17 @@ source = "registry+https://github.com/ru
 name = "string_cache"
 version = "0.7.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
  "precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)",
  "string_cache_codegen 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "string_cache_codegen"
 version = "0.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2102,17 +2101,17 @@ dependencies = [
  "tokio-io 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "toml"
 version = "0.4.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "traitobject"
 version = "0.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
@@ -2282,24 +2281,24 @@ dependencies = [
  "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-graphics 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-text 9.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "dwrote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "freetype 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "gleam 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.4.32 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)",
  "plane-split 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "rayon 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "ron 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)",
  "smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "thread_profiler 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)",
  "webrender_api 0.57.2",
 ]
 
 [[package]]
 name = "webrender_api"
@@ -2308,33 +2307,33 @@ dependencies = [
  "app_units 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "bincode 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-graphics 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "dwrote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_bytes 0.10.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_derive 1.0.35 (git+https://github.com/servo/serde?branch=deserialize_from_enums5)",
+ "serde_derive 1.0.37 (git+https://github.com/servo/serde?branch=deserialize_from_enums6)",
  "time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "webrender_bindings"
 version = "0.1.0"
 dependencies = [
  "app_units 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-graphics 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "dwrote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "foreign-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "gleam 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.4.32 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "rayon 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "thread_profiler 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "webrender 0.57.2",
 ]
 
 [[package]]
 name = "which"
@@ -2531,31 +2530,31 @@ dependencies = [
 "checksum fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ab76cfd2aaa59b7bf6688ad9ba15bbae64bff97f04ea02144cfd3443e5c2866"
 "checksum fuchsia-zircon 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f6c0581a4e363262e52b87f59ee2afe3415361c6ec35e665924eb08afe8ff159"
 "checksum fuchsia-zircon-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "43f3795b4bae048dc6123a6b972cadde2e676f9ded08aef6bb77f5f157684a82"
 "checksum futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "0bab5b5e94f5c31fc764ba5dd9ad16568aae5d4825538c01d6bca680c9bf94a7"
 "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4"
 "checksum fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
 "checksum gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)" = "5e33ec290da0d127825013597dbdfc28bee4964690c7ce1166cbc2a7bd08b1bb"
 "checksum gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0912515a8ff24ba900422ecda800b52f4016a56251922d397c576bf92c690518"
-"checksum gl_generator 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4f5c19cde55637681450c92f7a05ea16c78e2b6d0587e601ec1ebdab6960854b"
-"checksum gleam 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)" = "959c818d9bbe9f7b7db55dce0bc44673c4da4f4ee122536c40550f984c3b8017"
+"checksum gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a795170cbd85b5a7baa58d6d7525cae6a03e486859860c220f7ebbbdd379d0a"
+"checksum gleam 0.4.32 (registry+https://github.com/rust-lang/crates.io-index)" = "70363479f033b72dbd558fd3b6f153dd824bf4f9dcd05dfcff6cd29a3eb9a63d"
 "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb"
 "checksum httparse 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "af2f2dd97457e8fb1ae7c5a420db346af389926e36f43768b96f101546b04a07"
 "checksum humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0484fda3e7007f2a4a0d9c3a703ca38c71c54c55602ce4660c419fd32e188c9e"
 "checksum hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)" = "368cb56b2740ebf4230520e2b90ebb0461e69034d85d1945febd9b3971426db2"
 "checksum ident_case 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c9826188e666f2ed92071d2dadef6edc430b11b158b5b2b3f4babbcc891eaaa"
 "checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d"
 "checksum iovec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "29d062ee61fccdf25be172e70f34c9f6efc597e1fb8f6526e8437b2046ab26be"
 "checksum itertools 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d3f2be4da1690a039e9ae5fd575f706a63ad5a2120f161b1d653c9da3930dd21"
 "checksum itertools 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b07332223953b5051bceb67e8c4700aa65291535568e1f12408c43c4a42c0394"
 "checksum itoa 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eb2f404fbc66fd9aac13e998248505e7ecb2ad8e44ab6388684c5fb11c6c251c"
 "checksum itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c069bbec61e1ca5a596166e55dfe4773ff745c3d16b700013bcaff9a6df2c682"
 "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
-"checksum khronos_api 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d867c645cfeb8a7fec503731679eac03ac11b7105aa5a71cb8f8ee5271636add"
+"checksum khronos_api 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "037ab472c33f67b5fbd3e9163a2645319e5356fcd355efa6d4eb7fff4bbcb554"
 "checksum lalrpop 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88035943c3cfbb897a499a556212b2b053574f32b4238b71b61625bc470f80aa"
 "checksum lalrpop-intern 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cc4fd87be4a815fd373e02773983940f0d75fb26fde8c098e9e45f7af03154c0"
 "checksum lalrpop-snap 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5f244285324e4e33d486910b66fd3b7cb37e2072c5bf63319f506fe99ed72650"
 "checksum lalrpop-util 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)" = "de408fd50dea8ad7a77107144983a25c7fdabf5f8faf707a6e020d68874ed06c"
 "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a"
 "checksum lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c8f31047daa365f19be14b47c29df4f7c3b581832407daabe6ae77397619237d"
 "checksum lazycell 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce12306c4739d86ee97c23139f3a34ddf0387bbf181bc7929d287025a8c3ef6b"
 "checksum libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)" = "f54263ad99207254cf58b5f701ecb432c717445ea2ee8af387334bdd1a03fdff"
@@ -2621,20 +2620,20 @@ dependencies = [
 "checksum rust-ini 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "22dab655e8122ccb15db25a56852ce62506f1486cdefd37e86371bf34ea8f601"
 "checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda"
 "checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f"
 "checksum same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cfb6eded0b06a0b512c8ddbcf04089138c9b4362c2f696f3c3d76039d68f3637"
 "checksum scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f417c22df063e9450888a7561788e9bd46d3bb3c1466435b4eccb903807f147d"
 "checksum scopeguard 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c79eb2c3ac4bc2507cda80e7f3ac5b88bd8eae4c0914d5663e6a8933994be918"
 "checksum semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537"
 "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
-"checksum serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)" = "800fdb0a894572994f3970035a8a5f65d8ec2cd40e6cdf7d8cd9001d7b30648e"
+"checksum serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)" = "d3bcee660dcde8f52c3765dd9ca5ee36b4bf35470a738eb0bd5a8752b0389645"
 "checksum serde_bytes 0.10.4 (registry+https://github.com/rust-lang/crates.io-index)" = "adb6e51a6b3696b301bc221d785f898b4457c619b51d7ce195a6d20baecb37b3"
-"checksum serde_derive 1.0.35 (git+https://github.com/servo/serde?branch=deserialize_from_enums5)" = "<none>"
-"checksum serde_derive_internals 0.22.1 (git+https://github.com/servo/serde?branch=deserialize_from_enums5)" = "<none>"
+"checksum serde_derive 1.0.37 (git+https://github.com/servo/serde?branch=deserialize_from_enums6)" = "<none>"
+"checksum serde_derive_internals 0.23.0 (git+https://github.com/servo/serde?branch=deserialize_from_enums6)" = "<none>"
 "checksum simd 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3dd0805c7363ab51a829a1511ad24b6ed0349feaa756c4bc2f977f9f496e6673"
 "checksum siphasher 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2ffc669b726f2bc9a3bcff66e5e23b56ba6bf70e22a34c3d7b6d0b3450b65b84"
 "checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23"
 "checksum smallbitvec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "79b776f00dfe01df905fa3b2eaa1659522e99e3fc4a7b1334171622205c4bdcf"
 "checksum smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44db0ecb22921ef790d17ae13a3f6d15784183ff5f2a01aa32098c7498d2b4b9"
 "checksum stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "15132e0e364248108c5e2c02e3ab539be8d6f5d52a01ca9bbf27ed657316f02b"
 "checksum string_cache 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39cb4173bcbd1319da31faa5468a7e3870683d7a237150b0b0aaafd546f6ad12"
 "checksum string_cache_codegen 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "479cde50c3539481f33906a387f2bd17c8e87cb848c35b6021d41fb81ff9b4d7"
--- a/third_party/rust/gl_generator/.cargo-checksum.json
+++ b/third_party/rust/gl_generator/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{"Cargo.toml":"629fd3c2eb896803544c82298d3db10b37d8af15d37a311da617baf6c6fabb28","README.md":"e0ae9e1224f6ce5d6df8e30272a1a23044d2d33b0051bf32ccd74e559f8a9f6c","generators/debug_struct_gen.rs":"35984ebe92529467d61112d95c380c84d4bd00d5dc8280749c4eb2f185313df7","generators/global_gen.rs":"eb7836db702777cb13b47b4ab46b9287a3c41995d4bafa0e659ba23688d34475","generators/mod.rs":"8622cd66c69530ed156dd3852d126a44a1ab6d84ea3086240c0b5f5cd7e91316","generators/static_gen.rs":"9fb4ee9f056263611658234539977fb415f93435d290053b84b092e05de16924","generators/static_struct_gen.rs":"23b910c2b14936766036876b9915639058e0cf3bca468c317d4edc7f6498b471","generators/struct_gen.rs":"07d1b52409c31c09010bd7f03459559f772f8b9396b3c60563401a8627b5e247","generators/templates/types/egl.rs":"d1785a30f1098e101302ba74ba4c22cf95ac44b17edf221dbb9d890f4bd635a2","generators/templates/types/gl.rs":"f71f3a2200c0fa13f09687ef05e51c28c5b11c1bb841acd402c0097d8f9130bd","generators/templates/types/glx.rs":"f444166d117b96afed2d8d13db6cd3369d6c59704f296e76202269f411bbd4a8","generators/templates/types/wgl.rs":"9d626e0959374c694c19a36d4dd34dae2f37acf3cb94e9bd4d242a16b41a970d","lib.rs":"4d68840c600a1025025438454d68d70e6da3891f2a5bb33406d4255cb257cda1","registry/mod.rs":"4c42448775dc25449c9995a5ec76e95d6c0762d92443f3c12e865768e4e1dc2a","registry/parse.rs":"e508a1c20c47a92f000d444c34e7818443b15cc9e4a45350e73791fb9c6f68a8"},"package":"4f5c19cde55637681450c92f7a05ea16c78e2b6d0587e601ec1ebdab6960854b"}
\ No newline at end of file
+{"files":{"Cargo.toml":"a11980c70bdc8957d169c4482a3e57a0dd5cb3de6e9eae7b9c15caac7ad8f835","README.md":"e0ae9e1224f6ce5d6df8e30272a1a23044d2d33b0051bf32ccd74e559f8a9f6c","generators/debug_struct_gen.rs":"35223dab284989801bbb7bd676e25533d7fef8e2d990f686867eec1efe95dc62","generators/global_gen.rs":"cad1d5f209dc7ce06d0cea897ee56870c33b812403735adedf2c2d9d3712783f","generators/mod.rs":"9d9f9c20c70de67ca16f4692aff3cdcb7f9209433ebd49e771dbce94349a2a75","generators/static_gen.rs":"9fb4ee9f056263611658234539977fb415f93435d290053b84b092e05de16924","generators/static_struct_gen.rs":"23b910c2b14936766036876b9915639058e0cf3bca468c317d4edc7f6498b471","generators/struct_gen.rs":"03d1bcb9d8ddd64d9326fefe2898633e6714e0caffc32f54b6c873bc75b8a497","generators/templates/types/egl.rs":"d1785a30f1098e101302ba74ba4c22cf95ac44b17edf221dbb9d890f4bd635a2","generators/templates/types/gl.rs":"f71f3a2200c0fa13f09687ef05e51c28c5b11c1bb841acd402c0097d8f9130bd","generators/templates/types/glx.rs":"f444166d117b96afed2d8d13db6cd3369d6c59704f296e76202269f411bbd4a8","generators/templates/types/wgl.rs":"9d626e0959374c694c19a36d4dd34dae2f37acf3cb94e9bd4d242a16b41a970d","lib.rs":"4d68840c600a1025025438454d68d70e6da3891f2a5bb33406d4255cb257cda1","registry/mod.rs":"4c42448775dc25449c9995a5ec76e95d6c0762d92443f3c12e865768e4e1dc2a","registry/parse.rs":"5619135099e9be42e47c45a29a359d63890ab60da482bd4f437728a53d561e95"},"package":"7a795170cbd85b5a7baa58d6d7525cae6a03e486859860c220f7ebbbdd379d0a"}
\ No newline at end of file
--- a/third_party/rust/gl_generator/Cargo.toml
+++ b/third_party/rust/gl_generator/Cargo.toml
@@ -7,33 +7,33 @@
 #
 # If you believe there's an error in this file please file an
 # issue against the rust-lang/cargo repository. If you're
 # editing this file be aware that the upstream Cargo.toml
 # will likely look very different (and much more reasonable)
 
 [package]
 name = "gl_generator"
-version = "0.8.0"
+version = "0.9.0"
 authors = ["Brendan Zabarauskas <bjzaba@yahoo.com.au>", "Corey Richardson", "Arseny Kapoulkine"]
 description = "Code generators for creating bindings to the Khronos OpenGL APIs."
 homepage = "https://github.com/brendanzab/gl-rs/gl_generator/"
 documentation = "https://docs.rs/gl_generator"
 readme = "README.md"
 keywords = ["gl", "egl", "opengl", "khronos"]
 categories = ["api-bindings", "rendering::graphics-api"]
 license = "Apache-2.0"
 repository = "https://github.com/brendanzab/gl-rs/"
 
 [lib]
 name = "gl_generator"
 path = "lib.rs"
 [dependencies.khronos_api]
-version = "2.0.0"
+version = "2.1.0"
 
 [dependencies.log]
-version = "0.3.5"
+version = "0.4.1"
 
 [dependencies.xml-rs]
 version = "0.7.0"
 
 [features]
 unstable_generator_utils = []
--- a/third_party/rust/gl_generator/generators/debug_struct_gen.rs
+++ b/third_party/rust/gl_generator/generators/debug_struct_gen.rs
@@ -162,32 +162,32 @@ fn write_impl<W>(registry: &Registry, de
                   "impl {api} {{
             /// Load each OpenGL symbol using a custom load function. This allows for the
             /// use of functions like `glfwGetProcAddress` or `SDL_GL_GetProcAddress`.
             ///
             /// ~~~ignore
             /// let gl = Gl::load_with(|s| glfw.get_proc_address(s));
             /// ~~~
             #[allow(dead_code, unused_variables)]
-            pub fn load_with<F>(mut loadfn: F) -> {api} where F: FnMut(&str) -> *const __gl_imports::raw::c_void {{
+            pub fn load_with<F>(mut loadfn: F) -> {api} where F: FnMut(&'static str) -> *const __gl_imports::raw::c_void {{
                 #[inline(never)]
-                fn do_metaloadfn(loadfn: &mut FnMut(&str) -> *const __gl_imports::raw::c_void,
-                                 symbol: &str,
-                                 symbols: &[&str])
+                fn do_metaloadfn(loadfn: &mut FnMut(&'static str) -> *const __gl_imports::raw::c_void,
+                                 symbol: &'static str,
+                                 symbols: &[&'static str])
                                  -> *const __gl_imports::raw::c_void {{
                     let mut ptr = loadfn(symbol);
                     if ptr.is_null() {{
                         for &sym in symbols {{
                             ptr = loadfn(sym);
                             if !ptr.is_null() {{ break; }}
                         }}
                     }}
                     ptr
                 }}
-                let mut metaloadfn = |symbol: &str, symbols: &[&str]| {{
+                let mut metaloadfn = |symbol: &'static str, symbols: &[&'static str]| {{
                     do_metaloadfn(&mut loadfn, symbol, symbols)
                 }};
                 {api} {{",
                   api = super::gen_struct_name(registry.api)));
 
     for cmd in &registry.cmds {
         try!(writeln!(dest,
             "{name}: FnPtr::new(metaloadfn(\"{symbol}\", &[{fallbacks}])),",
--- a/third_party/rust/gl_generator/generators/global_gen.rs
+++ b/third_party/rust/gl_generator/generators/global_gen.rs
@@ -52,19 +52,19 @@ fn write_header<W>(dest: &mut W) -> io::
 
 /// Creates the metaloadfn function for fallbacks
 fn write_metaloadfn<W>(dest: &mut W) -> io::Result<()>
     where W: io::Write
 {
     writeln!(dest,
              r#"
         #[inline(never)]
-        fn metaloadfn(loadfn: &mut FnMut(&str) -> *const __gl_imports::raw::c_void,
-                      symbol: &str,
-                      fallbacks: &[&str]) -> *const __gl_imports::raw::c_void {{
+        fn metaloadfn(loadfn: &mut FnMut(&'static str) -> *const __gl_imports::raw::c_void,
+                      symbol: &'static str,
+                      fallbacks: &[&'static str]) -> *const __gl_imports::raw::c_void {{
             let mut ptr = loadfn(symbol);
             if ptr.is_null() {{
                 for &sym in fallbacks {{
                     ptr = loadfn(sym);
                     if !ptr.is_null() {{ break; }}
                 }}
             }}
             ptr
@@ -213,17 +213,17 @@ fn write_fn_mods<W>(registry: &Registry,
 
                 #[inline]
                 #[allow(dead_code)]
                 pub fn is_loaded() -> bool {{
                     unsafe {{ storage::{fnname}.is_loaded }}
                 }}
 
                 #[allow(dead_code)]
-                pub fn load_with<F>(mut loadfn: F) where F: FnMut(&str) -> *const raw::c_void {{
+                pub fn load_with<F>(mut loadfn: F) where F: FnMut(&'static str) -> *const raw::c_void {{
                     unsafe {{
                         storage::{fnname} = FnPtr::new(metaloadfn(&mut loadfn, "{symbol}", {fallbacks}))
                     }}
                 }}
             }}
         "##, fnname = fnname, fallbacks = fallbacks, symbol = symbol));
     }
 
@@ -254,17 +254,17 @@ fn write_load_fn<W>(registry: &Registry,
     try!(writeln!(dest,
                   "
         /// Load each OpenGL symbol using a custom load function. This allows for the
         /// use of functions like `glfwGetProcAddress` or `SDL_GL_GetProcAddress`.
         /// ~~~ignore
         /// gl::load_with(|s| glfw.get_proc_address(s));
         /// ~~~
         #[allow(dead_code)]
-        pub fn load_with<F>(mut loadfn: F) where F: FnMut(&str) -> *const __gl_imports::raw::c_void {{
+        pub fn load_with<F>(mut loadfn: F) where F: FnMut(&'static str) -> *const __gl_imports::raw::c_void {{
     "));
 
     for c in &registry.cmds {
         try!(writeln!(dest,
                       "{cmd_name}::load_with(&mut loadfn);",
                       cmd_name = &c.proto.ident[..]));
     }
 
--- a/third_party/rust/gl_generator/generators/mod.rs
+++ b/third_party/rust/gl_generator/generators/mod.rs
@@ -60,22 +60,26 @@ pub fn gen_enum_item<W>(enm: &Enum, type
 
 /// Generates all the type aliases for a namespace.
 ///
 /// Aliases are either `pub type = ...` or `#[repr(C)] pub struct ... { ... }` and contain all the
 /// things that we can't obtain from the XML files.
 pub fn gen_types<W>(api: Api, dest: &mut W) -> io::Result<()>
     where W: io::Write
 {
+    if let Api::Egl = api {
+        try!(writeln!(dest, "{}", include_str!("templates/types/egl.rs")));
+        return Ok(());
+    }
+
     try!(writeln!(dest, "{}", include_str!("templates/types/gl.rs")));
 
     match api {
         Api::Glx => try!(writeln!(dest, "{}", include_str!("templates/types/glx.rs"))),
         Api::Wgl => try!(writeln!(dest, "{}", include_str!("templates/types/wgl.rs"))),
-        Api::Egl => try!(writeln!(dest, "{}", include_str!("templates/types/egl.rs"))),
         _ => {}
     }
 
     Ok(())
 }
 
 /// Generates the list of Rust `Arg`s that a `Cmd` requires.
 pub fn gen_parameters(cmd: &Cmd, with_idents: bool, with_types: bool) -> Vec<String> {
--- a/third_party/rust/gl_generator/generators/struct_gen.rs
+++ b/third_party/rust/gl_generator/generators/struct_gen.rs
@@ -162,32 +162,32 @@ fn write_impl<W>(registry: &Registry, de
                   "impl {api} {{
             /// Load each OpenGL symbol using a custom load function. This allows for the
             /// use of functions like `glfwGetProcAddress` or `SDL_GL_GetProcAddress`.
             ///
             /// ~~~ignore
             /// let gl = Gl::load_with(|s| glfw.get_proc_address(s));
             /// ~~~
             #[allow(dead_code, unused_variables)]
-            pub fn load_with<F>(mut loadfn: F) -> {api} where F: FnMut(&str) -> *const __gl_imports::raw::c_void {{
+            pub fn load_with<F>(mut loadfn: F) -> {api} where F: FnMut(&'static str) -> *const __gl_imports::raw::c_void {{
                 #[inline(never)]
-                fn do_metaloadfn(loadfn: &mut FnMut(&str) -> *const __gl_imports::raw::c_void,
-                                 symbol: &str,
-                                 symbols: &[&str])
+                fn do_metaloadfn(loadfn: &mut FnMut(&'static str) -> *const __gl_imports::raw::c_void,
+                                 symbol: &'static str,
+                                 symbols: &[&'static str])
                                  -> *const __gl_imports::raw::c_void {{
                     let mut ptr = loadfn(symbol);
                     if ptr.is_null() {{
                         for &sym in symbols {{
                             ptr = loadfn(sym);
                             if !ptr.is_null() {{ break; }}
                         }}
                     }}
                     ptr
                 }}
-                let mut metaloadfn = |symbol: &str, symbols: &[&str]| {{
+                let mut metaloadfn = |symbol: &'static str, symbols: &[&'static str]| {{
                     do_metaloadfn(&mut loadfn, symbol, symbols)
                 }};
                 {api} {{",
                   api = super::gen_struct_name(registry.api)));
 
     for cmd in &registry.cmds {
         try!(writeln!(dest,
             "{name}: FnPtr::new(metaloadfn(\"{symbol}\", &[{fallbacks}])),",
--- a/third_party/rust/gl_generator/registry/parse.rs
+++ b/third_party/rust/gl_generator/registry/parse.rs
@@ -150,28 +150,16 @@ fn make_enum(ident: String, ty: Option<S
             if let Some((i, _)) = working.match_indices(")").next() {
                 let ty = working[..i].to_string();
                 let value = working[i + 1..].to_string();
 
                 (Cow::Owned(ty), value, true)
             } else {
                 panic!("Unexpected value format: {}", value)
             }
-        } else if value.starts_with("EGL_CAST(") && value.ends_with(")") {
-            // Handling "SpecialNumbers" in the egl.xml file
-            // The values for these enums has the form `'EGL_CAST(' type ',' expr ')'`.
-            let working = &value[9..value.len() - 1];
-            if let Some((i, _)) = working.match_indices(",").next() {
-                let ty = working[..i].to_string();
-                let value = working[i + 1..].to_string();
-
-                (Cow::Owned(ty), value, true)
-            } else {
-                panic!("Unexpected value format: {}", value)
-            }
         } else {
             let ty = match ty {
                 Some(ref ty) if ty == "u" => "GLuint",
                 Some(ref ty) if ty == "ull" => "GLuint64",
                 Some(ty) => panic!("Unhandled enum type: {}", ty),
                 None if value.starts_with("\"") => "&'static str",
                 None if ident == "TRUE" || ident == "FALSE" => "GLboolean",
                 None => "GLenum",
@@ -184,16 +172,57 @@ fn make_enum(ident: String, ty: Option<S
         ident: ident,
         value: value,
         cast: cast,
         alias: alias,
         ty: ty,
     }
 }
 
+fn make_egl_enum(ident: String, ty: Option<String>, value: String, alias: Option<String>) -> Enum {
+    let (ty, value, cast) = {
+        if value.starts_with("EGL_CAST(") && value.ends_with(")") {
+            // Handling "SpecialNumbers" in the egl.xml file
+            // The values for these enums has the form `'EGL_CAST(' type ',' expr ')'`.
+            let working = &value[9..value.len() - 1];
+            if let Some((i, _)) = working.match_indices(",").next() {
+                let ty = working[..i].to_string();
+                let value = working[i + 1..].to_string();
+
+                (Cow::Owned(ty), value, true)
+            } else {
+                panic!("Unexpected value format: {}", value)
+            }
+        } else {
+            match value.chars().next() {
+                Some('-') | Some('0' ... '9') => (),
+                _ => panic!("Unexpected value format: {}", value),
+            }
+
+            let ty = match ty {
+                Some(ref ty) if ty == "ull" => "EGLuint64KHR",
+                Some(ty) => panic!("Unhandled enum type: {}", ty),
+                None if value.starts_with('-') => "EGLint",
+                None if ident == "TRUE" || ident == "FALSE" => "EGLBoolean",
+                None => "EGLenum",
+            };
+            (Cow::Borrowed(ty), value, false)
+        }
+    };
+
+    Enum {
+        ident: ident,
+        value: value,
+        cast: cast,
+        alias: alias,
+        ty: ty,
+    }
+}
+
+
 fn trim_cmd_prefix(ident: &str, api: Api) -> &str {
     match api {
         Api::Gl | Api::GlCore | Api::Gles1 | Api::Gles2 | Api::Glsc2 => trim_str(ident, "gl"),
         Api::Glx => trim_str(ident, "glX"),
         Api::Wgl => trim_str(ident, "wgl"),
         Api::Egl => trim_str(ident, "egl"),
     }
 }
@@ -498,17 +527,20 @@ trait Parse: Sized + Iterator<Item = Par
 
     fn consume_enum(&mut self, api: Api, attributes: &[Attribute]) -> Enum {
         let ident = trim_enum_prefix(&get_attribute(&attributes, "name").unwrap(), api).to_string();
         let value = get_attribute(&attributes, "value").unwrap();
         let alias = get_attribute(&attributes, "alias");
         let ty = get_attribute(&attributes, "type");
         self.consume_end_element("enum");
 
-        make_enum(ident, ty, value, alias)
+        match api {
+            Api::Egl => make_egl_enum(ident, ty, value, alias),
+            _ => make_enum(ident, ty, value, alias)
+        }
     }
 
     fn consume_cmds(&mut self, api: Api) -> (Vec<Cmd>, BTreeMap<String, Vec<String>>) {
         let mut cmds = Vec::new();
         let mut aliases: BTreeMap<String, Vec<String>> = BTreeMap::new();
         loop {
             match self.next().unwrap() {
                 // add command definition
@@ -1060,27 +1092,16 @@ mod tests {
                                      "((EGLint)(-1))".to_string(),
                                      Some("BAR".to_string()));
             assert_eq!(e.ident, "FOO");
             assert_eq!((&*e.ty, &*e.value), ("EGLint", "(-1)"));
             assert_eq!(e.alias, Some("BAR".to_string()));
         }
 
         #[test]
-        fn test_cast_egl() {
-            let e = parse::make_enum("FOO".to_string(),
-                                     None,
-                                     "EGL_CAST(EGLint,-1)".to_string(),
-                                     Some("BAR".to_string()));
-            assert_eq!(e.ident, "FOO");
-            assert_eq!((&*e.ty, &*e.value), ("EGLint", "-1"));
-            assert_eq!(e.alias, Some("BAR".to_string()));
-        }
-
-        #[test]
         fn test_no_type() {
             let e = parse::make_enum("FOO".to_string(),
                                      None,
                                      "value".to_string(),
                                      Some("BAR".to_string()));
             assert_eq!(e.ident, "FOO");
             assert_eq!(e.value, "value");
             assert_eq!(e.alias, Some("BAR".to_string()));
@@ -1129,16 +1150,88 @@ mod tests {
 
         #[test]
         fn test_ident_false() {
             let e = parse::make_enum("FALSE".to_string(), None, String::new(), None);
             assert_eq!(e.ty, "GLboolean");
         }
     }
 
+    mod make_egl_enum {
+        use registry::parse;
+
+        #[test]
+        fn test_cast_egl() {
+            let e = parse::make_egl_enum("FOO".to_string(),
+                                     None,
+                                     "EGL_CAST(EGLint,-1)".to_string(),
+                                     Some("BAR".to_string()));
+            assert_eq!(e.ident, "FOO");
+            assert_eq!((&*e.ty, &*e.value), ("EGLint", "-1"));
+            assert_eq!(e.alias, Some("BAR".to_string()));
+        }
+
+        #[test]
+        fn test_ident_true() {
+            let e = parse::make_egl_enum("TRUE".to_string(), None, "1234".to_string(), None);
+            assert_eq!(e.ty, "EGLBoolean");
+        }
+
+        #[test]
+        fn test_ident_false() {
+            let e = parse::make_egl_enum("FALSE".to_string(), None, "1234".to_string(), None);
+            assert_eq!(e.ty, "EGLBoolean");
+        }
+
+        #[test]
+        fn test_ull() {
+            let e = parse::make_egl_enum("FOO".to_string(),
+                                     Some("ull".to_string()),
+                                     "1234".to_string(),
+                                     None);
+            assert_eq!(e.ty, "EGLuint64KHR");
+        }
+
+        #[test]
+        fn test_negative_value() {
+            let e = parse::make_egl_enum("FOO".to_string(),
+                                     None,
+                                     "-1".to_string(),
+                                     None);
+            assert_eq!(e.ty, "EGLint");
+        }
+
+        #[test]
+        #[should_panic]
+        fn test_unknown_type() {
+            parse::make_egl_enum("FOO".to_string(),
+                             Some("blargh".to_string()),
+                             String::new(),
+                             None);
+        }
+
+        #[test]
+        #[should_panic]
+        fn test_unknown_value() {
+            parse::make_egl_enum("FOO".to_string(),
+                             None,
+                             "a".to_string(),
+                             None);
+        }
+
+        #[test]
+        #[should_panic]
+        fn test_empty_value() {
+            parse::make_egl_enum("FOO".to_string(),
+                             None,
+                             String::new(),
+                             None);
+        }
+    }
+
     mod parse_event {
         mod from_xml {
             use xml::attribute::OwnedAttribute;
             use xml::common::XmlVersion;
             use xml::name::OwnedName;
             use xml::namespace::Namespace;
             use xml::reader::XmlEvent;
 
--- a/third_party/rust/gleam/.cargo-checksum.json
+++ b/third_party/rust/gleam/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{".travis.yml":"29b74b95210896ce634c11a9037638668473b5a1b3b1716c505cb04dbb6341fa","COPYING":"ec82b96487e9e778ee610c7ab245162464782cfa1f555c2299333f8dbe5c036a","Cargo.toml":"dacadef6f04af7170b41899ce02202e0f261b03fb4907828095ea6b0480e20a4","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"62065228e42caebca7e7d7db1204cbb867033de5982ca4009928915e4095f3a3","README.md":"2de24b7458d6b88f20324303a48acf64a4f2bbfb83d2ec4d6ff2b4f4a1fd2275","build.rs":"b37b2926b74c1f01bfed9aeaac7286e6570b2b2cc80e51a7583f30c039675ddc","src/gl.rs":"aecca69eced4fa373a58dd8253a2811e5e10d8e247e9a935943ac5160273d1bc","src/gl_fns.rs":"7414bf2232d181de751941b47e67f0b9a74f3672788684556b8bf61773c1d8ee","src/gles_fns.rs":"51bbbece61ebec9cfb6d68eda1fffc1a9955af58f848c9f0e6fb026e5c65e5df","src/lib.rs":"16610c19b45a3f26d56b379a3591aa2e4fc9477e7bd88f86b31c6ea32e834861"},"package":"959c818d9bbe9f7b7db55dce0bc44673c4da4f4ee122536c40550f984c3b8017"}
\ No newline at end of file
+{"files":{".travis.yml":"29b74b95210896ce634c11a9037638668473b5a1b3b1716c505cb04dbb6341fa","COPYING":"ec82b96487e9e778ee610c7ab245162464782cfa1f555c2299333f8dbe5c036a","Cargo.toml":"7eb0bbf4c4679d7be4c073b22b77036fa5f89264ee615bbf1f93bdbcc1b9fe75","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"62065228e42caebca7e7d7db1204cbb867033de5982ca4009928915e4095f3a3","README.md":"2de24b7458d6b88f20324303a48acf64a4f2bbfb83d2ec4d6ff2b4f4a1fd2275","build.rs":"a1616d76f35b3a6015c2ee22ecf13eb225095b22e4190ef5ef2fcd9197b43ad1","src/gl.rs":"982935c8c519e749b42f124ed105a3cacefc186d597f476bd72ea7c88a3e5070","src/gl_fns.rs":"ea24ea0c6deb06af7809140facd5e0f7fce2bb5b340ef425ce0b10029e95294a","src/gles_fns.rs":"aaced55ced12f5dcbeec9ee88eb91696ab65ca24c41cb6fd7f2bdf380641ceb7","src/lib.rs":"16610c19b45a3f26d56b379a3591aa2e4fc9477e7bd88f86b31c6ea32e834861"},"package":"70363479f033b72dbd558fd3b6f153dd824bf4f9dcd05dfcff6cd29a3eb9a63d"}
\ No newline at end of file
--- a/third_party/rust/gleam/Cargo.toml
+++ b/third_party/rust/gleam/Cargo.toml
@@ -7,20 +7,17 @@
 #
 # If you believe there's an error in this file please file an
 # issue against the rust-lang/cargo repository. If you're
 # editing this file be aware that the upstream Cargo.toml
 # will likely look very different (and much more reasonable)
 
 [package]
 name = "gleam"
-version = "0.4.20"
+version = "0.4.32"
 authors = ["The Servo Project Developers"]
 build = "build.rs"
 description = "Generated OpenGL bindings and wrapper for Servo."
 documentation = "http://doc.servo.org/gleam/"
 license = "Apache-2.0/MIT"
 repository = "https://github.com/servo/gleam"
 [build-dependencies.gl_generator]
-version = "0.8"
-
-[build-dependencies.pkg-config]
-version = "0.3.8"
+version = "0.9"
--- a/third_party/rust/gleam/build.rs
+++ b/third_party/rust/gleam/build.rs
@@ -1,43 +1,46 @@
 extern crate gl_generator;
-extern crate pkg_config;
 
 use std::env;
 use std::fs::File;
 use std::path::Path;
 use gl_generator::{Registry, Api, Profile, Fallbacks};
 
 fn main() {
     let dest = env::var("OUT_DIR").unwrap();
     let mut file_gl_and_gles = File::create(&Path::new(&dest).join("gl_and_gles_bindings.rs")).unwrap();
     let mut file_gl = File::create(&Path::new(&dest).join("gl_bindings.rs")).unwrap();
     let mut file_gles = File::create(&Path::new(&dest).join("gles_bindings.rs")).unwrap();
 
     // OpenGL 3.3 bindings
-    let gl_extensions = ["GL_ARB_texture_rectangle",
-                         "GL_EXT_debug_marker",
-                         "GL_APPLE_client_storage",
-                         "GL_APPLE_texture_range",
-                         "GL_APPLE_fence",
-                         "GL_ARB_get_program_binary",
-                         "GL_ARB_blend_func_extended"];
+    let gl_extensions = [
+        "GL_ARB_texture_rectangle",
+        "GL_EXT_debug_marker",
+        "GL_APPLE_client_storage",
+        "GL_APPLE_texture_range",
+        "GL_APPLE_fence",
+        "GL_ARB_get_program_binary",
+        "GL_ARB_blend_func_extended",
+        "GL_KHR_debug",
+    ];
     let gl_reg = Registry::new(Api::Gl, (3, 3), Profile::Core, Fallbacks::All, gl_extensions);
     gl_reg.write_bindings(gl_generator::StructGenerator, &mut file_gl)
-          .unwrap();
+        .unwrap();
 
     // GLES 3.0 bindings
     let gles_extensions = [
         "GL_EXT_texture_format_BGRA8888",
         "GL_OES_EGL_image",
         "GL_OES_EGL_image_external",
         "GL_EXT_disjoint_timer_query",
         "GL_EXT_debug_marker",
+        "GL_KHR_debug",
     ];
     let gles_reg = Registry::new(Api::Gles2, (3, 0), Profile::Core, Fallbacks::All, gles_extensions);
     gles_reg.write_bindings(gl_generator::StructGenerator, &mut file_gles)
-            .unwrap();
+        .unwrap();
 
     // OpenGL 3.3 + GLES 3.0 bindings. Used to get all enums
     let gl_reg = gl_reg + gles_reg;
     gl_reg.write_bindings(gl_generator::StructGenerator, &mut file_gl_and_gles)
-          .unwrap();
+        .unwrap();
 }
--- a/third_party/rust/gleam/src/gl.rs
+++ b/third_party/rust/gleam/src/gl.rs
@@ -8,17 +8,16 @@
 // except according to those terms.
 
 use std::mem;
 use std::mem::size_of;
 use std::os::raw::{c_char, c_int, c_void};
 use std::ptr;
 use std::rc::Rc;
 use std::str;
-use std::iter::repeat;
 use std::ffi::{CString, CStr};
 use ffi;
 
 pub use ffi::types::*;
 pub use ffi::*;
 
 pub use ffi_gl::Gl as GlFfi;
 pub use ffi_gles::Gles2 as GlesFfi;
@@ -58,16 +57,55 @@ fn calculate_length(width: GLsizei, heig
         ffi::UNSIGNED_BYTE => 1,
         ffi::FLOAT=> 4,
         _ => panic!("unsupported pixel_type for read_pixels: {:?}", pixel_type),
     };
 
     return (width * height * colors * depth) as usize;
 }
 
+// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
+fn get_uniform_iv_vector_length(uniform_type: &GLuint) -> usize {
+    match *uniform_type {
+        ffi::BOOL |
+        ffi::INT |
+        ffi::SAMPLER_2D |
+        ffi::SAMPLER_CUBE => 1,
+        ffi::INT_VEC2 |
+        ffi::BOOL_VEC2 => 2,
+        ffi::INT_VEC3 |
+        ffi::BOOL_VEC3 => 3,
+        ffi::INT_VEC4 |
+        ffi::BOOL_VEC4 => 4,
+        _ => panic!("Invalid location argument"),
+    }
+}
+
+// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
+fn get_uniform_fv_vector_length(uniform_type: &GLuint) -> usize {
+    match *uniform_type {
+        ffi::FLOAT => 1,
+        ffi::FLOAT_VEC2 => 2,
+        ffi::FLOAT_VEC3 => 3,
+        ffi::FLOAT_VEC4 |
+        ffi::FLOAT_MAT2 => 4,
+        ffi::FLOAT_MAT3 => 9,
+        ffi::FLOAT_MAT4 => 16,
+        _ => panic!("Invalid location argument"),
+    }
+}
+
+pub struct DebugMessage {
+    pub message: String,
+    pub source: GLenum,
+    pub ty: GLenum,
+    pub id: GLenum,
+    pub severity: GLenum,
+}
+
 pub trait Gl {
     fn get_type(&self) -> GlType;
     fn buffer_data_untyped(&self,
                            target: GLenum,
                            size: GLsizeiptr,
                            data: *const GLvoid,
                            usage: GLenum);
     fn buffer_sub_data_untyped(&self,
@@ -125,29 +163,32 @@ pub trait Gl {
                             target: GLenum,
                             internalformat: GLenum,
                             width: GLsizei,
                             height: GLsizei);
     fn depth_func(&self, func: GLenum);
     fn active_texture(&self, texture: GLenum);
     fn attach_shader(&self, program: GLuint, shader: GLuint);
     fn bind_attrib_location(&self, program: GLuint, index: GLuint, name: &str);
+    fn get_uniform_iv(&self, program: GLuint, location: GLint) -> Vec<GLint>;
+    fn get_uniform_fv(&self, program: GLuint, location: GLint) -> Vec<GLfloat>;
     fn get_uniform_block_index(&self, program: GLuint, name: &str) -> GLuint;
     fn get_uniform_indices(&self,  program: GLuint, names: &[&str]) -> Vec<GLuint>;
     fn bind_buffer_base(&self, target: GLenum, index: GLuint, buffer: GLuint);
     fn bind_buffer_range(&self, target: GLenum, index: GLuint, buffer: GLuint, offset: GLintptr, size: GLsizeiptr);
     fn uniform_block_binding(&self,
                              program: GLuint,
                              uniform_block_index: GLuint,
                              uniform_block_binding: GLuint);
     fn bind_buffer(&self, target: GLenum, buffer: GLuint);
     fn bind_vertex_array(&self, vao: GLuint);
     fn bind_renderbuffer(&self, target: GLenum, renderbuffer: GLuint);
     fn bind_framebuffer(&self, target: GLenum, framebuffer: GLuint);
     fn bind_texture(&self, target: GLenum, texture: GLuint);
+    fn draw_buffers(&self, bufs: &[GLenum]);
     fn tex_image_2d(&self,
                     target: GLenum,
                     level: GLint,
                     internal_format: GLint,
                     width: GLsizei,
                     height: GLsizei,
                     border: GLint,
                     format: GLenum,
@@ -260,16 +301,22 @@ pub trait Gl {
                                  ty: GLenum,
                                  output: &mut [u8]);
     fn get_integer_v(&self, name: GLenum) -> GLint;
     fn get_integer_64v(&self, name: GLenum) -> GLint64;
     fn get_integer_iv(&self, name: GLenum, index: GLuint) -> GLint;
     fn get_integer_64iv(&self, name: GLenum, index: GLuint) -> GLint64;
     fn get_boolean_v(&self, name: GLenum) -> GLboolean;
     fn get_float_v(&self, name: GLenum) -> GLfloat;
+    fn get_framebuffer_attachment_parameter_iv(&self,
+                                               target: GLenum,
+                                               attachment: GLenum,
+                                               pname: GLenum) -> GLint;
+    fn get_tex_parameter_iv(&self, target: GLenum, name: GLenum) -> GLint;
+    fn get_tex_parameter_fv(&self, target: GLenum, name: GLenum) -> GLfloat;
     fn tex_parameter_i(&self, target: GLenum, pname: GLenum, param: GLint);
     fn tex_parameter_f(&self, target: GLenum, pname: GLenum, param: GLfloat);
     fn framebuffer_texture_2d(&self,
                               target: GLenum,
                               attachment: GLenum,
                               textarget: GLenum,
                               texture: GLuint,
                               level: GLint);
@@ -307,16 +354,17 @@ pub trait Gl {
     fn vertex_attrib_i_pointer(&self,
                                index: GLuint,
                                size: GLint,
                                type_: GLenum,
                                stride: GLsizei,
                                offset: GLuint);
     fn vertex_attrib_divisor(&self, index: GLuint, divisor: GLuint);
     fn viewport(&self, x: GLint, y: GLint, width: GLsizei, height: GLsizei);
+    fn get_viewport(&self) -> (GLint, GLint, GLsizei, GLsizei);
     fn scissor(&self, x: GLint, y: GLint, width: GLsizei, height: GLsizei);
     fn line_width(&self, width: GLfloat);
     fn use_program(&self, program: GLuint);
     fn validate_program(&self, program: GLuint);
     fn draw_arrays(&self, mode: GLenum, first: GLint, count: GLsizei);
     fn draw_arrays_instanced(&self,
                              mode: GLenum,
                              first: GLint,
@@ -451,16 +499,24 @@ pub trait Gl {
         index: GLuint,
         name: &str,
     );
     fn get_frag_data_index(
         &self,
         program: GLuint,
         name: &str,
     ) -> GLint;
+
+    fn alias_point_size_range(&self) -> (GLfloat, GLfloat);
+
+    /// Returns the the maximum supported width and height of the viewport.
+    fn max_viewport_dims(&self) -> (GLint, GLint);
+
+    // GL_KHR_debug
+    fn get_debug_messages(&self) -> Vec<DebugMessage>;
 }
 
 #[inline]
 pub fn buffer_data<T>(gl_: &Gl, target: GLenum, data: &[T], usage: GLenum) {
     gl_.buffer_data_untyped(target,
                             (data.len() * size_of::<T>()) as GLsizeiptr,
                             data.as_ptr() as *const GLvoid,
                             usage)
--- a/third_party/rust/gleam/src/gl_fns.rs
+++ b/third_party/rust/gleam/src/gl_fns.rs
@@ -14,16 +14,31 @@ pub struct GlFns {
 impl GlFns
 {
     pub unsafe fn load_with<'a, F>(loadfn: F) -> Rc<Gl> where F: FnMut(&str) -> *const c_void {
         let ffi_gl_ = GlFfi::load_with(loadfn);
         Rc::new(GlFns {
             ffi_gl_: ffi_gl_,
         }) as Rc<Gl>
     }
+
+    fn get_active_uniform_type(&self, program: GLuint) -> GLuint {
+        let mut size: GLint = 0;
+        let mut uniform_type: GLuint = 0;
+        unsafe {
+            self.ffi_gl_.GetActiveUniform(program,
+                                          0 as GLuint,
+                                          0 as GLsizei,
+                                          ptr::null_mut(),
+                                          &mut size,
+                                          &mut uniform_type,
+                                          ptr::null_mut());
+        }
+        uniform_type
+    }
 }
 
 impl Gl for GlFns {
     fn get_type(&self) -> GlType {
         GlType::Gl
     }
 
     fn buffer_data_untyped(&self, target: GLenum, size: GLsizeiptr, data: *const GLvoid, usage: GLenum) {
@@ -104,57 +119,57 @@ impl Gl for GlFns {
 
     fn pixel_store_i(&self, name: GLenum, param: GLint) {
         unsafe {
             self.ffi_gl_.PixelStorei(name, param);
         }
     }
 
     fn gen_buffers(&self, n: GLsizei) -> Vec<GLuint> {
+        let mut result = vec![0 as GLuint; n as usize];
         unsafe {
-            let mut result: Vec<_> = repeat(0 as GLuint).take(n as usize).collect();
             self.ffi_gl_.GenBuffers(n, result.as_mut_ptr());
-            return result;
         }
+        result
     }
 
     fn gen_renderbuffers(&self, n: GLsizei) -> Vec<GLuint> {
+        let mut result = vec![0 as GLuint; n as usize];
         unsafe {
-            let mut result: Vec<_> = repeat(0 as GLuint).take(n as usize).collect();
             self.ffi_gl_.GenRenderbuffers(n, result.as_mut_ptr());
-            return result;
         }
+        result
     }
 
     fn gen_framebuffers(&self, n: GLsizei) -> Vec<GLuint> {
+        let mut result = vec![0 as GLuint; n as usize];
         unsafe {
-            let mut result: Vec<_> = repeat(0 as GLuint).take(n as usize).collect();
             self.ffi_gl_.GenFramebuffers(n, result.as_mut_ptr());
-            return result;
         }
+        result
     }
 
     fn gen_textures(&self, n: GLsizei) -> Vec<GLuint> {
+        let mut result = vec![0 as GLuint; n as usize];
         unsafe {
-            let mut result: Vec<_> = repeat(0 as GLuint).take(n as usize).collect();
             self.ffi_gl_.GenTextures(n, result.as_mut_ptr());
-            return result;
         }
+        result
     }
 
     fn gen_vertex_arrays(&self, n: GLsizei) -> Vec<GLuint> {
+        let mut result = vec![0 as GLuint; n as usize];
         unsafe {
-            let mut result: Vec<_> = repeat(0 as GLuint).take(n as usize).collect();
             self.ffi_gl_.GenVertexArrays(n, result.as_mut_ptr());
-            return result;
         }
+        result
     }
 
     fn gen_queries(&self, n: GLsizei) -> Vec<GLuint> {
-        let mut result = vec![0; n as usize];
+        let mut result = vec![0 as GLuint; n as usize];
         unsafe {
             self.ffi_gl_.GenQueries(n, result.as_mut_ptr());
         }
         result
     }
 
     fn begin_query(&self, target: GLenum, id: GLuint) {
         unsafe {
@@ -288,16 +303,38 @@ impl Gl for GlFns {
 
     fn bind_attrib_location(&self, program: GLuint, index: GLuint, name: &str) {
         let c_string = CString::new(name).unwrap();
         unsafe {
             self.ffi_gl_.BindAttribLocation(program, index, c_string.as_ptr())
         }
     }
 
+    // https://www.khronos.org/registry/OpenGL-Refpages/es2.0/xhtml/glGetUniform.xml
+    fn get_uniform_iv(&self, program: GLuint, location: GLint) -> Vec<GLint> {
+        let uniform_type = self.get_active_uniform_type(program);
+        let len = get_uniform_iv_vector_length(&uniform_type);
+        let mut result: [GLint; 4] = [0; 4];
+        unsafe {
+            self.ffi_gl_.GetUniformiv(program, location, result.as_mut_ptr());
+        }
+        Vec::from(&result[0..len])
+    }
+
+    // https://www.khronos.org/registry/OpenGL-Refpages/es2.0/xhtml/glGetUniform.xml
+    fn get_uniform_fv(&self, program: GLuint, location: GLint) -> Vec<GLfloat> {
+        let uniform_type = self.get_active_uniform_type(program);
+        let len = get_uniform_fv_vector_length(&uniform_type);
+        let mut result: [GLfloat; 16] = [0.0; 16];
+        unsafe {
+            self.ffi_gl_.GetUniformfv(program, location, result.as_mut_ptr());
+        }
+        Vec::from(&result[0..len])
+    }
+
     fn get_uniform_block_index(&self, program: GLuint, name: &str) -> GLuint {
         let c_string = CString::new(name).unwrap();
         unsafe {
             self.ffi_gl_.GetUniformBlockIndex(program, c_string.as_ptr())
         }
     }
 
     fn get_uniform_indices(&self,  program: GLuint, names: &[&str]) -> Vec<GLuint> {
@@ -357,16 +394,22 @@ impl Gl for GlFns {
     }
 
     fn bind_texture(&self, target: GLenum, texture: GLuint) {
         unsafe {
             self.ffi_gl_.BindTexture(target, texture);
         }
     }
 
+    fn draw_buffers(&self, bufs: &[GLenum]) {
+        unsafe {
+            self.ffi_gl_.DrawBuffers(bufs.len() as GLsizei, bufs.as_ptr());
+        }
+    }
+
     // FIXME: Does not verify buffer size -- unsafe!
     fn tex_image_2d(&self,
                     target: GLenum,
                     level: GLint,
                     internal_format: GLint,
                     width: GLsizei,
                     height: GLsizei,
                     border: GLint,
@@ -640,31 +683,55 @@ impl Gl for GlFns {
         let mut result = 0;
         unsafe {
             self.ffi_gl_.GetInteger64i_v(name, index, &mut result);
         }
         result
     }
 
     fn get_boolean_v(&self, name: GLenum) -> GLboolean {
-        let mut result: GLboolean = 0 as GLboolean;
+        let mut result = 0 as GLboolean;
         unsafe {
             self.ffi_gl_.GetBooleanv(name, &mut result);
         }
         result
     }
 
     fn get_float_v(&self, name: GLenum) -> GLfloat {
-        let mut result: GLfloat = 0 as GLfloat;
+        let mut result = 0 as GLfloat;
         unsafe {
             self.ffi_gl_.GetFloatv(name, &mut result);
         }
         result
     }
 
+    fn get_framebuffer_attachment_parameter_iv(&self, target: GLenum, attachment: GLenum, pname: GLenum) -> GLint {
+        let mut result: GLint = 0;
+        unsafe {
+            self.ffi_gl_.GetFramebufferAttachmentParameteriv(target, attachment, pname, &mut result);
+        }
+        result
+    }
+
+    fn get_tex_parameter_iv(&self, target: GLenum, pname: GLenum) -> GLint {
+        let mut result: GLint = 0;
+        unsafe {
+            self.ffi_gl_.GetTexParameteriv(target, pname, &mut result);
+        }
+        result
+    }
+
+    fn get_tex_parameter_fv(&self, target: GLenum, pname: GLenum) -> GLfloat {
+        let mut result: GLfloat = 0.0;
+        unsafe {
+            self.ffi_gl_.GetTexParameterfv(target, pname, &mut result);
+        }
+        result
+    }
+
     fn tex_parameter_i(&self, target: GLenum, pname: GLenum, param: GLint) {
         unsafe {
             self.ffi_gl_.TexParameteri(target, pname, param);
         }
     }
 
     fn tex_parameter_f(&self, target: GLenum, pname: GLenum, param: GLfloat) {
         unsafe {
@@ -785,16 +852,24 @@ impl Gl for GlFns {
     }
 
     fn viewport(&self, x: GLint, y: GLint, width: GLsizei, height: GLsizei) {
         unsafe {
             self.ffi_gl_.Viewport(x, y, width, height);
         }
     }
 
+    fn get_viewport(&self) -> (GLint, GLint, GLsizei, GLsizei) {
+        unsafe {
+            let mut ret = [0; 4];
+            self.ffi_gl_.GetIntegerv(ffi::VIEWPORT, ret.as_mut_ptr());
+            (ret[0], ret[1], ret[2], ret[3])
+        }
+    }
+
     fn scissor(&self, x: GLint, y: GLint, width: GLsizei, height: GLsizei) {
         unsafe {
             self.ffi_gl_.Scissor(x, y, width, height);
         }
     }
 
     fn line_width(&self, width: GLfloat) {
         unsafe {
@@ -1230,34 +1305,35 @@ impl Gl for GlFns {
     fn get_uniform_location(&self, program: GLuint, name: &str) -> c_int {
         let name = CString::new(name).unwrap();
         unsafe {
             self.ffi_gl_.GetUniformLocation(program, name.as_ptr())
         }
     }
 
     fn get_program_info_log(&self, program: GLuint) -> String {
+        let max_len = self.get_program_iv(program, ffi::INFO_LOG_LENGTH);
+        let mut result = vec![0u8; max_len as usize];
+        let mut result_len = 0 as GLsizei;
         unsafe {
-            let mut result = vec![0u8; 1024];
-            let mut result_len: GLsizei = 0 as GLsizei;
             self.ffi_gl_.GetProgramInfoLog(program,
-                                           1024 as GLsizei,
+                                           max_len as GLsizei,
                                            &mut result_len,
                                            result.as_mut_ptr() as *mut GLchar);
-            result.truncate(if result_len > 0 {result_len as usize} else {0});
-            String::from_utf8(result).unwrap()
         }
+        result.truncate(if result_len > 0 {result_len as usize} else {0});
+        String::from_utf8(result).unwrap()
     }
 
     fn get_program_iv(&self, program: GLuint, pname: GLenum) -> GLint {
+        let mut result = 0 as GLint;
         unsafe {
-            let mut result: GLint = 0 as GLint;
             self.ffi_gl_.GetProgramiv(program, pname, &mut result);
-            return result;
         }
+        result
     }
 
     fn get_program_binary(&self, program: GLuint) -> (Vec<u8>, GLenum) {
         if !self.ffi_gl_.GetProgramBinary.is_loaded() {
             return (Vec::new(), NONE);
         }
         let len = self.get_program_iv(program, ffi::PROGRAM_BINARY_LENGTH);
         if len <= 0 {
@@ -1298,58 +1374,59 @@ impl Gl for GlFns {
             return;
         }
         unsafe {
             self.ffi_gl_.ProgramParameteri(program, pname, value);
         }
     }
 
     fn get_vertex_attrib_iv(&self, index: GLuint, pname: GLenum) -> GLint {
+        let mut result = 0 as GLint;
         unsafe {
-            let mut result: GLint = 0 as GLint;
             self.ffi_gl_.GetVertexAttribiv(index, pname, &mut result);
-            return result;
         }
+        result
     }
 
     fn get_vertex_attrib_fv(&self, index: GLuint, pname: GLenum) -> Vec<GLfloat> {
+        let mut result = vec![0 as GLfloat; 4];
         unsafe {
-            let mut result = vec![0 as GLfloat; 4];
             self.ffi_gl_.GetVertexAttribfv(index, pname, result.as_mut_ptr());
-            return result;
         }
+        result
     }
 
     fn get_vertex_attrib_pointer_v(&self, index: GLuint, pname: GLenum) -> GLsizeiptr {
         let mut result = 0 as *mut GLvoid;
         unsafe {
             self.ffi_gl_.GetVertexAttribPointerv(index, pname, &mut result)
         }
         result as GLsizeiptr
     }
 
     fn get_buffer_parameter_iv(&self, target: GLuint, pname: GLenum) -> GLint {
+        let mut result = 0 as GLint;
         unsafe {
-            let mut result: GLint = 0 as GLint;
             self.ffi_gl_.GetBufferParameteriv(target, pname, &mut result);
-            return result;
         }
+        result
     }
 
     fn get_shader_info_log(&self, shader: GLuint) -> String {
+        let max_len = self.get_shader_iv(shader, ffi::INFO_LOG_LENGTH);
+        let mut result = vec![0u8; max_len as usize];
+        let mut result_len = 0 as GLsizei;
         unsafe {
-            let mut result = vec![0u8; 1024];
-            let mut result_len: GLsizei = 0 as GLsizei;
             self.ffi_gl_.GetShaderInfoLog(shader,
-                                          1024 as GLsizei,
+                                          max_len as GLsizei,
                                           &mut result_len,
                                           result.as_mut_ptr() as *mut GLchar);
-            result.truncate(if result_len > 0 {result_len as usize} else {0});
-            String::from_utf8(result).unwrap()
         }
+        result.truncate(if result_len > 0 {result_len as usize} else {0});
+        String::from_utf8(result).unwrap()
     }
 
     fn get_string(&self, which: GLenum) -> String {
         unsafe {
             let llstr = self.ffi_gl_.GetString(which);
             if !llstr.is_null() {
                 return str::from_utf8_unchecked(CStr::from_ptr(llstr as *const c_char).to_bytes()).to_string();
             } else {
@@ -1365,21 +1442,21 @@ impl Gl for GlFns {
                 str::from_utf8_unchecked(CStr::from_ptr(llstr as *const c_char).to_bytes()).to_string()
             } else {
                 "".to_string()
             }
         }
     }
 
     fn get_shader_iv(&self, shader: GLuint, pname: GLenum) -> GLint {
+        let mut result = 0 as GLint;
         unsafe {
-            let mut result: GLint = 0 as GLint;
             self.ffi_gl_.GetShaderiv(shader, pname, &mut result);
-            return result;
         }
+        result
     }
 
     fn get_shader_precision_format(&self, _shader_type: GLuint, precision_type: GLuint) -> (GLint, GLint, GLint) {
         // gl.GetShaderPrecisionFormat is not available until OpenGL 4.1.
         // Fallback to OpenGL standard precissions that most desktop hardware support.
         match precision_type {
             ffi::LOW_FLOAT | ffi::MEDIUM_FLOAT | ffi::HIGH_FLOAT => {
                 // Fallback to IEEE 754 single precision
@@ -1594,21 +1671,21 @@ impl Gl for GlFns {
 
     fn delete_sync(&self, sync: GLsync) {
         unsafe {
             self.ffi_gl_.DeleteSync(sync as *const _);
         }
     }
 
     fn gen_fences_apple(&self, n: GLsizei) -> Vec<GLuint> {
+        let mut result = vec![0 as GLuint; n as usize];
         unsafe {
-            let mut result: Vec<_> = repeat(0 as GLuint).take(n as usize).collect();
             self.ffi_gl_.GenFencesAPPLE(n, result.as_mut_ptr());
-            result
         }
+        result
     }
 
     fn delete_fences_apple(&self, fences: &[GLuint]) {
         unsafe {
             self.ffi_gl_.DeleteFencesAPPLE(fences.len() as GLsizei, fences.as_ptr());
         }
     }
 
@@ -1667,10 +1744,84 @@ impl Gl for GlFns {
 
         unsafe {
             self.ffi_gl_.GetFragDataIndex(
                 program,
                 c_string.as_ptr(),
             )
         }
     }
+
+    fn alias_point_size_range(&self) -> (GLfloat, GLfloat) {
+        unsafe {
+            let mut ret = [0.; 2];
+            self.ffi_gl_.GetFloatv(ffi::ALIASED_POINT_SIZE_RANGE, ret.as_mut_ptr());
+            (ret[0], ret[1])
+        }
+    }
+
+    fn max_viewport_dims(&self) -> (GLint, GLint) {
+        unsafe {
+            let mut ret = [0; 2];
+            self.ffi_gl_.GetIntegerv(ffi::MAX_VIEWPORT_DIMS, ret.as_mut_ptr());
+            (ret[0], ret[1])
+        }
+    }
+
+    // GL_KHR_debug
+    fn get_debug_messages(&self) -> Vec<DebugMessage> {
+        if !self.ffi_gl_.GetDebugMessageLog.is_loaded() {
+            return Vec::new();
+        }
+
+        let mut max_message_len = 0;
+        unsafe {
+            self.ffi_gl_.GetIntegerv(
+                ffi::MAX_DEBUG_MESSAGE_LENGTH,
+                &mut max_message_len
+            )
+        }
+
+        let mut output = Vec::new();
+        const CAPACITY: usize = 4;
+
+        let mut msg_data = vec![0u8; CAPACITY * max_message_len as usize];
+        let mut sources = [0 as GLenum; CAPACITY];
+        let mut types = [0 as GLenum; CAPACITY];
+        let mut severities = [0 as GLenum; CAPACITY];
+        let mut ids = [0 as GLuint; CAPACITY];
+        let mut lengths = [0 as GLsizei; CAPACITY];
+
+        loop {
+            let count = unsafe {
+                self.ffi_gl_.GetDebugMessageLog(
+                    CAPACITY as _,
+                    msg_data.len() as _,
+                    sources.as_mut_ptr(),
+                    types.as_mut_ptr(),
+                    ids.as_mut_ptr(),
+                    severities.as_mut_ptr(),
+                    lengths.as_mut_ptr(),
+                    msg_data.as_mut_ptr() as *mut _,
+                )
+            };
+
+            let mut offset = 0;
+            output.extend((0 .. count as usize).map(|i| {
+                let len = lengths[i] as usize;
+                let slice = &msg_data[offset .. offset + len];
+                offset += len;
+                DebugMessage {
+                    message: String::from_utf8_lossy(slice).to_string(),
+                    source: sources[i],
+                    ty: types[i],
+                    id: ids[i],
+                    severity: severities[i],
+                }
+            }));
+
+            if (count as usize) < CAPACITY {
+                return output
+            }
+        }
+    }
 }
 
--- a/third_party/rust/gleam/src/gles_fns.rs
+++ b/third_party/rust/gleam/src/gles_fns.rs
@@ -14,16 +14,31 @@ pub struct GlesFns {
 impl GlesFns
 {
     pub unsafe fn load_with<'a, F>(loadfn: F) -> Rc<Gl> where F: FnMut(&str) -> *const c_void {
         let ffi_gl_ = GlesFfi::load_with(loadfn);
         Rc::new(GlesFns {
             ffi_gl_: ffi_gl_,
         }) as Rc<Gl>
     }
+
+    fn get_active_uniform_type(&self, program: GLuint) -> GLuint {
+        let mut size: GLint = 0;
+        let mut uniform_type: GLuint = 0;
+        unsafe {
+            self.ffi_gl_.GetActiveUniform(program,
+                                          0 as GLuint,
+                                          0 as GLsizei,
+                                          ptr::null_mut(),
+                                          &mut size,
+                                          &mut uniform_type,
+                                          ptr::null_mut());
+        }
+        uniform_type
+    }
 }
 
 impl Gl for GlesFns {
     fn get_type(&self) -> GlType {
         GlType::Gles
     }
 
     fn buffer_data_untyped(&self, target: GLenum, size: GLsizeiptr, data: *const GLvoid, usage: GLenum) {
@@ -101,60 +116,60 @@ impl Gl for GlesFns {
 
     fn pixel_store_i(&self, name: GLenum, param: GLint) {
         unsafe {
             self.ffi_gl_.PixelStorei(name, param);
         }
     }
 
     fn gen_buffers(&self, n: GLsizei) -> Vec<GLuint> {
+        let mut result = vec![0 as GLuint; n as usize];
         unsafe {
-            let mut result: Vec<_> = repeat(0 as GLuint).take(n as usize).collect();
             self.ffi_gl_.GenBuffers(n, result.as_mut_ptr());
-            return result;
         }
+        result
     }
 
     fn gen_renderbuffers(&self, n: GLsizei) -> Vec<GLuint> {
+        let mut result = vec![0 as GLuint; n as usize];
         unsafe {
-            let mut result: Vec<_> = repeat(0 as GLuint).take(n as usize).collect();
             self.ffi_gl_.GenRenderbuffers(n, result.as_mut_ptr());
-            return result;
         }
+        result
     }
 
     fn gen_framebuffers(&self, n: GLsizei) -> Vec<GLuint> {
+        let mut result = vec![0 as GLuint; n as usize];
         unsafe {
-            let mut result: Vec<_> = repeat(0 as GLuint).take(n as usize).collect();
             self.ffi_gl_.GenFramebuffers(n, result.as_mut_ptr());
-            return result;
         }
+        result
     }
 
     fn gen_textures(&self, n: GLsizei) -> Vec<GLuint> {
+        let mut result = vec![0 as GLuint; n as usize];
         unsafe {
-            let mut result: Vec<_> = repeat(0 as GLuint).take(n as usize).collect();
             self.ffi_gl_.GenTextures(n, result.as_mut_ptr());
-            return result;
         }
+        result
     }
 
     fn gen_vertex_arrays(&self, n: GLsizei) -> Vec<GLuint> {
+        let mut result = vec![0 as GLuint; n as usize];
         unsafe {
-            let mut result: Vec<_> = repeat(0 as GLuint).take(n as usize).collect();
             self.ffi_gl_.GenVertexArrays(n, result.as_mut_ptr());
-            return result;
         }
+        result
     }
 
     fn gen_queries(&self, n: GLsizei) -> Vec<GLuint> {
         if !self.ffi_gl_.GenQueriesEXT.is_loaded() {
             return Vec::new();
         }
-        let mut result = vec![0; n as usize];
+        let mut result = vec![0 as GLuint; n as usize];
         unsafe {
             self.ffi_gl_.GenQueriesEXT(n, result.as_mut_ptr());
         }
         result
     }
 
     fn begin_query(&self, target: GLenum, id: GLuint) {
         if !self.ffi_gl_.BeginQueryEXT.is_loaded() {
@@ -312,16 +327,38 @@ impl Gl for GlesFns {
 
     fn bind_attrib_location(&self, program: GLuint, index: GLuint, name: &str) {
         let c_string = CString::new(name).unwrap();
         unsafe {
             self.ffi_gl_.BindAttribLocation(program, index, c_string.as_ptr())
         }
     }
 
+    // https://www.khronos.org/registry/OpenGL-Refpages/es2.0/xhtml/glGetUniform.xml
+    fn get_uniform_iv(&self, program: GLuint, location: GLint) -> Vec<GLint> {
+        let uniform_type = self.get_active_uniform_type(program);
+        let len = get_uniform_iv_vector_length(&uniform_type);
+        let mut result: [GLint; 4] = [0; 4];
+        unsafe {
+            self.ffi_gl_.GetUniformiv(program, location, result.as_mut_ptr());
+        }
+        Vec::from(&result[0..len])
+    }
+
+    // https://www.khronos.org/registry/OpenGL-Refpages/es2.0/xhtml/glGetUniform.xml
+    fn get_uniform_fv(&self, program: GLuint, location: GLint) -> Vec<GLfloat> {
+        let uniform_type = self.get_active_uniform_type(program);
+        let len = get_uniform_fv_vector_length(&uniform_type);
+        let mut result: [GLfloat; 16] = [0.0; 16];
+        unsafe {
+            self.ffi_gl_.GetUniformfv(program, location, result.as_mut_ptr());
+        }
+        Vec::from(&result[0..len])
+    }
+
     fn get_uniform_block_index(&self, program: GLuint, name: &str) -> GLuint {
         let c_string = CString::new(name).unwrap();
         unsafe {
             self.ffi_gl_.GetUniformBlockIndex(program, c_string.as_ptr())
         }
     }
 
     fn get_uniform_indices(&self,  program: GLuint, names: &[&str]) -> Vec<GLuint> {
@@ -381,16 +418,22 @@ impl Gl for GlesFns {
     }
 
     fn bind_texture(&self, target: GLenum, texture: GLuint) {
         unsafe {
             self.ffi_gl_.BindTexture(target, texture);
         }
     }
 
+    fn draw_buffers(&self, bufs: &[GLenum]) {
+        unsafe {
+            self.ffi_gl_.DrawBuffers(bufs.len() as GLsizei, bufs.as_ptr());
+        }
+    }
+
     // FIXME: Does not verify buffer size -- unsafe!
     fn tex_image_2d(&self,
                     target: GLenum,
                     level: GLint,
                     internal_format: GLint,
                     width: GLsizei,
                     height: GLsizei,
                     border: GLint,
@@ -660,31 +703,55 @@ impl Gl for GlesFns {
         let mut result = 0;
         unsafe {
             self.ffi_gl_.GetInteger64i_v(name, index, &mut result);
         }
         result
     }
 
     fn get_boolean_v(&self, name: GLenum) -> GLboolean {
-        let mut result: GLboolean = 0 as GLboolean;
+        let mut result = 0 as GLboolean;
         unsafe {
             self.ffi_gl_.GetBooleanv(name, &mut result);
         }
         result
     }
 
     fn get_float_v(&self, name: GLenum) -> GLfloat {
-        let mut result: GLfloat = 0 as GLfloat;
+        let mut result = 0 as GLfloat;
         unsafe {
             self.ffi_gl_.GetFloatv(name, &mut result);
         }
         result
     }
 
+    fn get_framebuffer_attachment_parameter_iv(&self, target: GLenum, attachment: GLenum, pname: GLenum) -> GLint {
+        let mut result: GLint = 0;
+        unsafe {
+            self.ffi_gl_.GetFramebufferAttachmentParameteriv(target, attachment, pname, &mut result);
+        }
+        result
+    }
+
+    fn get_tex_parameter_iv(&self, target: GLenum, pname: GLenum) -> GLint {
+        let mut result: GLint = 0;
+        unsafe {
+            self.ffi_gl_.GetTexParameteriv(target, pname, &mut result);
+        }
+        result
+    }
+
+    fn get_tex_parameter_fv(&self, target: GLenum, pname: GLenum) -> GLfloat {
+        let mut result: GLfloat = 0.0;
+        unsafe {
+            self.ffi_gl_.GetTexParameterfv(target, pname, &mut result);
+        }
+        result
+    }
+
     fn tex_parameter_i(&self, target: GLenum, pname: GLenum, param: GLint) {
         unsafe {
             self.ffi_gl_.TexParameteri(target, pname, param);
         }
     }
 
     fn tex_parameter_f(&self, target: GLenum, pname: GLenum, param: GLfloat) {
         unsafe {
@@ -805,16 +872,24 @@ impl Gl for GlesFns {
     }
 
     fn viewport(&self, x: GLint, y: GLint, width: GLsizei, height: GLsizei) {
         unsafe {
             self.ffi_gl_.Viewport(x, y, width, height);
         }
     }
 
+    fn get_viewport(&self) -> (GLint, GLint, GLsizei, GLsizei) {
+        unsafe {
+            let mut ret = [0; 4];
+            self.ffi_gl_.GetIntegerv(ffi::VIEWPORT, ret.as_mut_ptr());
+            (ret[0], ret[1], ret[2], ret[3])
+        }
+    }
+
     fn scissor(&self, x: GLint, y: GLint, width: GLsizei, height: GLsizei) {
         unsafe {
             self.ffi_gl_.Scissor(x, y, width, height);
         }
     }
 
     fn line_width(&self, width: GLfloat) {
         unsafe {
@@ -1191,17 +1266,17 @@ impl Gl for GlesFns {
                                              indices.as_ptr(),
                                              pname,
                                              result.as_mut_ptr());
         }
         result
     }
 
     fn get_active_uniform_block_i(&self, program: GLuint, index: GLuint, pname: GLenum) -> GLint {
-        let mut result = 0;
+        let mut result = 0 as GLint;
         unsafe {
             self.ffi_gl_.GetActiveUniformBlockiv(program, index, pname, &mut result);
         }
         result
     }
 
     fn get_active_uniform_block_iv(&self, program: GLuint, index: GLuint, pname: GLenum) -> Vec<GLint> {
         let count = self.get_active_uniform_block_i(program, index, ffi::UNIFORM_BLOCK_ACTIVE_UNIFORMS);
@@ -1244,34 +1319,35 @@ impl Gl for GlesFns {
     fn get_uniform_location(&self, program: GLuint, name: &str) -> c_int {
         let name = CString::new(name).unwrap();
         unsafe {
             self.ffi_gl_.GetUniformLocation(program, name.as_ptr())
         }
     }
 
     fn get_program_info_log(&self, program: GLuint) -> String {
+        let max_len = self.get_program_iv(program, ffi::INFO_LOG_LENGTH);
+        let mut result = vec![0u8; max_len as usize];
+        let mut result_len = 0 as GLsizei;
         unsafe {
-            let mut result = vec![0u8; 1024];
-            let mut result_len: GLsizei = 0 as GLsizei;
             self.ffi_gl_.GetProgramInfoLog(program,
-                                           1024 as GLsizei,
+                                           max_len as GLsizei,
                                            &mut result_len,
                                            result.as_mut_ptr() as *mut GLchar);
-            result.truncate(if result_len > 0 {result_len as usize} else {0});
-            String::from_utf8(result).unwrap()
         }
+        result.truncate(if result_len > 0 {result_len as usize} else {0});
+        String::from_utf8(result).unwrap()
     }
 
     fn get_program_iv(&self, program: GLuint, pname: GLenum) -> GLint {
+        let mut result = 0 as GLint;
         unsafe {
-            let mut result: GLint = 0 as GLint;
             self.ffi_gl_.GetProgramiv(program, pname, &mut result);
-            return result;
         }
+        result
     }
 
     fn get_program_binary(&self, program: GLuint) -> (Vec<u8>, GLenum) {
         let len = self.get_program_iv(program, ffi::PROGRAM_BINARY_LENGTH);
         if len <= 0 {
             return (Vec::new(), NONE);
         }
         let mut binary: Vec<u8> = Vec::with_capacity(len as usize);
@@ -1303,58 +1379,59 @@ impl Gl for GlesFns {
 
     fn program_parameter_i(&self, program: GLuint, pname: GLenum, value: GLint) {
         unsafe {
             self.ffi_gl_.ProgramParameteri(program, pname, value);
         }
     }
 
     fn get_vertex_attrib_iv(&self, index: GLuint, pname: GLenum) -> GLint {
+        let mut result = 0 as GLint;
         unsafe {
-            let mut result: GLint = 0 as GLint;
             self.ffi_gl_.GetVertexAttribiv(index, pname, &mut result);
-            return result;
         }
+        result
     }
 
     fn get_vertex_attrib_fv(&self, index: GLuint, pname: GLenum) -> Vec<GLfloat> {
+        let mut result = vec![0 as GLfloat; 4];
         unsafe {
-            let mut result = vec![0 as GLfloat; 4];
             self.ffi_gl_.GetVertexAttribfv(index, pname, result.as_mut_ptr());
-            return result;
         }
+        result
     }
 
     fn get_vertex_attrib_pointer_v(&self, index: GLuint, pname: GLenum) -> GLsizeiptr {
         let mut result = 0 as *mut GLvoid;
         unsafe {
             self.ffi_gl_.GetVertexAttribPointerv(index, pname, &mut result)
         }
         result as GLsizeiptr
     }
 
     fn get_buffer_parameter_iv(&self, target: GLuint, pname: GLenum) -> GLint {
+        let mut result = 0 as GLint;
         unsafe {
-            let mut result: GLint = 0 as GLint;
             self.ffi_gl_.GetBufferParameteriv(target, pname, &mut result);
-            return result;
         }
+        result
     }
 
     fn get_shader_info_log(&self, shader: GLuint) -> String {
+        let max_len = self.get_shader_iv(shader, ffi::INFO_LOG_LENGTH);
+        let mut result = vec![0u8; max_len as usize];
+        let mut result_len = 0 as GLsizei;
         unsafe {
-            let mut result = vec![0u8; 1024];
-            let mut result_len: GLsizei = 0 as GLsizei;
             self.ffi_gl_.GetShaderInfoLog(shader,
-                                          1024 as GLsizei,
+                                          max_len as GLsizei,
                                           &mut result_len,
                                           result.as_mut_ptr() as *mut GLchar);
-            result.truncate(if result_len > 0 {result_len as usize} else {0});
-            String::from_utf8(result).unwrap()
         }
+        result.truncate(if result_len > 0 {result_len as usize} else {0});
+        String::from_utf8(result).unwrap()
     }
 
     fn get_string(&self, which: GLenum) -> String {
         unsafe {
             let llstr = self.ffi_gl_.GetString(which);
             if !llstr.is_null() {
                 return str::from_utf8_unchecked(CStr::from_ptr(llstr as *const c_char).to_bytes()).to_string();
             } else {
@@ -1370,21 +1447,21 @@ impl Gl for GlesFns {
                 str::from_utf8_unchecked(CStr::from_ptr(llstr as *const c_char).to_bytes()).to_string()
             } else {
                 "".to_string()
             }
         }
     }
 
     fn get_shader_iv(&self, shader: GLuint, pname: GLenum) -> GLint {
+        let mut result = 0 as GLint;
         unsafe {
-            let mut result: GLint = 0 as GLint;
             self.ffi_gl_.GetShaderiv(shader, pname, &mut result);
-            return result;
         }
+        result
     }
 
     fn get_shader_precision_format(&self,
                                    shader_type: GLuint,
                                    precision_type: GLuint)
                                    -> (GLint, GLint, GLint) {
         let mut range = [0 as GLint, 0];
         let mut precision = 0 as GLint;
@@ -1628,10 +1705,84 @@ impl Gl for GlesFns {
 
     fn get_frag_data_index(
         &self,
         _program: GLuint,
         _name: &str,
     ) -> GLint {
         panic!("not supported");
     }
+
+    fn alias_point_size_range(&self) -> (GLfloat, GLfloat) {
+        unsafe {
+            let mut ret = [0.; 2];
+            self.ffi_gl_.GetFloatv(ffi::ALIASED_POINT_SIZE_RANGE, ret.as_mut_ptr());
+            (ret[0], ret[1])
+        }
+    }
+
+    fn max_viewport_dims(&self) -> (GLint, GLint) {
+        unsafe {
+            let mut ret = [0; 2];
+            self.ffi_gl_.GetIntegerv(ffi::MAX_VIEWPORT_DIMS, ret.as_mut_ptr());
+            (ret[0], ret[1])
+        }
+    }
+
+    // GL_KHR_debug
+    fn get_debug_messages(&self) -> Vec<DebugMessage> {
+        if !self.ffi_gl_.GetDebugMessageLog.is_loaded() {
+            return Vec::new();
+        }
+
+        let mut max_message_len = 0;
+        unsafe {
+            self.ffi_gl_.GetIntegerv(
+                ffi::MAX_DEBUG_MESSAGE_LENGTH,
+                &mut max_message_len
+            )
+        }
+
+        let mut output = Vec::new();
+        const CAPACITY: usize = 4;
+
+        let mut msg_data = vec![0u8; CAPACITY * max_message_len as usize];
+        let mut sources = [0 as GLenum; CAPACITY];
+        let mut types = [0 as GLenum; CAPACITY];
+        let mut severities = [0 as GLenum; CAPACITY];
+        let mut ids = [0 as GLuint; CAPACITY];
+        let mut lengths = [0 as GLsizei; CAPACITY];
+
+        loop {
+            let count = unsafe {
+                self.ffi_gl_.GetDebugMessageLog(
+                    CAPACITY as _,
+                    msg_data.len() as _,
+                    sources.as_mut_ptr(),
+                    types.as_mut_ptr(),
+                    ids.as_mut_ptr(),
+                    severities.as_mut_ptr(),
+                    lengths.as_mut_ptr(),
+                    msg_data.as_mut_ptr() as *mut _,
+                )
+            };
+
+            let mut offset = 0;
+            output.extend((0 .. count as usize).map(|i| {
+                let len = lengths[i] as usize;
+                let slice = &msg_data[offset .. offset + len];
+                offset += len;
+                DebugMessage {
+                    message: String::from_utf8_lossy(slice).to_string(),
+                    source: sources[i],
+                    ty: types[i],
+                    id: ids[i],
+                    severity: severities[i],
+                }
+            }));
+
+            if (count as usize) < CAPACITY {
+                return output
+            }
+        }
+    }
 }
 
--- a/third_party/rust/khronos_api/.cargo-checksum.json
+++ b/third_party/rust/khronos_api/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{"Cargo.toml":"b66b03a3e075e128ad40dc3d3d62c38ea14c47257634b8a012d99965e5071ddd","README.md":"dff09e27dcecc37f1e477d62ea89aa49b4dc743514ea6990c7c83b8b0fc602e4","api/xml/gl.xml":"5c3d768a361dc998b3497e93c1e0d837615c942ab82ff17dfeed8c1917b74bbb","api/xml/glx.xml":"1862e651300ae36fa6621b23910f55f63f29cd3550c114312be27c204e9828c5","api/xml/wgl.xml":"27fdf88d0f9fae2b025820f28ee3cb67dfc0388e68532a135ca7043db0427a35","api_egl/api/egl.xml":"7b20c062af2fda6dd340f4d03983c49204d75067ed161f10f671c805ace692f7","src/lib.rs":"9ff0a4ccce8f3fca7b2c6340a42d8b0f2f52f30ccae28db5a86be10c4341ca01"},"package":"d867c645cfeb8a7fec503731679eac03ac11b7105aa5a71cb8f8ee5271636add"}
\ No newline at end of file
+{"files":{"Cargo.toml":"e0120828d1aa70c40f47a6c7dc0cc08e089470d8faf8644e68836c31f44248b3","README.md":"45772358ebfb8a7554056ce7faab27c3dc73d881ba4be66891d39e4830657877","api/xml/gl.xml":"5c3d768a361dc998b3497e93c1e0d837615c942ab82ff17dfeed8c1917b74bbb","api/xml/glx.xml":"1862e651300ae36fa6621b23910f55f63f29cd3550c114312be27c204e9828c5","api/xml/wgl.xml":"27fdf88d0f9fae2b025820f28ee3cb67dfc0388e68532a135ca7043db0427a35","api_egl/api/egl.xml":"7b20c062af2fda6dd340f4d03983c49204d75067ed161f10f671c805ace692f7","api_webgl/extensions/ANGLE_instanced_arrays/extension.xml":"213f7e7636e8df0c390a18ad1339618335d7744970837998a191c275f7d1a95c","api_webgl/extensions/EXT_blend_minmax/extension.xml":"d1798c0faf13dfa7930032994f5a47c07b6f2f44b45d033059bfcffb7c1d579c","api_webgl/extensions/EXT_color_buffer_float/extension.xml":"48dacbcce0e0e96c206fc6dd2050266680ba24c2f6b254c3a6871c8715639d36","api_webgl/extensions/EXT_color_buffer_half_float/extension.xml":"1900351880046b495af97e6d38e9f3213538b133f74625a4dd73165d43e7710c","api_webgl/extensions/EXT_disjoint_timer_query/extension.xml":"b4df1205df86474e27459dc1cea3c75cba533d0245c38bb3ea5fe608612c512b","api_webgl/extensions/EXT_disjoint_timer_query_webgl2/extension.xml":"09cf6ddc69af0a032a5712df3808be30ff5fecaea0080ec73f464b87e4b3a313","api_webgl/extensions/EXT_float_blend/extension.xml":"5a298482adee7bb1fcc8f613a8aa9b61bb71bf5523fac56da45bb68136e451b8","api_webgl/extensions/EXT_frag_depth/extension.xml":"d19cf823811272352972ac4cb1d37405dcf63a91c48c1dd046e475487fecf9ea","api_webgl/extensions/EXT_sRGB/extension.xml":"7688ba25fa05558fbae72b21661e5bece2c36e899fe78da83bc8a172db9622fd","api_webgl/extensions/EXT_shader_texture_lod/extension.xml":"f1e5741d5d12d6e9a6bbc95049da2ec62ee55a4d1b6ec7b03e87e9f91282c6cb","api_webgl/extensions/EXT_texture_filter_anisotropic/extension.xml":"131ed0429a9951c05ae5c30859179f47c99b9bd6f47ca2825bdecf791f0188b6","api_webgl/extensions/OES_element_index_uint/extension.xml":"734f7a90af440ea559fa0fe777144aaef8acc7de94a8c3ce153a75ff85cb1f6b","api_webgl/extensions/OES_fbo_render_mipmap/extension.xml":"43bede667b814b80e15b5af463620c53f6fa9e1a610c2e9756ad2fa55b9f7589","api_webgl/extensions/OES_standard_derivatives/extension.xml":"2fa53259457d9f6042194bfb13c0db4b3c63d2d99d9e44f057d8fe4d5b28fe69","api_webgl/extensions/OES_texture_float/extension.xml":"42a782fcc2cafd3df9ea33c9259343c66b3fbd2ebfc216dc20ee6be53481f042","api_webgl/extensions/OES_texture_float_linear/extension.xml":"98041c4427f5abf741eb2c34e23f9b8c84090d4d5b4e2e0f1b04f9b53c73259a","api_webgl/extensions/OES_texture_half_float/extension.xml":"14cb4ce4e6f259fcb6ce0d988c4e81880299f28343cdcba4f7abbf8956207529","api_webgl/extensions/OES_texture_half_float_linear/extension.xml":"d2f29c9a9bf31e757fc8c6da277cdb813350a1504be773c3bd105bfa92e45502","api_webgl/extensions/OES_vertex_array_object/extension.xml":"8262ec860c2af3b23daacc27a17bcf29054bcc03baf59f90779c4e53fc469f41","api_webgl/extensions/WEBGL_color_buffer_float/extension.xml":"d68800fe416384a951fe45fdbcb324494d848cbecdecbdcacf7bbafe8a2aae93","api_webgl/extensions/WEBGL_compressed_texture_astc/extension.xml":"9ba9c29e7e09aa8ec950ec70c79eae42c6f844d354b49fc88d9f048318a9c400","api_webgl/extensions/WEBGL_compressed_texture_atc/extension.xml":"a8de4e909b3d7c29ff6ca58ff6bc91b14c298a12beded04c025bb0ecb1d74db2","api_webgl/extensions/WEBGL_compressed_texture_etc/extension.xml":"d926f0a7f533ea6ce43215a7e90f35064e1a51df539e04c49a2e918f69943aad","api_webgl/extensions/WEBGL_compressed_texture_etc1/extension.xml":"02a008b04a5b40e274023defe3a2fb94f06a2150c059ae703c282faa6b6b4b0e","api_webgl/extensions/WEBGL_compressed_texture_pvrtc/extension.xml":"1570f8ebb56480908e46706683182a097928e8e0a2e992e3eab8f1a2c16124c9","api_webgl/extensions/WEBGL_compressed_texture_s3tc/extension.xml":"87585ba713ad1a8dd5c04fd24a7068a0cf88799ea697e940752c68698de0c707","api_webgl/extensions/WEBGL_compressed_texture_s3tc_srgb/extension.xml":"e22e01bd35b437adabfc7592f5eb6d750fdaabac61b0f79561fe58e860843993","api_webgl/extensions/WEBGL_debug_renderer_info/extension.xml":"af71073e0031b0296b7e5b609cdd272458cbae434a7fa31649054be0969a72e0","api_webgl/extensions/WEBGL_debug_shaders/extension.xml":"fc8c59747ee8cc289aa269c6ac5b6a45f7dc036d509209ace8db7062481a1abe","api_webgl/extensions/WEBGL_depth_texture/extension.xml":"5d91c9b8252b9f3a19f3f6a2f861a660d200446cfcaf09fa2a337e6f6b2dd5bd","api_webgl/extensions/WEBGL_draw_buffers/extension.xml":"9b465aa066d86ba044ad1604f6a3ce9f9e9a3afe3b4d36750a60870a67697fa1","api_webgl/extensions/WEBGL_get_buffer_sub_data_async/extension.xml":"abea14f4cb2012a04db6edc1219ad3da97bfc0975c4756f9d61ab3378a283cae","api_webgl/extensions/WEBGL_lose_context/extension.xml":"71defc6045fefdf7b14cd2d1fe4a432d504b2567e7acb1e77b8737aea7ba1bb0","api_webgl/extensions/WEBGL_multiview/extension.xml":"ac8368b843bb76afb9a82460ef619aa278be180f285964070ccedcd66213f0e0","api_webgl/extensions/WEBGL_security_sensitive_resources/extension.xml":"99634c2e0117d7abb9b44bbd64d8c4e8c8ebbcfe6342222dfc624b05e8532249","api_webgl/extensions/WEBGL_shared_resources/extension.xml":"90b6f51521fbb2ba23563cdfd2029cf28de1233aba4b2844b7d832b323c0fa10","api_webgl/extensions/proposals/EXT_clip_cull_distance/extension.xml":"a4f9b465b1e1efa0367a8fbbada7a6156ffb3e4ee1c677a0d220a7ea1402a260","api_webgl/extensions/proposals/WEBGL_debug/extension.xml":"c8cdbb65c17dfe4851e7a56094c492b835f76f06a9cdb1b3fd273584357864b1","api_webgl/extensions/proposals/WEBGL_dynamic_texture/extension.xml":"7f5bc906ba61037befd4acd9fc39209d2e4bd8eea20ba01f34ebe4700bfd1806","api_webgl/extensions/proposals/WEBGL_subarray_uploads/extension.xml":"87cde732f220d4b54faaef1e6d5efc6174849c1b54983908084659f525c7f40f","api_webgl/extensions/proposals/WEBGL_texture_multisample/extension.xml":"338f0fc6f62bf875a0f7b19e4c284ed48e5a76e791e55414843659cf402636da","api_webgl/extensions/proposals/WEBGL_texture_source_iframe/extension.xml":"378beada6abe201a0ebdb68a3935e8bf27f620ae2653d696a38df9e499808eda","api_webgl/extensions/proposals/WEBGL_video_texture/extension.xml":"b9e0ffa1cf37c827b9be82d71adcd40ce44d05e434a87d174b289c7a5b9d30b0","api_webgl/extensions/rejected/EXT_texture_storage/extension.xml":"9fb3883d1b6d73e09b03129a30845031e0b27c9003b9fb0e2f2b2b2d5a9dbb1e","api_webgl/extensions/rejected/OES_depth24/extension.xml":"159c541fc025c3d454887cdedd1ff5c19ed17e9356c63d95510d70c586502af7","api_webgl/extensions/rejected/WEBGL_debug_shader_precision/extension.xml":"f618d6f82e21cf78146e86c396a3d7b3dd51cf778ab2dc7a504834d835abc5c8","api_webgl/extensions/rejected/WEBGL_draw_elements_no_range_check/extension.xml":"a3a616760a9cca44ecca27e8a8afd49679974f1bf0dfd4624231bcffaf4aec54","api_webgl/extensions/rejected/WEBGL_subscribe_uniform/extension.xml":"7ec77103308177cdfa0efbc995f62151622c30bab46a4ee191e04520c51965ae","api_webgl/extensions/rejected/WEBGL_texture_from_depth_video/extension.xml":"eabf2a9003050f8ef5ceb4d5cc0fafc98977aef407fb4060d08d704884a3d462","api_webgl/extensions/template/extension.xml":"8da65e0a5d053bf36373c6fcfdf7d8fa2738c48345671cf61b62e30ba9cce117","api_webgl/specs/latest/1.0/webgl.idl":"9ffefd8ed7b99053f0db70966749e8f3d6398e1393367f2772dda6325daf3db8","api_webgl/specs/latest/2.0/webgl2.idl":"121a6d79dae3ce4483b60cf26ee2dbca2e402ad19658c0ba951a5726d49aed22","build.rs":"28156f946b5f8b2ac39237d8ff9070bae75eb0f8f6ac66e5df9c6a0998784d2b","src/lib.rs":"7f1378f4337b537d46a8d67f7224b2c2cc50a633d0326692711e3514374799f4"},"package":"037ab472c33f67b5fbd3e9163a2645319e5356fcd355efa6d4eb7fff4bbcb554"}
\ No newline at end of file
--- a/third_party/rust/khronos_api/Cargo.toml
+++ b/third_party/rust/khronos_api/Cargo.toml
@@ -7,19 +7,19 @@
 #
 # If you believe there's an error in this file please file an
 # issue against the rust-lang/cargo repository. If you're
 # editing this file be aware that the upstream Cargo.toml
 # will likely look very different (and much more reasonable)
 
 [package]
 name = "khronos_api"
-version = "2.0.0"
+version = "2.2.0"
 authors = ["Brendan Zabarauskas <bjzaba@yahoo.com.au>", "Corey Richardson", "Arseny Kapoulkine", "Pierre Krieger <pierre.krieger1708@gmail.com>"]
-include = ["/README.md", "/src/**/*", "/Cargo.toml", "/api/xml/**/*.xml", "/api_egl/api/**/*.xml"]
+include = ["/README.md", "/src/**/*", "/Cargo.toml", "/build.rs", "/api/xml/**/*.xml", "/api_egl/api/**/*.xml", "/api_webgl/specs/latest/**/*.idl", "/api_webgl/extensions/**/extension.xml"]
 description = "The Khronos XML API Registry, exposed as byte string constants."
 homepage = "https://github.com/brendanzab/gl-rs/khronos_api/"
 documentation = "https://docs.rs/khronos_api"
 readme = "README.md"
 keywords = ["gl", "egl", "opengl", "khronos"]
 categories = ["rendering::graphics-api"]
 license = "Apache-2.0"
 repository = "https://github.com/brendanzab/gl-rs/"
--- a/third_party/rust/khronos_api/README.md
+++ b/third_party/rust/khronos_api/README.md
@@ -12,15 +12,18 @@ khronos_api = "1.0.0"
 ```
 
 The following constants are provided:
 
 - `GL_XML`: the contents of [`gl.xml`](https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/api/gl.xml)
 - `EGL_XML`: the contents of [`egl.xml`](https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/api/egl.xml)
 - `WGL_XML`: the contents of [`wgl.xml`](https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/api/wgl.xml)
 - `GLX_XML`: the contents of [`glx.xml`](https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/api/glx.xml)
+- `WEBGL_IDL`: the contents of [`webgl.idl`](https://raw.githubusercontent.com/KhronosGroup/WebGL/master/specs/latest/1.0/webgl.idl)
+- `WEBGL2_IDL`: the contents of [`webgl2.idl`](https://raw.githubusercontent.com/KhronosGroup/WebGL/master/specs/latest/2.0/webgl2.idl)
+- `WEBGL_EXT_XML`: the contents of the WebGL extension XML files
 
 ## Changelog
 
 ### v1.0.0
 
 - Initial release
 - Documentation improvements
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/ANGLE_instanced_arrays/extension.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0"?>
+<ratified href="ANGLE_instanced_arrays/">
+  <name>ANGLE_instanced_arrays</name>
+  <contact>
+    <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a> (public_webgl 'at' khronos.org)
+  </contact>
+  <contributors>
+    <contributor>Contributors to ANGLE_instanced_arrays</contributor>
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+  <number>19</number>
+  <depends>
+    <api version="1.0"/>
+    <core version="2.0" />
+  </depends>
+  <overview>
+    <mirrors href="http://www.khronos.org/registry/gles/extensions/ANGLE/ANGLE_instanced_arrays.txt" name="ANGLE_instanced_arrays">
+      <addendum>
+        The implementation must validate the indices referenced by <code>drawArraysInstancedANGLE</code> and <code>drawElementsInstancedANGLE</code>
+        similarly to how indices referenced by <code>drawArrays</code> and <code>drawElements</code> are validated according to section
+        <a href="http://www.khronos.org/registry/webgl/specs/1.0/#ATTRIBS_AND_RANGE_CHECKING">Enabled Vertex Attributes and Range Checking</a> of the
+        WebGL specification.
+      </addendum>
+    </mirrors>
+    <p>
+      Although the extension contains ANGLE in the name it may be exposed by any implementation, whether or not the implementation uses the ANGLE library.
+    </p>
+  </overview>
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface ANGLE_instanced_arrays {
+    const GLenum VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88FE;
+    void drawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+    void drawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei primcount);
+    void vertexAttribDivisorANGLE(GLuint index, GLuint divisor); 
+};
+  </idl>
+  <issues>
+    <p>How does ANGLE_instanced_arrays interact with OES_vertex_array_object?</p>
+    <ul>
+      <li>
+        <p>RESOLVED: When the ANGLE_instanced_arrays and OES_vertex_array_object
+        extensions are both enabled, attribute divisors are tracked by the
+        vertex array objects like any other vertex array state.
+        </p>
+      </li>
+    </ul>
+  </issues>
+  <history>
+    <revision date="2012/03/06">
+      <change>Initial revision.</change>
+    </revision>
+    <revision date="2013/01/26">
+      <change>Moved from proposal to draft.</change>
+    </revision>
+    <revision date="2013/03/11">
+      <change>Renumbered to 19 to fix misnumbering problem.</change>
+    </revision>
+    <revision date="2013/08/06">
+      <change>Moved to community approved.</change>
+    </revision>
+    <revision date="2013/08/22">
+      <change>Clarified non-ANGLE support.</change>
+    </revision>
+    <revision date="2014/03/13">
+      <change>Addendum about index validation.</change>
+    </revision>
+    <revision date="2014/07/15">
+      <change>Added NoInterfaceObject extended attribute.</change>
+    </revision>
+    <revision date="2014/08/08">
+      <change>Ratified by Khronos Board of Promoters.</change>
+    </revision>
+    <revision date="2015/09/23">
+      <change>Clarified interaction with OES_vertex_array_object.</change>
+    </revision>
+  </history>
+</ratified>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/EXT_blend_minmax/extension.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ratified href="EXT_blend_minmax/">
+  <name>EXT_blend_minmax</name>
+
+  <contact> <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL
+  working group</a> (public_webgl 'at' khronos.org) </contact>
+
+  <contributors>
+    <contributor>Florian Boesch (pyalot 'at' gmail.com)</contributor>
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+
+  <number>25</number>
+
+  <depends>
+    <api version="1.0"/>
+    <core version="2.0" />
+  </depends>
+
+  <overview>
+    <mirrors href="http://www.khronos.org/registry/gles/extensions/EXT/blend_minmax.txt"
+             name="EXT_blend_minmax">
+    </mirrors>
+
+    <features>
+      <feature>
+        The <code>blendEquation</code> and <code>blendEquationSeparate</code>
+        entry points are extended to accept <code>MIN_EXT</code> and <code>MAX_EXT</code>
+      </feature>
+    </features>
+  </overview>
+
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface EXT_blend_minmax {
+  const GLenum MIN_EXT = 0x8007;
+  const GLenum MAX_EXT = 0x8008;
+};
+  </idl>
+
+  <samplecode xml:space="preserve">
+    <pre>
+        var ext = gl.getExtension('EXT_blend_minmax');
+        gl.blendEquation(ext.MAX_EXT);
+        gl.getParameter(gl.BLEND_EQUATION) == ext.MAX_EXT;
+    </pre>
+  </samplecode>
+
+  <history>
+    <revision date="2012/12/12">
+      <change>Initial revision.</change>
+    </revision>
+    <revision date="2014/02/12">
+      <change>Moved to draft.</change>
+    </revision>
+    <revision date="2014/05/12">
+      <change>Removed blendEquationEXT function and the BLEND_EQUATION_EXT and
+        FUNC_ADD_EXT enums, all of which are already have equivalents in WebGL.</change>
+    </revision>
+    <revision date="2014/06/27">
+      <change>Moved to community approved after discussion on public_webgl list.</change>
+    </revision>
+    <revision date="2014/07/15">
+      <change>Added NoInterfaceObject extended attribute.</change>
+    </revision>
+    <revision date="2015/05/29">
+      <change>Ratified by Khronos Board of Promoters.</change>
+    </revision>
+  </history>
+</ratified>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/EXT_color_buffer_float/extension.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<extension href="EXT_color_buffer_float/">
+  <name>EXT_color_buffer_float</name>
+
+  <contact> <a href="https://www.khronos.org/webgl/public-mailing-list">WebGL
+  working group</a> (public_webgl 'at' khronos.org) </contact>
+
+  <contributors>
+    <contributor>Mark Callow, HI Corporation</contributor>
+
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+
+  <number>31</number>
+
+  <depends>
+    <api version="2.0"/>
+  </depends>
+
+  <overview>
+    <mirrors href="http://www.khronos.org/registry/gles/extensions/EXT/EXT_color_buffer_float.txt"
+             name="EXT_color_buffer_float">
+      <addendum>
+        The sized internal format <code>RGB16F</code> is not color-renderable in this
+        extension. This is a difference in functionality compared to the <a
+        href="../EXT_color_buffer_half_float">EXT_color_buffer_half_float</a> extension.
+      </addendum>
+    </mirrors>
+
+    <features>
+      <feature>
+        <p>The following floating-point internal formats become <span
+        style="font-style: italic">color-renderable</span>: <code>R16F</code>,
+        <code>RG16F</code>, <code>RGBA16F</code>, <code>R32F</code>,
+        <code>RG32F</code>, <code>RGBA32F</code> and
+        <code>R11F_G11F_B10F</code>. A renderbuffer or a texture with a
+        color-renderable internal format can be used as a rendering target by
+        attaching it to a framebuffer object as a color attachment.</p>
+      </feature>
+
+      <feature>
+        <p>Renderbuffers with these internal formats can be created.</p>
+      </feature>
+
+      <feature>
+        <p>The format and type combination <code>RGBA</code> and
+        <code>FLOAT</code> becomes valid for reading from a floating-point
+        color buffer.</p>
+      </feature>
+    </features>
+
+    <p>Notes: <ul style="list-style-type: circle">
+        <li>Fragment shader outputs to buffers with these internal formats are
+        not clamped.</li>
+
+        <li>Colors specified with <code>clearColor</code> and
+        <code>blendColor</code> are not clamped when applied to buffers with
+        these internal formats.</li>
+
+        <li>The format and type combination <code>RGBA</code> and
+        <code>UNSIGNED_BYTE</code> cannot be used for reading from a
+        floating-point color buffer.</li>
+
+        <li>Multi-sample floating-point color renderbuffers may optionally be supported. Limitations
+        are defined in the <a
+        href="http://www.khronos.org/registry/gles/extensions/EXT/EXT_color_buffer_float.txt">EXT_color_buffer_float</a>
+        extension.</li>
+
+        <li>The sized internal format <code>RGB16F</code> is not color-renderable in this
+        extension.</li>
+      </ul></p>
+  </overview>
+
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface EXT_color_buffer_float {
+}; // interface EXT_color_buffer_float
+</idl>
+
+  <history>
+    <revision date="2012/11/08">
+      <change>Initial revision.</change>
+    </revision>
+
+    <revision date="2014/07/15">
+      <change>Added NoInterfaceObject extended attribute.</change>
+    </revision>
+
+    <revision date="2014/10/29">
+      <change>Moved to draft status.</change>
+    </revision>
+
+    <revision date="2016/04/14">
+      <change>Moved to community approved status.</change>
+    </revision>
+
+    <revision date="2016/06/16">
+      <change>Added note about RGB16F not being color-renderable.</change>
+    </revision>
+
+    <revision date="2016/07/21">
+      <change>Allowed allocation of multi-sample floating-point color renderbuffers as optional functionality.</change>
+      <change>Changed XML tags to fix incorrect statement that there are no behavioral changes compared to the native extension.</change>
+    </revision>
+
+    <revision date="2016/08/03">
+      <change>Removed incorrect statement about framebuffer completeness and multi-sampled floating-point color renderbuffers.</change>
+    </revision>
+
+    <revision date="2017/04/19">
+      <change>Allowed these float formats for CopyTexImage2D.</change>
+    </revision>
+  </history>
+</extension>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/EXT_color_buffer_half_float/extension.xml
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<extension href="EXT_color_buffer_half_float/">
+  <name>EXT_color_buffer_half_float</name>
+
+  <contact> <a href="https://www.khronos.org/webgl/public-mailing-list">WebGL
+  working group</a> (public_webgl 'at' khronos.org) </contact>
+
+  <contributors>
+    <contributor>Mark Callow, HI Corporation</contributor>
+
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+
+  <number>14</number>
+
+  <depends>
+    <api version="1.0"/>
+
+    <ext name="OES_texture_half_float" require="true"/>
+
+    <subsumed version="2.0" by="EXT_color_buffer_float" />
+  </depends>
+
+  <overview>
+    <mirrors href="http://www.khronos.org/registry/gles/extensions/EXT/EXT_color_buffer_half_float.txt"
+             name="EXT_color_buffer_half_float">
+      <addendum>
+        <p>All references to <code>R16F</code> and <code>RG16F</code> types
+        are ignored.</p>
+      </addendum>
+      <addendum>
+	<p>WebGL implementations supporting this extension are required to
+	support rendering to <code>RGBA16F</code> format.</p>
+      </addendum>
+    </mirrors>
+
+    <features>
+      <feature>
+        <p>The 16-bit floating-point types <code>RGB16F</code> and
+        <code>RGBA16F</code> become available as color-renderable formats.
+        Renderbuffers can be created in these formats. These and textures
+        created with <code>type = HALF_FLOAT_OES</code>, which will have one
+        of these internal formats, can be attached to framebuffer object color
+        attachments for rendering. Implementations supporting this extension are
+	required to support rendering to <code>RGBA16F</code> format.
+	Applications must check framebuffer completeness to determine if
+	<code>RGB16F</code> is supported.</p>
+      </feature>
+
+      <feature>
+        <p><span style="color: red">NOTE:</span> fragment shaders outputs
+        gl_FragColor and gl_FragData[0] will only be clamped and converted
+        when the color buffer is fixed-point and <code>blendColor()</code> and
+        <code>clearColor()</code> will no longer clamp their parameter values
+        on input. Clamping will be applied as necessary at draw time according
+        to the type of color buffer in use.</p>
+      </feature>
+
+      <feature>
+        <p>The format and type combination <code>RGBA</code> and
+        <code>FLOAT</code> becomes valid for reading from a floating-point
+        rendering buffer. Note: <code>RGBA</code> and
+        <code>UNSIGNED_BYTE</code> cannot be used for reading from a
+        floating-point rendering buffer.</p>
+      </feature>
+
+      <feature>
+        <p>The component types of framebuffer object attachments can be
+        queried.</p>
+      </feature>
+    </features>
+  </overview>
+
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface EXT_color_buffer_half_float {
+  const GLenum RGBA16F_EXT = 0x881A;
+  const GLenum RGB16F_EXT = 0x881B;
+  const GLenum FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211;
+  const GLenum UNSIGNED_NORMALIZED_EXT = 0x8C17;
+}; // interface EXT_color_buffer_half_float
+  </idl>
+
+  <additions>
+    <p>In section 5.13.12 <cite>Reading back pixels</cite>, change the allowed
+    format and types table to:</p>
+
+    <dl class="methods">
+      <dd>
+        <table>
+          <tbody>
+            <tr>
+              <th>frame buffer type</th>
+              <th>
+                <code>format</code>
+              </th>
+              <th>
+                <code>type</code>
+              </th>
+            </tr>
+
+            <tr>
+              <td>normalized fixed-point</td>
+              <td>RGBA</td>
+              <td>UNSIGNED_BYTE</td>
+            </tr>
+
+            <tr>
+              <td>floating-point</td>
+              <td>RGBA</td>
+              <td>FLOAT</td>
+            </tr>
+          </tbody>
+        </table>
+      </dd>
+    </dl>
+
+    <p>Change the paragraph beginning "If <code>pixels</code> is null ..."
+    to</p><blockquote>If frame buffer type is not that indicated in the table for
+    the <code>format</code> and <code>type</code> combination, an
+    INVALID_OPERATON error is generated. If pixels is null
+    ...</blockquote>
+  </additions>
+
+  <history>
+    <revision date="2012/11/08">
+      <change>Initial revision.</change>
+    </revision>
+
+    <revision date="2012/11/13">
+      <change>"Add reading-pixels-as-FLOAT feature to the Overview and related
+      changes to WebGL section 5.13.12.</change>
+    </revision>
+
+    <revision date="2012/11/26">
+      <change>Move to draft.</change>
+    </revision>
+
+    <revision date="2014/07/15">
+      <change>Removed webgl module. Added NoInterfaceObject extended attribute.</change>
+    </revision>
+
+    <revision date="2014/11/24">
+      <change>Move to community approved.</change>
+    </revision>
+
+    <revision date="2016/05/05">
+      <change>Subsumed in WebGL 2.0 by EXT_color_buffer_float.</change>
+    </revision>
+
+    <revision date="2017/09/14">
+      <change>Require RGBA16F to be color-renderable and RGB16F to be optionally color-renderable.</change>
+    </revision>
+  </history>
+</extension>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/EXT_disjoint_timer_query/extension.xml
@@ -0,0 +1,358 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<extension href="EXT_disjoint_timer_query/">
+  <name>EXT_disjoint_timer_query</name>
+
+  <contact> <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL
+  working group</a> (public_webgl 'at' khronos.org) </contact>
+
+  <contributors>
+    <contributor>Contributors to ARB_occlusion_query</contributor>
+    <contributor>Contributors to EXT_timer_query</contributor>
+    <contributor>Contributors to ARB_timer_query</contributor>
+    <contributor>Ben Vanik, Google Inc.</contributor>
+    <contributor>Daniel Koch, TransGaming Inc.</contributor>
+    <contributor>Florian Boesch (pyalot 'at' gmail.com)</contributor>
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+
+  <number>26</number>
+
+  <depends>
+    <api version="1.0"/>
+  </depends>
+
+  <overview>
+    <mirrors href="http://www.khronos.org/registry/gles/extensions/EXT/EXT_disjoint_timer_query.txt"
+             name="EXT_disjoint_timer_query">
+      <addendum>
+        Specifies that queries' results only become available at certain well-defined times.
+      </addendum>
+    </mirrors>
+
+    <features>
+      <feature>
+        This extension provides a query mechanism that can be used to determine
+        the amount of time it takes to fully complete a set of GL commands, and
+        without stalling the rendering pipeline.  It uses the query object
+        mechanisms first introduced in the occlusion query extension, which allow
+        time intervals to be polled asynchronously by the application.
+      </feature>
+      <feature>
+        This version of the disjoint_timer_query extension is exposed
+        only on on WebGL 1.0 contexts. See the _webgl2 version of the
+        extension for how it is exposed on WebGL 2.0 contexts.
+      </feature>
+    </features>
+  </overview>
+
+  <idl xml:space="preserve">
+typedef unsigned long long GLuint64EXT;
+
+[NoInterfaceObject]
+interface WebGLTimerQueryEXT : WebGLObject {
+};
+
+[NoInterfaceObject]
+interface EXT_disjoint_timer_query {
+  const GLenum QUERY_COUNTER_BITS_EXT      = 0x8864;
+  const GLenum CURRENT_QUERY_EXT           = 0x8865;
+  const GLenum QUERY_RESULT_EXT            = 0x8866;
+  const GLenum QUERY_RESULT_AVAILABLE_EXT  = 0x8867;
+  const GLenum TIME_ELAPSED_EXT            = 0x88BF;
+  const GLenum TIMESTAMP_EXT               = 0x8E28;
+  const GLenum GPU_DISJOINT_EXT            = 0x8FBB;
+
+  WebGLTimerQueryEXT? createQueryEXT();
+  void deleteQueryEXT(WebGLTimerQueryEXT? query);
+  [WebGLHandlesContextLoss] boolean isQueryEXT(WebGLTimerQueryEXT? query);
+  void beginQueryEXT(enum target, WebGLTimerQueryEXT query);
+  void endQueryEXT(enum target);
+  void queryCounterEXT(WebGLTimerQueryEXT query, enum target);
+  any getQueryEXT(enum target, enum pname);
+  any getQueryObjectEXT(WebGLTimerQueryEXT query, enum pname);
+};
+  </idl>
+
+  <newfun>
+    <function name="createQueryEXT" type="WebGLTimerQueryEXT?">
+    </function>
+  </newfun>
+
+  <newfun>
+    <function name="deleteQueryEXT" type="void">
+      <param name="query" type="WebGLTimerQueryEXT?"/>
+    </function>
+  </newfun>
+
+  <newfun>
+    <function name="isQueryEXT" type="boolean">
+      <param name="query" type="WebGLTimerQueryEXT?"/>
+      Returns true if the passed WebGLTimerQueryEXT is valid and false otherwise. Returns false if
+      the query's <a
+      href="http://www.khronos.org/registry/webgl/specs/1.0.1/#webgl-object-invalidated-flag">invalidated
+      flag</a> is set.
+    </function>
+  </newfun>
+
+  <newfun>
+    <function name="beginQueryEXT" type="void">
+      <param name="target" type="GLenum"/>
+      <param name="query" type="WebGLTimerQueryEXT?"/>
+      <code>target</code> accepts <code>TIME_ELAPSED_EXT</code>.
+    </function>
+  </newfun>
+
+  <newfun>
+    <function name="endQueryEXT" type="void">
+      <param name="target" type="GLenum"/>
+      <code>target</code> accepts <code>TIME_ELAPSED_EXT</code>.
+    </function>
+  </newfun>
+
+  <newfun>
+    <function name="queryCounterEXT" type="void">
+      <param name="query" type="WebGLTimerQueryEXT?"/>
+      <param name="target" type="GLenum"/>
+      <code>target</code> accepts <code>TIMESTAMP_EXT</code>.
+    </function>
+  </newfun>
+
+  <newfun>
+    <function name="getQueryEXT" type="any">
+      <param name="target" type="GLenum"/>
+      <param name="pname" type="GLenum"/>
+      <code>target</code> and <code>pname</code> accept the following combinations of
+      parameters. The return type of this method depends on the parameter queried.
+      <br/>
+      <table width="30%">
+      <tr><th>target</th><th>pname</th><th>returned type</th></tr>
+      <tr><td>TIME_ELAPSED_EXT</td><td>CURRENT_QUERY</td><td>WebGLQuery?</td></tr>
+      <tr><td>TIMESTAMP_EXT</td><td>CURRENT_QUERY</td><td>null</td></tr>
+      <tr><td>TIME_ELAPSED_EXT</td><td>QUERY_COUNTER_BITS_EXT</td><td>GLint</td></tr>
+      <tr><td>TIMESTAMP_EXT</td><td>QUERY_COUNTER_BITS_EXT</td><td>GLint</td></tr>
+      </table>      
+    </function>
+  </newfun>
+
+  <newfun>
+    <function name="getQueryObjectEXT" type="any">
+      <param name="query" type="WebGLTimerQueryEXT?"/>
+      <param name="pname" type="GLenum"/>
+      <code>pname</code> accepts <code>QUERY_RESULT_EXT</code> or <code>QUERY_RESULT_AVAILABLE_EXT</code>.
+      <br/>
+      The return type of this method depends on the parameter queried:
+      <table width="30%">
+      <tr><th>pname</th><th>returned type</th></tr>
+      <tr><td>QUERY_RESULT_EXT</td><td>GLuint64EXT</td></tr>
+      <tr><td>QUERY_RESULT_AVAILABLE_EXT</td><td>boolean</td></tr>
+      </table>      
+      <br/>
+      In order to ensure consistent behavior across platforms, queries' results must only be made
+      available when the user agent's <a
+      href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#event-loops">event
+      loop</a> is not executing a task. In other words:
+      <ul>
+        <li> A query's result must not be made available until control has returned to the user
+             agent's main loop. </li>
+        <li> Repeatedly fetching a query's QUERY_RESULT_AVAILABLE_EXT parameter in a loop, without
+             returning control to the user agent, must always return the same value. </li>
+      </ul>
+
+      <div class="note">
+        A query's result may or may not be made available when control returns to the user
+        agent's event loop. It is not guaranteed that using a single setTimeout callback with a
+        delay of 0, or a single requestAnimationFrame callback, will allow sufficient time for
+        the WebGL implementation to supply the query's results.
+      </div>
+
+      <div class="note rationale">
+        This change compared to the original extension specification is enforced in order to prevent
+        applications from relying on being able to issue a query and fetch its result in the same
+        frame. In order to ensure best portability among devices and best performance among
+        implementations, applications must expect that queries' results will become available
+        asynchronously.
+      </div>
+    </function>
+  </newfun>
+  
+  <newtok>
+    <function name="getParameter" type="any">
+      <param name="pname" type="GLenum"/>
+      <code>pname</code> accepts <code>TIMESTAMP_EXT</code> or <code>GPU_DISJOINT_EXT</code>.
+      <br/>
+
+      The return type depends on the parameter queried:
+      <table width="30%">
+      <tr><th>pname</th><th>returned type</th></tr>
+      <tr><td>TIMESTAMP_EXT</td><td>GLuint64EXT</td></tr>
+      <tr><td>GPU_DISJOINT_EXT</td><td>boolean</td></tr>
+      </table>      
+    </function>
+  </newtok>
+
+  <issues>
+    <ol>
+      <li>
+        <p>
+          Can getQueryObjectEXT be exposed in its current form according to ECMAScript
+          semantics?  ECMAScript's <a
+          href="http://wiki.ecmascript.org/doku.php?id=strawman:concurrency">de-facto concurrency
+          model</a> is "shared nothing" communicating event loops. Is it acceptable for sequential
+          calls to getQueryObjectEXT to return different answers? Note that Date.now() advances
+          during script execution, so this may be fine; but if concerns are raised, then the API may
+          need to be redesigned to use callbacks.
+        </p>
+      </li>
+    </ol>
+  </issues>
+
+  <samplecode xml:space="preserve">
+    <pre>
+        // Example (1) -- uses beginQueryEXT/endQueryEXT.
+        var ext = gl.getExtension('EXT_disjoint_timer_query');
+        var query = ext.createQueryEXT();
+        ext.beginQueryEXT(ext.TIME_ELAPSED_EXT, query);
+
+        // Draw object
+        gl.drawElements(...);
+
+        ext.endQueryEXT(ext.TIME_ELAPSED_EXT);
+
+        // ...at some point in the future, after returning control to the browser and being called again:
+        var available = ext.getQueryObjectEXT(query, ext.QUERY_RESULT_AVAILABLE_EXT);
+        var disjoint = gl.getParameter(ext.GPU_DISJOINT_EXT);
+
+        if (available &amp;&amp; !disjoint) {
+          // See how much time the rendering of the object took in nanoseconds.
+          var timeElapsed = ext.getQueryObjectEXT(query, ext.QUERY_RESULT_EXT);
+
+          // Do something useful with the time.  Note that care should be
+          // taken to use all significant bits of the result, not just the
+          // least significant 32 bits.
+          adjustObjectLODBasedOnDrawTime(timeElapsed);
+        }
+
+        //----------------------------------------------------------------------
+
+        // Example (2) -- same as the example above, but uses queryCounterEXT instead.
+        var ext = gl.getExtension('EXT_disjoint_timer_query');
+        var startQuery = ext.createQueryEXT();
+        var endQuery = ext.createQueryEXT();
+        ext.queryCounterEXT(startQuery, ext.TIMESTAMP_EXT);
+
+        // Draw object
+        gl.drawElements(...);
+
+        ext.queryCounterEXT(endQuery, ext.TIMESTAMP_EXT);
+
+        // ...at some point in the future, after returning control to the browser and being called again:
+        var available = ext.getQueryObjectEXT(endQuery, ext.QUERY_RESULT_AVAILABLE_EXT);
+        var disjoint = gl.getParameter(ext.GPU_DISJOINT_EXT);
+
+        if (available &amp;&amp; !disjoint) {
+          // See how much time the rendering of the object took in nanoseconds.
+          var timeStart = ext.getQueryObjectEXT(startQuery, ext.QUERY_RESULT_EXT);
+          var timeEnd = ext.getQueryObjectEXT(endQuery, ext.QUERY_RESULT_EXT);
+
+          // Do something useful with the time.  Note that care should be
+          // taken to use all significant bits of the result, not just the
+          // least significant 32 bits.
+          adjustObjectLODBasedOnDrawTime(timeEnd - timeStart);
+        }
+
+        //----------------------------------------------------------------------
+
+        // Example (3) -- check the number of timestamp bits to determine how to best
+        // measure elapsed time.
+        var ext = gl.getExtension('EXT_disjoint_timer_query');
+        var timeElapsedQuery;
+        var startQuery;
+        var endQuery;
+
+        var useTimestamps = false;
+
+        if (ext.getQueryEXT(ext.TIMESTAMP_EXT, ext.QUERY_COUNTER_BITS_EXT) > 0) {
+          useTimestamps = true;
+        }
+
+        // Clear the disjoint state before starting to work with queries to increase
+        // the chances that the results will be valid.
+        gl.getParameter(ext.GPU_DISJOINT_EXT);
+
+        if (useTimestamps) {
+          startQuery = ext.createQueryEXT();
+          endQuery = ext.createQueryEXT();
+          ext.queryCounterEXT(startQuery, ext.TIMESTAMP_EXT);
+        } else {
+          timeElapsedQuery = ext.createQueryEXT();
+          ext.beginQueryEXT(ext.TIME_ELAPSED_EXT, timeElapsedQuery);
+        }
+
+        // Draw object
+        gl.drawElements(...);
+
+        if (useTimestamps) {
+          ext.queryCounterEXT(endQuery, ext.TIMESTAMP_EXT);
+        } else {
+          ext.endQueryEXT(ext.TIME_ELAPSED_EXT);
+        }
+
+        // ...at some point in the future, after returning control to the browser and being called again:
+        var disjoint = gl.getParameter(ext.GPU_DISJOINT_EXT);
+        if (disjoint) {
+          // Have to redo all of the measurements.
+        } else {
+          var available;
+          if (useTimestamps) {
+            available = ext.getQueryObjectEXT(endQuery, ext.QUERY_RESULT_AVAILABLE_EXT);
+          } else {
+            available = ext.getQueryObjectEXT(timeElapsedQuery, ext.QUERY_RESULT_AVAILABLE_EXT);
+          }
+
+          if (available) {
+            var timeElapsed;
+            if (useTimestamps) {
+              // See how much time the rendering of the object took in nanoseconds.
+              var timeStart = ext.getQueryObjectEXT(startQuery, ext.QUERY_RESULT_EXT);
+              var timeEnd = ext.getQueryObjectEXT(endQuery, ext.QUERY_RESULT_EXT);
+              timeElapsed = timeEnd - timeStart;
+            } else {
+              timeElapsed = ext.getQueryObjectEXT(query, ext.QUERY_RESULT_EXT);
+            }
+
+            // Do something useful with the time.  Note that care should be
+            // taken to use all significant bits of the result, not just the
+            // least significant 32 bits.
+            adjustObjectLODBasedOnDrawTime(timeElapsed);
+          }
+        }
+    </pre>
+  </samplecode>
+
+  <history>
+    <revision date="2013/04/02">
+      <change>Initial revision.</change>
+    </revision>
+    <revision date="2013/04/03">
+      <change>Based on public_webgl discussion, specified that queries' results only become available at well-defined times.</change>
+    </revision>
+    <revision date="2014/02/12">
+      <change>Recast as EXT_disjoint_timer_query and harmonized with mirrored extension.</change>
+    </revision>
+    <revision date="2014/07/15">
+      <change>Added NoInterfaceObject extended attribute.</change>
+    </revision>
+    <revision date="2015/10/05">
+      <change>Revised language regarding queries' availability based on feedback from Jeff Gilbert.</change>
+    </revision>
+    <revision date="2015/10/19">
+      <change>Promoted to community approved after discussion on public_webgl.</change>
+    </revision>
+    <revision date="2016/06/08">
+      <change>Added example choosing measurement technique based on number of timestamp bits.</change>
+    </revision>
+    <revision date="2016/09/30">
+      <change>Added clarifying note that this document only applies to WebGL 1.0. Minor reformatting and typo fixes.</change>
+    </revision>
+  </history>
+</extension>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/EXT_disjoint_timer_query_webgl2/extension.xml
@@ -0,0 +1,243 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<extension href="EXT_disjoint_timer_query_webgl2/">
+  <name>EXT_disjoint_timer_query_webgl2</name>
+
+  <contact> <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL
+  working group</a> (public_webgl 'at' khronos.org) </contact>
+
+  <contributors>
+    <contributor>Contributors to ARB_occlusion_query</contributor>
+    <contributor>Contributors to EXT_timer_query</contributor>
+    <contributor>Contributors to ARB_timer_query</contributor>
+    <contributor>Ben Vanik, Google Inc.</contributor>
+    <contributor>Daniel Koch, TransGaming Inc.</contributor>
+    <contributor>Florian Boesch (pyalot 'at' gmail.com)</contributor>
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+
+  <number>33</number>
+
+  <depends>
+    <api version="2.0"/>
+  </depends>
+
+  <overview>
+    <mirrors href="http://www.khronos.org/registry/gles/extensions/EXT/EXT_disjoint_timer_query.txt"
+             name="EXT_disjoint_timer_query">
+      <addendum>
+        Specifies that queries' results only become available at certain well-defined times.
+      </addendum>
+    </mirrors>
+
+    <features>
+      <feature>
+        This extension provides the same functionality as <a
+        href="../EXT_disjoint_timer_query/">EXT_disjoint_timer_query</a>. The IDL, description, and
+        extension name are specialized for WebGL 2.0, which incorporates query objects into the core
+        specification.
+      </feature>
+    </features>
+  </overview>
+
+  <idl xml:space="preserve">
+typedef unsigned long long GLuint64EXT;
+
+[NoInterfaceObject]
+interface EXT_disjoint_timer_query_webgl2 {
+  const GLenum QUERY_COUNTER_BITS_EXT      = 0x8864;
+  const GLenum TIME_ELAPSED_EXT            = 0x88BF;
+  const GLenum TIMESTAMP_EXT               = 0x8E28;
+  const GLenum GPU_DISJOINT_EXT            = 0x8FBB;
+
+  void queryCounterEXT(WebGLQuery query, enum target);
+};
+  </idl>
+
+  <newtok>
+    <function name="beginQuery" type="">
+      <param name="target" type="GLenum"/>
+      <param name="query" type="WebGLQuery?"/>
+      <code>target</code> accepts <code>TIME_ELAPSED_EXT</code>.
+    </function>
+  </newtok>
+
+  <newtok>
+    <function name="endQuery" type="void">
+      <param name="target" type="GLenum"/>
+      <code>target</code> accepts <code>TIME_ELAPSED_EXT</code>.
+    </function>
+  </newtok>
+
+  <newfun>
+    <function name="queryCounterEXT" type="void">
+      <param name="query" type="WebGLQuery"/>
+      <param name="target" type="GLenum"/>
+      <code>target</code> accepts <code>TIMESTAMP_EXT</code>.
+    </function>
+  </newfun>
+
+  <newtok>
+    <function name="getQuery" type="any">
+      <param name="target" type="GLenum"/>
+      <param name="pname" type="GLenum"/>
+      <code>target</code> and <code>pname</code> accept the following combinations of
+      parameters. The return type of this method now depends on the parameter queried.
+      <br/>
+      <table width="30%">
+      <tr><th>target</th><th>pname</th><th>returned type</th></tr>
+      <tr><td>TIME_ELAPSED_EXT</td><td>CURRENT_QUERY</td><td>WebGLQuery?</td></tr>
+      <tr><td>TIMESTAMP_EXT</td><td>CURRENT_QUERY</td><td>null</td></tr>
+      <tr><td>TIME_ELAPSED_EXT</td><td>QUERY_COUNTER_BITS_EXT</td><td>GLint</td></tr>
+      <tr><td>TIMESTAMP_EXT</td><td>QUERY_COUNTER_BITS_EXT</td><td>GLint</td></tr>
+      </table>      
+    </function>
+  </newtok>
+
+  <newtok>
+    <function name="getParameter" type="any">
+      <param name="pname" type="GLenum"/>
+      <code>pname</code> accepts <code>TIMESTAMP_EXT</code> or <code>GPU_DISJOINT_EXT</code>.
+      <br/>
+
+      The return type depends on the parameter queried:
+      <table width="30%">
+      <tr><th>pname</th><th>returned type</th></tr>
+      <tr><td>TIMESTAMP_EXT</td><td>GLuint64EXT</td></tr>
+      <tr><td>GPU_DISJOINT_EXT</td><td>boolean</td></tr>
+      </table>      
+    </function>
+  </newtok>
+
+  <samplecode xml:space="preserve">
+    <pre>
+        // Example (1) -- uses beginQuery/endQuery.
+        var ext = gl.getExtension('EXT_disjoint_timer_query_webgl2');
+        var query = gl.createQuery();
+        gl.beginQuery(ext.TIME_ELAPSED_EXT, query);
+
+        // Draw object
+        gl.drawElements(...);
+
+        gl.endQuery(ext.TIME_ELAPSED_EXT);
+
+        // ...at some point in the future, after returning control to the browser and being called again:
+        var available = gl.getQueryParameter(query, gl.QUERY_RESULT_AVAILABLE);
+        var disjoint = gl.getParameter(ext.GPU_DISJOINT_EXT);
+
+        if (available &amp;&amp; !disjoint) {
+          // See how much time the rendering of the object took in nanoseconds.
+          var timeElapsed = gl.getQueryParameter(query, gl.QUERY_RESULT);
+
+          // Do something useful with the time.  Note that care should be
+          // taken to use all significant bits of the result, not just the
+          // least significant 32 bits.
+          adjustObjectLODBasedOnDrawTime(timeElapsed);
+        }
+
+        //----------------------------------------------------------------------
+
+        // Example (2) -- same as the example above, but uses queryCounterEXT instead.
+        var ext = gl.getExtension('EXT_disjoint_timer_query_webgl2');
+        var startQuery = gl.createQuery();
+        var endQuery = gl.createQuery();
+        ext.queryCounterEXT(startQuery, ext.TIMESTAMP_EXT);
+
+        // Draw object
+        gl.drawElements(...);
+
+        ext.queryCounterEXT(endQuery, ext.TIMESTAMP_EXT);
+
+        // ...at some point in the future, after returning control to the browser and being called again:
+        var available = gl.getQueryParameter(endQuery, gl.QUERY_RESULT_AVAILABLE);
+        var disjoint = gl.getParameter(ext.GPU_DISJOINT_EXT);
+
+        if (available &amp;&amp; !disjoint) {
+          // See how much time the rendering of the object took in nanoseconds.
+          var timeStart = gl.getQueryParameter(startQuery, gl.QUERY_RESULT);
+          var timeEnd = gl.getQueryParameter(endQuery, gl.QUERY_RESULT);
+
+          // Do something useful with the time.  Note that care should be
+          // taken to use all significant bits of the result, not just the
+          // least significant 32 bits.
+          adjustObjectLODBasedOnDrawTime(timeEnd - timeStart);
+        }
+
+        //----------------------------------------------------------------------
+
+        // Example (3) -- check the number of timestamp bits to determine how to best
+        // measure elapsed time.
+        var ext = gl.getExtension('EXT_disjoint_timer_query_webgl2');
+        var timeElapsedQuery;
+        var startQuery;
+        var endQuery;
+
+        var useTimestamps = false;
+
+        if (gl.getQuery(ext.TIMESTAMP_EXT, ext.QUERY_COUNTER_BITS_EXT) > 0) {
+          useTimestamps = true;
+        }
+
+        // Clear the disjoint state before starting to work with queries to increase
+        // the chances that the results will be valid.
+        gl.getParameter(ext.GPU_DISJOINT_EXT);
+
+        if (useTimestamps) {
+          startQuery = gl.createQuery();
+          endQuery = gl.createQuery();
+          ext.queryCounterEXT(startQuery, ext.TIMESTAMP_EXT);
+        } else {
+          timeElapsedQuery = gl.createQuery();
+          gl.beginQuery(ext.TIME_ELAPSED_EXT, timeElapsedQuery);
+        }
+
+        // Draw object
+        gl.drawElements(...);
+
+        if (useTimestamps) {
+          ext.queryCounterEXT(endQuery, ext.TIMESTAMP_EXT);
+        } else {
+          gl.endQuery(ext.TIME_ELAPSED_EXT);
+        }
+
+        // ...at some point in the future, after returning control to the browser and being called again:
+        var disjoint = gl.getParameter(ext.GPU_DISJOINT_EXT);
+        if (disjoint) {
+          // Have to redo all of the measurements.
+        } else {
+          var available;
+          if (useTimestamps) {
+            available = gl.getQueryParameter(endQuery, gl.QUERY_RESULT_AVAILABLE);
+          } else {
+            available = gl.getQueryParameter(timeElapsedQuery, gl.QUERY_RESULT_AVAILABLE);
+          }
+
+          if (available) {
+            var timeElapsed;
+            if (useTimestamps) {
+              // See how much time the rendering of the object took in nanoseconds.
+              var timeStart = gl.getQueryParameter(startQuery, gl.QUERY_RESULT);
+              var timeEnd = gl.getQueryParameter(endQuery, gl.QUERY_RESULT);
+              timeElapsed = timeEnd - timeStart;
+            } else {
+              timeElapsed = gl.getQueryParameter(query, gl.QUERY_RESULT);
+            }
+
+            // Do something useful with the time.  Note that care should be
+            // taken to use all significant bits of the result, not just the
+            // least significant 32 bits.
+            adjustObjectLODBasedOnDrawTime(timeElapsed);
+          }
+        }
+    </pre>
+  </samplecode>
+
+  <history>
+    <revision date="2016/09/30">
+      <change>Split WebGL 2.0 specification of this extension into its own file
+      for better comprehensibility.</change>
+    </revision>
+    <revision date="2016/10/11">
+      <change>Fixed errors in sample code pointed out by @juj.</change>
+    </revision>
+  </history>
+</extension>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/EXT_float_blend/extension.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<draft href="EXT_float_blend/">
+  <name>EXT_float_blend</name>
+
+  <contact> <a href="https://www.khronos.org/webgl/public-mailing-list">WebGL
+  working group</a> (public_webgl 'at' khronos.org) </contact>
+
+  <contributors>
+    <contributor>Mark Callow</contributor>
+
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+
+  <number>35</number>
+
+  <depends>
+    <api version="2.0"/>
+    <ext name="EXT_color_buffer_float" require="true"/>
+  </depends>
+
+  <overview>
+    <mirrors href="http://www.khronos.org/registry/gles/extensions/EXT/EXT_float_blend.txt"
+             name="EXT_float_blend"/>
+
+    <features>
+      <feature>
+        <p>An <code>INVALID_OPERATION</code> error will no longer be raised by
+        <code>drawArrays</code> or <code>drawElements</code> when blending is
+        enabled and the draw buffer has 32-bit floating-point components. Note
+        that in order to create such a draw buffer the
+        <a href="http://www.khronos.org/registry/webgl/extensions/EXT_color_buffer_float">
+        EXT_color_buffer_float</a> extension must be enabled.</p>
+      </feature>
+    </features>
+
+  </overview>
+
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface EXT_float_blend {
+}; // interface EXT_float_blend
+</idl>
+
+  <history>
+    <revision date="2015/04/13">
+      <change>Initial revision.</change>
+    </revision>
+
+    <revision date="2017/01/03">
+      <change>Promoted to draft status after discussion on public_webgl.</change>
+    </revision>
+  </history>
+</draft>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/EXT_frag_depth/extension.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ratified href="EXT_frag_depth/">
+  <name>EXT_frag_depth</name>
+  <contact> <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL
+  working group</a> (public_webgl 'at' khronos.org) </contact>
+
+  <contributors>
+    <contributor>Florian Boesch (pyalot 'at' gmail.com)</contributor>
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+
+  <number>16</number>
+
+  <depends>
+    <api version="1.0"/>
+    <core version="2.0">
+      <glsl version="300 es"/>
+    </core>
+  </depends>
+
+  <overview>
+    <mirrors href="http://www.khronos.org/registry/gles/extensions/EXT/EXT_frag_depth.txt"
+             name="EXT_frag_depth">
+    </mirrors>
+
+    <features>
+      <feature>
+            Adds the ability to set the depth value of a fragment from
+            within the fragment shader with the built-in output variable gl_FragDepthEXT.
+      </feature>
+      <glsl extname="GL_EXT_frag_depth">
+        <stage type="fragment"/>
+        <output name="gl_FragDepthEXT" type="float" />
+      </glsl>
+    </features>
+  </overview>
+  
+  <idl xml:space="preserve">
+    [NoInterfaceObject]
+    interface EXT_frag_depth {
+    };
+  </idl>
+
+  <samplecode xml:space="preserve">
+    <pre>
+    void main(){
+        gl_FragColor = vec4(1.0, 0.0, 1.0, 1.0);
+        gl_FragDepthEXT = 0.5;
+    }
+    </pre>
+  </samplecode>
+
+  <history>
+    <revision date="2012/11/22">
+      <change>Initial revision.</change>
+    </revision>
+    <revision date="2012/12/17">
+      <change>Moved to draft.</change>
+    </revision>
+    <revision date="2014/05/13">
+      <change>Moved to community approved.</change>
+    </revision>
+    <revision date="2014/07/15">
+      <change>Added NoInterfaceObject extended attribute.</change>
+    </revision>
+    <revision date="2015/05/29">
+      <change>Ratified by Khronos Board of Promoters.</change>
+    </revision>
+  </history>
+</ratified>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/EXT_sRGB/extension.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<extension href="EXT_sRGB/">
+  <name>EXT_sRGB</name>
+
+  <contact> <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL
+  working group</a> (public_webgl 'at' khronos.org) </contact>
+
+  <contributors>
+    <contributor>Florian Boesch (pyalot 'at' gmail.com)</contributor>
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+
+  <number>17</number>
+
+  <depends>
+    <api version="1.0"/>
+    <core version="2.0">
+      <addendum>Additional format restrictions apply for CopyTexImage2D</addendum>
+    </core>
+  </depends>
+
+  <overview>
+    <mirrors href="http://www.khronos.org/registry/gles/extensions/EXT/EXT_sRGB.txt"
+             name="EXT_sRGB">
+    </mirrors>
+
+    <features>
+      <feature>
+         Adds the sRGB support to textures and framebuffer objects.
+      </feature>
+    </features>
+  </overview>
+
+  <idl xml:space="preserve">
+    [NoInterfaceObject]
+    interface EXT_sRGB {
+      const GLenum SRGB_EXT                                     = 0x8C40;
+      const GLenum SRGB_ALPHA_EXT                               = 0x8C42;
+      const GLenum SRGB8_ALPHA8_EXT                             = 0x8C43;
+      const GLenum FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT    = 0x8210;
+    };
+  </idl>
+
+  <newtok>
+    <function name="texImage2D">
+      <param name="format" type="GLenum"/>
+      <param name="internalformat" type="GLenum"/>
+      Accepted by the <code>format</code> and <code>internalformat</code> parameters: <code>SRGB_EXT</code> and <code>SRGB_ALPHA_EXT</code>
+    </function>
+    <function name="texSubImage2D">
+      <param name="format" type="GLenum"/>
+      Accepted by the <code>format</code> parameter: <code>SRGB_EXT</code> and <code>SRGB_ALPHA_EXT</code>
+    </function>
+    <function name="renderbufferStorage">
+      <param name="internalformat" type="GLenum"/>
+      Accepted by the <code>internalformat</code> parameter: <code>SRGB_ALPHA8_EXT</code>
+    </function>
+    <function name="getFramebufferAttachmentParameter">
+      <param name="pname" type="GLenum"/>
+      Accepted by the <code>pname</code> parameter: FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT
+    </function>
+  </newtok>
+
+  <samplecode xml:space="preserve">
+    <pre>
+        var ext = gl.getExtension('EXT_sRGB');
+        var texture = gl.createTexture();
+        gl.bindTexture(gl.TEXTURE_2D, texture);
+        texImage2D(gl.TEXTURE_2D, 0, ext.SRGB_EXT, 256, 256, 0, ext.SRGB_EXT, gl.UNSIGNED_BYTE, data);
+    </pre>
+  </samplecode>
+
+  <history>
+    <revision date="2012/12/16">
+      <change>Initial revision.</change>
+    </revision>
+    <revision date="2013/01/26">
+      <change>Moved from proposal to draft</change>
+    </revision>
+    <revision date="2014/05/13">
+      <change>Moved from draft to community approved</change>
+    </revision>
+    <revision date="2014/07/15">
+      <change>Added NoInterfaceObject extended attribute.</change>
+    </revision>
+  </history>
+</extension>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/EXT_shader_texture_lod/extension.xml
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ratified href="EXT_shader_texture_lod/">
+  <name>EXT_shader_texture_lod</name>
+  <contact> <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL
+  working group</a> (public_webgl 'at' khronos.org) </contact>
+
+  <contributors>
+    <contributor>Vladimir Vukicevic (vladimir 'at' mozilla.com)</contributor>
+    <contributor>Florian Boesch (pyalot 'at' gmail.com)</contributor>
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+
+  <number>27</number>
+
+  <depends>
+    <api version="1.0"/>
+    <core version="2.0">
+      <glsl version="300 es"/>
+    </core>
+  </depends>
+
+  <overview>
+    <mirrors href="http://www.khronos.org/registry/gles/extensions/EXT/EXT_shader_texture_lod.txt"
+             name="EXT_shader_texture_lod">
+    </mirrors>
+
+    <features>
+      <feature>
+            This extension adds additional texture functions to the
+            OpenGL ES Shading Language which provide the shader writer
+            with explicit control of LOD.
+      </feature>
+      <glsl extname="GL_EXT_shader_texture_lod">
+        <stage type="fragment"/>
+        <function name="texture2DLodEXT" type="vec4">
+          <param name="sampler" type="sampler2D" />
+          <param name="coord" type="vec2" />
+          <param name="lod" type="float" />
+        </function>
+        <function name="texture2DProjLodEXT" type="vec4">
+          <param name="sampler" type="sampler2D" />
+          <param name="coord" type="vec3" />
+          <param name="lod" type="float" />
+        </function>
+        <function name="texture2DProjLodEXT" type="vec4">
+          <param name="sampler" type="sampler2D" />
+          <param name="coord" type="vec4" />
+          <param name="lod" type="float" />
+        </function>
+        <function name="textureCubeLodEXT" type="vec4">
+          <param name="sampler" type="samplerCube" />
+          <param name="coord" type="vec3" />
+          <param name="lod" type="float" />
+        </function>
+        <function name="texture2DGradEXT" type="vec4">
+          <param name="sampler" type="sampler2D" />
+          <param name="P" type="vec2" />
+          <param name="dPdx" type="vec2" />
+          <param name="dPdy" type="vec2" />
+        </function>
+        <function name="texture2DProjGradEXT" type="vec4">
+          <param name="sampler" type="sampler2D" />
+          <param name="P" type="vec3" />
+          <param name="dPdx" type="vec2" />
+          <param name="dPdy" type="vec2" />
+        </function>
+        <function name="texture2DProjGradEXT" type="vec4">
+          <param name="sampler" type="sampler2D" />
+          <param name="P" type="vec4" />
+          <param name="dPdx" type="vec2" />
+          <param name="dPdy" type="vec2" />
+        </function>
+        <function name="textureCubeGradEXT" type="vec4">
+          <param name="sampler" type="samplerCube" />
+          <param name="P" type="vec3" />
+          <param name="dPdx" type="vec3" />
+          <param name="dPdy" type="vec3" />
+        </function>
+      </glsl>
+    </features>
+  </overview>
+  
+  <idl xml:space="preserve">
+    [NoInterfaceObject]
+    interface EXT_shader_texture_lod {
+    };
+  </idl>
+
+  <samplecode xml:space="preserve">
+    <pre>
+    #extension GL_EXT_shader_texture_lod : enable
+    #extension GL_OES_standard_derivatives : enable
+
+    uniform sampler2D myTexture;
+    varying vec2 texcoord;
+
+    void main(){
+        // avoids artifacts when wrapping texture coordinates
+        gl_FragColor = texture2DGradEXT(myTexture, mod(texcoord, vec2(0.1, 0.5)), dFdx(texcoord), dFdy(texcoord));
+    }
+    </pre>
+  </samplecode>
+
+  <history>
+    <revision date="2014/02/10">
+      <change>Initial revision.</change>
+    </revision>
+    <revision date="2014/02/18">
+      <change>Moved to draft.</change>
+    </revision>
+    <revision date="2014/06/27">
+      <change>Moved to community approved after discussion on public_webgl list.</change>
+    </revision>
+    <revision date="2014/07/15">
+      <change>Added NoInterfaceObject extended attribute.</change>
+    </revision>
+    <revision date="2014/11/07">
+      <change>Corrected extension name to include GL_ prefix.</change>
+    </revision>
+    <revision date="2015/05/29">
+      <change>Ratified by Khronos Board of Promoters.</change>
+    </revision>
+  </history>
+</ratified>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/EXT_texture_filter_anisotropic/extension.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+
+<ratified href="EXT_texture_filter_anisotropic/">
+  <name>EXT_texture_filter_anisotropic</name>
+  <contact>
+    <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a> (public_webgl 'at' khronos.org)
+  </contact>
+  <contributors>
+    <contributor>Members of the WebGL working group</contributor>
+    <contributor>Florian B&#246;sch (pyalot 'at' gmail.com)</contributor>
+  </contributors>
+  <number>11</number>
+  <depends>
+    <api version="1.0" />
+  </depends>
+  <overview>
+    <mirrors href="http://www.khronos.org/registry/gles/extensions/EXT/texture_filter_anisotropic.txt" name="EXT_texture_filter_anisotropic"/>
+    <features>
+      <feature>
+        The <code>getTexParameter</code>, <code>texParameterf</code> and <code>texParameteri</code> entry points'
+        parameter <code>pname</code> accepts the value <code>TEXTURE_MAX_ANISOTROPY_EXT</code>
+      </feature>
+      <feature>
+        The <code>getParameter</code> entry point parameter <code>pname</code> accepts the value <code>MAX_TEXTURE_MAX_ANISOTROPY_EXT</code>, returning a value of type <code>float</code>.
+      </feature>
+    </features>
+  </overview>
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface EXT_texture_filter_anisotropic {
+  const GLenum TEXTURE_MAX_ANISOTROPY_EXT       = 0x84FE;
+  const GLenum MAX_TEXTURE_MAX_ANISOTROPY_EXT   = 0x84FF;
+};
+  </idl>
+  <history>
+    <revision date="2012/01/27">
+      <change>Initial revision.</change>
+    </revision>
+    <revision date="2012/02/24">
+      <change>Added the EXT suffix to the enumerants and aliases to the extension name</change>
+    </revision>
+    <revision date="2012/07/19">
+      <change>Moved from draft to community approved status</change>
+    </revision>
+    <revision date="2013/05/15">
+      <change>Ratified by Khronos Board of Promoters.</change>
+    </revision>
+    <revision date="2014/07/15">
+      <change>Added NoInterfaceObject extended attribute.</change>
+    </revision>
+  </history>
+</ratified>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/OES_element_index_uint/extension.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+
+<ratified href="OES_element_index_uint/">
+  <name>OES_element_index_uint</name>
+  <contact>
+    <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a> (public_webgl 'at' khronos.org)
+  </contact>
+  <contributors>
+    <contributor>Members of the WebGL working group</contributor>
+    <contributor>Florian B&#246;sch (pyalot 'at' gmail.com)</contributor>
+  </contributors>
+  <number>10</number>
+  <depends>
+    <api version="1.0" />
+    <core version="2.0" />
+  </depends>
+  <overview>
+    <mirrors href="http://www.khronos.org/registry/gles/extensions/OES/OES_element_index_uint.txt" name="OES_element_index_uint"/>
+    <features>
+      <feature>
+        The <code>drawElements</code> entry point parameter <code>type</code> accepts the value <code>UNSIGNED_INT</code>
+      </feature>
+    </features>
+  </overview>
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface OES_element_index_uint {
+};
+  </idl>
+  <history>
+    <revision date="2012/01/24">
+      <change>Initial revision.</change>
+    </revision>
+    <revision date="2012/01/27">
+      <change>Removed the bufferData requirement as this is not checked by webgl</change>
+    </revision>
+    <revision date="2012/02/24">
+      <change>Removed the enumerants from the IDL which are contained in the context and added aliases to the extension name</change>
+    </revision>
+    <revision date="2012/10/16">
+      <change>Based on feedback on public_webgl, moved from draft to community approved, and removed aliases.</change>
+    </revision>
+    <revision date="2013/05/15">
+      <change>Ratified by Khronos Board of Promoters.</change>
+    </revision>
+    <revision date="2014/07/15">
+      <change>Added NoInterfaceObject extended attribute.</change>
+    </revision>
+  </history>
+</ratified>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/OES_fbo_render_mipmap/extension.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<draft href="OES_fbo_render_mipmap/">
+  <name>OES_fbo_render_mipmap</name>
+
+  <contact> <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL
+  working group</a> (public_webgl 'at' khronos.org) </contact>
+
+  <contributors>
+    <contributor>Florian Boesch (pyalot 'at' gmail.com)</contributor>
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+
+  <number>28</number>
+
+  <depends>
+    <api version="1.0"/>
+    <core version="2.0" />
+  </depends>
+
+  <overview>
+    <mirrors href="https://www.khronos.org/registry/gles/extensions/OES/OES_fbo_render_mipmap.txt"
+             name="OES_fbo_render_mipmap">
+    </mirrors>
+
+    <features>
+      <feature>
+        Any level of a texture can be attached to a framebuffer object.
+      </feature>
+    </features>
+  </overview>
+
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface OES_fbo_render_mipmap {
+};
+  </idl>
+
+  <samplecode xml:space="preserve">
+    <pre>
+        var extension = gl.getExtension('OES_fbo_render_mipmap');
+        if(extension !=== null){
+            var texture = gl.createTexture();
+            gl.bindTexture(gl.TEXTURE_2D, texture);
+            var fbos = [];
+            
+            for(var level=0; level&lt;7; level++){
+                var size = 128/Math.pow(2, level);
+                gl.texImage2D(gl.TEXTURE_2D, level, gl.RGBA, size, size, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+                var fbo = gl.createFramebuffer();
+                gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+                gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, level);
+                fbos.push(fbo);
+                
+                var fboStatus = gl.checkFramebufferStatus(gl.FRAMEBUFFER);
+                console.assert(fboStatus == gl.FRAMEBUFFER_COMPLETE, 'Framebuffer is not complete');
+            }
+
+            gl.bindTexture(gl.TEXTURE_2D, null);
+            gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+
+            console.assert(gl.getError() == gl.NO_ERROR, 'A GL error occured');
+        }
+    </pre>
+  </samplecode>
+
+  <history>
+    <revision date="2015/01/26">
+      <change>Initial revision.</change>
+    </revision>
+    <revision date="2015/01/31">
+      <change>Moved to draft.</change>
+    </revision>
+  </history>
+</draft>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/OES_standard_derivatives/extension.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+
+<ratified href="OES_standard_derivatives/">
+  <name>OES_standard_derivatives</name>
+  <contact>
+    <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a> (public_webgl 'at' khronos.org)
+  </contact>
+  <contributors>
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+  <number>4</number>
+  <depends>
+    <api version="1.0"/>
+    <core version="2.0">
+      <glsl version="300 es"/>
+    </core>
+  </depends>
+  <overview>
+    <mirrors href="http://www.khronos.org/registry/gles/extensions/OES/OES_standard_derivatives.txt" name="OES_standard_derivatives" />
+    <features>
+      <feature>
+        The <code>hint</code> entry point accepts <code>FRAGMENT_SHADER_DERIVATIVE_HINT_OES</code>
+           as a target and the <code>getParameter</code> entry point accepts it as a pname.
+      </feature>
+      <glsl extname="GL_OES_standard_derivatives">
+        <stage type="fragment"/>
+        <function name="dFdx" type="genType">
+          <param type="genType" />
+        </function>
+        <function name="dFdy" type="genType">
+          <param type="genType" />
+        </function>
+        <function name="fwidth" type="genType">
+          <param type="genType" />
+        </function>
+      </glsl>
+    </features>
+  </overview>
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface OES_standard_derivatives {
+    const GLenum FRAGMENT_SHADER_DERIVATIVE_HINT_OES = 0x8B8B;
+};
+  </idl>
+  <history>
+    <revision date="2010/01/13">
+      <change>Initial revision.</change>
+    </revision>
+    <revision date="2011/12/07">
+      <change>Added <code>genType</code> argument and return type to function declarations.</change>
+    </revision>
+    <revision date="2012/01/03">
+      <change>Removed webgl module per changes to Web IDL spec.</change>
+    </revision>
+    <revision date="2013/05/15">
+      <change>Ratified by Khronos Board of Promoters.</change>
+    </revision>
+    <revision date="2014/07/15">
+      <change>Added NoInterfaceObject extended attribute.</change>
+    </revision>
+  </history>
+</ratified>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/OES_texture_float/extension.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ratified href="OES_texture_float/">
+  <name>OES_texture_float</name>
+
+  <contact> <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL
+  working group</a> (public_webgl 'at' khronos.org) </contact>
+
+  <contributors>
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+
+  <number>1</number>
+
+  <depends>
+    <api version="1.0"/>
+    <removed version="2.0" />
+  </depends>
+
+  <overview>
+    <mirrors href="http://www.khronos.org/registry/gles/extensions/OES/OES_texture_float.txt"
+             name="OES_texture_float">
+      <addendum>Optional support for <code>FLOAT</code> textures as FBO
+      attachments.</addendum>
+    </mirrors>
+
+    <features>
+      <feature> The <code>texImage2D</code> and <code>texSubImage2D</code>
+      entry points taking <code>ArrayBufferView</code> are extended to accept
+      <code>Float32Array</code> with the pixel type <code>FLOAT</code>.
+      </feature>
+
+      <feature> The <code>texImage2D</code> and <code>texSubImage2D</code>
+      entry points taking <code>ImageData</code>,
+      <code>HTMLImageElement</code>, <code>HTMLCanvasElement</code> and
+      <code>HTMLVideoElement</code> are extended to accept the pixel type
+      <code>FLOAT</code>. </feature>
+
+      <feature>Upon activation of this extension, implementations supporting
+      <a href="../WEBGL_color_buffer_float/">WEBGL_color_buffer_float</a>
+      shall implicitly enable it. This requirement maintains the historical
+      behavior prior to the differentiation of float renderability from float
+      textures, so as to not break existing content.</feature>
+    </features>
+  </overview>
+
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface OES_texture_float { }; </idl>
+
+  <history>
+    <revision date="2010/11/29">
+      <change>Initial revision.</change>
+    </revision>
+
+    <revision date="2010/12/13">
+      <change>Extended to support pixel type FLOAT for texImage2D and
+      texSubImage2D entry points taking ImageData, HTMLImageElement,
+      HTMLCanvasElement and HTMLVideoElement. </change>
+    </revision>
+
+    <revision date="2011/09/12">
+      <change>Added optional ability to use a FLOAT type texture as an FBO's
+      color attachment. </change>
+    </revision>
+
+    <revision date="2012/01/03">
+      <change>Removed webgl module per changes to Web IDL spec.</change>
+    </revision>
+
+    <revision date="2012/12/04">
+      <change>Specify that implementations supporting FLOAT color attachments
+      implicitly enable WEBGL_color_buffer_float.</change>
+    </revision>
+
+    <revision date="2013/05/15">
+      <change>Ratified by Khronos Board of Promoters.</change>
+    </revision>
+
+    <revision date="2014/07/15">
+      <change>Added NoInterfaceObject extended attribute.</change>
+    </revision>
+
+    <revision date="2014/09/11">
+      <change>Corrected link to WEBGL_color_buffer_float.</change>
+    </revision>
+
+    <revision date="2017/09/14">
+      <change>Clarify behaviors regarding WEBGL_color_buffer_float.</change>
+    </revision>
+  </history>
+</ratified>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/OES_texture_float_linear/extension.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ratified href="OES_texture_float_linear/">
+  <name>OES_texture_float_linear</name>
+
+  <contact> <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL
+  working group</a> (public_webgl 'at' khronos.org) </contact>
+
+  <contributors>
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+
+  <number>20</number>
+
+  <depends>
+    <api version="1.0"/>
+  </depends>
+
+  <overview>
+    <mirrors href="http://www.khronos.org/registry/gles/extensions/OES/OES_texture_float_linear.txt"
+             name="OES_texture_float_linear">
+    </mirrors>
+
+    <features>
+      Expands upon the OES_texture_float extension by allowing support for
+      LINEAR magnification filter and LINEAR, NEAREST_MIPMAP_LINEAR,
+      LINEAR_MIPMAP_NEAREST and LINEAR_MIPMAP_NEAREST minification filters.
+    </features>
+  </overview>
+
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface OES_texture_float_linear { };</idl>
+
+  <history>
+    <revision date="2013/02/20">
+      <change>Initial revision.</change>
+    </revision>
+    <revision date="2013/03/11">
+      <change>Moved to draft status after discussion on public_webgl.</change>
+    </revision>
+    <revision date="2013/08/06">
+      <change>Moved to community approved.</change>
+    </revision>
+    <revision date="2014/07/15">
+      <change>Added NoInterfaceObject extended attribute.</change>
+    </revision>
+    <revision date="2014/08/08">
+      <change>Ratified by Khronos Board of Promoters.</change>
+    </revision>
+  </history>
+</ratified>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/OES_texture_half_float/extension.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ratified href="OES_texture_half_float/">
+  <name>OES_texture_half_float</name>
+
+  <contact> <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL
+  working group</a> (public_webgl 'at' khronos.org) </contact>
+
+  <contributors>
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+
+  <number>2</number>
+
+  <depends>
+    <api version="1.0"/>
+    <removed version="2.0" />
+  </depends>
+
+  <overview>
+    <mirrors href="http://www.khronos.org/registry/gles/extensions/OES/OES_texture_float.txt"
+             name="OES_texture_half_float">
+      <addendum>Optional support for <code>HALF_FLOAT</code> textures as FBO
+      attachments.</addendum>
+    </mirrors>
+
+    <features>
+      <feature> The <code>texImage2D</code> and <code>texSubImage2D</code>
+      entry points taking <code>ArrayBufferView</code> are extended to accept
+      <code>Uint16Array</code> with the pixel type <code>HALF_FLOAT_OES</code>.
+      </feature>
+
+      <feature> The <code>texImage2D</code> and <code>texSubImage2D</code>
+      entry points taking <code>ImageData</code>,
+      <code>HTMLImageElement</code>, <code>HTMLCanvasElement</code> and
+      <code>HTMLVideoElement</code> are extended to accept the pixel type
+      <code>HALF_FLOAT_OES</code>. </feature>
+
+      <feature>Upon activation of this extension, implementations supporting
+      <a href="../EXT_color_buffer_half_float/">EXT_color_buffer_half_float</a>
+      shall implicitly enable it. This requirement maintains the historical
+      behavior prior to the differentiation of float renderability from float
+      textures, so as to not break existing content.</feature>
+    </features>
+  </overview>
+
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface OES_texture_half_float {
+  const GLenum HALF_FLOAT_OES = 0x8D61;
+};
+</idl>
+
+  <history>
+    <revision date="2010/11/29">
+      <change>Initial revision.</change>
+    </revision>
+
+    <revision date="2011/09/12">
+      <change> Added similar text about <code>texImage2D</code> and
+      <code>texSubImage2D</code> as in OES_texture_float spec. </change>
+
+      <change> Added optional ability to use a HALF_FLOAT_OES type texture as
+      an FBO's color attachment. </change>
+    </revision>
+
+    <revision date="2012/01/03">
+      <change>Removed webgl module per changes to Web IDL spec.</change>
+    </revision>
+
+    <revision date="2012/12/04">
+      <change>Specify that implementations supporting HALF_FLOAT_OES color
+      attachments implicitly enable EXT_color_buffer_half_float.</change>
+    </revision>
+
+    <revision date="2013/05/15">
+      <change>Ratified by Khronos Board of Promoters.</change>
+    </revision>
+
+    <revision date="2014/02/12">
+      <change>Allow texture uploads of half-floats via Uint16Arrays.</change>
+    </revision>
+
+    <revision date="2014/07/15">
+      <change>Added NoInterfaceObject extended attribute.</change>
+    </revision>
+
+    <revision date="2014/09/11">
+      <change>Corrected link to EXT_color_buffer_half_float.</change>
+    </revision>
+
+    <revision date="2017/09/14">
+      <change>Clarify behaviors regarding EXT_color_buffer_half_float.</change>
+    </revision>
+  </history>
+</ratified>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/OES_texture_half_float_linear/extension.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ratified href="OES_texture_half_float_linear/">
+  <name>OES_texture_half_float_linear</name>
+
+  <contact> <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL
+  working group</a> (public_webgl 'at' khronos.org) </contact>
+
+  <contributors>
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+
+  <number>21</number>
+
+  <depends>
+    <api version="1.0"/>
+    <removed version="2.0" />
+  </depends>
+
+  <overview>
+    <mirrors href="http://www.khronos.org/registry/gles/extensions/OES/OES_texture_float_linear.txt"
+             name="OES_texture_half_float_linear">
+    </mirrors>
+
+    <features>
+      Expands upon the OES_texture_half_float extension by allowing support for
+      LINEAR magnification filter and LINEAR, NEAREST_MIPMAP_LINEAR,
+      LINEAR_MIPMAP_NEAREST and LINEAR_MIPMAP_NEAREST minification filters.
+    </features>
+  </overview>
+
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface OES_texture_half_float_linear { };</idl>
+
+  <history>
+    <revision date="2013/02/20">
+      <change>Initial revision.</change>
+    </revision>
+    <revision date="2013/03/11">
+      <change>Moved to draft status after discussion on public_webgl.</change>
+    </revision>
+    <revision date="2013/08/06">
+      <change>Moved to community approved.</change>
+    </revision>
+    <revision date="2014/07/15">
+      <change>Added NoInterfaceObject extended attribute.</change>
+    </revision>
+    <revision date="2014/08/08">
+      <change>Ratified by Khronos Board of Promoters.</change>
+    </revision>
+  </history>
+</ratified>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/OES_vertex_array_object/extension.xml
@@ -0,0 +1,138 @@
+<?xml version="1.0"?>
+
+<ratified href="OES_vertex_array_object/">
+  <name>OES_vertex_array_object</name>
+  <contact>
+    <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a> (public_webgl 'at' khronos.org)
+  </contact>
+  <contributors>
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+  <number>5</number>
+  <depends>
+    <api version="1.0"/>
+    <core version="2.0" />
+  </depends>
+  <overview>
+    <mirrors href="http://www.khronos.org/registry/gles/extensions/OES/OES_vertex_array_object.txt" name="OES_vertex_array_object" />
+  </overview>
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface WebGLVertexArrayObjectOES : WebGLObject {
+};
+
+[NoInterfaceObject]
+interface OES_vertex_array_object {
+    const GLenum VERTEX_ARRAY_BINDING_OES = 0x85B5;
+
+    WebGLVertexArrayObjectOES? createVertexArrayOES();
+    void deleteVertexArrayOES(WebGLVertexArrayObjectOES? arrayObject);
+    [WebGLHandlesContextLoss] GLboolean isVertexArrayOES(WebGLVertexArrayObjectOES? arrayObject);
+    void bindVertexArrayOES(WebGLVertexArrayObjectOES? arrayObject);
+};
+  </idl>
+
+  <newfun>
+    <function name="createVertexArrayOES" type="WebGLVertexArrayObjectOES?">
+    </function>
+  </newfun>
+
+  <newfun>
+    <function name="deleteVertexArrayOES" type="void">
+      <param name="arrayObject" type="WebGLVertexArrayObjectOES?"/>
+    </function>
+  </newfun>
+
+  <newfun>
+    <function name="isVertexArrayOES" type="GLboolean">
+      <param name="arrayObject" type="WebGLVertexArrayObjectOES?"/>
+      Returns false if the vertex array object's <a
+      href="../../specs/1.0/#webgl-object-invalidated-flag">invalidated
+      flag</a> is set.
+    </function>
+  </newfun>
+
+  <newfun>
+    <function name="bindVertexArrayOES" type="void">
+      <param name="arrayObject" type="WebGLVertexArrayObjectOES?"/>
+    </function>
+  </newfun>
+
+  <issues>
+    <p>The OES_vertex_array_object spec does not make it clear
+    what happens to buffers that are deleted when they are referenced
+    by vertex array objects. It is inferred that all buffers are
+    reference counted.
+    </p>
+    <p>Before OES_vertex_array_object there was no way to use a deleted
+    buffer in a single context as the spec states it would be unbound
+    from all bind points. After OES_vertex_array_object it is now
+    possible to use deleted buffers.
+    </p>
+    <p>Furthermore, the OpenGL ES 2.0 spec specifies that using a
+    deleted buffer has undefined results including possibly
+    corrupt rendering and generating GL errors. Undefined behavior
+    is unacceptable for WebGL.
+    </p>
+    <ul>
+      <li>
+        <p>RESOLVED: Buffers should be reference counted when attached to
+        a vertex array object. This is consistent with the OpenGL ES 3.0
+        spec's implementation of Vertex Array Objects and matches the 
+        behavior of other WebGL objects, such as textures that are attached
+        to framebuffers.
+        </p>
+        <p>This will require that most implementations do not call 
+        glDeleteBuffer when the user calls deleteBuffer on the WebGL context.
+        Instead the implementation must wait for all references to be released
+        before calling glDeleteBuffer to prevent undefined behavior.
+        </p>
+        <p>If a buffer object is deleted while it is attached to the currently
+        bound vertex array object, then it is as if BindBuffer had been called,
+        with a buffer of 0, for each target to which this buffer was attached
+        in the currently bound vertex array object. In other words, this buffer
+        is first detached from all attachment points in the currently bound 
+        vertex array object. Note that the buffer is specifically not detached
+        from any other vertex array object. Detaching the buffer from any other
+        vertex array objects is the responsibility of the application.
+        </p>
+      </li>
+    </ul>
+  </issues>
+  <history>
+    <revision date="2011/01/27">
+      <change>Initial revision.</change>
+    </revision>
+    <revision date="2011/11/12">
+      <change>Demotion to draft.</change>
+    </revision>
+    <revision date="2011/12/06">
+      <change>Added vendor-specific name strings for draft extension per discussion on WebGL mailing list.</change>
+    </revision>
+    <revision date="2011/12/07">
+      <change>Renamed "Name Strings" section to "Alias Name Strings".</change>
+      <change>Sorted Revision History in ascending order.</change>
+    </revision>
+    <revision date="2012/01/03">
+      <change>Removed webgl module per changes to Web IDL spec.</change>
+    </revision>
+    <revision date="2012/09/24">
+      <change>Added resolution to deleted buffer issue</change>
+    </revision>
+    <revision date="2012/10/16">
+      <change>Based on feedback on public_webgl, moved from draft to community approved, and removed aliases.</change>
+    </revision>
+    <revision date="2013/05/08">
+      <change>Made WebGLVertexArrayObjectOES return values and arguments nullable on feedback from Benoit Jacob.</change>
+    </revision>
+    <revision date="2013/05/14">
+      <change>Based on pull request from J Kenneth King, added WebGLHandlesContextLoss extended attribute to isVertexArrayOES and added markup for new functions.</change>
+    </revision>
+    <revision date="2013/05/15">
+      <change>Ratified by Khronos Board of Promoters.</change>
+    </revision>
+    <revision date="2014/07/15">
+      <change>Added NoInterfaceObject extended attribute to extension and WebGLVertexArrayObjectOES interface.</change>
+    </revision>
+  </history>
+</ratified>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/WEBGL_color_buffer_float/extension.xml
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<extension href="WEBGL_color_buffer_float/">
+  <name>WEBGL_color_buffer_float</name>
+
+  <contact><a href="https://www.khronos.org/webgl/public-mailing-list">WebGL
+  working group</a> (public_webgl 'at' khronos.org) </contact>
+
+  <contributors>
+    <contributor>Mark Callow, HI Corporation</contributor>
+
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+
+  <number>15</number>
+
+  <depends>
+    <api version="1.0"/>
+
+    <ext name="EXT_color_buffer_half_float"/>
+
+    <ext name="OES_texture_float" require="true"/>
+
+    <subsumed version="2.0" by="EXT_color_buffer_float" />
+  </depends>
+
+  <overview>
+    <p>Adds support for rendering to 32-bit floating-point color buffers.</p>
+
+    <features>
+      <feature>
+        <p>The 32-bit floating-point type <code>RGBA32F</code> becomes available
+        as a color-renderable format. Renderbuffers can be created in this
+        format. These and textures created with <code>format = RGBA</code> and
+        <code>type = FLOAT</code> as specified in <a
+        href="http://www.khronos.org/registry/webgl/extensions/OES_texture_float/">OES_texture_float</a>,
+        can be attached to framebuffer object color attachments for rendering.
+        </p>
+      </feature>
+
+      <feature>
+        <p>The 32-bit floating-point type <code>RGB32F</code> may also optionally
+	become available as a color-renderable format. These and textures created
+	with <code>format = RGB</code> and <code>type = FLOAT</code> as specified in
+	<a href="http://www.khronos.org/registry/webgl/extensions/OES_texture_float/">OES_texture_float</a>,
+        can be attached to framebuffer object color attachments for rendering.
+	Applications must check framebuffer completeness to determine if an
+	implementation actually supports this format.
+        </p>
+      </feature>
+
+      <feature>
+        <p><span style="color: red">NOTE:</span> fragment shaders outputs
+        gl_FragColor and gl_FragData[0] will only be clamped and converted
+        when the color buffer is fixed-point and <code>blendColor()</code> and
+        <code>clearColor()</code> will no longer clamp their parameter values
+        on input. Clamping will be applied as necessary at draw time according
+        to the type of color buffer in use.</p>
+      </feature>
+
+      <feature>
+        <p>The format and type combination <code>RGBA</code> and
+        <code>FLOAT</code> becomes valid for reading from a floating-point
+        rendering buffer. Note: <code>RGBA</code> and
+        <code>UNSIGNED_BYTE</code> cannot be used for reading from a
+        floating-point rendering buffer.</p>
+      </feature>
+
+      <feature>
+        <p>The component types of framebuffer object attachments can be
+        queried.</p>
+      </feature>
+    </features>
+  </overview>
+
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface WEBGL_color_buffer_float {
+  const GLenum RGBA32F_EXT = 0x8814;
+  const GLenum FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211;
+  const GLenum UNSIGNED_NORMALIZED_EXT = 0x8C17;
+}; // interface WEBGL_color_buffer_float
+  </idl>
+
+  <newtok>
+    <function name="renderbufferStorage" type="void"><param name="target"
+    type="GLenum"/><param name="internalformat" type="GLenum"/><param
+    name="width" type="GLsizei"/><param name="height"
+    type="GLsizei"/><code>RGBA32F_EXT</code> is accepted as the
+    <code>internalformat</code> parameter of
+    <code>renderbufferStorage()</code>.</function>
+  </newtok>
+
+  <additions>
+    <p>The new tokens and the behavioral changes for floating-point color
+    buffers specified in <a
+    href="http://www.khronos.org/registry/webgl/extensions/EXT_color_buffer_half_float/">EXT_color_buffer_half_float</a>
+    are incorporated into WebGL except for the <code>RGB16F</code> and
+    <code>RGBA16F</code> types. References to <code>RGB16F</code> are ignored,
+    and references to <code>RGBA16F</code> are replaced by references to
+    <code>RGBA32F</code>.</p>
+  </additions>
+
+  <history>
+    <revision date="2012/11/08">
+      <change>Initial revision.</change>
+    </revision>
+
+    <revision date="2012/11/12">
+      <change>Don't mirror EXT_color_buffer_half_float. Mirror has a different
+      meaning from what is done here.</change>
+    </revision>
+
+    <revision date="2012/11/13">
+      <change>Add reading-pixels-as-FLOAT feature to the Overview.</change>
+    </revision>
+
+    <revision date="2012/11/26">
+      <change>Move to draft.</change>
+    </revision>
+
+    <revision date="2014/07/15">
+      <change>Removed webgl module. Added NoInterfaceObject extended attribute.</change>
+    </revision>
+
+    <revision date="2014/09/11">
+      <change>Fixed the name of the interface from EXT_color_buffer_float to WEBGL_color_buffer_float.</change>
+    </revision>
+
+    <revision date="2014/11/24">
+      <change>Removed the support for RGB32F, since it is not natively supported on all platforms where WebGL is implemented.</change>
+    </revision>
+
+    <revision date="2014/11/24">
+      <change>Move to community approved.</change>
+    </revision>
+
+    <revision date="2016/05/05">
+      <change>Subsumed in WebGL 2.0 by EXT_color_buffer_float.</change>
+    </revision>
+
+    <revision date="2017/09/14">
+      <change>Add optional RGB renderability.</change>
+    </revision>
+  </history>
+</extension>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/WEBGL_compressed_texture_astc/extension.xml
@@ -0,0 +1,577 @@
+<?xml version="1.0"?>
+
+<extension href="WEBGL_compressed_texture_astc/">
+  <name>WEBGL_compressed_texture_astc</name>
+  <contact>
+    <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a> (public_webgl 'at' khronos.org)
+  </contact>
+  <contributors>
+    <contributor>Christophe Riccio, Unity</contributor>
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+  <number>30</number>
+  <depends>
+    <api version="1.0"/>
+  </depends>
+  <overview>
+    <p>
+      This extension exposes the compressed texture format defined in the 
+      <a href="https://www.opengl.org/registry/specs/KHR/texture_compression_astc_hdr.txt">
+      KHR_texture_compression_astc_hdr</a> OpenGL ES extension to WebGL. Consult that extension
+      specification for behavioral definitions, including error behaviors.
+    </p>
+    <p>
+      ASTC textures may be encoded using either high or low dynamic range, corresponding to an "HDR
+      profile" and "LDR profile". The compression format is designed to be extended, and for new
+      profiles to be added in the future. For this reason, enabling the WebGL extension enables all
+      of the profiles supported by the implementation. The supported profiles may be queried by
+      calling <code>getSupportedProfiles</code> against the extension object.
+    </p>
+    <features>
+      <feature>
+        Compression format <code>COMPRESSED_RGBA_ASTC_4x4_KHR</code>,
+        <code>COMPRESSED_RGBA_ASTC_5x4_KHR</code>,
+        <code>COMPRESSED_RGBA_ASTC_5x5_KHR</code>,
+        <code>COMPRESSED_RGBA_ASTC_6x5_KHR</code>,
+        <code>COMPRESSED_RGBA_ASTC_6x6_KHR</code>,
+        <code>COMPRESSED_RGBA_ASTC_8x5_KHR</code>,
+        <code>COMPRESSED_RGBA_ASTC_8x6_KHR</code>,
+        <code>COMPRESSED_RGBA_ASTC_8x8_KHR</code>,
+        <code>COMPRESSED_RGBA_ASTC_10x5_KHR</code>,
+        <code>COMPRESSED_RGBA_ASTC_10x6_KHR</code>,
+        <code>COMPRESSED_RGBA_ASTC_10x8_KHR</code>,
+        <code>COMPRESSED_RGBA_ASTC_10x10_KHR</code>,
+        <code>COMPRESSED_RGBA_ASTC_12x10_KHR</code>,
+        <code>COMPRESSED_RGBA_ASTC_12x12_KHR</code>,
+        <code>COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR</code>,
+        <code>COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR</code>,
+        <code>COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR</code>,
+        <code>COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR</code>,
+        <code>COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR</code>,
+        <code>COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR</code>,
+        <code>COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR</code>,
+        <code>COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR</code>,
+        <code>COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR</code>,
+        <code>COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR</code>,
+        <code>COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR</code>,
+        <code>COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR</code>,
+        <code>COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR</code>,
+        and <code>COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR</code> may be passed to
+        the <code>compressedTexImage2D</code> and <code>compressedTexSubImage2D</code> entry points.
+      </feature>
+      <feature>
+        Calling <code>getParameter</code> with the argument <code>COMPRESSED_TEXTURE_FORMATS</code>
+        will include the format from this specification.
+      </feature>
+      <feature>
+        <p>The following format-specific restrictions must be enforced:</p>
+        <dl>
+          <dt>COMPRESSED_RGBA_ASTC_4x4_KHR</dt>
+          <dt>COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR</dt>
+          <dd>
+            <p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
+              <code>compressedTexImage2D</code> or <code>compressedTexSubImage2D</code> must be 
+              equal to the following number of bytes:
+            </p>
+            <blockquote><code>
+              floor((width + 3) / 4) * floor((height + 3) / 4) * 16
+            </code></blockquote>
+            <p>If it is not, an <code>INVALID_VALUE</code> error is generated.</p>
+          </dd>
+        </dl>
+      </feature>
+      <feature>
+        <p>The following format-specific restrictions must be enforced:</p>
+        <dl>
+          <dt>COMPRESSED_RGBA_ASTC_5x4_KHR</dt>
+          <dt>COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR</dt>
+          <dd>
+            <p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
+              <code>compressedTexImage2D</code> or <code>compressedTexSubImage2D</code> must be 
+              equal to the following number of bytes:
+            </p>
+            <blockquote><code>
+              floor((width + 4) / 5) * floor((height + 3) / 4) * 16
+            </code></blockquote>
+            <p>If it is not, an <code>INVALID_VALUE</code> error is generated.</p>
+          </dd>
+        </dl>
+      </feature>
+      <feature>
+        <p>The following format-specific restrictions must be enforced:</p>
+        <dl>
+          <dt>COMPRESSED_RGBA_ASTC_5x5_KHR</dt>
+          <dt>COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR</dt>
+          <dd>
+            <p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
+              <code>compressedTexImage2D</code> or <code>compressedTexSubImage2D</code> must be 
+              equal to the following number of bytes:
+            </p>
+            <blockquote><code>
+              floor((width + 4) / 5) * floor((height + 4) / 5) * 16
+            </code></blockquote>
+            <p>If it is not, an <code>INVALID_VALUE</code> error is generated.</p>
+          </dd>
+        </dl>
+      </feature>
+      <feature>
+        <p>The following format-specific restrictions must be enforced:</p>
+        <dl>
+          <dt>COMPRESSED_RGBA_ASTC_6x5_KHR</dt>
+          <dt>COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR</dt>
+          <dd>
+            <p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
+              <code>compressedTexImage2D</code> or <code>compressedTexSubImage2D</code> must be 
+              equal to the following number of bytes:
+            </p>
+            <blockquote><code>
+              floor((width + 5) / 6) * floor((height + 4) / 5) * 16
+            </code></blockquote>
+            <p>If it is not, an <code>INVALID_VALUE</code> error is generated.</p>
+          </dd>
+        </dl>
+      </feature>
+      <feature>
+        <p>The following format-specific restrictions must be enforced:</p>
+        <dl>
+          <dt>COMPRESSED_RGBA_ASTC_6x6_KHR</dt>
+          <dt>COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR</dt>
+          <dd>
+            <p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
+              <code>compressedTexImage2D</code> or <code>compressedTexSubImage2D</code> must be 
+              equal to the following number of bytes:
+            </p>
+            <blockquote><code>
+              floor((width + 5) / 6) * floor((height + 5) / 6) * 16
+            </code></blockquote>
+            <p>If it is not, an <code>INVALID_VALUE</code> error is generated.</p>
+          </dd>
+        </dl>
+      </feature>
+      <feature>
+        <p>The following format-specific restrictions must be enforced:</p>
+        <dl>
+          <dt>COMPRESSED_RGBA_ASTC_8x5_KHR</dt>
+          <dt>COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR</dt>
+          <dd>
+            <p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
+              <code>compressedTexImage2D</code> or <code>compressedTexSubImage2D</code> must be 
+              equal to the following number of bytes:
+            </p>
+            <blockquote><code>
+              floor((width + 7) / 8) * floor((height + 4) / 5) * 16
+            </code></blockquote>
+            <p>If it is not, an <code>INVALID_VALUE</code> error is generated.</p>
+          </dd>
+        </dl>
+      </feature>
+      <feature>
+        <p>The following format-specific restrictions must be enforced:</p>
+        <dl>
+          <dt>COMPRESSED_RGBA_ASTC_8x6_KHR</dt>
+          <dt>COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR</dt>
+          <dd>
+            <p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
+              <code>compressedTexImage2D</code> or <code>compressedTexSubImage2D</code> must be 
+              equal to the following number of bytes:
+            </p>
+            <blockquote><code>
+              floor((width + 7) / 8) * floor((height + 5) / 6) * 16
+            </code></blockquote>
+            <p>If it is not, an <code>INVALID_VALUE</code> error is generated.</p>
+          </dd>
+        </dl>
+      </feature>
+      <feature>
+        <p>The following format-specific restrictions must be enforced:</p>
+        <dl>
+          <dt>COMPRESSED_RGBA_ASTC_8x8_KHR</dt>
+          <dt>COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR</dt>
+          <dd>
+            <p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
+              <code>compressedTexImage2D</code> or <code>compressedTexSubImage2D</code> must be 
+              equal to the following number of bytes:
+            </p>
+            <blockquote><code>
+              floor((width + 7) / 8) * floor((height + 7) / 8) * 16
+            </code></blockquote>
+            <p>If it is not, an <code>INVALID_VALUE</code> error is generated.</p>
+          </dd>
+        </dl>
+      </feature>
+      <feature>
+        <p>The following format-specific restrictions must be enforced:</p>
+        <dl>
+          <dt>COMPRESSED_RGBA_ASTC_10x5_KHR</dt>
+          <dt>COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR</dt>
+          <dd>
+            <p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
+              <code>compressedTexImage2D</code> or <code>compressedTexSubImage2D</code> must be 
+              equal to the following number of bytes:
+            </p>
+            <blockquote><code>
+              floor((width + 9) / 10) * floor((height + 4) / 5) * 16
+            </code></blockquote>
+            <p>If it is not, an <code>INVALID_VALUE</code> error is generated.</p>
+          </dd>
+        </dl>
+      </feature>
+      <feature>
+        <p>The following format-specific restrictions must be enforced:</p>
+        <dl>
+          <dt>COMPRESSED_RGBA_ASTC_10x6_KHR</dt>
+          <dt>COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR</dt>
+          <dd>
+            <p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
+              <code>compressedTexImage2D</code> or <code>compressedTexSubImage2D</code> must be 
+              equal to the following number of bytes:
+            </p>
+            <blockquote><code>
+              floor((width + 9) / 10) * floor((height + 5) / 6) * 16
+            </code></blockquote>
+            <p>If it is not, an <code>INVALID_VALUE</code> error is generated.</p>
+          </dd>
+        </dl>
+      </feature>
+      <feature>
+        <p>The following format-specific restrictions must be enforced:</p>
+        <dl>
+          <dt>COMPRESSED_RGBA_ASTC_10x8_KHR</dt>
+          <dt>COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR</dt>
+          <dd>
+            <p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
+              <code>compressedTexImage2D</code> or <code>compressedTexSubImage2D</code> must be 
+              equal to the following number of bytes:
+            </p>
+            <blockquote><code>
+              floor((width + 9) / 10) * floor((height + 7) / 8) * 16
+            </code></blockquote>
+            <p>If it is not, an <code>INVALID_VALUE</code> error is generated.</p>
+          </dd>
+        </dl>
+      </feature>
+      <feature>
+        <p>The following format-specific restrictions must be enforced:</p>
+        <dl>
+          <dt>COMPRESSED_RGBA_ASTC_10x10_KHR</dt>
+          <dt>COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR</dt>
+          <dd>
+            <p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
+              <code>compressedTexImage2D</code> or <code>compressedTexSubImage2D</code> must be 
+              equal to the following number of bytes:
+            </p>
+            <blockquote><code>
+              floor((width + 9) / 10) * floor((height + 9) / 10) * 16
+            </code></blockquote>
+            <p>If it is not, an <code>INVALID_VALUE</code> error is generated.</p>
+          </dd>
+        </dl>
+      </feature>
+      <feature>
+        <p>The following format-specific restrictions must be enforced:</p>
+        <dl>
+          <dt>COMPRESSED_RGBA_ASTC_12x10_KHR</dt>
+          <dt>COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR</dt>
+          <dd>
+            <p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
+              <code>compressedTexImage2D</code> or <code>compressedTexSubImage2D</code> must be 
+              equal to the following number of bytes:
+            </p>
+            <blockquote><code>
+              floor((width + 11) / 12) * floor((height + 9) / 10) * 16
+            </code></blockquote>
+            <p>If it is not, an <code>INVALID_VALUE</code> error is generated.</p>
+          </dd>
+        </dl>
+      </feature>
+      <feature>
+        <p>The following format-specific restrictions must be enforced:</p>
+        <dl>
+          <dt>COMPRESSED_RGBA_ASTC_12x12_KHR</dt>
+          <dt>COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR</dt>
+          <dd>
+            <p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
+              <code>compressedTexImage2D</code> or <code>compressedTexSubImage2D</code> must be 
+              equal to the following number of bytes:
+            </p>
+            <blockquote><code>
+              floor((width + 11) / 12) * floor((height + 11) / 12) * 16
+            </code></blockquote>
+            <p>If it is not, an <code>INVALID_VALUE</code> error is generated.</p>
+          </dd>
+        </dl>
+      </feature>
+    </features>
+  </overview>
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface WEBGL_compressed_texture_astc {
+    /* Compressed Texture Format */
+    const GLenum COMPRESSED_RGBA_ASTC_4x4_KHR = 0x93B0;
+    const GLenum COMPRESSED_RGBA_ASTC_5x4_KHR = 0x93B1;
+    const GLenum COMPRESSED_RGBA_ASTC_5x5_KHR = 0x93B2;
+    const GLenum COMPRESSED_RGBA_ASTC_6x5_KHR = 0x93B3;
+    const GLenum COMPRESSED_RGBA_ASTC_6x6_KHR = 0x93B4;
+    const GLenum COMPRESSED_RGBA_ASTC_8x5_KHR = 0x93B5;
+    const GLenum COMPRESSED_RGBA_ASTC_8x6_KHR = 0x93B6;
+    const GLenum COMPRESSED_RGBA_ASTC_8x8_KHR = 0x93B7;
+    const GLenum COMPRESSED_RGBA_ASTC_10x5_KHR = 0x93B8;
+    const GLenum COMPRESSED_RGBA_ASTC_10x6_KHR = 0x93B9;
+    const GLenum COMPRESSED_RGBA_ASTC_10x8_KHR = 0x93BA;
+    const GLenum COMPRESSED_RGBA_ASTC_10x10_KHR = 0x93BB;
+    const GLenum COMPRESSED_RGBA_ASTC_12x10_KHR = 0x93BC;
+    const GLenum COMPRESSED_RGBA_ASTC_12x12_KHR = 0x93BD;
+
+    const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR = 0x93D0;
+    const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR = 0x93D1;
+    const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR = 0x93D2;
+    const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR = 0x93D3;
+    const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR = 0x93D4;
+    const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR = 0x93D5;
+    const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR = 0x93D6;
+    const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR = 0x93D7;
+    const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR = 0x93D8;
+    const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR = 0x93D9;
+    const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR = 0x93DA;
+    const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR = 0x93DB;
+    const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR = 0x93DC;
+    const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR = 0x93DD;
+
+    // Profile query support.
+    sequence&lt;DOMString&gt; getSupportedProfiles();
+};
+  </idl>
+
+  <newfun>
+    <function name="getSupportedProfiles" type="sequence&lt;DOMString&gt;">
+      Returns the names of the ASTC profiles supported by the implementation. As of this writing,
+      valid return values will include "ldr", corresponding to the
+      GL_KHR_texture_compression_astc_ldr extension string; and "hdr", corresponding to the
+      GL_KHR_texture_compression_astc_hdr extension string. More profiles may be added in the
+      future.
+    </function>
+    <div class="note">
+      The intent of the <code>getSupportedProfiles</code> function is to allow easy reconstruction
+      of the underlying OpenGL or OpenGL ES extension strings for environments like Emscripten, by
+      prepending the string <code>GL_KHR_texture_compression_astc_</code> to the returned profile
+      names.
+    </div>
+  </newfun>
+
+  <newtok>
+    <function name="compressedTexImage2D">
+      <param name="internalformat" type="GLenum"/>
+      Accepted by the <code>internalformat</code> parameter:
+      <code>COMPRESSED_RGBA_ASTC_4x4_KHR</code>,
+      <code>COMPRESSED_RGBA_ASTC_5x4_KHR</code>,
+      <code>COMPRESSED_RGBA_ASTC_5x5_KHR</code>,
+      <code>COMPRESSED_RGBA_ASTC_6x5_KHR</code>,
+      <code>COMPRESSED_RGBA_ASTC_6x6_KHR</code>,
+      <code>COMPRESSED_RGBA_ASTC_8x5_KHR</code>,
+      <code>COMPRESSED_RGBA_ASTC_8x6_KHR</code>,
+      <code>COMPRESSED_RGBA_ASTC_8x8_KHR</code>,
+      <code>COMPRESSED_RGBA_ASTC_10x5_KHR</code>,
+      <code>COMPRESSED_RGBA_ASTC_10x6_KHR</code>,
+      <code>COMPRESSED_RGBA_ASTC_10x8_KHR</code>,
+      <code>COMPRESSED_RGBA_ASTC_10x10_KHR</code>,
+      <code>COMPRESSED_RGBA_ASTC_12x10_KHR</code>,
+      <code>COMPRESSED_RGBA_ASTC_12x12_KHR</code>,
+      <code>COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR</code>,
+      <code>COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR</code>,
+      <code>COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR</code>,
+      <code>COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR</code>,
+      <code>COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR</code>,
+      <code>COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR</code>,
+      <code>COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR</code>,
+      <code>COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR</code>,
+      <code>COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR</code>,
+      <code>COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR</code>,
+      <code>COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR</code>,
+      <code>COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR</code>,
+      <code>COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR</code>,
+      <code>COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR</code>
+      <br/>
+    </function>
+    
+    <function name="compressedTexSubImage2D">
+      <param name="internalformat" type="GLenum"/>
+      Accepted by the <code>internalformat</code> parameter:
+      <code>COMPRESSED_RGBA_ASTC_4x4_KHR</code>,
+      <code>COMPRESSED_RGBA_ASTC_5x4_KHR</code>,
+      <code>COMPRESSED_RGBA_ASTC_5x5_KHR</code>,
+      <code>COMPRESSED_RGBA_ASTC_6x5_KHR</code>,
+      <code>COMPRESSED_RGBA_ASTC_6x6_KHR</code>,
+      <code>COMPRESSED_RGBA_ASTC_8x5_KHR</code>,
+      <code>COMPRESSED_RGBA_ASTC_8x6_KHR</code>,
+      <code>COMPRESSED_RGBA_ASTC_8x8_KHR</code>,
+      <code>COMPRESSED_RGBA_ASTC_10x5_KHR</code>,
+      <code>COMPRESSED_RGBA_ASTC_10x6_KHR</code>,
+      <code>COMPRESSED_RGBA_ASTC_10x8_KHR</code>,
+      <code>COMPRESSED_RGBA_ASTC_10x10_KHR</code>,
+      <code>COMPRESSED_RGBA_ASTC_12x10_KHR</code>,
+      <code>COMPRESSED_RGBA_ASTC_12x12_KHR</code>,
+      <code>COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR</code>,
+      <code>COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR</code>,
+      <code>COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR</code>,
+      <code>COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR</code>,
+      <code>COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR</code>,
+      <code>COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR</code>,
+      <code>COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR</code>,
+      <code>COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR</code>,
+      <code>COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR</code>,
+      <code>COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR</code>,
+      <code>COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR</code>,
+      <code>COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR</code>,
+      <code>COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR</code>,
+      <code>COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR</code>
+      <br/>
+    </function>
+  </newtok>
+
+  <errors>
+    <error enum="INVALID_VALUE">
+      The error <code>INVALID_VALUE</code> is generated by <code>compressedTexImage2D</code> and <code>compressedTexSubImage2D</code>
+      if the <code>internalformat</code> parameter is 
+      <code>COMPRESSED_RGBA_ASTC_4x4_KHR</code> or <code>COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR</code>
+      and the byteLength of the ArrayBufferView is not:
+      <blockquote><code>
+        floor((width + 3) / 4) * floor((height + 3) / 4) * 16
+      </code></blockquote>
+    </error>
+    <error enum="INVALID_VALUE">
+      The error <code>INVALID_VALUE</code> is generated by <code>compressedTexImage2D</code> and <code>compressedTexSubImage2D</code>
+      if the <code>internalformat</code> parameter is 
+      <code>COMPRESSED_RGBA_ASTC_5x4_KHR</code> or <code>COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR</code>
+      and the byteLength of the ArrayBufferView is not:
+      <blockquote><code>
+        floor((width + 4) / 5) * floor((height + 3) / 4) * 16
+      </code></blockquote>
+    </error>
+    <error enum="INVALID_VALUE">
+      The error <code>INVALID_VALUE</code> is generated by <code>compressedTexImage2D</code> and <code>compressedTexSubImage2D</code>
+      if the <code>internalformat</code> parameter is 
+      <code>COMPRESSED_RGBA_ASTC_5x5_KHR</code> or <code>COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR</code>
+      and the byteLength of the ArrayBufferView is not:
+      <blockquote><code>
+        floor((width + 4) / 5) * floor((height + 4) / 5) * 16
+      </code></blockquote>
+    </error>
+    <error enum="INVALID_VALUE">
+      The error <code>INVALID_VALUE</code> is generated by <code>compressedTexImage2D</code> and <code>compressedTexSubImage2D</code>
+      if the <code>internalformat</code> parameter is 
+      <code>COMPRESSED_RGBA_ASTC_6x5_KHR</code> or <code>COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR</code>
+      and the byteLength of the ArrayBufferView is not:
+      <blockquote><code>
+        floor((width + 5) / 6) * floor((height + 4) / 5) * 16
+      </code></blockquote>
+    </error>
+    <error enum="INVALID_VALUE">
+      The error <code>INVALID_VALUE</code> is generated by <code>compressedTexImage2D</code> and <code>compressedTexSubImage2D</code>
+      if the <code>internalformat</code> parameter is 
+      <code>COMPRESSED_RGBA_ASTC_6x6_KHR</code> or <code>COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR</code>
+      and the byteLength of the ArrayBufferView is not:
+      <blockquote><code>
+        floor((width + 5) / 6) * floor((height + 5) / 6) * 16
+      </code></blockquote>
+    </error>
+    <error enum="INVALID_VALUE">
+      The error <code>INVALID_VALUE</code> is generated by <code>compressedTexImage2D</code> and <code>compressedTexSubImage2D</code>
+      if the <code>internalformat</code> parameter is 
+      <code>COMPRESSED_RGBA_ASTC_8x5_KHR</code> or <code>COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR</code>
+      and the byteLength of the ArrayBufferView is not:
+      <blockquote><code>
+        floor((width + 7) / 8) * floor((height + 4) / 5) * 16
+      </code></blockquote>
+    </error>
+    <error enum="INVALID_VALUE">
+      The error <code>INVALID_VALUE</code> is generated by <code>compressedTexImage2D</code> and <code>compressedTexSubImage2D</code>
+      if the <code>internalformat</code> parameter is 
+      <code>COMPRESSED_RGBA_ASTC_8x6_KHR</code> or <code>COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR</code>
+      and the byteLength of the ArrayBufferView is not:
+      <blockquote><code>
+        floor((width + 7) / 8) * floor((height + 5) / 6) * 16
+      </code></blockquote>
+    </error>
+    <error enum="INVALID_VALUE">
+      The error <code>INVALID_VALUE</code> is generated by <code>compressedTexImage2D</code> and <code>compressedTexSubImage2D</code>
+      if the <code>internalformat</code> parameter is 
+      <code>COMPRESSED_RGBA_ASTC_8x8_KHR</code> or <code>COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR</code>
+      and the byteLength of the ArrayBufferView is not:
+      <blockquote><code>
+        floor((width + 7) / 8) * floor((height + 7) / 8) * 16
+      </code></blockquote>
+    </error>
+    <error enum="INVALID_VALUE">
+      The error <code>INVALID_VALUE</code> is generated by <code>compressedTexImage2D</code> and <code>compressedTexSubImage2D</code>
+      if the <code>internalformat</code> parameter is 
+      <code>COMPRESSED_RGBA_ASTC_10x5_KHR</code> or <code>COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR</code>
+      and the byteLength of the ArrayBufferView is not:
+      <blockquote><code>
+        floor((width + 9) / 10) * floor((height + 4) / 5) * 16
+      </code></blockquote>
+    </error>
+    <error enum="INVALID_VALUE">
+      The error <code>INVALID_VALUE</code> is generated by <code>compressedTexImage2D</code> and <code>compressedTexSubImage2D</code>
+      if the <code>internalformat</code> parameter is 
+      <code>COMPRESSED_RGBA_ASTC_10x6_KHR</code> or <code>COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR</code>
+      and the byteLength of the ArrayBufferView is not:
+      <blockquote><code>
+        floor((width + 9) / 10) * floor((height + 5) / 6) * 16
+      </code></blockquote>
+    </error>
+    <error enum="INVALID_VALUE">
+      The error <code>INVALID_VALUE</code> is generated by <code>compressedTexImage2D</code> and <code>compressedTexSubImage2D</code>
+      if the <code>internalformat</code> parameter is 
+      <code>COMPRESSED_RGBA_ASTC_10x8_KHR</code> or <code>COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR</code>
+      and the byteLength of the ArrayBufferView is not:
+      <blockquote><code>
+        floor((width + 9) / 10) * floor((height + 7) / 8) * 16
+      </code></blockquote>
+    </error>
+    <error enum="INVALID_VALUE">
+      The error <code>INVALID_VALUE</code> is generated by <code>compressedTexImage2D</code> and <code>compressedTexSubImage2D</code>
+      if the <code>internalformat</code> parameter is 
+      <code>COMPRESSED_RGBA_ASTC_10x10_KHR</code> or <code>COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR</code>
+      and the byteLength of the ArrayBufferView is not:
+      <blockquote><code>
+        floor((width + 9) / 10) * floor((height + 9) / 10) * 16
+      </code></blockquote>
+    </error>
+    <error enum="INVALID_VALUE">
+      The error <code>INVALID_VALUE</code> is generated by <code>compressedTexImage2D</code> and <code>compressedTexSubImage2D</code>
+      if the <code>internalformat</code> parameter is 
+      <code>COMPRESSED_RGBA_ASTC_12x10_KHR</code> or <code>COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR</code>
+      and the byteLength of the ArrayBufferView is not:
+      <blockquote><code>
+        floor((width + 11) / 12) * floor((height + 9) / 10) * 16
+      </code></blockquote>
+     </error>
+    <error enum="INVALID_VALUE">
+      The error <code>INVALID_VALUE</code> is generated by <code>compressedTexImage2D</code> and <code>compressedTexSubImage2D</code>
+      if the <code>internalformat</code> parameter is 
+      <code>COMPRESSED_RGBA_ASTC_12x12_KHR</code> or <code>COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR</code>
+      and the byteLength of the ArrayBufferView is not:
+      <blockquote><code>
+        floor((width + 11) / 12) * floor((height + 11) / 12) * 16
+      </code></blockquote>
+     </error>
+  </errors>
+
+  <history>
+    <revision date="2015/03/10">
+      <change>Initial revision.</change>
+    </revision>
+    <revision date="2015/08/07">
+      <change>Added profile string support. Renamed constants back to _KHR.</change>
+    </revision>
+    <revision date="2015/08/10">
+      <change>Clarified intent of getSupportedProfiles. Stressed that OpenGL ES extension defines the behavior.</change>
+    </revision>
+    <revision date="2015/08/10">
+      <change>Moved to draft status.</change>
+    </revision>
+    <revision date="2016/12/12">
+      <change>Moved to community approved after discussion on public_webgl list.</change>
+    </revision>
+  </history>
+</extension>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/WEBGL_compressed_texture_atc/extension.xml
@@ -0,0 +1,109 @@
+<?xml version="1.0"?>
+
+<extension href="WEBGL_compressed_texture_atc/">
+  <name>WEBGL_compressed_texture_atc</name>
+  <contact>
+    <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a> (public_webgl 'at' khronos.org)
+  </contact>
+  <contributors>
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+  <number>12</number>
+  <depends>
+    <api version="1.0"/>
+  </depends>
+  <overview>
+    <p>
+      This extension exposes the compressed texture formats defined in the 
+      <a href="http://www.khronos.org/registry/gles/extensions/AMD/AMD_compressed_ATC_texture.txt">
+      AMD_compressed_ATC_texture</a> OpenGL extension to WebGL.
+    </p>
+    <features>
+      <feature>
+        Compression formats <code>COMPRESSED_RGB_ATC_WEBGL</code>,
+        <code>COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL</code>, and
+        <code>COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL</code> may be passed to
+        the <code>compressedTexImage2D</code> and <code>compressedTexSubImage2D</code> entry points.
+
+        These formats correspond to the 3 formats defined in the AMD_compressed_ATC_texture OpenGL
+        extension. Although the enum names are changed, their numeric values are the same. The correspondence
+        is given by this table:
+        <table>
+          <tr>
+            <th>WebGL format enum</th>
+            <th>OpenGL format enum</th>
+            <th>Numeric value</th>
+          </tr>
+          <tr>
+            <td>COMPRESSED_RGB_ATC_WEBGL</td>
+            <td>ATC_RGB_AMD</td>
+            <td>0x8C92</td>
+          </tr>
+          <tr>
+            <td>COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL</td>
+            <td>ATC_RGBA_EXPLICIT_ALPHA_AMD</td>
+            <td>0x8C93</td>
+          </tr>
+          <tr>
+            <td>COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL</td>
+            <td>ATC_RGBA_INTERPOLATED_ALPHA_AMD</td>
+            <td>0x87EE</td>
+          </tr>
+        </table>
+      </feature>
+      <feature>
+        Calling <code>getParameter</code> with the argument <code>COMPRESSED_TEXTURE_FORMATS</code>
+        will include the 3 formats from this specification.
+      </feature>
+      <feature>
+        <p>The following format-specific restrictions must be enforced:</p>
+        <dl>
+          <dt>COMPRESSED_RGB_ATC_WEBGL</dt>
+          <dd><p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
+          <code>compressedTexImage2D</code>, must be equal to the following number of bytes:</p>
+          <blockquote><code>
+            floor((width + 3) / 4) * floor((height + 3) / 4) * 8
+          </code></blockquote>
+          <p>If it is not, an <code>INVALID_VALUE</code> error is generated.</p>
+          </dd>
+
+          <dt>COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL</dt>
+          <dt>COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL</dt>
+          <dd><p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
+          <code>compressedTexImage2D</code>, must be equal to the following number of bytes:</p>
+          <blockquote><code>
+            floor((width + 3) / 4) * floor((height + 3) / 4) * 16
+          </code></blockquote>
+          <p>If it is not, an <code>INVALID_VALUE</code> error is generated.</p>
+          </dd>
+        </dl>
+      </feature>
+    </features>
+  </overview>
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface WEBGL_compressed_texture_atc {
+    /* Compressed Texture Formats */
+    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;
+};
+  </idl>
+  <history>
+    <revision date="2012/09/11">
+      <change>Initial revision.</change>
+    </revision>
+    <revision date="2013/07/03">
+      <change>Clarified that length of ArrayBufferView is actually byteLength.</change>
+    </revision>
+    <revision date="2014/04/17">
+      <change>Removed reference to compressedTexSubImage2D. This format can only be used with compressedTexImage2D.</change>
+    </revision>
+    <revision date="2014/06/27">
+      <change>Moved to community approved after discussion on public_webgl list.</change>
+    </revision>
+    <revision date="2014/07/15">
+      <change>Added NoInterfaceObject extended attribute.</change>
+    </revision>
+  </history>
+</extension>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/WEBGL_compressed_texture_etc/extension.xml
@@ -0,0 +1,189 @@
+<?xml version="1.0"?>
+
+<extension href="WEBGL_compressed_texture_etc/">
+  <name>WEBGL_compressed_texture_etc</name>
+  <contact>
+    <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a> (public_webgl 'at' khronos.org)
+  </contact>
+  <contributors>
+    <contributor>Jeff Gilbert, Mozilla</contributor>
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+  <number>29</number>
+  <depends>
+    <api version="1.0"/>
+  </depends>
+  <overview>
+    <p>
+      This extension exposes the compressed texture formats defined as core in the
+      <a href="http://www.khronos.org/registry/gles/specs/3.0/es_spec_3.0.4.pdf">
+      OpenGL ES 3.0</a> spec to WebGL. These include the ETC2 and EAC formats, where
+      ETC2 is a superset of ETC1. ETC1 textures can be loaded using the ETC2 token
+      value. All of these formats are in the ETC family.
+    </p>
+    <p>
+      Browsers should not advertise this extension when the WebGL implementation, or
+      graphics driver, supports these formats by decompressing them.
+    </p>
+    <features>
+      <feature>
+        Compression formats <code>COMPRESSED_R11_EAC</code>,
+        <code>COMPRESSED_SIGNED_R11_EAC</code>,
+        <code>COMPRESSED_RG11_EAC</code>,
+        <code>COMPRESSED_SIGNED_RG11_EAC</code>,
+        <code>COMPRESSED_RGB8_ETC2</code>,
+        <code>COMPRESSED_SRGB8_ETC2</code>,
+        <code>COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2</code>,
+        <code>COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2</code>,
+        <code>COMPRESSED_RGBA8_ETC2_EAC</code>,
+        and <code>COMPRESSED_SRGB8_ALPHA8_ETC2_EAC</code> may be passed to the
+        <code>compressedTexImage2D</code> and <code>compressedTexSubImage2D</code> entry points. In
+        WebGL 2.0, they may also be passed to the <code>compressedTexImage3D</code> and
+        <code>compressedTexSubImage3D</code> entry points with the <code>TEXTURE_2D_ARRAY</code>
+        target.
+      </feature>
+      <feature>
+        Calling <code>getParameter</code> with the argument <code>COMPRESSED_TEXTURE_FORMATS</code>
+        will include the formats from this specification.
+      </feature>
+      <feature>
+        For all of the formats, <code>validatedSize</code> (defined for each specific format
+        below) is validated in the following ways:
+        <ul>
+            <li>
+                <b>WebGL 1.0 and 2.0</b>: if the variant of <code>compressedTexImage*D</code> or
+                <code>compressedTexSubImage*D</code> taking <code>ArrayBufferView pixels</code> is
+                called, then the <code>byteLength</code> of the view must be equal to
+                <code>validatedSize</code>, or an INVALID_VALUE error is generated.
+            </li>
+            <li>
+                <b>WebGL 2.0</b>: if the variant of <code>compressedTexImage*D</code> or
+                <code>compressedTexSubImage*D</code> taking <code>GLintptr offset</code> is called,
+                and <code>offset + validatedSize</code> is greater than the size of the bound
+                <code>PIXEL_UNPACK_BUFFER</code>, an <code>INVALID_OPERATION</code> error is
+                generated.
+            </li>
+        </ul>
+        <dl>
+          <dt>COMPRESSED_R11_EAC</dt>
+          <dt>COMPRESSED_SIGNED_R11_EAC</dt>
+          <dt>COMPRESSED_RGB8_ETC2</dt>
+          <dt>COMPRESSED_SRGB8_ETC2</dt>
+          <dt>COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2</dt>
+          <dt>COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2</dt>
+          <dd><p><code>validatedSize</code> is computed in the following way:</p>
+          <blockquote><code>
+            floor((width + 3) / 4) * floor((height + 3) / 4) * 8
+          </code></blockquote>
+          </dd>
+        </dl>
+        <dl>
+          <dt>COMPRESSED_RG11_EAC</dt>
+          <dt>COMPRESSED_SIGNED_RG11_EAC</dt>
+          <dt>COMPRESSED_RGBA8_ETC2_EAC</dt>
+          <dt>COMPRESSED_SRGB8_ALPHA8_ETC2_EAC</dt>
+          <dd><p><code>validatedSize</code> is computed in the following way:</p>
+          <blockquote><code>
+            floor((width + 3) / 4) * floor((height + 3) / 4) * 16
+          </code></blockquote>
+          </dd>
+        </dl>
+      </feature>
+    </features>
+  </overview>
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface WEBGL_compressed_texture_etc {
+    /* Compressed Texture Formats */
+    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;
+    const GLenum COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2  = 0x9276;
+    const GLenum COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277;
+    const GLenum COMPRESSED_RGBA8_ETC2_EAC                 = 0x9278;
+    const GLenum COMPRESSED_SRGB8_ALPHA8_ETC2_EAC          = 0x9279;
+};
+  </idl>
+  
+  <newtok>
+    <function name="compressedTexImage2D">
+      <param name="internalformat" type="GLenum"/>
+      Accepted by the <code>internalformat</code> parameter:
+      <code>COMPRESSED_R11_EAC</code>,
+      <code>COMPRESSED_SIGNED_R11_EAC</code>,
+      <code>COMPRESSED_RG11_EAC</code>,
+      <code>COMPRESSED_SIGNED_RG11_EAC</code>,
+      <code>COMPRESSED_RGB8_ETC2</code>,
+      <code>COMPRESSED_SRGB8_ETC2</code>,
+      <code>COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2</code>,
+      <code>COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2</code>,
+      <code>COMPRESSED_RGBA8_ETC2_EAC</code> or
+      <code>COMPRESSED_SRGB8_ALPHA8_ETC2_EAC</code>
+      <br/>
+    </function>
+    
+    <function name="compressedTexSubImage2D">
+      <param name="internalformat" type="GLenum"/>
+      Accepted by the <code>internalformat</code> parameter:
+      <code>COMPRESSED_R11_EAC</code>,
+      <code>COMPRESSED_SIGNED_R11_EAC</code>,
+      <code>COMPRESSED_RG11_EAC</code>,
+      <code>COMPRESSED_SIGNED_RG11_EAC</code>,
+      <code>COMPRESSED_RGB8_ETC2</code>,
+      <code>COMPRESSED_SRGB8_ETC2</code>,
+      <code>COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2</code>,
+      <code>COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2</code>,
+      <code>COMPRESSED_RGBA8_ETC2_EAC</code> or
+      <code>COMPRESSED_SRGB8_ALPHA8_ETC2_EAC</code>
+      <br/>
+    </function>
+  </newtok>
+
+  <errors>
+    <error enum="INVALID_VALUE">
+      The error <code>INVALID_VALUE</code> is generated by <code>compressedTexImage2D</code>,
+      <code>compressedTexSubImage2D</code>, <code>compressedTexImage3D</code>, and
+      <code>compressedTexSubImage3D</code> if the variant taking <code>ArrayBufferView pixels</code>
+      is called and the size restrictions above are not met.
+    </error>
+    <error enum="INVALID_OPERATION">
+      The error <code>INVALID_OPERATION</code> is generated by <code>compressedTexImage2D</code>,
+      <code>compressedTexSubImage2D</code>, <code>compressedTexImage3D</code>, and
+      <code>compressedTexSubImage3D</code> if the variant taking <code>GLintptr offset</code> is
+      called and the size restrictions above are not met.
+    </error>
+  </errors>
+  <history>
+    <revision date="2013/12/9">
+      <change>Initial revision.</change>
+    </revision>
+    <revision date="2014/07/15">
+      <change>Added NoInterfaceObject extended attribute.</change>
+    </revision>
+    <revision date="2014/12/12">
+      <change>COMPRESSED_RGB_ETC2 should be COMPRESSED_RGB8_ETC2.</change>
+      <change>Remove unnecessary language.</change>
+    </revision>
+    <revision date="2015/01/31">
+      <change>Moved to draft.</change>
+      <change>Added issue questions.</change>
+      <change>Formalized the newtok and error codes.</change>
+    </revision>
+    <revision date="2016/09/16">
+      <change>Renamed to WEBGL_compressed_texture_es3_0.</change>
+    </revision>
+    <revision date="2016/09/21">
+      <change>Clarifications to the supported formats on suggestion from Mark Callow.</change>
+    </revision>
+    <revision date="2016/09/30">
+      <change>Addressed issues regarding 3D entry points, description of interation with WebGL 2.0,
+      and generation of INVALID_OPERATION and INVALID_VALUE errors. Added note that browsers should
+      not advertise this extension if these compressed texture formats are decompressed. Renamed to
+      WEBGL_compressed_texture_etc after further discussion. Promoted to community
+      approved.</change>
+    </revision>
+  </history>
+</extension>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/WEBGL_compressed_texture_etc1/extension.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0"?>
+
+<extension href="WEBGL_compressed_texture_etc1/">
+  <name>WEBGL_compressed_texture_etc1</name>
+  <contact>
+    <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a> (public_webgl 'at' khronos.org)
+  </contact>
+  <contributors>
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+  <number>24</number>
+  <depends>
+    <api version="1.0"/>
+  </depends>
+  <overview>
+    <p>
+      This extension exposes the compressed texture format defined in the 
+      <a href="http://www.khronos.org/registry/gles/extensions/OES/OES_compressed_ETC1_RGB8_texture.txt">
+      OES_compressed_ETC1_RGB8_texture</a> OpenGL ES extension to WebGL.
+    </p>
+    <features>
+      <feature>
+        Compression format <code>COMPRESSED_RGB_ETC1_WEBGL</code> may be passed to
+        the <code>compressedTexImage2D</code> entry point.
+
+        This format correspond to the format defined in the OES_compressed_ETC1_RGB8_texture OpenGL ES
+        extension. Although the enum name is changed, the numeric value is the same. The correspondence
+        is given by this table:
+        <table>
+          <tr>
+            <th>WebGL format enum</th>
+            <th>OpenGL format enum</th>
+            <th>Numeric value</th>
+          </tr>
+          <tr>
+            <td>COMPRESSED_RGB_ETC1_WEBGL</td>
+            <td>ETC1_RGB8_OES</td>
+            <td>0x8D64</td>
+          </tr>
+        </table>
+      </feature>
+      <feature>
+        Calling <code>getParameter</code> with the argument <code>COMPRESSED_TEXTURE_FORMATS</code>
+        will include the format from this specification.
+      </feature>
+      <feature>
+        <p>The following format-specific restrictions must be enforced:</p>
+        <dl>
+          <dt>COMPRESSED_RGB_ETC1_WEBGL</dt>
+          <dd><p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
+          <code>compressedTexImage2D</code> must be equal to the following number of bytes:</p>
+          <blockquote><code>
+            floor((width + 3) / 4) * floor((height + 3) / 4) * 8
+          </code></blockquote>
+          <p>If it is not, an <code>INVALID_VALUE</code> error is generated.</p>
+          </dd>
+        </dl>
+      </feature>
+    </features>
+  </overview>
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface WEBGL_compressed_texture_etc1 {
+    /* Compressed Texture Format */
+    const GLenum COMPRESSED_RGB_ETC1_WEBGL = 0x8D64; 
+};
+  </idl>
+  <history>
+    <revision date="2012/02/23">
+      <change>Initial revision.</change>
+    </revision>
+    <revision date="2013/07/03">
+      <change>Clarified that length of ArrayBufferView is actually byteLength.</change>
+    </revision>
+    <revision date="2013/11/27">
+      <change>Moved to draft status.</change>
+    </revision>
+    <revision date="2013/12/03">
+      <change>Assigned extension number 24 to WEBGL_compressed_texture_etc1 extension.</change>
+    </revision>
+    <revision date="2014/03/07">
+      <change>Remove ability to use the format with compressedTexSubImage2D, as per the GLES extension spec.</change>
+    </revision>
+    <revision date="2014/06/27">
+      <change>Moved to community approved after discussion on public_webgl list.</change>
+    </revision>
+    <revision date="2014/07/15">
+      <change>Added NoInterfaceObject extended attribute.</change>
+    </revision>
+  </history>
+</extension>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/WEBGL_compressed_texture_pvrtc/extension.xml
@@ -0,0 +1,100 @@
+<?xml version="1.0"?>
+
+<extension href="WEBGL_compressed_texture_pvrtc/">
+  <name>WEBGL_compressed_texture_pvrtc</name>
+  <contact>
+    <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a> (public_webgl 'at' khronos.org)
+  </contact>
+  <contributors>
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+  <number>13</number>
+  <depends>
+    <api version="1.0"/>
+  </depends>
+  <overview>
+    <p>
+      This extension exposes the compressed texture formats defined in the 
+      <a href="http://www.khronos.org/registry/gles/extensions/IMG/IMG_texture_compression_pvrtc.txt">
+      IMG_texture_compression_pvrtc</a> OpenGL extension to WebGL.
+    </p>
+    <features>
+      <feature>
+        Compression formats <code>COMPRESSED_RGB_PVRTC_4BPPV1_IMG</code>,
+        <code>COMPRESSED_RGB_PVRTC_2BPPV1_IMG</code>, <code>COMPRESSED_RGBA_PVRTC_4BPPV1_IMG</code>, and
+        <code>COMPRESSED_RGBA_PVRTC_2BPPV1_IMG</code> may be passed to
+        the <code>compressedTexImage2D</code> and <code>compressedTexSubImage2D</code> entry points.
+      </feature>
+      <feature>
+        Calling <code>getParameter</code> with the argument <code>COMPRESSED_TEXTURE_FORMATS</code>
+        will include the 4 formats from this specification.
+      </feature>
+      <feature>
+        <p>The following format-specific restrictions apply to all of the formats described
+          by this extension:
+        </p>
+
+        <p>In <code>compressedTexImage2D</code>, the <code>width</code> and <code>height</code>
+          parameters must be powers of two. Otherwise, an INVALID_VALUE error is generated.
+        </p>
+
+        <p>
+          In <code>compressedTexSubImage2D</code>, the <code>width</code> and <code>height</code>
+          parameters must be equal to the current values of the existing texture image, and the
+          <code>xoffset</code> and <code>yoffset</code> parameters must be zero.
+          Otherwise, an INVALID_VALUE error is generated.
+        </p>
+      </feature>
+      <feature>
+        <p>The following format-specific restrictions must also be enforced:</p>
+        <dl>
+          <dt>COMPRESSED_RGB_PVRTC_4BPPV1_IMG</dt>
+          <dt>COMPRESSED_RGBA_PVRTC_4BPPV1_IMG</dt>
+          <dd><p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
+          either <code>compressedTexImage2D</code> or <code>compressedTexSubImage2D</code> must be
+          equal to the following number of bytes:</p>
+          <blockquote><code>
+            max(width, 8) * max(height, 8) / 2
+          </code></blockquote>
+          <p>If it is not, an <code>INVALID_VALUE</code> error is generated.</p>
+          </dd>
+
+          <dt>COMPRESSED_RGB_PVRTC_2BPPV1_IMG</dt>
+          <dt>COMPRESSED_RGBA_PVRTC_2BPPV1_IMG</dt>
+          <dd><p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
+          either <code>compressedTexImage2D</code> or <code>compressedTexSubImage2D</code> must be
+          equal to the following number of bytes:</p>
+          <blockquote><code>
+            max(width, 16) * max(height, 8) / 4
+          </code></blockquote>
+          <p>If it is not, an <code>INVALID_VALUE</code> error is generated.</p>
+          </dd>
+        </dl>
+      </feature>
+    </features>
+  </overview>
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface WEBGL_compressed_texture_pvrtc {
+    /* Compressed Texture Formats */
+    const GLenum COMPRESSED_RGB_PVRTC_4BPPV1_IMG      = 0x8C00;
+    const GLenum COMPRESSED_RGB_PVRTC_2BPPV1_IMG      = 0x8C01;
+    const GLenum COMPRESSED_RGBA_PVRTC_4BPPV1_IMG     = 0x8C02;
+    const GLenum COMPRESSED_RGBA_PVRTC_2BPPV1_IMG     = 0x8C03;
+};
+  </idl>
+  <history>
+    <revision date="2012/08/07">
+      <change>Initial revision.</change>
+    </revision>
+    <revision date="2013/07/03">
+      <change>Clarified that length of ArrayBufferView is actually byteLength.</change>
+    </revision>
+    <revision date="2014/06/27">
+      <change>Moved to community approved after discussion on public_webgl list.</change>
+    </revision>
+    <revision date="2014/07/15">
+      <change>Added NoInterfaceObject extended attribute.</change>
+    </revision>
+  </history>
+</extension>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/WEBGL_compressed_texture_s3tc/extension.xml
@@ -0,0 +1,119 @@
+<?xml version="1.0"?>
+
+<ratified href="WEBGL_compressed_texture_s3tc/">
+  <name>WEBGL_compressed_texture_s3tc</name>
+  <contact>
+    <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a> (public_webgl 'at' khronos.org)
+  </contact>
+  <contributors>
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+  <number>8</number>
+  <depends>
+    <api version="1.0"/>
+  </depends>
+  <overview>
+    <p>
+      This extension exposes the compressed texture formats defined in the 
+      <a href="http://www.opengl.org/registry/specs/EXT/texture_compression_s3tc.txt">
+      EXT_texture_compression_s3tc</a> OpenGL extension to WebGL.
+    </p>
+    <features>
+      <feature>
+        Compression formats <code>COMPRESSED_RGB_S3TC_DXT1_EXT</code>,
+        <code>COMPRESSED_RGBA_S3TC_DXT1_EXT</code>, <code>COMPRESSED_RGBA_S3TC_DXT3_EXT</code>, and
+        <code>COMPRESSED_RGBA_S3TC_DXT5_EXT</code> may be passed to
+        the <code>compressedTexImage2D</code> and <code>compressedTexSubImage2D</code> entry points.
+      </feature>
+      <feature>
+        Calling <code>getParameter</code> with the argument <code>COMPRESSED_TEXTURE_FORMATS</code>
+        will include the 4 formats from this specification.
+      </feature>
+      <feature>
+        <p>The following format specific restrictions must be enforced:</p>
+        <dl>
+          <dt>COMPRESSED_RGB_S3TC_DXT1_EXT</dt>
+          <dt>COMPRESSED_RGBA_S3TC_DXT1_EXT</dt>
+          <dd><p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
+          either <code>compressedTexImage2D</code> or <code>compressedTexSubImage2D</code>
+          must match the following equation:</p>
+          <blockquote><code>
+          floor((width + 3) / 4) * floor((height + 3) / 4) * 8
+          </code></blockquote>
+          <p>
+          If it is not an <code>INVALID_VALUE</code> error is generated.
+          </p>
+          <p>When <code>level</code> equals zero <code>width</code> and <code>height</code>
+          must be a multiple of 4. When <code>level</code> is greater than 0 <code>width</code>
+          and <code>height</code> must be 0, 1, 2 or a multiple of 4.</p>
+          <p>
+          If they are not an <code>INVALID_OPERATION</code> error is generated.
+          </p>
+          <p>
+          For <code>compressedTexSubImage2D</code> <code>xoffset</code> and
+          <code>yoffset</code> must be a multiple of 4 and
+          <code>width</code> must be a multiple of 4 or equal to the original
+          width of the <code>level</code>. <code>height</code> must be a multiple of 4 or
+          equal to the original height of the <code>level</code>.
+          If they are not an <code>INVALID_OPERATION</code> error is generated.
+          </p>
+          </dd>
+
+          <dt>COMPRESSED_RGBA_S3TC_DXT3_EXT</dt>
+          <dt>COMPRESSED_RGBA_S3TC_DXT5_EXT</dt>
+          <dd><p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
+          either <code>compressedTexImage2D</code> or <code>compressedTexSubImage2D</code> must
+          match the following equation:</p>
+          <blockquote><code>
+          floor((width + 3) / 4) * floor((height + 3) / 4) * 16
+          </code></blockquote>
+          <p>
+          If it is not an <code>INVALID_VALUE</code> error is generated.
+          </p>
+          <p>When <code>level</code> equals zero <code>width</code> and <code>height</code>
+          must be a multiple of 4. When <code>level</code> is greater than 0 <code>width</code>
+          and <code>height</code> must be 0, 1, 2 or a multiple of 4.</p>
+          <p>
+          If they are not an <code>INVALID_OPERATION</code> error is generated.
+          </p>
+          <p>
+          For <code>compressedTexSubImage2D</code> <code>xoffset</code> and
+          <code>yoffset</code> must be a multiple of 4 and
+          <code>width</code> must be a multiple of 4 or equal to the original
+          width of the <code>level</code>. <code>height</code> must be a multiple of 4 or
+          equal to the original height of the <code>level</code>.
+          If they are not an <code>INVALID_OPERATION</code> error is generated.
+          </p>
+          </dd>
+        </dl>
+      </feature>
+    </features>
+  </overview>
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface WEBGL_compressed_texture_s3tc {
+    /* Compressed Texture Formats */
+    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;
+};
+  </idl>
+  <history>
+    <revision date="2012/01/25">
+      <change>Initial revision.</change>
+    </revision>
+    <revision date="2013/01/26">
+      <change>Moved from draft to community approved status</change>
+    </revision>
+    <revision date="2013/05/15">
+      <change>Ratified by Khronos Board of Promoters.</change>
+    </revision>
+    <revision date="2013/07/03">
+      <change>Clarified that length of ArrayBufferView is actually byteLength.</change>
+    </revision>
+    <revision date="2014/07/15">
+      <change>Added NoInterfaceObject extended attribute.</change>
+    </revision>
+  </history>
+</ratified>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/WEBGL_compressed_texture_s3tc_srgb/extension.xml
@@ -0,0 +1,113 @@
+<?xml version="1.0"?>
+
+<extension href="WEBGL_compressed_texture_s3tc_srgb/">
+  <name>WEBGL_compressed_texture_s3tc_srgb</name>
+  <contact>
+    <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a> (public_webgl 'at' khronos.org)
+  </contact>
+  <contributors>
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+  <number>32</number>
+  <depends>
+    <api version="1.0"/>
+  </depends>
+  <overview>
+    <p>
+      This extension exposes the sRGB compressed texture formats defined in the 
+      <a href="https://www.opengl.org/registry/specs/EXT/texture_sRGB.txt">
+      EXT_texture_sRGB</a> OpenGL extension to WebGL.
+    </p>
+    <features>
+      <feature>
+        Compression formats <code>COMPRESSED_SRGB_S3TC_DXT1_EXT</code>,
+        <code>COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT</code>, <code>COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT</code>, and
+        <code>COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT</code> may be passed to
+        the <code>compressedTexImage2D</code> and <code>compressedTexSubImage2D</code> entry points.
+      </feature>
+      <feature>
+        Calling <code>getParameter</code> with the argument <code>COMPRESSED_TEXTURE_FORMATS</code>
+        will include the 4 formats from this specification.
+      </feature>
+      <feature>
+        <p>The following format specific restrictions must be enforced:</p>
+        <dl>
+          <dt>COMPRESSED_SRGB_S3TC_DXT1_EXT</dt>
+          <dt>COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT</dt>
+          <dd><p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
+          either <code>compressedTexImage2D</code> or <code>compressedTexSubImage2D</code>
+          must match the following equation:</p>
+          <blockquote><code>
+          floor((width + 3) / 4) * floor((height + 3) / 4) * 8
+          </code></blockquote>
+          <p>
+          If it is not an <code>INVALID_VALUE</code> error is generated.
+          </p>
+          <p>When <code>level</code> equals zero <code>width</code> and <code>height</code>
+          must be a multiple of 4. When <code>level</code> is greater than 0 <code>width</code>
+          and <code>height</code> must be 0, 1, 2 or a multiple of 4.</p>
+          <p>
+          If they are not an <code>INVALID_OPERATION</code> error is generated.
+          </p>
+          <p>
+          For <code>compressedTexSubImage2D</code> <code>xoffset</code> and
+          <code>yoffset</code> must be a multiple of 4 and
+          <code>width</code> must be a multiple of 4 or equal to the original
+          width of the <code>level</code>. <code>height</code> must be a multiple of 4 or
+          equal to the original height of the <code>level</code>.
+          If they are not an <code>INVALID_OPERATION</code> error is generated.
+          </p>
+          </dd>
+
+          <dt>COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT</dt>
+          <dt>COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT</dt>
+          <dd><p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
+          either <code>compressedTexImage2D</code> or <code>compressedTexSubImage2D</code> must
+          match the following equation:</p>
+          <blockquote><code>
+          floor((width + 3) / 4) * floor((height + 3) / 4) * 16
+          </code></blockquote>
+          <p>
+          If it is not an <code>INVALID_VALUE</code> error is generated.
+          </p>
+          <p>When <code>level</code> equals zero <code>width</code> and <code>height</code>
+          must be a multiple of 4. When <code>level</code> is greater than 0 <code>width</code>
+          and <code>height</code> must be 0, 1, 2 or a multiple of 4.</p>
+          <p>
+          If they are not an <code>INVALID_OPERATION</code> error is generated.
+          </p>
+          <p>
+          For <code>compressedTexSubImage2D</code> <code>xoffset</code> and
+          <code>yoffset</code> must be a multiple of 4 and
+          <code>width</code> must be a multiple of 4 or equal to the original
+          width of the <code>level</code>. <code>height</code> must be a multiple of 4 or
+          equal to the original height of the <code>level</code>.
+          If they are not an <code>INVALID_OPERATION</code> error is generated.
+          </p>
+          </dd>
+        </dl>
+      </feature>
+    </features>
+  </overview>
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface WEBGL_compressed_texture_s3tc_srgb {
+    /* Compressed Texture Formats */
+    const GLenum COMPRESSED_SRGB_S3TC_DXT1_EXT        = 0x8C4C;
+    const GLenum COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT  = 0x8C4D;
+    const GLenum COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT  = 0x8C4E;
+    const GLenum COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT  = 0x8C4F;
+};
+  </idl>
+  <history>
+    <revision date="2016/06/10">
+      <change>Initial revision.</change>
+    </revision>
+    <revision date="2016/07/21">
+      <change>Moved to draft after discussion in working group, and study of possible dependencies.</change>
+    </revision>
+    <revision date="2017/05/31">
+      <change>Moved to community approved after Mozilla voiced support.</change>
+    </revision>
+  </history>
+</extension>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/WEBGL_debug_renderer_info/extension.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0"?>
+
+<ratified href="WEBGL_debug_renderer_info/">
+  <name>WEBGL_debug_renderer_info</name>
+  <contact><a href="mailto:zmo@chromium.org">zmo@chromium.org</a></contact>
+  <contributors>
+    <contributor>Members of the <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a></contributor>
+  </contributors>
+  <number>6</number>
+  <depends>
+    <api version="1.0"/>
+  </depends>
+  <overview>
+    <p>WebGL implementations might mask the <code>RENDERER</code> and <code>VENDOR</code> strings of the underlying graphics driver for privacy reasons. This extension exposes new tokens to query this information in a guaranteed manner for debugging purposes.</p>
+  </overview>
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface WEBGL_debug_renderer_info {
+
+      const GLenum UNMASKED_VENDOR_WEBGL            = 0x9245;
+      const GLenum UNMASKED_RENDERER_WEBGL          = 0x9246;
+
+};
+  </idl>
+  <newtok>
+    <function name="getParameter" type="any">
+      <param name="pname" type="GLenum"/>
+      Two new enums <code>UNMASKED_VENDOR_WEBGL</code> and <code>UNMASKED_RENDERER_WEBGL</code> are accepted by <code>pname</code> parameter in <code>getParameter()</code>.
+      <table class="foo">
+        <tr><th>pname</th><th>returned type</th></tr>
+        <tr><td>UNMASKED_VENDOR_WEBGL</td><td>DOMString</td></tr>
+        <tr><td>UNMASKED_RENDERER_WEBGL</td><td>DOMString</td></tr>
+      </table>
+      <br />
+      The following pname arguments return a string describing some aspect of the underlying graphics driver.
+      <table class="foo">
+        <tr><td>UNMASKED_VENDOR_WEBGL</td><td>Return the VENDOR string of the underlying graphics driver.</td></tr>
+        <tr><td>UNMASKED_RENDERER_WEBGL</td><td>Return the RENDERER string of the underlying graphics driver.</td></tr>
+      </table>
+    </function>
+  </newtok>
+  <issues>
+    <p>
+      1) What enum values should be used for UNMASKED_VENDOR_WEBGL and UNMASKED_RENDERER_WEBGL?</p>
+      <ul>
+        <li> RESOLVED: The first draft used temporary enum values. They have been replaced with enums allocated from the WEBGL range of GL enums.</li>
+      </ul>
+    <p>
+      2) Should this extension be made available on ordinary web pages?</p>
+      <ul>
+        <li> Earlier versions of this extension noted the following concerns:
+        <ol>
+          <li> Identifying the precise graphics card in the user's computer may yield certain personally-identifiable information to the web page; for example, if the user has a unique graphics card. </li>
+          <li> Identifying the precise graphics card to JavaScript might encourage developers to target their WebGL applications to run only on a particular type of graphics card. This is similar to the User-Agent "sniffing" or "spoofing" problem which has historically been pervasive and problematic on the web. </li>
+        </ol>
+
+        User agents (web browsers) should carefully consider whether or not to expose this extension in non-privileged settings due to these concerns. </li>
+
+        <li> On the other hand, benefits of exposing this information to general web pages include:
+
+        <ol>
+          <li> The WebGL application can tune its rendering techniques based on previously observed performance characteristics on the same graphics card. </li>
+          <li> The WebGL application can gather useful information for debugging; for example, if it is running slowly, it can gather data for reproducing and fixing the problem. </li>
+        </ol>
+
+        </li>
+      </ul>
+  </issues>
+  <history>
+    <revision date="2011/10/03">
+      <change>Initial revision.</change>
+    </revision>
+    <revision date="2011/10/12">
+      <change>Assigned enums; assigned webgl extension number.</change>
+    </revision>
+    <revision date="2011/10/18">
+      <change>Clarify the meaning of "privileged".</change>
+    </revision>
+    <revision date="2011/12/07">
+      <change>Fixed mistake where extension still indicated draft status.</change>
+    </revision>
+    <revision date="2012/01/03">
+      <change>Removed webgl module per changes to Web IDL spec.</change>
+    </revision>
+    <revision date="2013/05/15">
+      <change>Ratified by Khronos Board of Promoters.</change>
+    </revision>
+    <revision date="2014/01/28">
+      <change>Added issue on privacy and user agent sniffing considerations, replacing security section.</change>
+    </revision>
+    <revision date="2014/07/15">
+      <change>Added NoInterfaceObject extended attribute.</change>
+    </revision>
+  </history>
+</ratified>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/WEBGL_debug_shaders/extension.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0"?>
+
+<ratified href="WEBGL_debug_shaders/">
+  <name>WEBGL_debug_shaders</name>
+  <contact><a href="mailto:zmo@chromium.org">zmo@chromium.org</a></contact>
+  <contributors>
+    <contributor>Members of the <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a></contributor>
+  </contributors>
+  <number>7</number>
+  <depends>
+    <api version="1.0"/>
+  </depends>
+  <overview>
+    <p>
+      WebGL uses the GLSL ES 2.0 spec on all platforms, and translates these shaders to the host platform's native language (HLSL, GLSL, and even GLSL ES). For debugging purpose, it is useful to be able to examine the shader after translation. This extension exposes a new function <code>getTranslatedShaderSource</code> for such purposes.
+    </p>
+  </overview>
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface WEBGL_debug_shaders {
+
+      DOMString getTranslatedShaderSource(WebGLShader shader);
+
+};
+  </idl>
+  <newfun>
+    <function name="getTranslatedShaderSource" type="DOMString">
+      <param name="shader" type="WebGLShader" />
+      If no source has been defined, <code>compileShader()</code> has not been called, or the translation has failed for <code>shader</code>, an empty string is returned; otherwise, return the translated source.
+    </function>
+  </newfun>
+  <issues>
+    <p>
+      1) Should this extension be made available on ordinary web pages?</p>
+      <ul>
+        <li> Earlier versions of this extension noted the following concerns:
+        <ol>
+          <li> The precise pattern of how the original shader is translated may yield personally-identifiable information to the web page about the kind of graphics card in the user's computer. </li>
+        </ol>
+
+        User agents (web browsers) should carefully consider whether or not to expose this extension in non-privileged settings due to these concerns. </li>
+
+        <li> On the other hand, benefits of exposing this information to general web pages include:
+
+        <ol>
+          <li> Tools for WebGL developers can provide more detailed information about how the input shader is translated to run on the graphics card, potentially helping the developers make their applications run faster. </li>
+        </ol>
+
+        </li>
+      </ul>
+  </issues>
+  <history>
+    <revision date="2011/10/03">
+      <change>Initial revision.</change>
+    </revision>
+    <revision date="2011/10/14">
+      <change>Assigned WebGL extension number.</change>
+    </revision>
+    <revision date="2011/10/18">
+      <change>Clarify the meaning of "privileged".</change>
+    </revision>
+    <revision date="2011/12/07">
+      <change>Fixed mistake where extension still indicated draft status.</change>
+      <change>Renamed "New Functions and Methods" section to "New Functions".</change>
+    </revision>
+    <revision date="2012/01/03">
+      <change>Removed webgl module per changes to Web IDL spec.</change>
+    </revision>
+    <revision date="2013/05/15">
+      <change>Ratified by Khronos Board of Promoters.</change>
+    </revision>
+    <revision date="2014/01/28">
+      <change>Added issue on privacy considerations, replacing security section.</change>
+    </revision>
+    <revision date="2014/07/15">
+      <change>Added NoInterfaceObject extended attribute.</change>
+    </revision>
+  </history>
+</ratified>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/WEBGL_depth_texture/extension.xml
@@ -0,0 +1,265 @@
+<?xml version="1.0"?>
+
+<ratified href="WEBGL_depth_texture/">
+  <name>WEBGL_depth_texture</name>
+  <aliases>
+    <alias>WEBKIT_WEBGL_depth_texture</alias>
+    <alias>MOZ_WEBGL_depth_texture</alias>
+  </aliases>
+  <contact>
+    <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a> (public_webgl 'at' khronos.org)
+  </contact>
+  <contributors>
+    <contributor>Members of the WebGL working group</contributor>
+    <contributor>Florian B&#246;sch (pyalot 'at' gmail.com)</contributor>
+  </contributors>
+  <number>9</number>
+  <depends>
+    <api version="1.0"/>
+    <removed version="2.0" />
+  </depends>
+  <overview>
+    <p>This extension exposes the
+      <a href="http://angleproject.googlecode.com/svn/trunk/extensions/ANGLE_depth_texture.txt">ANGLE_depth_texture</a>
+      functionality to WebGL. ANGLE_depth_texture provides a subset of the
+      functionality from the OpenGL ES 2.0 extensions
+      <a href="http://www.khronos.org/registry/gles/extensions/OES/OES_depth_texture.txt">OES_depth_texture</a>
+      and
+      <a href="http://www.khronos.org/registry/gles/extensions/OES/OES_packed_depth_stencil.txt">OES_packed_depth_stencil</a>, with certain restrictions added for portability reasons. Specifically:</p>
+
+      <ul>
+      <li> ANGLE_depth_texture provides both depth and depth/stencil textures. </li>
+      <li> ANGLE_depth_texture does not provide the <code>DEPTH24_STENCIL8_OES</code> renderbuffer internal format from the OES_packed_depth_stencil extension. The core WebGL specification already supports allocation of depth/stencil renderbuffers. </li>
+      <li> ANGLE_depth_texture does not support loading image data via the TexImage or TexSubImage commands. Depth and depth/stencil textures created via this extension can only have their contents specified by rendering to them. </li>
+      </ul>
+
+    <p>Consult the Errors section below for specific restrictions.
+    </p>
+
+    <features>
+      <feature>
+        The <code>texImage2D</code> entry point is extended to accept the
+        <code>format</code> parameter <code>DEPTH_COMPONENT</code> and
+        <code>DEPTH_STENCIL</code>
+      </feature>
+      <feature>
+        The <code>texImage2D</code> entry point is extended to accept the
+        <code>internalFormat</code> parameter <code>DEPTH_COMPONENT</code>
+        and <code>DEPTH_STENCIL</code>
+      </feature>
+      <feature>
+        The <code>texImage2D</code> entry point is extended to accept
+        the <code>type</code> parameter <code>UNSIGNED_SHORT</code>,
+        <code>UNSIGNED_INT</code>, and
+        <code>UNSIGNED_INT_24_8_WEBGL</code>
+      </feature>
+      <feature>
+        The <code>framebufferTexture2D</code> entry point is extended to
+        accept the <code>target</code> parameter
+        <code>DEPTH_ATTACHMENT</code> and
+        <code>DEPTH_STENCIL_ATTACHMENT</code>
+      </feature>
+      <feature>
+        The <code>texImage2D</code> entry point is extended to accept
+        <code>ArrayBufferView</code> of type <code>Uint16Array</code> and
+        <code>Uint32Array</code>
+      </feature>
+      <feature>
+        <p>
+          The WebGL-specific constraints about <a href="http://www.khronos.org/registry/webgl/specs/1.0/#FBO_ATTACHMENTS">Framebuffer Object Attachments</a> are extended:</p>
+
+          <ul>
+          <li> A texture attached to an FBO's <code>DEPTH_ATTACHMENT</code> attachment point must be allocated with the <code>DEPTH_COMPONENT</code> internal format. </li>
+          <li> A texture attached to the <code>DEPTH_STENCIL_ATTACHMENT</code> attachment point must be allocated with the <code>DEPTH_STENCIL</code> internal format. </li>
+          </ul>
+
+        <p>
+          In the WebGL API, it is an error to concurrently attach either
+          renderbuffers or textures to the following combinations of
+          attachment points:</p>
+
+          <ul>
+          <li> <code>DEPTH_ATTACHMENT</code> + <code>DEPTH_STENCIL_ATTACHMENT</code> </li>
+          <li> <code>STENCIL_ATTACHMENT</code> + <code>DEPTH_STENCIL_ATTACHMENT</code> </li>
+          <li> <code>DEPTH_ATTACHMENT</code> + <code>STENCIL_ATTACHMENT</code> </li>
+          </ul>
+
+        <p>
+          See the section
+          <a href="http://www.khronos.org/registry/webgl/specs/1.0/#FBO_ATTACHMENTS">Framebuffer Object Attachments</a>
+          in the WebGL specification for the behavior if these
+          constraints are violated.
+        </p>
+      </feature>
+      <feature>
+        <p>
+          As per the OpenGL ES spec, there is no guarantee that the OpenGL ES implementation
+          will use the texture type to determine how to store the depth texture internally.
+          It may choose to downsample the 32-bit depth values to 16-bit or even 24-bit.
+          When a depth or depth/stencil texture is attached to a framebuffer object, calls to getParameter
+          with the DEPTH_BITS and STENCIL_BITS enums return the following:
+          <table>
+            <tr>
+              <th>Texture Type</th>
+              <th>DEPTH_BITS (GLint)</th>
+              <th>STENCIL_BITS (GLint)</th>
+            </tr>
+            <tr>
+              <td>UNSIGNED_SHORT</td>
+              <td>>= 16</td>
+              <td>0</td>
+            </tr>
+            <tr>
+              <td>UNSIGNED_INT</td>
+              <td>>= 16</td>
+              <td>0</td>
+            </tr>
+            <tr>
+              <td>UNSIGNED_INT_24_8_WEBGL</td>
+              <td>>= 24</td>
+              <td>>= 8</td>
+            </tr>
+          </table>
+        </p>
+      </feature>
+    </features>
+  </overview>
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface WEBGL_depth_texture {
+  const GLenum UNSIGNED_INT_24_8_WEBGL = 0x84FA;
+};
+  </idl>
+  <errors>
+    <error>
+      The error <code>INVALID_OPERATION</code> is generated by
+      <code>texImage2D</code> if the <code>format</code> parameter is
+      <code>DEPTH_COMPONENT</code> or <code>DEPTH_STENCIL</code> and the
+      <code>target</code> is
+      <code>TEXTURE_CUBE_MAP_{POSITIVE,NEGATIVE}_{X,Y,Z}</code>.
+    </error>
+    <error>
+      The error <code>INVALID_OPERATION</code> is generated by
+      <code>texImage2D</code> if <code>format</code> and
+      <code>internalformat</code> are <code>DEPTH_COMPONENT</code> and
+      <code>type</code> is not <code>UNSIGNED_SHORT</code> or
+      <code>UNSIGNED_INT</code>.
+    </error>
+    <error>
+       The error <code>INVALID_OPERATION</code> is generated by
+       <code>texImage2D</code> if <code>format</code> and
+       <code>internalformat</code> are not <code>DEPTH_COMPONENT</code>
+       and <code>type</code> is <code>UNSIGNED_SHORT</code> or
+       <code>UNSIGNED_INT</code>.
+    </error>
+    <error>
+      The error <code>INVALID_OPERATION</code> is generated by
+      <code>texImage2D</code> if <code>format</code> and
+      <code>internalformat</code> are <code>DEPTH_STENCIL</code> and
+      <code>type</code> is not <code>UNSIGNED_INT_24_8_WEBGL</code>.
+    </error>
+    <error>
+      The error <code>INVALID_OPERATION</code> is generated by
+      <code>texImage2D</code> if <code>format</code> and
+      <code>internalformat</code> are not <code>DEPTH_STENCIL</code> and
+      <code>type</code> is <code>UNSIGNED_INT_24_8_WEBGL</code>.
+    </error>
+    <error>
+      The error <code>INVALID_OPERATION</code> is generated in the following situations:
+      <ul>
+        <li>
+          <code>texImage2D</code> is called with <code>format</code> and
+          <code>internalformat</code> of <code>DEPTH_COMPONENT</code> or
+          <code>DEPTH_STENCIL</code> and
+          <ul>
+            <li> <code>target</code> is not TEXTURE_2D, </li>
+            <li> <code>data</code> is not NULL, or </li>
+            <li> <code>level</code> is not zero. </li>
+          </ul>
+        </li>
+        <li>
+          <code>texSubImage2D</code> is called with <code>format</code> of
+          <code>DEPTH_COMPONENT</code> or <code>DEPTH_STENCIL</code>.
+        </li>
+        <li>
+          <code>copyTexImage2D</code> is called with an
+          <code>internalformat</code> that has a base internal format of
+          <code>DEPTH_COMPONENT</code> or <code>DEPTH_STENCIL</code>.
+        </li>
+        <li>
+          <code>copyTexSubImage2D</code> is called with a target texture
+          that has a base internal format of <code>DEPTH_COMPONENT</code>
+          or <code>DEPTH_STENCIL</code>.
+        </li>
+        <li>
+          <code>generateMipmap</code> is called on a texture that has a
+          base internal format of <code>DEPTH_COMPONENT</code> or
+          <code>DEPTH_STENCIL</code>.
+        </li>
+      </ul>
+    </error>
+  </errors>
+  <issues>
+    <p>
+      As per the ANGLE_depth_texture specification, when a depth
+      texture is sampled, the value is stored into the RED channel.
+      The contents of the GREEN, BLUE and ALPHA channels are
+      implementation dependent. It is therefore recommended to use
+      only the <code>r</code> component of variables in GLSL shaders
+      that are used to reference depth textures.
+    </p>
+  </issues>
+  <history>
+    <revision date="2012/01/23">
+      <change>Initial revision.</change>
+    </revision>
+    <revision date="2012/01/25">
+      <change>Added provisions to exclude cube depth textures.</change>
+    </revision>
+    <revision date="2012/02/06">
+      <change>Changed referenced WebGL API version from 2.0 to 1.0</change>
+    </revision>
+    <revision date="2012/02/24">
+      <change>Removed the enumerants from the IDL which are contained in the context and added aliases to the extension name</change>
+    </revision>
+    <revision date="2012/03/01">
+      <change>
+        Renamed with OES prefix and removed the addendum due to expected harmonization between OES_depth_texture and ARB_depth_texture
+        (depth cube maps).
+      </change>
+    </revision>
+    <revision date="2012/06/04">
+      <change>
+        Renamed to WEBGL prefix, and changed to reference ANGLE_depth_texture, because of
+        limitations preventing the current ANGLE library from loading of image data to depth
+        textures. Incorporated errors from ANGLE_depth_texure extension specification.
+      </change>
+    </revision>
+    <revision date="2012/06/20">
+      <change>
+        Incorporated depth/stencil support and UNSIGNED_INT_24_8_WEBGL enum after discussion on
+        public_webgl mailing list, including supported behavior and additional error behavior.
+        Extended rules in Section 6.5 ("Framebuffer Object Attachments") to handle texture
+        attachments.
+      </change>
+    </revision>
+    <revision date="2012/06/27">
+      <change>
+        Updated references to texSubImage2D. Added
+        DEPTH_STENCIL_ATTACHMENT to framebufferTexture2D.
+      </change>
+    </revision>
+    <revision date="2013/01/26">
+      <change>Moved from draft to community approved status</change>
+    </revision>
+    <revision date="2013/02/28">
+      <change>Updated to track ANGLE_depth_texture, indicating that only red channel is guaranteed.</change>
+    </revision>
+    <revision date="2013/05/15">
+      <change>Ratified by Khronos Board of Promoters.</change>
+    </revision>
+    <revision date="2014/07/15">
+      <change>Added NoInterfaceObject extended attribute.</change>
+    </revision>
+  </history>
+</ratified>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/WEBGL_draw_buffers/extension.xml
@@ -0,0 +1,185 @@
+<?xml version="1.0"?>
+
+<ratified href="WEBGL_draw_buffers/">
+  <name>WEBGL_draw_buffers</name>
+  <contact>
+    <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a> (public_webgl 'at' khronos.org)
+  </contact>
+  <contributors>
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+  <number>18</number>
+  <depends>
+    <api version="1.0"/>
+    <core version="2.0">
+      <glsl version="300 es"/>
+    </core>
+  </depends>
+  <overview>
+    <mirrors href="https://www.khronos.org/registry/gles/extensions/EXT/EXT_draw_buffers.txt" name="EXT_draw_buffers">
+      <addendum>
+        The implementation must support a minimum of 4 color attachments.
+      </addendum>
+      <addendum>
+        The value of the <code>MAX_COLOR_ATTACHMENTS_WEBGL</code> parameter must be greater than or
+        equal to that of the <code>MAX_DRAW_BUFFERS_WEBGL</code> parameter.
+      </addendum>
+      <addendum>
+        If:
+        <ul>
+          <li> A framebuffer's color attachments are all textures allocated with format <code>RGBA</code>
+               and type <code>UNSIGNED_BYTE</code>, and </li>
+          <li> The framebuffer has either:
+            <ul>
+              <li> No depth or stencil attachment </li>
+              <li> A valid <code>DEPTH</code> or <code>DEPTH_STENCIL</code> attachment </li>
+            </ul></li>
+        </ul>
+        Then a call to <code>checkFramebufferStatus</code> against this framebuffer must not return
+        <code>FRAMEBUFFER_UNSUPPORTED</code>. (In other words, the implementation must support the
+        use of <code>RGBA/UNSIGNED_BYTE</code> textures as color attachments, plus either a
+        <code>DEPTH</code> or <code>DEPTH_STENCIL</code> attachment.)
+      </addendum>
+      <addendum>
+        Attaching <code>n</code> consecutive color attachments starting at COLOR_ATTACHMENT0_WEBGL,
+        where <code>n</code> is between 1 and <code>MAX_DRAW_BUFFERS_WEBGL</code>, must not return
+        <code>FRAMEBUFFER_UNSUPPORTED</code> from a call to <code>checkFramebufferStatus</code>. In
+        other words, if <code>MAX_DRAW_BUFFERS_WEBGL</code> is 4, then the implementation is
+        required to support the following combinations of color attachments:
+
+        <ul>
+          <li> <code>COLOR_ATTACHMENT0_WEBGL = RGBA/UNSIGNED_BYTE</code></li>
+          <li> <code>COLOR_ATTACHMENT0_WEBGL = RGBA/UNSIGNED_BYTE</code><br/>
+               <code>COLOR_ATTACHMENT1_WEBGL = RGBA/UNSIGNED_BYTE</code><br/></li>
+          <li> <code>COLOR_ATTACHMENT0_WEBGL = RGBA/UNSIGNED_BYTE</code><br/>
+               <code>COLOR_ATTACHMENT1_WEBGL = RGBA/UNSIGNED_BYTE</code><br/>
+               <code>COLOR_ATTACHMENT2_WEBGL = RGBA/UNSIGNED_BYTE</code><br/></li>
+          <li> <code>COLOR_ATTACHMENT0_WEBGL = RGBA/UNSIGNED_BYTE</code><br/>
+               <code>COLOR_ATTACHMENT1_WEBGL = RGBA/UNSIGNED_BYTE</code><br/>
+               <code>COLOR_ATTACHMENT2_WEBGL = RGBA/UNSIGNED_BYTE</code><br/>
+               <code>COLOR_ATTACHMENT3_WEBGL = RGBA/UNSIGNED_BYTE</code><br/></li>
+        </ul>
+      </addendum>
+      <addendum>
+        Although the extension name is prefixed with WEBGL the extension must be enabled with the 
+        <code>#extension GL_EXT_draw_buffers</code> directive, as shown in the sample code, to use
+        the extension in a shader.
+
+        Likewise the shading language preprocessor <code>#define GL_EXT_draw_buffers</code>, will be defined to 1 if the extension is supported.
+      </addendum>
+      <addendum>
+        The value of <code>gl_MaxDrawBuffers</code> must match <code>MAX_DRAW_BUFFERS_WEBGL</code> from the API if the extension is enabled in a WebGL context; otherwise, the value must be 1. Whether or not the extension is enabled with the <code>#extension GL_EXT_draw_buffers</code> directive in a shader does not affect the value of <code>gl_MaxDrawBuffers</code>. The value of <code>gl_MaxDrawBuffers</code> is a constant in the shader, and is guaranteed to be frozen at program link time. It is implementation-dependent whether it is frozen at shader compile time. (A consequence is that if a program is linked, and later the WEBGL_draw_buffers extension is enabled, the value of <code>gl_MaxDrawBuffers</code> seen by that program will still be 1.)
+      </addendum>
+      <addendum>
+        If the WEBGL_draw_buffers extension is enabled, but the fragment shader does not contain the <code>#extension GL_EXT_draw_buffers</code> directive to enable it, then writes to <code>gl_FragColor</code> are only written to <code>COLOR_ATTACHMENT0_WEBGL</code>, and not broadcast to all color attachments. In this scenario, other color attachments are guaranteed to remain untouched.
+      </addendum>
+      <addendum>
+        If a fragment shader writes to neither <code>gl_FragColor</code> nor <code>gl_FragData</code>, the values of
+        the fragment colors following shader execution are untouched.
+
+        If a fragment shader contains the <code>#extension GL_EXT_draw_buffers</code> directive, all
+        <code>gl_FragData</code> variables (from <code>gl_FragData[0]</code> to <code>gl_FragData[MAX_DRAW_BUFFERS_WEBGL - 1]</code>)
+        default to zero if no values are written to them during a shader execution.
+      </addendum>
+      <addendum>
+        If an image is attached to more than one color attachment point in a framebuffer, <code>checkFramebufferStatus</code>
+        returns <code>FRAMEBUFFER_UNSUPPORTED</code>. An image can be an individual mip level, or a face of cube map.
+      </addendum>
+    </mirrors>
+    <features>
+      <feature>
+      Adds support for multiple color buffers and color outputs from fragment shaders.
+      </feature>
+    </features>
+  </overview>
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface WEBGL_draw_buffers {
+    const GLenum COLOR_ATTACHMENT0_WEBGL     = 0x8CE0;
+    const GLenum COLOR_ATTACHMENT1_WEBGL     = 0x8CE1;
+    const GLenum COLOR_ATTACHMENT2_WEBGL     = 0x8CE2;
+    const GLenum COLOR_ATTACHMENT3_WEBGL     = 0x8CE3;
+    const GLenum COLOR_ATTACHMENT4_WEBGL     = 0x8CE4;
+    const GLenum COLOR_ATTACHMENT5_WEBGL     = 0x8CE5;
+    const GLenum COLOR_ATTACHMENT6_WEBGL     = 0x8CE6;
+    const GLenum COLOR_ATTACHMENT7_WEBGL     = 0x8CE7;
+    const GLenum COLOR_ATTACHMENT8_WEBGL     = 0x8CE8;
+    const GLenum COLOR_ATTACHMENT9_WEBGL     = 0x8CE9;
+    const GLenum COLOR_ATTACHMENT10_WEBGL    = 0x8CEA;
+    const GLenum COLOR_ATTACHMENT11_WEBGL    = 0x8CEB;
+    const GLenum COLOR_ATTACHMENT12_WEBGL    = 0x8CEC;
+    const GLenum COLOR_ATTACHMENT13_WEBGL    = 0x8CED;
+    const GLenum COLOR_ATTACHMENT14_WEBGL    = 0x8CEE;
+    const GLenum COLOR_ATTACHMENT15_WEBGL    = 0x8CEF;
+
+    const GLenum DRAW_BUFFER0_WEBGL          = 0x8825;
+    const GLenum DRAW_BUFFER1_WEBGL          = 0x8826;
+    const GLenum DRAW_BUFFER2_WEBGL          = 0x8827;
+    const GLenum DRAW_BUFFER3_WEBGL          = 0x8828;
+    const GLenum DRAW_BUFFER4_WEBGL          = 0x8829;
+    const GLenum DRAW_BUFFER5_WEBGL          = 0x882A;
+    const GLenum DRAW_BUFFER6_WEBGL          = 0x882B;
+    const GLenum DRAW_BUFFER7_WEBGL          = 0x882C;
+    const GLenum DRAW_BUFFER8_WEBGL          = 0x882D;
+    const GLenum DRAW_BUFFER9_WEBGL          = 0x882E;
+    const GLenum DRAW_BUFFER10_WEBGL         = 0x882F;
+    const GLenum DRAW_BUFFER11_WEBGL         = 0x8830;
+    const GLenum DRAW_BUFFER12_WEBGL         = 0x8831;
+    const GLenum DRAW_BUFFER13_WEBGL         = 0x8832;
+    const GLenum DRAW_BUFFER14_WEBGL         = 0x8833;
+    const GLenum DRAW_BUFFER15_WEBGL         = 0x8834;
+
+    const GLenum MAX_COLOR_ATTACHMENTS_WEBGL = 0x8CDF;
+    const GLenum MAX_DRAW_BUFFERS_WEBGL      = 0x8824;
+
+    void drawBuffersWEBGL(sequence&lt;GLenum&gt; buffers);
+};
+  </idl>
+  <samplecode xml:space="preserve">
+    <pre>
+    #extension GL_EXT_draw_buffers : require
+    precision mediump float;
+    void main() {
+        gl_FragData[0] = vec4(1.0, 0.0, 0.0, 1.0);
+        gl_FragData[1] = vec4(0.0, 1.0, 0.0, 1.0);
+        gl_FragData[2] = vec4(0.0, 0.0, 1.0, 1.0);
+        gl_FragData[3] = vec4(1.0, 1.0, 1.0, 1.0);
+    }
+    </pre>
+  </samplecode>
+  <history>
+    <revision date="2012/10/16">
+      <change>Initial revision.</change>
+    </revision>
+    <revision date="2012/11/05">
+      <change>Corrected typo in drawBuffersWEBGL. Changed referenced spec version to 1.0 to fix broken link.</change>
+    </revision>
+    <revision date="2013/02/02">
+      <change>Renamed to EXT_draw_buffers per plan of OpenGL ES working group. Moved to draft status. Assigned number.</change>
+    </revision>
+    <revision date="2013/03/05">
+      <change>Renamed to WEBGL_draw_buffers per discussion on public_webgl list. Added guarantees to make it easier for developers to use the extension.</change>
+    </revision>
+    <revision date="2013/06/07">
+      <change>Clarified naming of shader directives.</change>
+    </revision>
+    <revision date="2014/07/15">
+      <change>Added NoInterfaceObject extended attribute.</change>
+    </revision>
+    <revision date="2014/08/08">
+      <change>Ratified by Khronos Board of Promoters.</change>
+    </revision>
+    <revision date="2016/06/28">
+      <change>Revised behavior of gl_MaxDrawBuffers and gl_FragColor broadcasting, to avoid significant performance impact for WebGL 1.0 implementations running on top of the desktop OpenGL API.</change>
+    </revision>
+    <revision date="2016/07/08">
+      <change>Removed undefined behaviors.</change>
+    </revision>
+    <revision date="2016/07/11">
+      <change>Revised user-defined variable behavior to default to zero.</change>
+    </revision>
+    <revision date="2016/07/23">
+      <change>Revised behavior of the same image is attached to more than one color attachment point.</change>
+    </revision>
+  </history>
+</ratified>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/WEBGL_get_buffer_sub_data_async/extension.xml
@@ -0,0 +1,136 @@
+<?xml version="1.0"?>
+
+<draft href="WEBGL_get_buffer_sub_data_async/">
+  <name>WEBGL_get_buffer_sub_data_async</name>
+  <contact>
+    <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a> (public_webgl 'at' khronos.org)
+  </contact>
+  <contributors>
+    <contributor>Kai Ninomiya, Google Inc.</contributor>
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+  <number>34</number>
+  <depends>
+    <api version="2.0"/>
+  </depends>
+  <overview>
+    <p>
+      This extension allows asynchronous buffer readback in WebGL 2.0.
+    </p>
+    <features>
+      <feature>
+        This extension exposes an asynchronous buffer readback entry point for
+        non-blocking readbacks from WebGL buffers. It is equivalent to
+        <code>getBufferSubData</code> but returns a <code>Promise</code>
+        instead of an immediate readback result.
+      </feature>
+    </features>
+  </overview>
+
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface WEBGL_get_buffer_sub_data_async {
+  // Asynchronous version of getBufferSubData which fulfills the returned promise when the data becomes available.
+  Promise&lt;ArrayBuffer&gt; getBufferSubDataAsync(GLenum target, GLintptr srcByteOffset, ArrayBufferView dstBuffer,
+                                                   optional GLuint dstOffset = 0, optional GLuint length = 0); // May throw DOMException
+};
+  </idl>
+
+  <newfun>
+    <function name="getBufferSubDataAsync" type="Promise&lt;ArrayBuffer&gt;">
+      <param name="target" type="GLenum"/>
+      <param name="srcByteOffset" type="GLintptr"/>
+      <param name="dstBuffer" type="ArrayBufferView"/>
+      <param name="dstOffset" type="optional GLuint"/>
+      <param name="length" type="optional GLuint"/>
+      Reads back data asynchronously from the bound WebGLBuffer into <code>dstBuffer</code>.
+      <br/><br/>
+      Let <code>buf</code> be the buffer bound to <code>target</code> at the time
+      <code>getBufferSubDataAsync</code> is called.
+      If <code>length</code> is 0, let <code>copyLength</code> be
+      <code>dstBuffer.length - dstOffset</code>; otherwise, let
+      <code>copyLength</code> be <code>length</code>.
+      <br/><br/>
+      If <code>copyLength</code> is greater than zero,
+      copy <code>copyLength</code> typed elements (each of size <code>dstBuffer.BYTES_PER_ELEMENT</code>)
+      from <code>buf</code> into <code>dstBuffer</code>,
+      reading <code>buf</code> starting at byte index <code>srcByteOffset</code> and
+      writing into <code>dstBuffer</code> starting at element index <code>dstOffset</code>.
+      If <code>copyLength</code> is 0, no data is written to <code>dstBuffer</code>, but
+      this does not cause a GL error to be generated.
+      <ul>
+        <li>If no WebGLBuffer is bound to <code>target</code>,
+            an <code>INVALID_OPERATION</code> error is generated.
+        </li>
+        <li>If <code>target</code> is <code>TRANSFORM_FEEDBACK_BUFFER</code>,
+            and any transform feedback object is currently active,
+            an <code>INVALID_OPERATION</code> error is generated.
+        </li>
+        <li>If <code>dstOffset</code> is greater than <code>dstBuffer.length</code>,
+            an <code>INVALID_VALUE</code> error is generated.
+        </li>
+        <li>If <code>dstOffset + copyLength</code> is greater than <code>dstBuffer.length</code>,
+            an <code>INVALID_VALUE</code> error is generated.
+        </li>
+        <li>If <code>srcByteOffset</code> is less than zero,
+            an <code>INVALID_VALUE</code> error is generated.
+        </li>
+        <li>If <code>srcByteOffset + copyLength*dstBuffer.BYTES_PER_ELEMENT</code>
+            is larger than the length of <code>buf</code>,
+            an <code>INVALID_OPERATION</code> is generated.
+        </li>
+      </ul>
+      When invoked, <code>getBufferSubDataAsync</code> must run these steps:
+      <ul>
+        <li>Let <code>promise</code> be a Promise to be returned.
+        </li>
+        <li>Check for the errors defined above. If there are any errors, generate the GL error
+          synchronously and
+          <a href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise">reject</a>
+          <code>promise</code> with an <code>InvalidStateError</code>.
+        </li>
+        <li>Insert a readback of <code>buf</code> into the GL command stream, using the range
+          defined above.
+        </li>
+        <li>Return <code>promise</code>, but continue running these steps in parallel.
+        </li>
+        <li>Upon completion of the readback, queue a task performing the following steps:
+          <ul>
+            <li>If the context has been lost, or if <code>dstBuffer</code> has been neutered,
+              <a href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise">reject</a>
+              <code>promise</code> with an <code>InvalidStateError</code>. In this case, no GL
+              error is generated.
+            </li>
+            <li>Write the readback result into <code>dstBuffer</code>, using the range defined
+              above.
+            </li>
+            <li><a href="https://www.w3.org/2001/tag/doc/promises-guide/#resolve-promise">Resolve</a>
+              <code>promise</code> with <code>dstBuffer</code>.
+            </li>
+          </ul>
+          The task source for this task is the <a href="#WEBGLCONTEXTEVENT">WebGL task source</a>.
+        </li>
+      </ul>
+      If the returned Promise is rejected, no data is written to <code>dstBuffer</code>.
+
+      <div class="note">
+        Even if <code>getBufferSubDataAsync</code> is called multiple times in a row with the same
+        <code>dstBuffer</code>, <code>then</code> callbacks added synchronously will never see
+        results of subsequent <code>getBufferSubDataAsync</code> calls.
+      </div>
+
+      <div class="note rationale">
+        Compared to the synchronous version of <code>getBufferSubData</code>, this version may
+        impose less overhead on applications. Intended use cases include reading pixels into a
+        pixel buffer object and examining that data on the CPU. It does not force the graphics
+        pipeline to be stalled as <code>getBufferSubData</code> does.
+      </div>
+    </function>
+  </newfun>
+
+  <history>
+    <revision date="2016/12/13">
+      <change>Initial revision.</change>
+    </revision>
+  </history>
+</draft>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/WEBGL_lose_context/extension.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0"?>
+
+<ratified href="WEBGL_lose_context/">
+  <name>WEBGL_lose_context</name>
+  <aliases>
+    <alias>WEBKIT_WEBGL_lose_context</alias>
+    <alias>MOZ_WEBGL_lose_context</alias>
+  </aliases>
+  <contact><a href="mailto:enne@chromium.org">enne@chromium.org</a></contact>
+  <contributors>
+    <contributor>Members of the <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a></contributor>
+    <contributor>Glenn Maynard</contributor>
+  </contributors>
+  <number>3</number>
+  <depends>
+    <api version="1.0"/>
+  </depends>
+  <overview>
+    <p>This extension exposes new functions which simulate losing and restoring the WebGL context, even on platforms where the context can never be lost.  Consult the WebGL specification for documentation about the <code>webglcontextlost</code> and <code>webglcontextrestored</code> events.</p>
+    <p>When this extension is enabled:
+      <ul>
+        <li><code>loseContext</code> and <code>restoreContext</code> are allowed to generate INVALID_OPERATION errors even when the context is lost.</li>
+      </ul>
+    </p>
+    <p>
+        Note that this extension is <strong>not</strong> disconnected from the WebGLRenderingContext if that
+        object loses its context as described in "The Context Lost Event" of the WebGL specification, either
+        through use of this API or via actual circumstances such as a system failure.
+    </p>
+  </overview>
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface WEBGL_lose_context {
+      void loseContext();
+      void restoreContext();
+};
+  </idl>
+  <newfun>
+    <function name="loseContext" type="void">
+      <p>When this function is called and the context is not lost, simulate
+      losing the context so as to trigger the steps described in the WebGL
+      spec for handling context lost. The context will remain in the lost
+      state according to the WebGL specification until
+      <code>restoreContext()</code> is called.  If the context is already
+      lost when this function is called, generate an
+      <code>INVALID_OPERATION</code> error.</p>
+
+      <p>Implementations should destroy the underlying graphics context and
+      all graphics resources when this method is called. This is the
+      recommended mechanism for applications to programmatically halt their
+      use of the WebGL API.</p>
+
+    </function>
+    <function name="restoreContext" type="void">
+      When this function is called while the context is lost, and the conditions
+      defined by the WebGL specification for restoring the context are
+      met, simulate the context being restored so as to trigger the steps
+      described in the WebGL spec for handling the context being restored.
+      If the context is already restored when this function is called, or if
+      the conditions in the WebGL specification for restoring the
+      context are not satisfied, or if the context was not lost via <code>loseContext()</code>,
+      generate an <code>INVALID_OPERATION</code> error.
+    </function>
+  </newfun>
+  <history>
+    <revision date="2011/01/11">
+      <change>Initial revision.</change>
+    </revision>
+    <revision date="2011/04/14">
+      <change>Added explicit restoreContext() method based on discussion on public_webgl list, to enable testing of scenario where context stays lost for a period of time.</change>
+    </revision>
+    <revision date="2011/11/08">
+      <change>Renamed from WEBKIT_lose_context to WEBGL_EXT_lose_context</change>
+    </revision>
+    <revision date="2011/11/11">
+      <change>Changed to make it clear this extension should follow the WebGL spec for the steps involved in handling losing and restoring the context rather than just fire events.</change>
+    </revision>
+    <revision date="2011/12/06">
+      <change>Added vendor-specific name strings for draft extension per discussion on WebGL mailing list</change>
+      <change>Renamed from WEBGL_EXT_lose_context to WEBGL_lose_context</change>
+    </revision>
+    <revision date="2011/12/07">
+      <change>Renamed "Name Strings" section to "Alias Name Strings".</change>
+    </revision>
+    <revision date="2012/01/03">
+      <change>Removed webgl module per changes to Web IDL spec.</change>
+    </revision>
+    <revision date="2013/01/26">
+      <change>Moved from draft to community approved status</change>
+    </revision>
+    <revision date="2013/05/15">
+      <change>Ratified by Khronos Board of Promoters.</change>
+    </revision>
+    <revision date="2013/06/05">
+      <change>Clarified error generation that conflicted with WebGL spec.</change>
+    </revision>
+    <revision date="2013/08/02">
+      <change>
+          Indicated that this extension is not disconnected from the WebGLRenderingContext
+          when that object loses its drawing buffer (i.e. when it performs the steps
+          outlined in "The Context Lost Event" of the WebGL specification).</change>
+    </revision>
+    <revision date="2014/05/08">
+      <change>Added INVALID_OPERATION for restoreContext() without loseContext()</change>
+    </revision>
+    <revision date="2014/07/15">
+      <change>Added NoInterfaceObject extended attribute.</change>
+    </revision>
+    <revision date="2017/02/03">
+      <change>Per discussion in working group, document that this extension
+      should destroy the underlying context and all graphics resources.</change>
+    </revision>
+  </history>
+</ratified>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/WEBGL_multiview/extension.xml
@@ -0,0 +1,281 @@
+<?xml version="1.0"?>
+
+<draft href="WEBGL_multiview/">
+  <name>WEBGL_multiview</name>
+  <contact>
+    <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a> (public_webgl 'at' khronos.org)
+  </contact>
+  <contributors>
+    <contributor>Olli Etuaho, NVIDIA</contributor>
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+  <number>36</number>
+  <depends>
+    <api version="1.0"/>
+  </depends>
+  <overview>
+    <mirrors href="https://www.opengl.org/registry/specs/OVR/multiview.txt" name="OVR_multiview">
+      <addendum>
+        Calling <code>framebufferTextureMultiviewWEBGL</code> with a non-null <code>texture</code> parameter that does not identify a 2D array texture generates an <code>INVALID_OPERATION</code> error.
+      </addendum>
+      <addendum>
+        The values of <code>baseViewIndex</code> and <code>numViews</code> can result in an error only if the <code>texture</code> parameter is non-null.
+      </addendum>
+      <addendum>
+        If <code>baseViewIndex</code> is not the same for all framebuffer attachment points where the value of <code>FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE</code> is not <code>NONE</code> the framebuffer is considered incomplete. Calling <code>getFramebufferStatus</code> for a framebuffer in this state returns <code>FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR</code>. Other rules for framebuffer completeness from the OVR_multiview specification also apply.
+      </addendum>
+      <addendum>
+        Other web APIs may expose <i>opaque multiview framebuffers</i>. Opaque multiview framebuffers are <code>WebGLFramebuffer</code> objects that act as if they have multi-view attachments, but their attachments are not exposed as textures or renderbuffers and can not be changed. Opaque multiview framebuffers may have any combination of color, depth and stencil attachments.
+      </addendum>
+      <addendum>
+        Calling <code>framebufferRenderbuffer</code>, <code>framebufferTexture2D</code>, <code>framebufferTextureLayer</code>, <code>framebufferTextureMultiviewWEBGL</code>, or any other call that could change framebuffer attachments with an opaque multiview framebuffer bound to <code>target</code> generates an <code>INVALID_OPERATION</code> error.
+      </addendum>
+      <addendum>
+        If an opaque framebuffer is bound to <code>target</code> when calling <code>getFramebufferAttachmentParameter</code>, then <code>attachment</code> must be <code>BACK</code>, <code>DEPTH</code>, or <code>STENCIL</code>.
+      </addendum>
+      <addendum>
+        If an opaque framebuffer is bound to <code>target</code> when calling <code>getFramebufferAttachmentParameter</code>, then <code>pname</code> must not be <code>FRAMEBUFFER_ATTACHMENT_OBJECT_NAME</code>.
+      </addendum>
+      <addendum>
+        Querying <code>FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR</code> on an opaque multiview framebuffer attachment point that has attachments must return the number of views in the opaque multiview framebuffer.
+      </addendum>
+      <addendum>
+        Querying <code>FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR</code> on an opaque multiview framebuffer must return 0.
+      </addendum>
+      <addendum>
+        Querying <code>FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE</code> on an opaque multiview framebuffer must return <code>FRAMEBUFFER_DEFAULT</code>.
+      </addendum>
+      <addendum>
+        The number of views in an opaque multiview framebuffer may be greater than the maximum number of texture array views (the value of <code>MAX_VIEWS_OVR</code>).
+      </addendum>
+      <addendum>
+        Passing an opaque multiview framebuffer to <code>deleteFramebuffer</code> generates an <code>INVALID_OPERATION</code> error.
+      </addendum>
+      <addendum>
+        Although the extension name is prefixed with WEBGL the extension must be enabled with the
+        <code>#extension GL_OVR_multiview</code> directive, as shown in the sample code, to use
+        the extension in a shader.
+
+        Likewise the shading language preprocessor <code>#define GL_OVR_multiview</code>, will be defined to 1 if the extension is supported.
+      </addendum>
+      <addendum>
+        This extension relaxes the restriction in OVR_multiview that only <code>gl_Position</code> can depend on ViewID in the vertex shader. With this change, view-dependent outputs like reflection vectors and similar are allowed.
+      </addendum>
+      <addendum>
+        When the number of views specified in the active program is one, <code>gl_ViewID_OVR</code> will always evaluate to zero.
+      </addendum>
+      <addendum>
+        When a shader written in OpenGL ES shading language version 1.00 enables or requires <code>GL_OVR_multiview</code> with an extension directive, <code>layout</code> is treated as a keyword rather than an identifier, and using a layout qualifier to specify <code>num_views</code> is allowed. Other uses of layout qualifiers are not allowed in OpenGL ES shading language 1.00.
+      </addendum>
+      <addendum>
+        In OpenGL ES shading language version 1.00 <code>gl_ViewID_OVR</code> has the type <code>int</code> as opposed to <code>uint</code>.
+      </addendum>
+      <addendum>
+        When a timer query is active and the number of views in the current draw framebuffer is greater than one, attempting to draw or calling <code>clear</code> generates an <code>INVALID_OPERATION</code> error.
+      </addendum>
+      <addendum>
+        When the number of views in the current draw framebuffer is greater than one and the active program does not declare a number of views, attempting to draw generates an <code>INVALID_OPERATION</code> error.
+      </addendum>
+    </mirrors>
+    <features>
+      <feature>
+        Adds support for rendering into multiple views simultaneously. This is supported for opaque multiview framebuffers starting from WebGL 1.0, and 2D texture arrays starting from WebGL 2.0.
+      </feature>
+      <feature>
+        When a shader enables, requires, or warns <code>GL_OVR_multiview</code> with an extension directive:
+        <ul>
+          <li><code>gl_ViewID_OVR</code> is a built-in input of the type uint.</li>
+        </ul>
+      </feature>
+      <feature>
+        The GLSL macro <code>GL_OVR_multiview</code> is defined as 1.
+      </feature>
+    </features>
+  </overview>
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface WEBGL_multiview {
+    const GLenum FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR = 0x9630;
+    const GLenum FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR = 0x9632;
+    const GLenum MAX_VIEWS_OVR = 0x9631;
+    const GLenum FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR = 0x9633;
+
+    void framebufferTextureMultiviewWEBGL(GLenum target, GLenum attachment, WebGLTexture? texture, GLint level, GLint baseViewIndex, GLsizei numViews);
+};
+  </idl>
+  <newfun>
+    <function name="framebufferTextureMultiviewWEBGL" type="void">
+      <param name="target" type="GLenum"/>
+      <param name="attachment" type="GLenum"/>
+      <param name="texture" type="GLuint"/>
+      <param name="level" type="GLint"/>
+      <param name="baseViewIndex" type="GLint"/>
+      <param name="numViews" type="GLsizei"/>
+    </function>
+  </newfun>
+  <newtok>
+    <function name="getParameter" type="any">
+      <param name="pname" type="GLenum"/>
+      Calling with the <code>pname</code> set to <code>MAX_VIEWS_OVR</code> returns the maximum number of views. The implementation must support at least 2 views.
+      <br/>
+
+      The return type depends on the parameter queried:
+      <table width="30%">
+      <tr><th>pname</th><th>returned type</th></tr>
+      <tr><td>MAX_VIEWS_OVR</td><td>GLint</td></tr>
+      </table>
+    </function>
+  </newtok>
+  <newtok>
+    <function name="getFramebufferAttachmentParameter" type="any">
+      <param name="target" type="GLenum"/>
+      <param name="attachment" type="GLenum"/>
+      <param name="pname" type="GLenum"/>
+        Calling with the <code>pname</code> parameter set to <code>FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR</code> returns the number of views of the framebuffer object attachment.
+        Calling with the <code>pname</code> parameter set to <code>FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR</code> returns the base view index of the framebuffer object attachment.
+        <br/>
+
+        The return type depends on the parameter queried:
+        <table width="30%">
+        <tr><th>pname</th><th>returned type</th></tr>
+        <tr><td>FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR</td><td>GLsizei</td></tr>
+        <tr><td>FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR</td><td>GLint</td></tr>
+        </table>
+    </function>
+  </newtok>
+  <errors>
+    <error>
+      The error <code>INVALID_OPERATION</code> is generated by calling <code>framebufferTextureMultiviewWEBGL</code> with a <code>texture</code> parameter that does not identify a 2D array texture.
+    </error>
+    <error>
+      The error <code>INVALID_OPERATION</code> is generated by calling <code>framebufferRenderbuffer</code>, <code>framebufferTexture2D</code>, <code>framebufferTextureLayer</code>, or <code>framebufferTextureMultiviewWEBGL</code> with a <code>target</code> parameter that identifies an opaque multiview framebuffer.
+    </error>
+    <error>
+      The error <code>INVALID_OPERATION</code> is generated by calling <code>deleteFramebuffer</code> with a <code>buffer</code> parameter that identifies an opaque multiview framebuffer.
+    </error>
+    <error>
+      The error <code>INVALID_ENUM</code> is generated by calling <code>getFramebufferAttachmentParameter</code> with an <code>attachment</code> parameter other than <code>BACK</code>, <code>DEPTH</code> or <code>STENCIL</code> when the <code>target</code> parameter identifies an opaque multiview framebuffer.
+    </error>
+    <error>
+      The error <code>INVALID_ENUM</code> is generated by calling <code>getFramebufferAttachmentParameter</code> with the <code>pname</code> parameter set to <code>FRAMEBUFFER_ATTACHMENT_OBJECT_NAME</code> when the <code>target</code> parameter identifies an opaque multiview framebuffer.
+    </error>
+    <error>
+      The error <code>INVALID_VALUE</code> is generated by calling <code>framebufferTextureMultiviewWEBGL</code> with a non-null <code>texture</code> in the following cases:
+      <ul>
+        <li>if <code>numViews</code> is less than one</li>
+        <li>if <code>numViews</code> is more than <code>MAX_VIEWS_OVR</code></li>
+        <li>with the parameters set so that <code>baseViewIndex</code> + <code>numViews</code> is larger than the value of <code>MAX_ARRAY_TEXTURE_LAYERS</code> minus one</li>
+        <li>if <code>baseViewIndex</code> is negative</li>
+      </ul>
+    </error>
+    <error>
+      The error <code>INVALID_FRAMEBUFFER_OPERATION</code> is generated by commands that read from the framebuffer such as <code>BlitFramebuffer</code>, <code>ReadPixels</code>, <code>CopyTexImage*</code>, and <code>CopyTexSubImage*</code>, if the number of views in the current read framebuffer is greater than one.
+    </error>
+    <error>
+      The error <code>INVALID_OPERATION</code> is generated by attempting to draw if the active program declares a number of views and the number of views in the draw framebuffer does not match the number of views declared in the active program.
+    </error>
+    <error>
+      The error <code>INVALID_OPERATION</code> is generated by attempting to draw if the number of views in the current draw framebuffer is greater than one and the active program does not declare a number of views.
+    </error>
+    <error>
+      The error <code>INVALID_OPERATION</code> is generated by attempting to draw if the number of views in the current draw framebuffer is greater than one and transform feedback is active.
+    </error>
+    <error>
+      The error <code>INVALID_OPERATION</code> is generated by attempting to draw or calling <code>clear</code> if the number of views in the current draw framebuffer is greater than one and a timer query is active.
+    </error>
+  </errors>
+  <samplecode xml:space="preserve">
+    <pre>
+    var gl = document.createElement('canvas').getContext('webgl2');
+    var ext = gl.getExtension('WEBGL_multiview');
+    var fb = gl.createFramebuffer();
+    gl.bindFramebuffer(gl.DRAW_FRAMEBUFFER, fb);
+    var colorTex = gl.createTexture();
+    gl.bindTexture(gl.TEXTURE_2D_ARRAY, colorTex);
+    gl.texStorage3D(gl.TEXTURE_2D_ARRAY, 1, gl.RGBA8, 512, 512, 2);
+    ext.framebufferTextureMultiviewWEBGL(gl.DRAW_FRAMEBUFFER, gl.COLOR_ATTACHMENT0, colorTex, 0, 0, 2);
+    var depthStencilTex = gl.createTexture();
+    gl.bindTexture(gl.TEXTURE_2D_ARRAY, depthStencilTex);
+    gl.texStorage3D(gl.TEXTURE_2D_ARRAY, 1, gl.DEPTH32F_STENCIL8, 512, 512, 2);
+    ext.framebufferTextureMultiviewWEBGL(gl.DRAW_FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, depthStencilTex, 0, 0, 2);
+    gl.drawElements(...);  // draw will be broadcasted to the layers of colorTex and depthStencilTex.
+    </pre>
+  </samplecode>
+  <samplecode xml:space="preserve">
+    <pre>
+    var gl = document.createElement('canvas').getContext('webgl');
+    var ext = gl.getExtension('WEBGL_multiview');
+    // ... obtain opaque multiview framebuffer "fb" from another web API here ...
+    gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+    gl.drawElements(...);  // draw will be broadcasted to the views of the opaque multiview framebuffer.
+    // You can not call framebufferTextureMultiviewWEBGL to change the attachments of "fb", only draw to it.
+    </pre>
+  </samplecode>
+  <samplecode xml:space="preserve">
+    <pre>
+    #version 300 es
+    #extension GL_OVR_multiview : require
+    precision mediump float;
+    layout (num_views = 2) in;
+    in vec4 inPos;
+    uniform mat4 u_viewMatrix0;
+    uniform mat4 u_viewMatrix1;
+    void main() {
+      if (gl_ViewID_OVR == 0u) {
+        gl_Position = u_viewMatrix0 * inPos;
+      } else {
+        gl_Position = u_viewMatrix1 * inPos;
+      }
+    }
+    </pre>
+  </samplecode>
+  <history>
+    <revision date="2016/11/11">
+      <change>Initial revision.</change>
+    </revision>
+
+    <revision date="2016/11/25">
+      <change>Specified what happens when the number of views doesn't match or if the number of views is one.</change>
+    </revision>
+    ´
+    <revision date="2016/12/21">
+      <change>Specified what happens on invalid num_views declarations and if assignment to gl_Position.x is inside a larger expression.</change>
+    </revision>
+
+    <revision date="2017/01/12">
+      <change>Filled in getFramebufferAttachmentParameter and extension macro specs, formatted the documentation better, and added a simple API usage example.</change>
+    </revision>
+
+    <revision date="2017/03/10">
+      <change>Removed the core spec changes and made the specification follow the OVR_multiview specification more closely.</change>
+    </revision>
+
+    <revision date="2017/05/19">
+      <change>Introduced the concept of an opaque multiview framebuffer and fixed example code.</change>
+    </revision>
+
+    <revision date="2017/05/23">
+      <change>Made the extension compatible with WebGL 1.0 and fixed example shader code.</change>
+    </revision>
+
+    <revision date="2017/07/21">
+      <change>Specified some errors to be generated at draw time and made the extension compatible with emscripten.</change>
+    </revision>
+
+    <revision date="2017/08/08">
+      <change>Rolled back shader restrictions.</change>
+    </revision>
+
+    <revision date="2017/08/17">
+      <change>Required a multiview program to draw to a multiview framebuffer.</change>
+    </revision>
+
+    <revision date="2017/10/26">
+      <change>Took changes in the native OVR_multiview specification into account, added a more elaborate example including a depth/stencil texture, and an explicit mention that texture arrays are only supported in WebGL 2.0.</change>
+    </revision>
+
+    <revision date="2018/01/03">
+      <change>Moved to draft status.</change>
+    </revision>
+  </history>
+</draft>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/WEBGL_security_sensitive_resources/extension.xml
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<draft href="WEBGL_security_sensitive_resources/">
+
+  <name>WEBGL_security_sensitive_resources</name>
+
+  <contact>
+    <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a> (public_webgl 'at' khronos.org)
+  </contact>
+
+  <contributors>
+    <contributor>Max Vujovic (mvujovic 'at' adobe.com)</contributor>
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+
+  <number>23</number>
+
+  <depends>
+    <api version="1.0"/>
+    <ext name="EXT_frag_depth"/>
+    <ext name="WEBGL_draw_buffers"/>
+    <ext name="WEBGL_shared_resources"/>
+  </depends>
+
+  <overview>
+    <p>In the <a href="../../../specs/1.0/">WebGL API 1.0</a> specification, section <a href="../../../specs/1.0/#4.2">4.2 Origin Restrictions</a> restricts the following sources for texture upload:</p>
+    <p>
+      <ul>
+        <li>An image or video element whose origin is not the same as the origin of the <code>Document</code> that contains the <code>WebGLRenderingContext</code>'s canvas element.</li>
+        <li>A canvas element whose <i>origin-clean</i> flag is set to false.</li>
+      </ul>
+    </p>
+    <p>This extension allows these sources for texture uploads, with some restrictions regarding their uploading and use.</p>
+
+    <div class="nonnormative">
+      <p>Motivation:</p>
+      <p>This extension enables the processing of cross-origin resources in WebGL. Additionally, it defines a foundation of concepts that can be used in future extensions to process other types of security sensitive content, including arbitrary HTML content.</p>
+      <p>For an example of security sensitive content, consider the rendering of an HTML link. The color of the link can indicate its visited or unvisited state. Third parties must not be able to access or infer this information.</p>
+      <p>Specifically, third parties must not be able read the pixel data of security sensitive content through WebGL or other APIs. Additionally, third parties must not be able to divulge or approximate the pixel data of security sensitive content by timing WebGL operations.</p>
+      <p>Prior to this extension, WebGL restricted the upload of security sensitive content as a texture for graphical processing. This extension enables the uploading and processing of security sensitive content, with some restrictions. Note that this extension imposes no restrictions on the processing of regular, non-security sensitive content.</p>
+      <p>To secure a user’s privacy, a WebGL implementation must not leak information about the contents of security sensitive textures through the execution time of its commands. To achieve this, no part of the underlying graphics pipeline may vary in execution time based on the contents of a security sensitive texture. For example, primitive assembly and depth testing must not vary based on the contents of a security sensitive texture.</p>
+      <p>The vertex shading and fragment shading stages of the graphics pipeline require particular restrictions to keep their execution time independent of the contents of security sensitive textures. Specifically, the contents of a security sensitive texture must only appear in constant-time GLSL operations. A constant-time GLSL operation is an operation whose execution time does not vary based on the values of its operands. This extension will describe how a WebGL implementation can enforce this requirement.</p>
+      <p>Additionally, this extension attempts to identify non-constant-time GLSL operations. All other GLSL operations are assumed to be constant time in both the WebGL implementation and the underlying GPU implementation. If this assumption is false on a particular implementation, then this extension must be disabled for that implementation. In the future, GPU vendors may be able to provide a mechanism to guarantee that the assumed GLSL operations are in fact constant-time.</p>
+    </div>
+
+    <h3>Definitions</h3>
+    <p>This extension relies on the definition of several constructs in GLSL. These constructs are determined statically, after preprocessing.</p>
+
+    <h4>Regular Sampler Variables and Secure Sampler Variables</h4>
+    <p><code>S</code> is a regular sampler if an expression dependent on <code>S</code> appears in one or more of the following constructs:</p>
+    <p>
+      <ul>
+        <li><code>if</code> statement condition</li>
+        <li>selection operator (<code>?</code>) condition</li>
+        <li>loop condition</li>
+        <li>logical and operator (<code>&amp;&amp;</code>)</li>
+        <li>logical or operator (<code>||</code>)</li>
+        <li><code>coord</code>, <code>bias</code>, or <code>lod</code> argument in a texture lookup function call</li>
+        <li>assignment to <code>gl_Position</code></li>
+        <li>assignment to <code>gl_FragDepth</code></li>
+      </ul>
+    </p>
+    <p>Otherwise, <code>S</code> is a secure sampler.</p>
+
+    <h4>Sampler-Dependent Expressions</h4>
+    <p>An expression is dependent on the sampler <code>S</code> if:</p>
+    <p>
+      <ul>
+        <li>It contains a texture lookup function call with <code>S</code> as the <code>sampler</code> argument.</li>
+        <li>It contains an expression that is dependent on the sampler <code>S</code>.</li>
+        <li>It contains a variable that is dependent on the sampler <code>S</code>.</li>
+      </ul>
+    </p>
+
+    <h4>Sampler-Dependent Variables</h4>
+    <p>A variable is dependent on the sampler <code>S</code> if:</p>
+    <p>
+      <ul>
+        <li>It is assigned to an expression dependent on the sampler <code>S</code>. (e.g. If <code>a = b</code> and <code>b</code> is dependent on sampler <code>S</code>, then <code>a</code> is dependent on sampler <code>S</code>.)</li>
+        <li>It is addressed using a sampler-dependent expression in an assignment. (e.g. If <code>a[b] = c</code> and <code>b</code> is dependent on the sampler <code>S</code>, then <code>a</code> is dependent on sampler <code>S</code>.)</li>
+        <li>It is a fragment shader varying and the corresponding vertex shader varying is dependent on the sampler <code>S</code>.</li>
+      </ul>
+    </p>
+
+    <div class="nonnormative">
+      A WebGL implementation can create a dependency graph in its GLSL compiler to implement these GLSL constructs. One closely related implementation is described in a <a href="http://code.google.com/p/mvujovic/wiki/ShaderControlFlowAnalysis">wiki page</a>.
+    </div>
+
+    <h3>Features</h3>
+    <features>
+      <feature>The <code>WebGLRenderingContext</code>'s canvas's <i>origin-clean</i> flag is set to false if the context is created with a <code>WebGLContextAttributes</code> dictionary with <code>securitySensitiveDrawingBuffer</code> set to true.</feature>
+    </features>
+  </overview>
+
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface WEBGL_security_sensitive_resources {
+  WebGLFramebuffer? createSecuritySensitiveFramebuffer();
+  WebGLTexture? createSecuritySensitiveTexture();
+};
+
+dictionary WebGLContextAttributes {
+    GLboolean securitySensitiveDrawingBuffer = false;
+};
+  </idl>
+
+  <newfun>
+    <function name="createSecuritySensitiveFramebuffer" type="WebGLFramebuffer?">Behaves like <code>createFramebuffer</code>, except framebuffers created with this function are referred to as security sensitive framebuffers. Framebuffers created with <code>createFramebuffer</code> are referred to as regular framebuffers.</function>
+    <function name="createSecuritySensitiveTexture" type="WebGLTexture?">Behaves like <code>createTexture</code>, except textures created with this function are known as security sensitive textures. Textures created with <code>createTexture</code> are known as regular textures.</function>
+  </newfun>
+
+  <errors>
+    <error>
+      <div class="nonnormative">
+        <p>In summary, an author cannot:</p>
+        <ul>
+          <li>draw a security sensitive resource into a regular resource,</li>
+          <li>copy from a security sensitive resource into a regular resource,</li>
+          <li>read a security sensitive resource using <code>readPixels</code>,</li>
+          <li>use a security sensitive resource for depth testing or stencil testing,</li>
+          <li>share security sensitive resources with a context that cannot recognize them as security sensitive,</li>
+          <li>use a security sensitive resource to influence geometry, since this can affect the depth buffer.</li>
+        </ul>
+      </div>
+      <p>The error <code>INVALID_OPERATION</code> is generated in the following situations:</p>
+      <ul>
+        <li><code>drawArrays</code> or <code>drawElements</code> is called and a security sensitive texture is bound to a regular sampler.</li>
+        <li>
+          <p><code>drawArrays</code> or <code>drawElements</code> is called and:</p>
+          <ul>
+            <li>a security sensitive texture is bound to a secure sampler,</li>
+            <li>a color output variable <code>gl_FragColor</code> or <code>gl_FragData[i]</code> is dependent on the secure sampler,</li>
+            <li>
+              <p>the output variable writes to either:</p>
+              <ul>
+                <li>a regular texture,</li>
+                <li>a regular renderbuffer,</li>
+                <li>the default framebuffer with <code>securitySensitiveDrawingBuffer</code> set to false in the <code>WebGLContextAttributes</code> dictionary used to create the context.</li>
+              </ul>
+            </li>
+          </ul>
+        </li>
+        <li>
+          <p><code>copyTexImage2D</code> or <code>copyTexSubImage2D</code> is called and:</p>
+          <ul>
+            <li>the default framebuffer is bound,</li>
+            <li><code>securitySensitiveDrawingBuffer</code> was set to true in the <code>WebGLContextAttributes</code> dictionary used to create the context.</li>
+            <li>a regular texture is bound as the destination.</li>
+          </ul>
+        </li>
+        <li>
+          <p><code>copyTexImage2D</code> or <code>copyTexSubImage2D</code> is called and:</p>
+          <ul>
+            <li>a security sensitive renderbuffer is selected as the source,</li>
+            <li>a regular texture is bound as the destination.</li>
+          </ul>
+        </li>
+        <li>
+          <p><code>readPixels</code> is called and:</p>
+          <ul>
+            <li>the default framebuffer is bound,</li>
+            <li><code>securitySensitiveDrawingBuffer</code> was set to true in the <code>WebGLContextAttributes</code> dictionary used to create the context.</li>
+          </ul>
+        </li>
+        <li><code>readPixels</code> is called and a security sensitive renderbuffer is selected as the source.</li>
+        <li>
+          <p><code>framebufferRenderbuffer</code> is called and:</p>
+          <ul>
+            <li><code>attachment</code> is <code>DEPTH_ATTACHMENT</code>, <code>STENCIL_ATTACHMENT</code>, or <code>DEPTH_STENCIL_ATTACHMENT</code>,</li>
+            <li><code>renderbuffer</code> is a security sensitive renderbuffer.</li>
+          </ul>
+        </li>
+        <li>
+          <p><code>acquireSharedResource</code> is called and:</p>
+          <ul>
+            <li><code>resource</code> is a security sensitive texture or a security sensitive renderbuffer,</li>
+            <li>the context acquiring the resource does not have this extension enabled.</li>
+          </ul>
+        </li>
+      </ul>
+    </error>
+  </errors>
+
+  <issues>
+    <ul>
+      <li>
+        <div>Q: Why not mark textures and renderbuffers as security sensitive automatically in the WebGL implementation instead of exposing <code>createSecuritySensitive*</code> to the API consumer?</div>
+        <div>A: This approach could make it difficult for API consumers to determine what operation caused a resource to become security sensitive because a related error could occur much later.</div>
+      </li>
+    </ul>
+  </issues>
+
+  <history>
+    <revision date="2013/09/13">
+      <change>Initial revision.</change>
+    </revision>
+    <revision date="2014/07/15">
+      <change>Added NoInterfaceObject extended attribute.</change>
+    </revision>
+  </history>
+</draft>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/WEBGL_shared_resources/extension.xml
@@ -0,0 +1,374 @@
+<?xml version="1.0"?>
+
+<draft href="WEBGL_shared_resources/">
+  <name>WEBGL_shared_resources</name>
+  <contact>
+    <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a> (public_webgl 'at' khronos.org)
+  </contact>
+  <contributors>
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+  <number>22</number>
+  <depends>
+    <api version="1.0"/>
+  </depends>
+  <overview>
+    <p>
+      This extension exposes the ability to share WebGL resources with multiple WebGLRenderingContexts.
+    </p>
+    <p>
+      Background:
+    </p>
+    <p>
+      The OpenGL ES spec defines that you can share a resource (texture, buffer, shader, program,
+      renderbuffer) with 2 or more GL contexts but with some caveats. To guarantee you'll see a
+      change made in one context in other context requires calling glFinish on the context that
+      made the change and call glBind on the context that wants to see the change.
+    </p>
+    <p>
+      Not calling glFinish and/or glBind does not guarantee you won't see the results which means
+      that users may do neither and their app might just happen to work on some platforms and
+      mysteriously have glitches, rendering corruption, gl errors or program failure on others.
+    </p>
+    <p>
+      WebGL must present consistent behavior for sharing and so this extension provides
+      an API so that implementions can enforce and optimize these requirements.
+    </p>
+    <features>
+      <feature>
+        <p>Adds a new context creation parameter:</p>
+        <dl>
+            <dt><span class="prop-value">shareGroup</span></dt>
+                <dd>
+                    <em>Default: undefined</em>. If the value is set to the <code>group</code>
+                    attribute from the <code>WEBGL_shared_resources</code> object from an existing context
+                    then resources from the existing context are shared with the newly created context.
+                </dd>
+        </dl>
+        <pre class="example">
+var canvas1 = document.createElement("canvas");
+var canvas2 = document.createElement("canvas");
+var ctx1 = canvas1.getContext("webgl");
+var sharedResourcesExtension = ctx1.getExtension("WEBGL_shared_resources");
+var ctx2 = canvas2.getContext("webgl", {
+    shareGroup: sharedResourcesExtension.group
+});
+        </pre>
+      </feature>
+      <feature>
+        <p>
+        In order for a context to use a resouce it must first acquire it.
+        Contexts can make a request to acquire a resource by calling acquireSharedResource
+        in one of 2 modes, EXCLUSIVE or READ_ONLY. A resource may be acquired by multiple
+        contexts in READ_ONLY mode. The resource may only be acquired by one context
+        if the mode is EXCLUSIVE. acquireSharedResource returns an id you can use to cancel the acquire
+        by calling cancelAcquireSharedResource.
+        When the resource is available in the requested mode the callback
+        will be invoked. Resources start their life as acquired in EXCLUSIVE mode in the context
+        in which they are created.
+        </p>
+        <p>
+        To release a resource so it may be acquired by another context call releaseSharedResource and
+        pass it the resource to be released.
+        </p>
+      </feature>
+      <feature>
+        <p>
+        After a resource is acquired it must be bound before it is used. Binding
+        means for buffers calling bindBuffer, for textures either bindTexture or
+        framebufferTexture2D, for renderbuffers either bindRenderbuffer or framebufferRenderbuffer,
+        for shaders attachShader, for programs useProgram. Binding once is sufficient to satisfy
+        this requirement. In other words, if you have a texture attached to more than one texture
+        unit the texture only needs to be re-bound to 1 texture unit.  Attemping to use a resource
+        which has not been bound since it was acquired generates INVALID_OPERATION.
+        </p>
+        <p>
+        Bind Requirement Algorithm:
+        </p>
+        <p>
+        Each resource has a per-context bound flag. When a resource is acquired in a context its
+        bound flag for that context is set to false. If one of the functions listed above
+        is called the bound flag for that context is set to true. Drawing and reading functions,
+        clear, drawArrays, drawElements, readPixels, that would access a resource whose bound flag
+        for that context is false generate INVALID_FRAMEBUFFER_OPERATION. All other functions that
+        use a resource whose bound flag for that context is false generate INVALID_OPERATION.
+        </p>
+        <p>
+        Note: In the specific case of programs, it is not an error to call draw with a program
+        or call useProgram for a program which has shaders that have
+        been acquired but not re-attached. Nor it is an error to draw with or call useProgram
+        for a program which has shaders that have not been acquired.  It is an error to call linkProgram
+        for a program that is using shaders that have been acquired but not re-attached.
+        </p>
+      </feature>
+      <feature>
+        <p>
+        When an attempt is made to use a resource that is not acquired in the current context
+        the implementation must generate the error INVALID_OPERATION or INVALID_FRAMEBUFFER_OPRATION.
+        This includes all gl calls
+        that would access the given resource directly or indirectly. For example, a
+        draw call must fail if any of the resources it would access is not acquired in the
+        correct mode for the call. In other words, if the draw call would read from a buffer
+        or texture and that buffer or texture is not acquired for READ_ONLY or EXCLUSIVE mode the draw
+        must fail with INVALID_FRAMEBUFFER_OPERATION. If the draw would render to a texture or renderbuffer
+        that is not acquired for EXCLUSIVE mode the draw must fail and generate INVALID_FRAMEBUFFER_OPERATION.
+        If a program used in the draw is not acquired for READ_ONLY or EXCLUSIVE mode the draw or clear must fail
+        and generate INVALID_FRAMEBUFFER_OPERATION.
+        </p>
+        <p>
+        For buffers not acquired this includes but is not limited to
+        </p>
+        <pre>
+          bindBuffer
+          bufferData
+          bufferSubData
+          deleteBuffer
+          drawArrays
+          drawElements
+          getParameter with parameter (BUFFER_SIZE or BUFFER_USAGE)
+          isBuffer
+          vertexAttribPointer
+        </pre>
+        <p>
+        For a buffer acquired in READ_ONLY mode this includes but is not limited to
+        </p>
+        <pre>
+          bufferData
+          bufferSubData
+        </pre>
+        <p>
+        For programs not acquired this includes but is not limited to
+        </p>
+        <pre>
+          attachShader
+          bindAttribLocation
+          drawArrays
+          drawElements
+          deleteProgram
+          getActiveAttrib
+          getActiveUniform
+          getAttribLocation
+          getUniformLocation
+          getProgramParameter
+          getProgramInfoLog
+          isProgram
+          linkProgram
+          useProgram
+          validateProgram
+        </pre>
+        <p>
+        For programs acquired in READ_ONLY mode includes but is not limited to
+        </p>
+        <pre>
+          bindAttribLocation
+          deleteProgram
+          linkProgram
+        </pre>
+        <p>
+        For renderbuffers not acquired this includes but is not limited to
+        </p>
+        <pre>
+          bindRenderbuffer
+          clear
+          deleteRenderbuffer
+          drawArrays
+          drawElements
+          framebufferRenderbuffer
+          isRenderbuffer
+          renderbufferStorage
+        </pre>
+        <p>
+        For renderbuffers acquired in READ_ONLY mode this includes
+        </p>
+        <pre>
+          clear
+          deleteRenderbuffer
+          drawArrays
+          drawElements
+          renderbufferStorage
+        </pre>
+        <p>
+        For shaders not acquired this includes but is not limited to
+        </p>
+        <pre>
+          attachShader
+          compileShader
+          deleteShader
+          getShaderSource
+          getShaderParameter
+          isShader
+          shaderSource
+        </pre>
+        <p>
+        For shaders acquired in READ_ONLY mode this includes but is not limited to
+        </p>
+        <pre>
+          deleteShader
+          compileShader
+          shaderSource
+        </pre>
+        <p>
+        For textures not acquired this includes but is not limited to
+        </p>
+        <pre>
+          bindTexture
+          clear
+          compressedTexImage2D
+          compressedTexSubImage2D
+          copyTexImage2D
+          copyTexSubImage2D
+          drawArrays
+          drawElements
+          deleteTexture
+          framebufferTexture2D
+          getTexParameter
+          isTexture
+          texImage2D
+          texParameter
+          texSubImage2D
+        </pre>
+        <p>
+        For textures acquired in READ_ONLY mode this includes but is not limited to
+        </p>
+        <pre>
+          clear
+          compressedTexImage2D
+          compressedTexSubImage2D
+          copyTexImage2D
+          copyTexSubImage2D
+          drawArrays
+          drawElements
+          deleteTexture
+          texImage2D
+          texParameter
+          texSubImage2D
+        </pre>
+        <p>
+        The term "not limited to" is intended to point out that extension may enable
+        other functions to which these rule should apply. For example drawArraysInstancedANGLE
+        must follow the same rules as drawArrays.
+        </p>
+      </feature>
+      <feature>
+          <p>
+          Calling checkFramebufferStatus with the argument FRAMEBUFFER or DRAW_FRAMEBUFFER must
+          return FRAMEBUFFER_INCOMPLETE_ATTACHMENT if any of the resources referenced by the currently
+          bound framebuffer are not acquired for EXCLUSIVE access.
+          Calling checkFramebufferStatus with the argument READ_FRAMEBUFFER will return
+          FRAMEBUFFER_INCOMPLETE_ATTACHMENT if any of the resources referenced by the currently bound
+          framebuffer are not acquired for EXCLUSIVE or READ_ONLY access.
+          </p>
+          <p>
+          Note: This extension exposes the constants READ_FRAMEBUFFER and DRAW_FRAMEBUFFER only for
+          the purpose of calling checkFramebufferStatus. In particular, this extension does not enable
+          calling bindFramebuffer with either constant.
+          </p>
+      </feature>
+      <feature>
+          <p>
+          A context that is deleted automatically releases all resources it has acquired. Note that
+          currently there is no way to explicitly delete a context. Contexts are deleted through
+          garbage collection.
+          </p>
+      </feature>
+      <feature>
+        <p>
+         Note that implementing this extension changes the base class of the sharable resources.
+         Specifically: WebGLBuffer, WebGLProgram, WebGLRenderbuffer, WebGLShader, and WebGLTexture
+         change their base class from WebGLObject to WebGLSharedObject.
+        </p>
+      </feature>
+    </features>
+  </overview>
+  <issues>
+    <ul>
+      <li>
+          <div>
+              Q: What happens if one context deletes a resource another context is attempting to acquire?
+          </div>
+          <div>
+              A: Nothing special. The acquire will succeed when the context that currently has the resource
+              releases it. The context that acquires the resource can use the WebGLSharedObject
+              (buffer, texture, etc...) and will get the normal WebGL behavior associated with using
+              a deleted resource.
+          </div>
+      </li>
+      <li>
+          <div>
+              Q: Can you attach a resources that you have not acquired to a container?
+          </div>
+          <div>
+              A: No. An attachment can remain attached while it is released but it must be acquired
+                 when attaching.
+                 In particular a framebuffer attachment may not be attached to a framebuffer unless
+                 the attachment is acquired. A shader may not be attached to a program unless the
+                 shader is acquired. A buffer may not be attached to an attibute, vertexAttribPointer,
+                 unless the buffer is acquired.
+          </div>
+      </li>
+      <li>
+          <div>
+ Q: What happens if you try to acquire a resource you already have acquired?
+          </div>
+          <div>
+ A: It will generate INVALID_OPERATION
+          </div>
+      </li>
+    </ul>
+  </issues>
+  <idl xml:space="preserve">
+[NoInterfaceObject]
+interface WEBGL_shared_resources {
+     const GLenum READ_ONLY  = 0x0001;
+     const GLenum EXCLUSIVE  = 0x0004;
+
+     const GLenum READ_FRAMEBUFFER = 0x8CA8;
+     const GLenum DRAW_FRAMEBUFFER = 0x8CA9;
+
+     readonly attribute WebGLShareGroup group;
+
+     long acquireSharedResource(
+         WebGLSharedObject resource,
+         GLenum mode,
+         AcquireResourcesCallback callback);
+     void releaseSharedResource(
+         WebGLSharedObject resource);
+     void cancelAcquireSharedResource(long id);
+};
+
+callback AcquireSharedResourcesCallback = void ();
+
+[NoInterfaceObject]
+interface WebGLShareGroup {
+}
+
+interface WebGLSharedObject : WebGLObject {
+}
+
+interface WebGLBuffer : WebGLSharedObject {
+}
+
+interface WebGLProgram : WebGLSharedObject {
+}
+
+interface WebGLRenderbuffer : WebGLSharedObject {
+}
+
+interface WebGLShader : WebGLSharedObject {
+}
+
+interface WebGLTexture : WebGLSharedObject {
+}
+  </idl>
+  <history>
+    <revision date="2012/02/06">
+      <change>Initial revision.</change>
+    </revision>
+    <revision date="2013/05/14">
+      <change>Moved to draft after agreement in working group.</change>
+    </revision>
+    <revision date="2014/07/15">
+      <change>Added NoInterfaceObject extended attribute to extension interface and WebGLShareGroup.</change>
+    </revision>
+  </history>
+</draft>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/proposals/EXT_clip_cull_distance/extension.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi:set sw=2 ts=4: -->
+<?xml-stylesheet href="../../extension.xsl" type="text/xsl"?>
+<proposal href="proposals/EXT_clip_cull_distance/">
+  <name>EXT_clip_cull_distance</name>
+
+  <contact> <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL
+  working group</a> (public_webgl 'at' khronos.org) </contact>
+
+  <contributors>
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+
+  <number>XYZ</number>
+
+  <depends>
+    <api version="2.0"/>
+  </depends>
+
+  <overview>
+    <mirrors href="https://www.khronos.org/registry/gles/extensions/EXT/EXT_clip_cull_distance.txt"
+             name="EXT_clip_cull_distance">
+    </mirrors>
+
+    <features>
+      <feature>
+        Adds support for hardware clip planes and cull distances to OpenGL ES.
+      </feature>
+      <glsl extname="GL_EXT_clip_cull_distance">
+        <stage type="vertex"/>
+        <output name="gl_ClipDistance" type="highp float" suffix="[]"/>
+        <output name="gl_CullDistance" type="highp float" suffix="[]"/>
+        <stage type="fragment"/>
+        <input name="gl_ClipDistance" type="highp float" suffix="[]"/>
+        <input name="gl_CullDistance" type="highp float" suffix="[]"/>
+      </glsl>
+    </features>
+  </overview>
+
+  <idl xml:space="preserve">
+    [NoInterfaceObject]
+    interface EXT_clip_cull_distance {
+      const GLenum MAX_CLIP_DISTANCES_EXT                       = 0x0D32;
+      const GLenum MAX_CULL_DISTANCES_EXT                       = 0x82F9;
+      const GLenum MAX_COMBINED_CLIP_AND_CULL_DISTANCES_EXT     = 0x82FA;
+
+      const GLenum CLIP_DISTANCE0_EXT                           = 0x3000;
+      const GLenum CLIP_DISTANCE1_EXT                           = 0x3001;
+      const GLenum CLIP_DISTANCE2_EXT                           = 0x3002;
+      const GLenum CLIP_DISTANCE3_EXT                           = 0x3003;
+      const GLenum CLIP_DISTANCE4_EXT                           = 0x3004;
+      const GLenum CLIP_DISTANCE5_EXT                           = 0x3005;
+      const GLenum CLIP_DISTANCE6_EXT                           = 0x3006;
+      const GLenum CLIP_DISTANCE7_EXT                           = 0x3007;
+    };
+  </idl>
+
+  <samplecode xml:space="preserve">
+    <pre>
+    #extension GL_EXT_clip_cull_distance : enable
+
+    // Vertex shader
+    out highp float gl_ClipDistance[2];
+    out highp float gl_CullDistance[2];
+
+    void main(){
+        // Compute the clip and cull distances for this vertex
+        gl_ClipDistance[0] = ...;
+        gl_CullDistance[0] = ...;
+        gl_ClipDistance[1] = ...;
+        gl_CullDistance[1] = ...;
+    }
+    </pre>
+  </samplecode>
+
+  <history>
+    <revision date="2016/08/22">
+      <change>Initial revision.</change>
+    </revision>
+  </history>
+</proposal>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/khronos_api/api_webgl/extensions/proposals/WEBGL_debug/extension.xml
@@ -0,0 +1,359 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<proposal href="proposals/WEBGL_debug/">
+  <name>WEBGL_debug</name>
+
+  <contact> <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL
+  working group</a> (public_webgl 'at' khronos.org) </contact>
+
+  <contributors>
+    <contributor>Emmanuel Gil Peyrot, Collabora Ltd.</contributor>
+    <contributor>Members of the WebGL working group</contributor>
+  </contributors>
+
+  <number>NN</number>
+
+  <depends>
+    <api version="1.0"/>
+  </depends>
+
+  <overview id="overview">
+    <p>
+      This extension allows the GL to notify applications when various events
+      occur that may be useful during application development, debugging and
+      profiling.
+    </p>
+
+    <mirrors href="https://www.opengl.org/registry/specs/KHR/debug.txt"
+             name="KHR_debug">
+      <addendum>
+        References to debug contexts are deleted.
+      </addendum>
+
+      <addendum>
+        References to the debug message log and callback are deleted, replaced
+        with DOM events.
+      </addendum>
+
+      <addendum>
+        The <code>ObjectPtrLabel</code> and <code>GetObjectPtrLabel</code>
+        functions are replaced with <code>ObjectLabel</code> and
+        <code>GetObjectLabel</code>.
+      </addendum>
+
+      <addendum>
+        The <code>count</code> and <code>ids</code> arguments of
+        <code>DebugMessageControl</code> are replaced with a
+        <code>sequence&lt;GLuint&gt; ids</code> argument.
+      </addendum>
+
+      <addendum>
+        The <code>length</code> and <code>buf</code> arguments of
+        <code>DebugMessageInsert</code> and <code>PushDebugGroup</code> are
+        replaced with a <code>DOMString message</code> argument.
+      </addendum>
+
+      <addendum>
+        The <code>identifier</code> and <code>name</code> arguments of
+        <code>ObjectLabel</code> and <code>GetObjectLabel</code> are replaced
+        with a <code>WebGLObject object</code> argument.
+      </addendum>
+
+      <addendum>
+        The <code>length</code> and <code>label</code> arguments of
+        <code>ObjectLabel</code> are replaced with a <code>DOMString
+        label</code> argument.
+      </addendum>
+
+      <addendum>
+        The <code>bufSize</code>, <code>length</code> and <code>label</code>
+        arguments of <code>GetObjectLabel</code> are replaced with a
+        <code>DOMString</code> return type.
+      </addendum>
+
+      <addendum>
+        As per the usual WebGL binding rules, functions don’t keep the KHR
+        suffix they have in the GLES version, but tokens do.
+      </addendum>
+    </mirrors>
+
+    <features>
+      <feature>
+        The <code>WEBGL_debug</code> extension object is a DOM
+        <code>EventTarget</code>, obeying the rules of the <a
+        href="http://www.w3.org/TR/DOM-Level-3-Events/">DOM Level 3 Events</a>,
+        with a new <code>WebGLDebugMessage</code> event that gets fired
+        whenever the driver, browser or application emits a debug message.
+      </feature>
+
+      <feature>
+        <code>debugMessageInsertKHR</code> is exposed to allow the application
+        to insert debug messages into the WebGL stream.
+      </feature>
+
+      <feature>
+        <code>objectLabelKHR</code> and <code>getObjectLabelKHR</code> are
+        exposed, to assign a label to a <code>WebGLObject</code> and retrieve
+        it.
+      </feature>
+
+      <feature>
+        <code>pushDebugGroupKHR</code> and <code>popDebugGroupKHR</code> make
+        it possible to group a list of WebGL calls together.
+      </feature>
+
+      <feature>
+        <code>debugMessageControlKHR</code> allows the application to enable
+        and disable the debug messages which emit a
+        <code>WebGLDebugMessage</code> event.  This state is part of the debug
+        group they are part of, and gets poped on
+        <code>popDebugGroupKHR</code>.
+      </feature>
+    </features>
+  </overview>
+
+  <idl xml:space="preserve"><![CDATA[
+[NoInterfaceObject]
+interface WEBGL_debug : EventTarget {
+  const GLenum MAX_DEBUG_MESSAGE_LENGTH_KHR = 0x9143;
+  const GLenum MAX_DEBUG_GROUP_STACK_DEPTH_KHR = 0x826C;
+  const GLenum DEBUG_GROUP_STACK_DEPTH_KHR = 0x826D;
+  const GLenum MAX_LABEL_LENGTH_KHR = 0x82E8;
+
+  const GLenum DEBUG_SOURCE_API_KHR = 0x8246;
+  const GLenum DEBUG_SOURCE_WINDOW_SYSTEM_KHR = 0x8247;
+  const GLenum DEBUG_SOURCE_SHADER_COMPILER_KHR = 0x8248;
+  const GLenum DEBUG_SOURCE_THIRD_PARTY_KHR = 0x8249;
+  const GLenum DEBUG_SOURCE_APPLICATION_KHR = 0x824A;
+  const GLenum DEBUG_SOURCE_OTHER_KHR = 0x824B;
+
+  const GLenum DEBUG_TYPE_ERROR_KHR = 0x824C;
+  const GLenum DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR = 0x824D;
+  const GLenum DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR = 0x824E;
+  const GLenum DEBUG_TYPE_PORTABILITY_KHR = 0x824F;
+  const GLenum DEBUG_TYPE_PERFORMANCE_KHR = 0x8250;
+  const GLenum DEBUG_TYPE_OTHER_KHR = 0x8251;
+  const GLenum DEBUG_TYPE_MARKER_KHR = 0x8268;
+
+  const GLenum DEBUG_TYPE_PUSH_GROUP_KHR = 0x8269;
+  const GLenum DEBUG_TYPE_POP_GROUP_KHR = 0x826A;
+
+  const GLenum DEBUG_SEVERITY_HIGH_KHR = 0x9146;
+  const GLenum DEBUG_SEVERITY_MEDIUM_KHR = 0x9147;
+  const GLenum DEBUG_SEVERITY_LOW_KHR = 0x9148;
+  const GLenum DEBUG_SEVERITY_NOTIFICATION_KHR = 0x826B;
+
+  const GLenum STACK_UNDERFLOW_KHR = 0x0504;
+  const GLenum STACK_OVERFLOW_KHR = 0x0503;
+
+  void debugMessageControlKHR(GLenum source, GLenum type, GLenum severity, sequence<GLuint> ids, boolean enabled);
+  void debugMessageInsertKHR(GLenum source, GLenum type, GLuint id, GLenum severity, DOMString buf);
+
+  void pushDebugGroupKHR(GLenum source, GLuint id, DOMString message);
+  void popDebugGroupKHR();
+
+  void objectLabelKHR(WebGLObject? object, DOMString label);
+  DOMString getObjectLabelKHR(WebGLObject? object);
+}; // interface WEBGL_debug
+
+[NoInterfaceObject]
+interface WebGLDebugMessage : Event {
+  readonly attribute GLenum source;
+  readonly attribute GLenum type;
+  readonly attribute GLuint id;
+  readonly attribute GLenum severity;
+  readonly attribute DOMString message;
+}; // interface WebGLDebugMessage
+  ]]></idl>
+
+  <newfun>
+    <p>On <code>WEBGL_debug</code>:</p>
+
+    <function name="debugMessageControlKHR" type="void">
+      <param name="source" type="GLenum"/>
+      <param name="type" type="GLenum"/>
+      <param name="severity" type="GLenum"/>
+      <param name="ids" type="sequence&lt;GLuint&gt;"/>
+      <param name="enabled" type="boolean"/>
+      Enables or disables the reporting of <code>WebGLDebugMessage</code>
+      events for the specified messages.
+    </function>
+
+    <function name="debugMessageInsertKHR" type="void">
+      <param name="source" type="GLenum"/>
+      <param name="type" type="GLenum"/>
+      <param name="id" type="GLuint"/>
+      <param name="severity" type="GLenum"/>
+      <param name="message" type="DOMString"/>
+      Inserts a custom message into the debug log.
+    </function>
+
+    <function name="pushDebugGroupKHR" type="void">
+      <param name="source" type="GLenum"/>
+      <param name="id" type="GLuint"/>
+      <param name="message" type="DOMString"/>
+      Pushes a debug group on the stack.
+    </function>
+
+    <function name="popDebugGroupKHR" type="void">
+      Closes a group opened with <code>pushDebugGroupKHR</code>.
+    </function>
+
+    <function name="objectLabelKHR" type="void">
+      <param name="object" type="WebGLObject?"/>
+      <param name="label" type="DOMString"/>
+      Assigns a label to a <code>WebGLObject</code>.
+    </function>
+
+    <function name="getObjectLabelKHR" type="DOMString">
+      <param name="object" type="WebGLObject?"/>
+      Retrieves the label associated with a <code>WebGLObject</code>.
+    </function>
+
+    <function name="addEventListener" type="void">
+      <param name="type" type="DOMString"/>
+      <param name="listener" type="EventListener"/>
+      Register an event handler of a specific event type on the EventTarget.
+    </function>
+
+    <function name="removeEventListener" type="void">
+      <param name="type" type="DOMString"/>
+      <param name="listener" type="EventListener"/>
+      Removes an event listener from the EventTarget.
+    </function>
+
+    <function name="dispatchEvent" type="boolean">
+      <param name="event" type="Event"/>
+      Dispatch an event to this EventTarget.
+    </function>
+
+  </newfun>
+
+  <samplecode><div class="example">
+    Common initialization of the extension, with an example of debug message
+    reporting.
+
+    <pre xml:space="preserve"><![CDATA[
+function init(gl) {
+  ...
+  var ext = gl.getExtension('WEBGL_debug');
+
+  ext.addEventListener('message', function(evt) {
+    console.log(evt.source, evt.type, evt.id, evt.severity, evt.message);
+  });
+  ...
+}]]></pre></div></samplecode>
+
+  <samplecode><div class="example">
+    Skip a section of the code.
+    
+    <pre xml:space="preserve"><![CDATA[
+function draw(gl, ext) {
+  ...
+
+  // Setup of the default active debug group: Filter everything in
+  ext.debugMessageControlKHR(gl.DONT_CARE, gl.DONT_CARE, gl.DONT_CARE, [], true);
+
+  // Generate a debug marker debug output message
+  ext.debugMessageInsertKHR(
+    ext.DEBUG_SOURCE_APPLICATION_KHR,
+    ext.DEBUG_TYPE_MARKER_KHR, 100,
+    ext.DEBUG_SEVERITY_NOTIFICATION_KHR,
+    "Message 1");
+
+  // Push debug group 1
+  ext.pushDebugGroupKHR(
+    ext.DEBUG_SOURCE_APPLICATION_KHR,
+    1,
+    "Message 2");
+
+  // Setup of the debug group 1: Filter everything out
+  ext.debugMessageControlKHR(gl.DONT_CARE, gl.DONT_CARE, gl.DONT_CARE, [], false);
+
+  // This message won't appear in the debug output log of
+  ext.debugMessageInsertKHR(
+    ext.DEBUG_SOURCE_APPLICATION_KHR,
+    ext.DEBUG_TYPE_MARKER_KHR, 100,
+    ext.DEBUG_SEVERITY_NOTIFICATION_KHR,
+    "Message 3");
+
+  // Pop debug group 1, restore the volume control of the default debug group.
+  ext.popDebugGroupKHR();
+
+  // Generate a debug marker debug output message
+  ext.debugMessageInsertKHR(
+    ext.DEBUG_SOURCE_APPLICATION_KHR,
+    ext.DEBUG_TYPE_MARKER_KHR, 100,
+    ext.DEBUG_SEVERITY_NOTIFICATION_KHR,
+    "Message 5");
+
+  ...
+
+  // Expected debug output in the JS console:
+  // Message 1
+  // Message 2
+  // Message 2
+  // Message 5
+}]]></pre></div></samplecode>
+
+  <samplecode><div class="example">
+    Only output a subsection of the code and disable some messages for the
+    entire application.
+  
+    <pre xml:space="preserve"><![CDATA[
+function draw(gl, ext) {
+  ...
+
+  // Setup the control of the debug output for the default debug group
+  ext.debugMessageControlKHR(
+    gl.DONT_CARE, gl.DONT_CARE, gl.DONT_CARE, [], false);
+  ext.debugMessageControlKHR(
+    ext.DEBUG_SOURCE_THIRD_PARTY_KHR, gl.DONT_CARE, gl.DONT_CARE, [], false);
+  var messages = [1234, 2345, 3456, 4567];
+  ext.debugMessageControlKHR(
+    ext.DEBUG_SOURCE_APPLICATION_KHR, gl.DEBUG_TYPE_OTHER, gl.DONT_CARE,
+    messages, false);
+  ext.debugMessageControlKHR(
+    ext.DEBUG_SOURCE_APPLICATION_KHR, ext.DEBUG_TYPE_PORTABILITY_KHR, gl.DONT_CARE,
+    messages, false);
+
+  // Push debug group 1
+  // Inherit the default debug group debug output volume control
+  // Filtered out by ext.debugMessageControlKHR
+  ext.pushDebugGroupKHR(
+    ext.DEBUG_SOURCE_APPLICATION_KHR,
+    1,
+    "Message 1");
+
+  // In this section of the code, we are interested in performances.
+  ext.debugMessageControlKHR(
+    ext.DEBUG_SOURCE_APPLICATION_KHR, ext.DEBUG_TYPE_PERFORMANCE_KHR, gl.DONT_CARE, [], true);
+  // But we already identify that some messages are not really useful for us.
+  ext.debugMessageControlKHR(
+    ext.DEBUG_SOURCE_APPLICATION_KHR, ext.DEBUG_TYPE_OTHER_KHR, gl.DONT_CARE,
+    [5678, 6789], false);
+
+  ext.debugMessageInsertKHR(
+    ext.DEBUG_SOURCE_APPLICATION_KHR,
+    ext.DEBUG_TYPE_PERFORMANCE_KHR, 1357,
+    ext.DEBUG_SEVERITY_MEDIUM_KHR,
+    "Message 2");
+  ext.debugMessageInsertKHR(
+    ext.DEBUG_SOURCE_THIRD_PARTY_KHR, // We still filter out these messages.
+    ext.DEBUG_TYPE_OTHER_KHR, 3579,
+    ext.DEBUG_SEVERITY_MEDIUM_KHR,
+    "Message 3");
+
+  ext.popDebugGroupKHR();
+
+  ...