From fe6fedf6c898826761a77d9b7343f7f5520be069 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 12 Nov 2018 20:46:11 +0100 Subject: [PATCH] TextureTools: add some fuzziness to DistanceField test comparison. --- src/Magnum/TextureTools/Test/DistanceFieldGLTest.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Magnum/TextureTools/Test/DistanceFieldGLTest.cpp b/src/Magnum/TextureTools/Test/DistanceFieldGLTest.cpp index 0dac20b3a..6c755421b 100644 --- a/src/Magnum/TextureTools/Test/DistanceFieldGLTest.cpp +++ b/src/Magnum/TextureTools/Test/DistanceFieldGLTest.cpp @@ -198,7 +198,11 @@ void DistanceFieldGLTest::test() { CORRADE_COMPARE_WITH(*actualOutputImage, Utility::Directory::join(_testDir, "output.tga"), - DebugTools::CompareImageToFile{_manager}); + /* Some mobile GPUs have slight (off-by-one) rounding errors compared + to the ground truth, but it's just a very small amount of pixels + (20-50 out of the total 4k pixels). That's okay. It's also possible + that the ground truth itself has rounding errors ;) */ + (DebugTools::CompareImageToFile{_manager, 1.0f, 0.0125f})); } #ifndef MAGNUM_TARGET_WEBGL