Skip to content

Commit

Permalink
copyToTexture: increase threshold so rgb10a2unorm passes all hardware
Browse files Browse the repository at this point in the history
  • Loading branch information
kainino0x committed Mar 29, 2022
1 parent 707adcc commit dc82768
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/webgpu/web_platform/copyToTexture/canvas.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
);
});

Expand Down Expand Up @@ -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 }
);
});

Expand Down Expand Up @@ -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 }
);
});

Expand Down

0 comments on commit dc82768

Please sign in to comment.