From 6ca74fa2fc81e3154d3860ecc77418b93f7adda8 Mon Sep 17 00:00:00 2001 From: Yu Wang Date: Wed, 29 Jul 2015 11:01:23 -0600 Subject: arb_clear_texture: add tolerance to clear-max-level.c test Since we're querying a ubyte image as float values we can't expect exact matches. Reviewed-by: Brian Paul --- tests/spec/arb_clear_texture/clear-max-level.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/spec/arb_clear_texture/clear-max-level.c b/tests/spec/arb_clear_texture/clear-max-level.c index be14898cb..91e50142d 100644 --- a/tests/spec/arb_clear_texture/clear-max-level.c +++ b/tests/spec/arb_clear_texture/clear-max-level.c @@ -86,7 +86,7 @@ test_clear(GLint maxLevel) if (!piglit_check_gl_error(GL_NO_ERROR)) return false; for (i = 0; i < 4 * w * h; i++) { - if (texData[i] != expected) { + if (fabsf(texData[i] - expected) > 0.01) { printf("Failure:\n"); printf("\tmipmap level %d, pixel %d\n", l, i / 4); -- cgit v1.2.3