diff --git a/src/webgpu/web_platform/copyToTexture/canvas.spec.ts b/src/webgpu/web_platform/copyToTexture/canvas.spec.ts index f48da3e62e48..7b3cad456baa 100644 --- a/src/webgpu/web_platform/copyToTexture/canvas.spec.ts +++ b/src/webgpu/web_platform/copyToTexture/canvas.spec.ts @@ -468,7 +468,9 @@ g.test('copy_contents_from_2d_context_canvas') }, expTexelView, { width, height, depthOrArrayLayers: 1 }, - { maxDiffULPsForNormFormat: 0, maxDiffULPsForFloatFormat: 0 } + // 1.0 and 0.6 are representable precisely by all formats except rgb10a2unorm, but + // allow diffs of 1ULP since that's the generally-appropriate threshold. + { maxDiffULPsForNormFormat: 1, maxDiffULPsForFloatFormat: 1 } ); }); @@ -570,7 +572,9 @@ g.test('copy_contents_from_gl_context_canvas') }, expTexelView, { width, height, depthOrArrayLayers: 1 }, - { maxDiffULPsForNormFormat: 0, maxDiffULPsForFloatFormat: 0 } + // 1.0 and 0.6 are representable precisely by all formats except rgb10a2unorm, but + // allow diffs of 1ULP since that's the generally-appropriate threshold. + { maxDiffULPsForNormFormat: 1, maxDiffULPsForFloatFormat: 1 } ); }); @@ -687,7 +691,9 @@ g.test('copy_contents_from_gpu_context_canvas') }, expTexelView, { width: canvas.width, height: canvas.height, depthOrArrayLayers: 1 }, - { maxDiffULPsForNormFormat: 0, maxDiffULPsForFloatFormat: 0 } + // 1.0 and 0.6 are representable precisely by all formats except rgb10a2unorm, but + // allow diffs of 1ULP since that's the generally-appropriate threshold. + { maxDiffULPsForNormFormat: 1, maxDiffULPsForFloatFormat: 1 } ); });