Commit 2a46b4e8 by Geoff Lang

Remove the PackUnpackHalfOverflow test.

Different drivers handle overflow differently. The overflow case is not defined in the spec. BUG=angleproject:1044 Change-Id: I9e3883af147c6c1a4fcdcddea3ff70c62f859c56 Reviewed-on: https://chromium-review.googlesource.com/282540Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 8273e006
...@@ -9,8 +9,6 @@ ...@@ -9,8 +9,6 @@
#include "test_utils/ANGLETest.h" #include "test_utils/ANGLETest.h"
#include <cmath>
using namespace angle; using namespace angle;
namespace namespace
...@@ -128,25 +126,8 @@ class PackUnpackTest : public ANGLETest ...@@ -128,25 +126,8 @@ class PackUnpackTest : public ANGLETest
ASSERT_GL_NO_ERROR(); ASSERT_GL_NO_ERROR();
static const double epsilon = 0.0005; static const double epsilon = 0.0005;
EXPECT_NEAR(p[0], expect1, epsilon);
// Compare infinite numbers exactly EXPECT_NEAR(p[1], expect2, epsilon);
if (isinf(expect1))
{
EXPECT_EQ(p[0], expect1);
}
else
{
EXPECT_NEAR(p[0], expect1, epsilon);
}
if (isinf(expect2))
{
EXPECT_EQ(p[1], expect2);
}
else
{
EXPECT_NEAR(p[1], expect2, epsilon);
}
} }
GLuint mSNormProgram; GLuint mSNormProgram;
...@@ -210,13 +191,6 @@ TEST_P(PackUnpackTest, PackUnpackSnormOverflow) ...@@ -210,13 +191,6 @@ TEST_P(PackUnpackTest, PackUnpackSnormOverflow)
compareBeforeAfter(mSNormProgram, 67000.0f, -67000.0f, 1.0f, -1.0f); compareBeforeAfter(mSNormProgram, 67000.0f, -67000.0f, 1.0f, -1.0f);
} }
// Test the correctness of packHalf2x16 and unpackHalf2x16 functions calculating overflow floating numbers.
TEST_P(PackUnpackTest, PackUnpackHalfOverflow)
{
// Expect the shader return inf when the numbers are not representable as 16-bit floats.
compareBeforeAfter(mHalfProgram, 67000.0f, -67000.0f, std::numeric_limits<float>::infinity(), -std::numeric_limits<float>::infinity());
}
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against. // Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
ANGLE_INSTANTIATE_TEST(PackUnpackTest, ES3_OPENGL(3, 3), ES3_OPENGL(4, 0), ES3_OPENGL(4, 1), ES3_OPENGL(4, 2), ANGLE_INSTANTIATE_TEST(PackUnpackTest, ES3_OPENGL(3, 3), ES3_OPENGL(4, 0), ES3_OPENGL(4, 1), ES3_OPENGL(4, 2),
ES3_OPENGL(4, 3), ES3_OPENGL(4, 4), ES3_OPENGL(4, 5)); ES3_OPENGL(4, 3), ES3_OPENGL(4, 4), ES3_OPENGL(4, 5));
......
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