From e8f36033f9dcfb0e634724fd9fd1c65c53051945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 4 May 2020 16:34:50 +0200 Subject: [PATCH] Shaders: GS is needed only for wireframe. So don't skip the test when rendering just object/primitive/.. ID. Turns out due to the skip this test was never executed on SwiftShader, and it thus needs some threshold bumping. --- src/Magnum/Shaders/Test/MeshVisualizerGLTest.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Magnum/Shaders/Test/MeshVisualizerGLTest.cpp b/src/Magnum/Shaders/Test/MeshVisualizerGLTest.cpp index a38536428..1a12d33e9 100644 --- a/src/Magnum/Shaders/Test/MeshVisualizerGLTest.cpp +++ b/src/Magnum/Shaders/Test/MeshVisualizerGLTest.cpp @@ -1558,10 +1558,10 @@ void MeshVisualizerGLTest::renderObjectVertexPrimitiveId2D() { ) CORRADE_SKIP("gl_PrimitiveID not supported."); #ifndef MAGNUM_TARGET_GLES - if(!(data.flags2D & MeshVisualizer2D::Flag::NoGeometryShader) && !GL::Context::current().isExtensionSupported()) + if(data.flags2D & MeshVisualizer2D::Flag::Wireframe && !(data.flags2D & MeshVisualizer2D::Flag::NoGeometryShader) && !GL::Context::current().isExtensionSupported()) CORRADE_SKIP(GL::Extensions::ARB::geometry_shader4::string() + std::string(" is not supported")); #else - if(!(data.flags2D & MeshVisualizer2D::Flag::NoGeometryShader) && !GL::Context::current().isExtensionSupported()) + if(data.flags2D & MeshVisualizer2D::Flag::Wireframe && !(data.flags2D & MeshVisualizer2D::Flag::NoGeometryShader) && !GL::Context::current().isExtensionSupported()) CORRADE_SKIP(GL::Extensions::EXT::geometry_shader::string() + std::string(" is not supported")); #endif #endif @@ -1650,10 +1650,10 @@ void MeshVisualizerGLTest::renderObjectVertexPrimitiveId3D() { ) CORRADE_SKIP("gl_PrimitiveID not supported."); #ifndef MAGNUM_TARGET_GLES - if(!(data.flags3D & MeshVisualizer3D::Flag::NoGeometryShader) && !GL::Context::current().isExtensionSupported()) + if(data.flags3D & MeshVisualizer3D::Flag::Wireframe && !(data.flags3D & MeshVisualizer3D::Flag::NoGeometryShader) && !GL::Context::current().isExtensionSupported()) CORRADE_SKIP(GL::Extensions::ARB::geometry_shader4::string() + std::string(" is not supported")); #else - if(!(data.flags3D & MeshVisualizer3D::Flag::NoGeometryShader) && !GL::Context::current().isExtensionSupported()) + if(data.flags3D & MeshVisualizer3D::Flag::Wireframe && !(data.flags3D & MeshVisualizer3D::Flag::NoGeometryShader) && !GL::Context::current().isExtensionSupported()) CORRADE_SKIP(GL::Extensions::EXT::geometry_shader::string() + std::string(" is not supported")); #endif #endif @@ -1716,10 +1716,10 @@ void MeshVisualizerGLTest::renderObjectVertexPrimitiveId3D() { CORRADE_SKIP("AnyImageImporter / TgaImageImporter plugins not found."); /* Release build has 1 pixel slightly off. Huh. AMD & llvmpipe has - additional off-by-one errors compared to Intel. If - GL_NV_shader_noperspective_interpolation is not supported, the artifacts - are bigger when wireframe is enabled. */ - Float maxThreshold = 10.7f, meanThreshold = 0.279f; + additional off-by-one errors compared to Intel, SwiftShader some errors + on the edges. If GL_NV_shader_noperspective_interpolation is not + supported, the artifacts are bigger when wireframe is enabled. */ + Float maxThreshold = 138.4f, meanThreshold = 0.279f; #if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL) if(data.flags3D & MeshVisualizer3D::Flag::Wireframe && !GL::Context::current().isExtensionSupported()) { /* SwiftShader has a bit more rounding errors */