servo: Merge #19091 - Add WebGL conformance 2.0.0 tests (from MortimerGoro:webgl2_suite); r=jdm
authorImanol Fernandez <mortimergoro@gmail.com>
Thu, 02 Nov 2017 15:52:42 -0500
changeset 443212 43e56a29736611ceadaa613d2be8168b12f7c45f
parent 443211 6f3b7e0969c97c5c085b52272cccfc9bc3e9c37d
child 443213 b72849fc97edf35719144003995622eaf33687d0
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdm
bugs19091
milestone58.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
servo: Merge #19091 - Add WebGL conformance 2.0.0 tests (from MortimerGoro:webgl2_suite); r=jdm <!-- Please describe your changes on the following line: --> This PR includes WebGL conformance 2.0.0 tests. For now I have disabled three folders in the new suite: - `Conformance`: Tests WebGL 1.0 API like the current 1.0.3 suite we are using, but it includes a lot more tests and many expectations have to be updated. This is better to do in a separate PR because it will require to update github intermittent paths again and maybe detect new intermittents. - `Conformance2\textures`: It causes a lot of timeouts because of using videos, svgs, and other complicated formats. - `deqp`: It's a extra GPU testing suite included in the Khronos 2.0.0 suite. Disabled for now because it causes some timeouts. So in a nutshell, it uses part of the 2.0.0 suite to test webgl 2.0 and keeps using 1.0.3 in order to test WebGL 1.0. It's good enough to enable TDD for the new WebGL 2.0 features We can create follow-up issues for the next steps: * deprecate 1.0.3 and use the new 'conformance' folder in 2.0.0 in order to test WebGL 1.0 * Enable `conformance2/textures` and 'deqp' tests once WebGL 2.0 implementation is more advanced or the timeouts are monitored in more detail. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 92b49010b107ffd8be9169a1c979710338dc24c4
servo/Cargo.lock
servo/components/script/dom/webgl2renderingcontext.rs
servo/python/servo/testing_commands.py
servo/resources/prefs.json
servo/servo-tidy.toml
--- a/servo/Cargo.lock
+++ b/servo/Cargo.lock
@@ -290,34 +290,34 @@ dependencies = [
  "compositing 0.0.1",
  "cssparser 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.15.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "gleam 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
- "offscreen_gl_context 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "offscreen_gl_context 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo_config 0.0.1",
  "webrender 0.53.1 (git+https://github.com/servo/webrender)",
  "webrender_api 0.53.1 (git+https://github.com/servo/webrender)",
 ]
 
 [[package]]
 name = "canvas_traits"
 version = "0.0.1"
 dependencies = [
  "cssparser 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.15.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "malloc_size_of 0.0.1",
  "malloc_size_of_derive 0.0.1",
  "nonzero 0.0.1",
- "offscreen_gl_context 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "offscreen_gl_context 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo_config 0.0.1",
  "webrender_api 0.53.1 (git+https://github.com/servo/webrender)",
 ]
 
 [[package]]
 name = "caseless"
 version = "0.1.3"
