summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorYu Wang <wangyu@vmware.com>2015-07-29 11:01:23 -0600
committerBrian Paul <brianp@vmware.com>2015-07-29 11:03:21 -0600
commit6ca74fa2fc81e3154d3860ecc77418b93f7adda8 (patch)
tree2e62d076598437189209ecfa5b4af36694f8a633 /tests
parentca5b173004098420307d8cb75ab3396ac8c91270 (diff)
arb_clear_texture: add tolerance to clear-max-level.c testHEADmaster
Since we're querying a ubyte image as float values we can't expect exact matches. Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/spec/arb_clear_texture/clear-max-level.c2
1 files changed, 1 insertions, 1 deletions
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);