Skip ViewportTest failing on Swiftshader.

The viewport tests assume sub-pixels precision when the Vulkan
specification explicitly allows for no subpixel precision.

Swiftshader seem to have only 4 bits of subpixel precision and fails
only this test surprisingly.

Bug: dawn:283
Change-Id: I77f6a6169a8fdff13448a612abdd4ab1dc42532e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19084
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
Corentin Wallez 2020-04-09 08:16:50 +00:00 committed by Commit Bot service account
parent d56b69f115
commit 989f139ceb
1 changed files with 5 additions and 0 deletions

View File

@ -367,6 +367,11 @@ TEST_P(ViewportTest, ShrinkViewportAndShiftToBottomRightAndApplyDepth) {
// X and y have fractions and they are smaller than 0.5, which is the center of point(0, 0). So
// point(0, 0) is covered by the top left triangle as usual.
TEST_P(ViewportTest, DoNotTruncateXAndY) {
// Swiftshader seems to be using 4 bits of subpixel precision for viewport computations but
// advertises 0 bits of precision. This is within the allowed Vulkan behaviors so this test
// should likely be revisited.
DAWN_SKIP_TEST_IF(IsVulkan() && IsSwiftshader());
ViewportParams viewport = {0.49, 0.49, 4.0, 4.0, 0.0, 1.0};
TestInfo info = {viewport, TopLeftTriangleColor, BottomRightTriangleColor};
DoTest(info);