diff --git a/src/Magnum/MeshTools/Test/CompileLinesGLTest.cpp b/src/Magnum/MeshTools/Test/CompileLinesGLTest.cpp index 2923b146a..99399c653 100644 --- a/src/Magnum/MeshTools/Test/CompileLinesGLTest.cpp +++ b/src/Magnum/MeshTools/Test/CompileLinesGLTest.cpp @@ -189,7 +189,9 @@ void CompileLinesGLTest::twoDimensions() { CORRADE_COMPARE_WITH( _framebuffer.read({{}, {32, 32}}, {PixelFormat::RGBA8Unorm}), Utility::Path::join({MESHTOOLS_TEST_DIR, "CompileLinesTestFiles", data.expected}), - (DebugTools::CompareImageToFile{_manager})); + /* Minor differences in vertex color rendering on NVidia vs Mesa + Intel */ + (DebugTools::CompareImageToFile{_manager, 0.25f, 0.007f})); } void CompileLinesGLTest::threeDimensions() { @@ -257,7 +259,9 @@ void CompileLinesGLTest::linePrimitiveCompatibility() { CORRADE_COMPARE_WITH( _framebuffer.read({{}, {32, 32}}, {PixelFormat::RGBA8Unorm}), Utility::Path::join(MESHTOOLS_TEST_DIR, "CompileLinesTestFiles/line-primitive.tga"), - (DebugTools::CompareImageToFile{_manager})); + /* Two/three pixel difference on NVidia vs. Mesa Intel vs Mesa + llvmpipe */ + (DebugTools::CompareImageToFile{_manager, 36.0f, 0.105f})); _framebuffer.clear(GL::FramebufferClear::Color); @@ -269,7 +273,9 @@ void CompileLinesGLTest::linePrimitiveCompatibility() { CORRADE_COMPARE_WITH( _framebuffer.read({{}, {32, 32}}, {PixelFormat::RGBA8Unorm}), Utility::Path::join(MESHTOOLS_TEST_DIR, "CompileLinesTestFiles/line-primitive.tga"), - (DebugTools::CompareImageToFile{_manager})); + /* Two/three pixel difference on NVidia vs. Mesa Intel vs Mesa + llvmpipe */ + (DebugTools::CompareImageToFile{_manager, 36.0f, 0.07f})); GL::Renderer::disable(GL::Renderer::Feature::Blending); } diff --git a/src/Magnum/Shaders/Test/LineGLTest.cpp b/src/Magnum/Shaders/Test/LineGLTest.cpp index cc34b1112..13b249384 100644 --- a/src/Magnum/Shaders/Test/LineGLTest.cpp +++ b/src/Magnum/Shaders/Test/LineGLTest.cpp @@ -1360,7 +1360,8 @@ template void LineGLTest::renderLineCapsJoins2D() { /* Dropping the alpha channel, as it's always 1.0 */ Containers::arrayCast(image.pixels()), Utility::Path::join({SHADERS_TEST_DIR, "LineTestFiles", data.expected}), - (DebugTools::CompareImageToFile{_manager})); + /* Minor differences on NVidia vs Mesa Intel */ + (DebugTools::CompareImageToFile{_manager, 1.0f, 0.0025f})); { /** @todo drop this when fixed */ @@ -1425,8 +1426,9 @@ void LineGLTest::renderLineCapsJoins2DReversed() { /* Dropping the alpha channel, as it's always 1.0 */ Containers::arrayCast(image.pixels()), Utility::Path::join({SHADERS_TEST_DIR, "LineTestFiles", data.expected}), + /* Minor differences on NVidia vs Mesa Intel */ /** @todo sync this with render2D() once the overlaps are fixed */ - (DebugTools::CompareImageToFile{_manager, 1.0f, 0.0005f})); + (DebugTools::CompareImageToFile{_manager, 1.0f, 0.0025f})); } void LineGLTest::renderLineCapsJoins2DTransformed() { @@ -1486,7 +1488,8 @@ void LineGLTest::renderLineCapsJoins2DTransformed() { /* Dropping the alpha channel, as it's always 1.0 */ Containers::arrayCast(image.pixels()), Utility::Path::join({SHADERS_TEST_DIR, "LineTestFiles", data.expected}), - (DebugTools::CompareImageToFile{_manager})); + /* Minor differences on NVidia vs Mesa Intel */ + (DebugTools::CompareImageToFile{_manager, 1.0f, 0.0025f})); } template void LineGLTest::renderCube3D() { @@ -1668,7 +1671,8 @@ template void LineGLTest::renderCube3D() { /* Dropping the alpha channel, as it's always 1.0 */ Containers::arrayCast(image.pixels()), Utility::Path::join({SHADERS_TEST_DIR, "LineTestFiles", data.expected}), - (DebugTools::CompareImageToFile{_manager})); + /* Minor differences on NVidia vs Mesa Intel */ + (DebugTools::CompareImageToFile{_manager, 1.0f, 0.0031f})); } void LineGLTest::renderPerspective3D() { @@ -1790,7 +1794,8 @@ template void LineGLTest::renderVertexColor2D() { /* Dropping the alpha channel, as it's always 1.0 */ Containers::arrayCast(_framebuffer.read(_framebuffer.viewport(), {PixelFormat::RGBA8Unorm}).pixels()), Utility::Path::join(SHADERS_TEST_DIR, "LineTestFiles/vertex-color.tga"), - (DebugTools::CompareImageToFile{_manager})); + /* Minor differences on NVidia vs Mesa Intel */ + (DebugTools::CompareImageToFile{_manager, 0.34f, 0.0019f})); } template void LineGLTest::renderVertexColor3D() { @@ -1881,7 +1886,8 @@ template void LineGLTest::renderVertexColor3D() { /* Dropping the alpha channel, as it's always 1.0 */ Containers::arrayCast(_framebuffer.read(_framebuffer.viewport(), {PixelFormat::RGBA8Unorm}).pixels()), Utility::Path::join(SHADERS_TEST_DIR, "LineTestFiles/vertex-color.tga"), - (DebugTools::CompareImageToFile{_manager})); + /* Minor differences on NVidia vs Mesa Intel */ + (DebugTools::CompareImageToFile{_manager, 0.34f, 0.0019f})); } template void LineGLTest::renderObjectId2D() { @@ -2169,7 +2175,8 @@ template void LineGLTest::renderInstanced2D() { /* Dropping the alpha channel, as it's always 1.0 */ Containers::arrayCast(_framebuffer.read(_framebuffer.viewport(), {PixelFormat::RGBA8Unorm}).pixels()), Utility::Path::join(SHADERS_TEST_DIR, "LineTestFiles/instanced.tga"), - (DebugTools::CompareImageToFile{_manager})); + /* Minor differences on NVidia vs Mesa Intel */ + (DebugTools::CompareImageToFile{_manager, 0.67f, 0.001f})); /* Object ID -- no need to verify the whole image, just check that pixels on known places have expected values. SwiftShader insists that the read @@ -2303,7 +2310,8 @@ template void LineGLTest::renderInstanced3D() { /* Dropping the alpha channel, as it's always 1.0 */ Containers::arrayCast(_framebuffer.read(_framebuffer.viewport(), {PixelFormat::RGBA8Unorm}).pixels()), Utility::Path::join(SHADERS_TEST_DIR, "LineTestFiles/instanced.tga"), - (DebugTools::CompareImageToFile{_manager})); + /* Minor differences on NVidia vs Mesa Intel */ + (DebugTools::CompareImageToFile{_manager, 0.67f, 0.001f})); /* Object ID -- no need to verify the whole image, just check that pixels on known places have expected values. SwiftShader insists that the read @@ -2520,7 +2528,8 @@ void LineGLTest::renderMulti2D() { /* Dropping the alpha channel, as it's always 1.0 */ Containers::arrayCast(_framebuffer.read(_framebuffer.viewport(), {PixelFormat::RGBA8Unorm}).pixels()), Utility::Path::join(SHADERS_TEST_DIR, "LineTestFiles/multidraw.tga"), - (DebugTools::CompareImageToFile{_manager})); + /* Minor differences on NVidia vs Mesa Intel */ + (DebugTools::CompareImageToFile{_manager, 0.67f, 0.00125f})); /* Object ID -- no need to verify the whole image, just check that pixels on known places have expected values. SwiftShader insists that the read @@ -2734,7 +2743,8 @@ void LineGLTest::renderMulti3D() { /* Dropping the alpha channel, as it's always 1.0 */ Containers::arrayCast(_framebuffer.read(_framebuffer.viewport(), {PixelFormat::RGBA8Unorm}).pixels()), Utility::Path::join(SHADERS_TEST_DIR, "LineTestFiles/multidraw.tga"), - (DebugTools::CompareImageToFile{_manager})); + /* Minor differences on NVidia vs Mesa Intel */ + (DebugTools::CompareImageToFile{_manager, 0.67f, 0.00125f})); /* Object ID -- no need to verify the whole image, just check that pixels on known places have expected values. SwiftShader insists that the read