diff options
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_test_format.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_test_format.c b/src/gallium/drivers/llvmpipe/lp_test_format.c index 6aca66dc700..daf6ded29c7 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_format.c +++ b/src/gallium/drivers/llvmpipe/lp_test_format.c @@ -262,8 +262,13 @@ test_format_unorm8(struct gallivm_state *gallivm, match = TRUE; for(k = 0; k < 4; ++k) { int error = float_to_ubyte(test->unpacked[i][j][k]) - unpacked[k]; + + if (util_is_double_nan(test->unpacked[i][j][k])) + continue; + if (error < 0) error = -error; + if (error > 1) match = FALSE; } @@ -337,6 +342,7 @@ test_all(struct gallivm_state *gallivm, unsigned verbose, FILE *fp) continue; } + /* * TODO: test more */ |