aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMátyás Mustoha <matyas.mustoha@h-lab.eu>2019-03-25 12:50:45 +0100
committerJosh Matthews <josh@joshmatthews.net>2019-05-21 16:56:40 -0400
commit7f0b820d4ee87351aba9e7c785a704c6c83f135f (patch)
tree65864ccd58ac2156e59591c82fa07baa757e3ec4 /tests
parenta14b952fa3eedec86e6308213c525538bcb20827 (diff)
downloadservo-7f0b820d4ee87351aba9e7c785a704c6c83f135f.tar.gz
servo-7f0b820d4ee87351aba9e7c785a704c6c83f135f.zip
Add initial support for WebGL compressed textures
Diffstat (limited to 'tests')
-rw-r--r--tests/wpt/webgl/meta/MANIFEST.json6
-rw-r--r--tests/wpt/webgl/tests/conformance/extensions/webgl-compressed-texture-s3tc.html15
-rw-r--r--tests/wpt/webgl/tools/compressed-images.patch32
-rwxr-xr-xtests/wpt/webgl/tools/import-conformance-tests.py1
-rw-r--r--tests/wpt/webgl/tools/timeout.patch12
5 files changed, 57 insertions, 9 deletions
diff --git a/tests/wpt/webgl/meta/MANIFEST.json b/tests/wpt/webgl/meta/MANIFEST.json
index ccf761ac8a9..752c28611b4 100644
--- a/tests/wpt/webgl/meta/MANIFEST.json
+++ b/tests/wpt/webgl/meta/MANIFEST.json
@@ -10888,7 +10888,9 @@
"conformance/extensions/webgl-compressed-texture-s3tc.html": [
[
"conformance/extensions/webgl-compressed-texture-s3tc.html",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"conformance/extensions/webgl-compressed-texture-size-limit.html": [
@@ -27817,7 +27819,7 @@
"testharness"
],
"conformance/extensions/webgl-compressed-texture-s3tc.html": [
- "28e3cfc5628760d1ae27166612f17ed46fa12b88",
+ "ea56180224af7537748a649a724563a86c431710",
"testharness"
],
"conformance/extensions/webgl-compressed-texture-size-limit.html": [
diff --git a/tests/wpt/webgl/tests/conformance/extensions/webgl-compressed-texture-s3tc.html b/tests/wpt/webgl/tests/conformance/extensions/webgl-compressed-texture-s3tc.html
index 28e3cfc5628..ea56180224a 100644
--- a/tests/wpt/webgl/tests/conformance/extensions/webgl-compressed-texture-s3tc.html
+++ b/tests/wpt/webgl/tests/conformance/extensions/webgl-compressed-texture-s3tc.html
@@ -29,6 +29,7 @@
<html>
<head>
<meta charset="utf-8">
+<meta name="timeout" content="long">
<link rel="stylesheet" href="../../resources/js-test-style.css"/>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
@@ -694,13 +695,6 @@ function compareRect(width, height, channels, expectedData, filteringMode) {
gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, actual);
wtu.glErrorShouldBe(gl, gl.NO_ERROR, "reading back pixels");
- var div = document.createElement("div");
- div.className = "testimages";
- insertImg(div, "expected", makeImage(width, height, expectedData, channels == 4));
- insertImg(div, "actual", makeImage(width, height, actual, channels == 4));
- div.appendChild(document.createElement('br'));
- document.getElementById("console").appendChild(div);
-
var failed = false;
for (var yy = 0; yy < height; ++yy) {
for (var xx = 0; xx < width; ++xx) {
@@ -714,6 +708,13 @@ function compareRect(width, height, channels, expectedData, filteringMode) {
for (var jj = 0; jj < 4; ++jj) {
if (actual[offset + jj] != expected[jj]) {
failed = true;
+ var div = document.createElement("div");
+ div.className = "testimages";
+ insertImg(div, "expected", makeImage(width, height, expectedData, channels == 4));
+ insertImg(div, "actual", makeImage(width, height, actual, channels == 4));
+ div.appendChild(document.createElement('br'));
+ document.getElementById("console").appendChild(div);
+
var was = actual[offset + 0].toString();
for (var j = 1; j < 4; ++j) {
was += "," + actual[offset + j];
diff --git a/tests/wpt/webgl/tools/compressed-images.patch b/tests/wpt/webgl/tools/compressed-images.patch
new file mode 100644
index 00000000000..d403b7d7cf5
--- /dev/null
+++ b/tests/wpt/webgl/tools/compressed-images.patch
@@ -0,0 +1,32 @@
+diff --git a/tests/wpt/webgl/tests/conformance/extensions/webgl-compressed-texture-s3tc.html b/tests/wpt/webgl/tests/conformance/extensions/webgl-compressed-texture-s3tc.html
+index 308e8577a8..ea56180224 100644
+--- a/tests/wpt/webgl/tests/conformance/extensions/webgl-compressed-texture-s3tc.html
++++ b/tests/wpt/webgl/tests/conformance/extensions/webgl-compressed-texture-s3tc.html
+@@ -695,13 +695,6 @@ function compareRect(width, height, channels, expectedData, filteringMode) {
+ gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, actual);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "reading back pixels");
+
+- var div = document.createElement("div");
+- div.className = "testimages";
+- insertImg(div, "expected", makeImage(width, height, expectedData, channels == 4));
+- insertImg(div, "actual", makeImage(width, height, actual, channels == 4));
+- div.appendChild(document.createElement('br'));
+- document.getElementById("console").appendChild(div);
+-
+ var failed = false;
+ for (var yy = 0; yy < height; ++yy) {
+ for (var xx = 0; xx < width; ++xx) {
+@@ -715,6 +708,13 @@ function compareRect(width, height, channels, expectedData, filteringMode) {
+ for (var jj = 0; jj < 4; ++jj) {
+ if (actual[offset + jj] != expected[jj]) {
+ failed = true;
++ var div = document.createElement("div");
++ div.className = "testimages";
++ insertImg(div, "expected", makeImage(width, height, expectedData, channels == 4));
++ insertImg(div, "actual", makeImage(width, height, actual, channels == 4));
++ div.appendChild(document.createElement('br'));
++ document.getElementById("console").appendChild(div);
++
+ var was = actual[offset + 0].toString();
+ for (var j = 1; j < 4; ++j) {
+ was += "," + actual[offset + j];
diff --git a/tests/wpt/webgl/tools/import-conformance-tests.py b/tests/wpt/webgl/tools/import-conformance-tests.py
index 58afe1ddc77..9440abab4d0 100755
--- a/tests/wpt/webgl/tools/import-conformance-tests.py
+++ b/tests/wpt/webgl/tools/import-conformance-tests.py
@@ -15,6 +15,7 @@ PATCHES = [
("unit.patch", "conformance/more/unit.js"),
("timeout.patch", None),
("set-zero-timeout.patch", "js/webgl-test-utils.js"),
+ ("compressed-images.patch", "conformance/extensions/webgl-compressed-texture-s3tc.html"),
]
# Fix for 'UnicodeDecodeError: 'ascii' codec can't decode byte'
diff --git a/tests/wpt/webgl/tools/timeout.patch b/tests/wpt/webgl/tools/timeout.patch
index b5284094e52..89bf21807bc 100644
--- a/tests/wpt/webgl/tools/timeout.patch
+++ b/tests/wpt/webgl/tools/timeout.patch
@@ -92,3 +92,15 @@ index c1542f4fa9..b3ee786e0b 100644
<title>WebGL uniform packing restrctions Conformance Test</title>
<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
<link rel="stylesheet" href="../../../resources/glsl-feature-tests.css"/>
+diff --git i/conformance/extensions/webgl-compressed-texture-s3tc.html w/conformance/extensions/webgl-compressed-texture-s3tc.html
+index 28e3cfc562..308e8577a8 100644
+--- i/conformance/extensions/webgl-compressed-texture-s3tc.html
++++ w/conformance/extensions/webgl-compressed-texture-s3tc.html
+@@ -29,6 +29,7 @@
+ <html>
+ <head>
+ <meta charset="utf-8">
++<meta name="timeout" content="long">
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>