@@ -2079,17 +2079,17 @@ dependencies = [
 
 [[package]]
 name = "odds"
 version = "0.2.25"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "offscreen_gl_context"
-version = "0.12.0"
+version = "0.12.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "cgl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.15.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "gl_generator 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "gleam 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2542,17 +2542,17 @@ dependencies = [
  "metrics 0.0.1",
  "mime 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "mime_guess 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "mitochondria 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net_traits 0.0.1",
  "nonzero 0.0.1",
  "num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
- "offscreen_gl_context 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "offscreen_gl_context 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "open 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
  "phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
  "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
  "profile_traits 0.0.1",
  "ref_filter_map 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "ref_slice 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3813,17 +3813,17 @@ dependencies = [
 "checksum num-iter 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)" = "f7d1891bd7b936f12349b7d1403761c8a0b85a18b148e9da4429d5d102c1a41e"
 "checksum num-rational 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "c2dc5ea04020a8f18318ae485c751f8cfa1c0e69dcf465c29ddaaa64a313cc44"
 "checksum num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "e1cbfa3781f3fe73dc05321bed52a06d2d491eaa764c52335cf4399f046ece99"
 "checksum num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca313f1862c7ec3e0dfe8ace9fa91b1d9cb5c84ace3d00f5ec4216238e93c167"
 "checksum objc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "877f30f37acef6749b1841cceab289707f211aecfc756553cd63976190e6cc2e"
 "checksum objc-foundation 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9"
 "checksum objc_id 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e4730aa1c64d722db45f7ccc4113a3e2c465d018de6db4d3e7dfe031e8c8a297"
 "checksum odds 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)" = "c3df9b730298cea3a1c3faa90b7e2f9df3a9c400d0936d6015e6165734eefcba"
-"checksum offscreen_gl_context 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2211cc1c0513c664d64f1e2a15d9d7ded52a90f115946e3b2acc7a651d8404f9"
+"checksum offscreen_gl_context 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a34d93fc471702a477584ad881d9e026bafb3479b76b9c300980ab810d9fc4ec"
 "checksum ogg 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7137bf02687385302f4c0aecd77cfce052b69f5b4ee937be778e125c62f67e30"
 "checksum ogg_metadata 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fc665717454399cba557c55ad226148996e9266ee291f8a37a98bb2cded0a490"
 "checksum open 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3478ed1686bd1300c8a981a940abc92b06fac9cbef747f4c668d4e032ff7b842"
 "checksum openssl 0.9.12 (registry+https://github.com/rust-lang/crates.io-index)" = "bb5d1663b73d10c6a3eda53e2e9d0346f822394e7b858d7257718f65f61dfbe2"
 "checksum openssl-sys 0.9.12 (registry+https://github.com/rust-lang/crates.io-index)" = "3a5886d87d3e2a0d890bf62dc8944f5e3769a405f7e1e9ef6e517e47fd7a0897"
 "checksum ordered-float 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "da12c96037889ae0be29dd2bdd260e5a62a7df24e6466d5a15bb8131c1c200a8"
 "checksum osmesa-src 17.3.1-devel (git+https://github.com/servo/osmesa-src)" = "<none>"
 "checksum osmesa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "88cfece6e95d2e717e0872a7f53a8684712ad13822a7979bc760b9c77ec0013b"
--- a/servo/components/script/dom/webgl2renderingcontext.rs
+++ b/servo/components/script/dom/webgl2renderingcontext.rs
@@ -904,11 +904,12 @@ impl WebGL2RenderingContextMethods for W
         self.base.FramebufferTexture2D(target, attachment, textarget, texture, level)
     }
 }
 
 
 impl LayoutCanvasWebGLRenderingContextHelpers for LayoutDom<WebGL2RenderingContext> {
     #[allow(unsafe_code)]
     unsafe fn canvas_data_source(&self) -> HTMLCanvasDataSource {
-        HTMLCanvasDataSource::WebGL((*self.unsafe_get()).base.layout_handle())
+        let this = &*self.unsafe_get();
+        HTMLCanvasDataSource::WebGL((*this.base.to_layout().unsafe_get()).layout_handle())
     }
 }
--- a/servo/python/servo/testing_commands.py
+++ b/servo/python/servo/testing_commands.py
@@ -890,17 +890,17 @@ testing/web-platform/mozilla/tests for S
                                           "cookie_http_state_utils.py"))
         run_globals = {"__file__": run_file}
         execfile(run_file, run_globals)
         return run_globals["update_test_file"](cache_dir)
 
     @Command('update-webgl',
              description='Update the WebGL conformance suite tests from Khronos repo',
              category='testing')
-    @CommandArgument('--version', action='store_true', default='1.0.3',
+    @CommandArgument('--version', default='2.0.0',
                      help='WebGL conformance suite version')
     def update_webgl(self, version=None):
         self.ensure_bootstrapped()
 
         base_dir = path.abspath(path.join(PROJECT_TOPLEVEL_PATH,
                                 "tests", "wpt", "mozilla", "tests", "webgl"))
         run_file = path.join(base_dir, "tools", "import-conformance-tests.py")
         dest_folder = path.join(base_dir, "conformance-%s" % version)
--- a/servo/resources/prefs.json
+++ b/servo/resources/prefs.json
@@ -11,17 +11,17 @@
   "dom.mutation_observer.enabled": false,
   "dom.permissions.enabled": false,
   "dom.permissions.testing.allowed_in_nonsecure_contexts": false,
   "dom.serviceworker.timeout_seconds": 60,
   "dom.servoparser.async_html_tokenizer.enabled": false,
   "dom.testable_crash.enabled": false,
   "dom.testbinding.enabled": false,
   "dom.webgl.dom_to_texture.enabled": false,
-  "dom.webgl2.enabled.enabled": false,
+  "dom.webgl2.enabled": false,
   "dom.webvr.enabled": false,
   "dom.webvr.event_polling_interval": 500,
   "js.asmjs.enabled": true,
   "js.asyncstack.enabled": false,
   "js.baseline.enabled": true,
   "js.baseline.unsafe_eager_compilation.enabled": false,
   "js.discard_system_source.enabled": false,
   "js.dump_stack_on_debuggee_would_run.enabled": false,
--- a/servo/servo-tidy.toml
+++ b/servo/servo-tidy.toml
@@ -48,16 +48,18 @@ files = [
   "./components/style/gecko/generated/bindings.rs",
   "./components/style/gecko/generated/pseudo_element_definition.rs",
   "./components/style/gecko/generated/structs.rs",
   "./components/style/gecko/generated/atom_macro.rs",
   "./resources/hsts_preload.json",
   "./tests/wpt/metadata/MANIFEST.json",
   "./components/script/dom/webidls/ForceTouchEvent.webidl",
   "./support/android/openssl.sh",
+  # Upstream code from Khronos/WebGL uses tabs for indentation
+  "./tests/wpt/mozilla/tests/webgl",
   # Ignore those files since the issues reported are on purpose
   "./tests/html/bad-line-ends.html",
   "./tests/unit/net/parsable_mime/text",
   "./tests/wpt/mozilla/tests/css/fonts",
   "./tests/wpt/mozilla/tests/css/pre_with_tab.html",
   "./tests/wpt/mozilla/tests/mozilla/textarea_placeholder.html",
 ]
 # Directories that are ignored for the non-WPT tidy check.