Commit a56a86e6 by Jamie Madill

Update the VertexAttribute test expectations.

When we switched from converting 8-bit normalized signed int from a full 32-bit float expansion to a 4-channel 8-bit format, we broke an ANGLE test. Giving the test a slightly looser bound produces the correct output, due to floating point rounding. BUG=angle:612 Change-Id: I8781e6efe83341e22d31d35b35e0048889bcd540 Reviewed-on: https://chromium-review.googlesource.com/196532Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarShannon Woods <shannonwoods@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
parent cdacacdd
......@@ -49,7 +49,12 @@ protected:
glDisableVertexAttribArray(mTestAttrib);
glDisableVertexAttribArray(mExpectedAttrib);
EXPECT_PIXEL_EQ(midPixelX, midPixelY, 255, 255, 255, 255);
// We need to offset our checks from triangle edges to ensure we don't fall on a single tri
// Avoid making assumptions of drawQuad with four checks to check the four possible tri regions
EXPECT_PIXEL_EQ((midPixelX + viewportSize[0]) / 2, midPixelY, 255, 255, 255, 255);
EXPECT_PIXEL_EQ((midPixelX + viewportSize[2]) / 2, midPixelY, 255, 255, 255, 255);
EXPECT_PIXEL_EQ(midPixelX, (midPixelY + viewportSize[1]) / 2, 255, 255, 255, 255);
EXPECT_PIXEL_EQ(midPixelX, (midPixelY + viewportSize[3]) / 2, 255, 255, 255, 255);
}
}
......@@ -68,7 +73,7 @@ protected:
void main(void)
{
gl_Position = position;
color = vec4(lessThan(abs(test - expected), vec4(1.0 / 128.0)));
color = vec4(lessThan(abs(test - expected), vec4(1.0 / 64.0)));
}
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment