From db132395b6a18fe5b04fc141129d15f3c4d48ed9 Mon Sep 17 00:00:00 2001 From: Mike Wyrzykowski Date: Mon, 31 Aug 2026 11:00:42 -0700 Subject: [PATCH] Allow 1 ULP on canvas import tests as noted in the comment. --- src/webgpu/util/texture/color_space_conversions.spec.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/webgpu/util/texture/color_space_conversions.spec.ts b/src/webgpu/util/texture/color_space_conversions.spec.ts index 56a59ac8bd11..37877a651574 100644 --- a/src/webgpu/util/texture/color_space_conversions.spec.ts +++ b/src/webgpu/util/texture/color_space_conversions.spec.ts @@ -96,7 +96,13 @@ g.test('util_matches_2d_canvas') { x: 0, y: 0, z: 0 }, { width, height, depthOrArrayLayers: 1 }, { actTexelView, expTexelView }, - { maxDiffULPsForNormFormat: 0 } + // The canvas 2D side of this comparison is produced by the implementation's color + // management system, which typically quantizes to 8 bits internally, so its result + // may differ from this file's double-precision reference math by one unit in the + // last place. Several of the reference values here land within 0.05/255 of a + // round-to-nearest boundary (e.g. display-p3 (0x80, 0, 0x80) converts to an exact + // sRGB blue of 132.551/255), so requiring bit-exact agreement is not meaningful. + { maxDiffULPsForNormFormat: 1 } ); if (failedPixelsMessage !== undefined) {