Commit 5fec8ecf by Shahbaz Youssefi Committed by Commit Bot

Fix CopyTexture3D test to remove Nvidia workaround

Bug: angleproject:4748 Change-Id: I8e66fda3c9fd234451ad765c8777cd75b4fc44fc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2279136Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
parent 65f7ab79
......@@ -184,19 +184,19 @@ class CopyTexture3DTest : public ANGLETest
{
uint32_t tolerance = 1;
// The destination formats may be emulated, so the precision may be higher than
// required. Increase the tolerance to 2^(8-width) / 2. 8 is for the 8-bit format
// used for emulation, and divide by 2 because the value is expected to round to
// nearest.
// required. Increase the tolerance to 2^(8-width). 8 is for the 8-bit format used for
// emulation. Even though Vulkan recommends round to nearest, it's not a requirement
// so the full-range of precision is used as tolerance.
switch (destType)
{
case GL_UNSIGNED_SHORT_5_6_5:
tolerance = 4;
tolerance = 8;
break;
case GL_UNSIGNED_SHORT_5_5_5_1:
tolerance = 4;
tolerance = 8;
break;
case GL_UNSIGNED_SHORT_4_4_4_4:
tolerance = 8;
tolerance = 16;
break;
default:
break;
......@@ -204,13 +204,13 @@ class CopyTexture3DTest : public ANGLETest
switch (destInternalFormat)
{
case GL_RGB565:
tolerance = 4;
tolerance = 8;
break;
case GL_RGB5_A1:
tolerance = 4;
tolerance = 8;
break;
case GL_RGBA4:
tolerance = 8;
tolerance = 16;
break;
default:
break;
......@@ -230,13 +230,6 @@ class CopyTexture3DTest : public ANGLETest
break;
}
if (tolerance != 1 && (IsNVIDIA() || IsAndroid()) && IsVulkan())
{
// Note: on Nvidia/Vulkan, the round is not done to nearest in all cases, so bring
// the tolerance to the full-range of precision. http://anglebug.com/4742
tolerance *= 2;
}
GLColor actual;
glReadPixels(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &actual.R);
EXPECT_GL_NO_ERROR();
......
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