From 7c50b5fba5aded5874ec11fe83fe3a07b127e63d Mon Sep 17 00:00:00 2001 From: Fabian Bieler Date: Thu, 4 Jan 2018 23:51:44 +0100 Subject: util-gl: Remove tolerance from integer pixel probes. The present tests using these functions use the default piglit_tolerance of 0.01 which is as good as no tolerance for integer values. Reviewed-by: Brian Paul --- tests/util/piglit-util-gl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/util/piglit-util-gl.c b/tests/util/piglit-util-gl.c index 0d2b7cabd..e9c20385e 100644 --- a/tests/util/piglit-util-gl.c +++ b/tests/util/piglit-util-gl.c @@ -1476,7 +1476,7 @@ piglit_probe_rect_rgba_int(int x, int y, int w, int h, const int *expected) probe = &pixels[(j*w+i)*4]; for (p = 0; p < 4; ++p) { - if (abs(probe[p] - expected[p]) >= piglit_tolerance[p]) { + if (probe[p] != expected[p]) { printf("Probe color at (%d,%d)\n", x+i, y+j); printf(" Expected: %d %d %d %d\n", expected[0], expected[1], expected[2], expected[3]); @@ -1509,7 +1509,7 @@ piglit_probe_rect_rgba_uint(int x, int y, int w, int h, probe = &pixels[(j*w+i)*4]; for (p = 0; p < 4; ++p) { - if (abs((int) (probe[p] - expected[p])) >= piglit_tolerance[p]) { + if (probe[p] != expected[p]) { printf("Probe color at (%d,%d)\n", x+i, y+j); printf(" Expected: %u %u %u %u\n", expected[0], expected[1], expected[2], expected[3]); -- cgit v1.2.3