From 943f95fe4717459c845df7f6a10a039e5adf8e97 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Wed, 19 Sep 2018 12:31:55 +0200 Subject: [PATCH 1/4] Remove some misplaced framebuffer validations --- components/script/dom/webglrenderingcontext.rs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs index 61671ee3b15..f299b3ff2e4 100644 --- a/components/script/dom/webglrenderingcontext.rs +++ b/components/script/dom/webglrenderingcontext.rs @@ -1303,19 +1303,9 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { // GL_OES_read_format support (assuming an underlying GLES // driver. Desktop is happy to format convert for us). constants::IMPLEMENTATION_COLOR_READ_FORMAT => { - handle_potential_webgl_error!( - self, - self.validate_framebuffer(), - return NullValue() - ); return Int32Value(constants::RGBA as i32); }, constants::IMPLEMENTATION_COLOR_READ_TYPE => { - handle_potential_webgl_error!( - self, - self.validate_framebuffer(), - return NullValue() - ); return Int32Value(constants::UNSIGNED_BYTE as i32); }, constants::COMPRESSED_TEXTURE_FORMATS => { From a3d8b5d2d3c3b50e2c357b9dfd491acee78cb593 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Wed, 19 Sep 2018 12:32:11 +0200 Subject: [PATCH 2/4] Fix the error when calling getProgramInfoLog on a deleted program (#20561) --- components/script/dom/webglprogram.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/script/dom/webglprogram.rs b/components/script/dom/webglprogram.rs index e6cf894feca..3c2a17ca4fb 100644 --- a/components/script/dom/webglprogram.rs +++ b/components/script/dom/webglprogram.rs @@ -414,7 +414,7 @@ impl WebGLProgram { /// glGetProgramInfoLog pub fn get_info_log(&self) -> WebGLResult { if self.is_deleted() { - return Err(WebGLError::InvalidOperation); + return Err(WebGLError::InvalidValue); } if self.link_called.get() { let shaders_compiled = match (self.fragment_shader.get(), self.vertex_shader.get()) { From 2662739ee5f54c20847dffe7feacabb20b065580 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Wed, 19 Sep 2018 12:38:35 +0200 Subject: [PATCH 3/4] Update WebGL tests --- tests/wpt/webgl/meta/MANIFEST.json | 12 +- .../textures/misc/00_test_list.txt | 1 + ...as-teximage-after-multiple-drawimages.html | 125 ++++++++++++++++++ 3 files changed, 137 insertions(+), 1 deletion(-) create mode 100644 tests/wpt/webgl/tests/conformance/textures/misc/canvas-teximage-after-multiple-drawimages.html diff --git a/tests/wpt/webgl/meta/MANIFEST.json b/tests/wpt/webgl/meta/MANIFEST.json index 62fda6944e2..c1b1f57adf1 100644 --- a/tests/wpt/webgl/meta/MANIFEST.json +++ b/tests/wpt/webgl/meta/MANIFEST.json @@ -15010,6 +15010,12 @@ {} ] ], + "conformance/textures/misc/canvas-teximage-after-multiple-drawimages.html": [ + [ + "/_webgl/conformance/textures/misc/canvas-teximage-after-multiple-drawimages.html", + {} + ] + ], "conformance/textures/misc/compressed-tex-image.html": [ [ "/_webgl/conformance/textures/misc/compressed-tex-image.html", @@ -36878,9 +36884,13 @@ "testharness" ], "conformance/textures/misc/00_test_list.txt": [ - "3c7636158223c16d24707ee209016b4c715d88c9", + "8a561de6f6f5b5ca80f11c7e5c353468225e4a67", "support" ], + "conformance/textures/misc/canvas-teximage-after-multiple-drawimages.html": [ + "aac3306a7d4c3c08201e7d55e7ef549f3d8ad8e6", + "testharness" + ], "conformance/textures/misc/compressed-tex-image.html": [ "af234ab29614fc3e566b27fe11df1854db333aa3", "testharness" diff --git a/tests/wpt/webgl/tests/conformance/textures/misc/00_test_list.txt b/tests/wpt/webgl/tests/conformance/textures/misc/00_test_list.txt index 3c763615822..8a561de6f6f 100644 --- a/tests/wpt/webgl/tests/conformance/textures/misc/00_test_list.txt +++ b/tests/wpt/webgl/tests/conformance/textures/misc/00_test_list.txt @@ -1,3 +1,4 @@ +--min-version 1.0.4 canvas-teximage-after-multiple-drawimages.html --max-version 1.9.9 compressed-tex-image.html copy-tex-image-and-sub-image-2d.html --min-version 1.0.2 copy-tex-image-2d-formats.html diff --git a/tests/wpt/webgl/tests/conformance/textures/misc/canvas-teximage-after-multiple-drawimages.html b/tests/wpt/webgl/tests/conformance/textures/misc/canvas-teximage-after-multiple-drawimages.html new file mode 100644 index 00000000000..aac3306a7d4 --- /dev/null +++ b/tests/wpt/webgl/tests/conformance/textures/misc/canvas-teximage-after-multiple-drawimages.html @@ -0,0 +1,125 @@ + + + + + + +TexImage2D of 2D Canvas after multiple drawImages + + + + + + + + +
+
+ + + From aeaf895a055f0ccef4f7b242f012486c8dd85024 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Wed, 19 Sep 2018 12:43:14 +0200 Subject: [PATCH 4/4] Add some bug links --- .../conformance/textures/misc/copy-tex-image-2d-formats.html.ini | 1 + .../meta/conformance/textures/misc/tex-input-validation.html.ini | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/wpt/webgl/meta/conformance/textures/misc/copy-tex-image-2d-formats.html.ini b/tests/wpt/webgl/meta/conformance/textures/misc/copy-tex-image-2d-formats.html.ini index 503a5efca8e..a4bd32b2816 100644 --- a/tests/wpt/webgl/meta/conformance/textures/misc/copy-tex-image-2d-formats.html.ini +++ b/tests/wpt/webgl/meta/conformance/textures/misc/copy-tex-image-2d-formats.html.ini @@ -1,4 +1,5 @@ [copy-tex-image-2d-formats.html] + bug: https://github.com/servo/servo/issues/20595 [WebGL test #32: getError expected: INVALID_OPERATION. Was NO_ERROR : should not be able to copyTexImage2D ALPHA from RGB] expected: FAIL diff --git a/tests/wpt/webgl/meta/conformance/textures/misc/tex-input-validation.html.ini b/tests/wpt/webgl/meta/conformance/textures/misc/tex-input-validation.html.ini index a86dfea0c35..a5e193befaf 100644 --- a/tests/wpt/webgl/meta/conformance/textures/misc/tex-input-validation.html.ini +++ b/tests/wpt/webgl/meta/conformance/textures/misc/tex-input-validation.html.ini @@ -1,4 +1,5 @@ [tex-input-validation.html] + bug: https://github.com/servo/servo/issues/20595 [WebGL test #45: getError expected: INVALID_OPERATION. Was NO_ERROR : colorBufferFormat: RGB565 internalFormat: RGBA target: TEXTURE_2D] expected: FAIL