From: Kristian Høgsberg Kristensen <kristian.h.kristen...@intel.com>
--- tests/util/piglit-util-gl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/util/piglit-util-gl.c b/tests/util/piglit-util-gl.c index a96ab27..727a901 100644 --- a/tests/util/piglit-util-gl.c +++ b/tests/util/piglit-util-gl.c @@ -1792,7 +1792,9 @@ piglit_probe_image_ubyte(int x, int y, int w, int h, GLenum format, const GLubyte *probe = &pixels[(j * w + i) * c]; for (p = 0; p < c; ++p) { - if (probe[p] == expected[p]) + + const int tolerance = ceil(piglit_tolerance[p] * 255); + if (abs((int)probe[p] - (int)expected[p]) < tolerance) continue; printf("Probe at (%i,%i)\n", x + i, y + j); -- 2.5.0 _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit