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 ...@@ -184,19 +184,19 @@ class CopyTexture3DTest : public ANGLETest
{ {
uint32_t tolerance = 1; uint32_t tolerance = 1;
// The destination formats may be emulated, so the precision may be higher than // 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 // required. Increase the tolerance to 2^(8-width). 8 is for the 8-bit format used for
// used for emulation, and divide by 2 because the value is expected to round to // emulation. Even though Vulkan recommends round to nearest, it's not a requirement
// nearest. // so the full-range of precision is used as tolerance.
switch (destType) switch (destType)
{ {
case GL_UNSIGNED_SHORT_5_6_5: case GL_UNSIGNED_SHORT_5_6_5:
tolerance = 4; tolerance = 8;
break; break;
case GL_UNSIGNED_SHORT_5_5_5_1: case GL_UNSIGNED_SHORT_5_5_5_1:
tolerance = 4; tolerance = 8;
break; break;
case GL_UNSIGNED_SHORT_4_4_4_4: case GL_UNSIGNED_SHORT_4_4_4_4:
tolerance = 8; tolerance = 16;
break; break;
default: default:
break; break;
...@@ -204,13 +204,13 @@ class CopyTexture3DTest : public ANGLETest ...@@ -204,13 +204,13 @@ class CopyTexture3DTest : public ANGLETest
switch (destInternalFormat) switch (destInternalFormat)
{ {
case GL_RGB565: case GL_RGB565:
tolerance = 4; tolerance = 8;
break; break;
case GL_RGB5_A1: case GL_RGB5_A1:
tolerance = 4; tolerance = 8;
break; break;
case GL_RGBA4: case GL_RGBA4:
tolerance = 8; tolerance = 16;
break; break;
default: default:
break; break;
...@@ -230,13 +230,6 @@ class CopyTexture3DTest : public ANGLETest ...@@ -230,13 +230,6 @@ class CopyTexture3DTest : public ANGLETest
break; 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; GLColor actual;
glReadPixels(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &actual.R); glReadPixels(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &actual.R);
EXPECT_GL_NO_ERROR(); 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