From fdd736764fa88d8bb9d5697e2e902591da313848 Mon Sep 17 00:00:00 2001 From: Kai Ninomiya Date: Thu, 21 Dec 2023 14:27:40 -0800 Subject: [PATCH] reftests: Allow large totalPixels for fuzzy matching (#3230) For these tests the fuzzy matching is only to allow for slight differences like rounding errors. We don't care about how many pixels are different. https://web-platform-tests.org/writing-tests/reftests.html#fuzzy-matching Also adds fuzzy matching to two more canvas_colorspace tests because it's not important to have extremely precise results for any test that does color conversions or blending (at least right now). I haven't tested this exact change but in the linked Chromium CL below we saw the following: ``` 01:01:43.047 7604 Found pixels_different: 500, max_channel_diff: 1 Allowed pixels_different; 0-400, max_channel_diff: 0-2 ``` ``` 01:01:44.062 7604 Found pixels_different: 700, max_channel_diff: 2 Allowed pixels_different; 0-400, max_channel_diff: 0-2 ``` So this should definitely work. Some other tests that we're not currently passing for other reasons render quite large areas, so we set totalPixels very large. For example the canvas_colorspace tests render twelve `(128 * devicePixelRatio)`-squared canvases. Issue: #1045, https://chromium-review.googlesource.com/c/chromium/src/+/5134470 --- .../reftests/canvas_colorspace_bgra8unorm.https.html | 1 + .../reftests/canvas_colorspace_rgba16float.https.html | 2 +- .../reftests/canvas_colorspace_rgba8unorm.https.html | 1 + ...vas_composite_alpha_bgra8unorm_premultiplied_copy.https.html | 2 +- ...vas_composite_alpha_bgra8unorm_premultiplied_draw.https.html | 2 +- ...as_composite_alpha_rgba16float_premultiplied_copy.https.html | 2 +- ...as_composite_alpha_rgba16float_premultiplied_draw.https.html | 2 +- ...vas_composite_alpha_rgba8unorm_premultiplied_copy.https.html | 2 +- ...vas_composite_alpha_rgba8unorm_premultiplied_draw.https.html | 2 +- 9 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/webgpu/web_platform/reftests/canvas_colorspace_bgra8unorm.https.html b/src/webgpu/web_platform/reftests/canvas_colorspace_bgra8unorm.https.html index c910c97b1dda..a0068dbf7af7 100644 --- a/src/webgpu/web_platform/reftests/canvas_colorspace_bgra8unorm.https.html +++ b/src/webgpu/web_platform/reftests/canvas_colorspace_bgra8unorm.https.html @@ -14,6 +14,7 @@ +