diff --git a/src/Magnum/Shaders/Test/DistanceFieldVectorGLTest.cpp b/src/Magnum/Shaders/Test/DistanceFieldVectorGLTest.cpp index d1a51363e..010ece013 100644 --- a/src/Magnum/Shaders/Test/DistanceFieldVectorGLTest.cpp +++ b/src/Magnum/Shaders/Test/DistanceFieldVectorGLTest.cpp @@ -88,6 +88,7 @@ struct DistanceFieldVectorGLTest: GL::OpenGLTester { - SwiftShader ES2/ES3 - ARM Mali (Huawei P10) ES2/ES3 - WebGL 1 / 2 (on Mesa Intel) + - iPhone 6 w/ iOS 12.4 */ using namespace Math::Literals; @@ -257,8 +258,8 @@ void DistanceFieldVectorGLTest::renderDefaults2D() { #if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL)) /* SwiftShader has off-by-one differences on edges, ARM Mali off-by-one in - all channels. */ - const Float maxThreshold = 3.0f, meanThreshold = 0.076f; + all channels. Apple A8 off-by-more. */ + const Float maxThreshold = 4.0f, meanThreshold = 0.077f; #else /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */ const Float maxThreshold = 17.0f, meanThreshold = 0.480f; @@ -313,8 +314,8 @@ void DistanceFieldVectorGLTest::renderDefaults3D() { #if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL)) /* SwiftShader has off-by-one differences on edges, ARM Mali off-by-one in - all channels. */ - const Float maxThreshold = 3.0f, meanThreshold = 0.076f; + all channels. Apple A8 off-by-more. */ + const Float maxThreshold = 4.0f, meanThreshold = 0.077f; #else /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */ const Float maxThreshold = 17.0f, meanThreshold = 0.480f; @@ -369,8 +370,9 @@ void DistanceFieldVectorGLTest::render2D() { MAGNUM_VERIFY_NO_GL_ERROR(); #if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL)) - /* SwiftShader has off-by-one differences when smoothing */ - const Float maxThreshold = 5.667f, meanThreshold = 0.268f; + /* SwiftShader has off-by-one differences when smoothing, Apple A8 a bit + more. */ + const Float maxThreshold = 6.0f, meanThreshold = 0.360f; #else /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */ const Float maxThreshold = 17.0f, meanThreshold = 2.386f; @@ -430,8 +432,8 @@ void DistanceFieldVectorGLTest::render3D() { #if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL)) /* SwiftShader has off-by-one differences when smoothing plus a bunch of - different pixels on primitive edges */ - const Float maxThreshold = 17.0f, meanThreshold = 0.192f; + different pixels on primitive edges, Apple A8 a bit more. */ + const Float maxThreshold = 17.0f, meanThreshold = 0.204f; #else /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */ const Float maxThreshold = 17.0f, meanThreshold = 1.613f; diff --git a/src/Magnum/Shaders/Test/FlatGLTest.cpp b/src/Magnum/Shaders/Test/FlatGLTest.cpp index 436aeaa9a..799026f36 100644 --- a/src/Magnum/Shaders/Test/FlatGLTest.cpp +++ b/src/Magnum/Shaders/Test/FlatGLTest.cpp @@ -122,6 +122,7 @@ struct FlatGLTest: GL::OpenGLTester { - NVidia Windows - Intel Windows - AMD on macOS + - iPhone 6 w/ iOS 12.4 */ using namespace Math::Literals; @@ -571,8 +572,8 @@ void FlatGLTest::renderTextured2D() { MAGNUM_VERIFY_NO_GL_ERROR(); #if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL)) - /* SwiftShader has minor rounding errors */ - const Float maxThreshold = 1.334f, meanThreshold = 0.012f; + /* SwiftShader has minor rounding errors, Apple A8 slightly more */ + const Float maxThreshold = 2.334f, meanThreshold = 0.023f; #else /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */ const Float maxThreshold = 15.667f, meanThreshold = 3.254f; @@ -673,8 +674,8 @@ template void FlatGLTest::renderVertexColor2D() { MAGNUM_VERIFY_NO_GL_ERROR(); #if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL)) - /* SwiftShader has minor rounding errors. ARM Mali slightly more */ - const Float maxThreshold = 1.334f, meanThreshold = 0.015f; + /* SwiftShader has minor rounding errors. ARM Mali / Apple A8 a bit more */ + const Float maxThreshold = 3.334f, meanThreshold = 0.064f; #else /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's worse */ const Float maxThreshold = 15.334f, meanThreshold = 4.355f; @@ -731,8 +732,8 @@ template void FlatGLTest::renderVertexColor3D() { MAGNUM_VERIFY_NO_GL_ERROR(); #if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL)) - /* SwiftShader has some minor differences on the edges */ - const Float maxThreshold = 76.67f, meanThreshold = 0.072f; + /* SwiftShader has some minor differences on the edges, Apple A8 more */ + const Float maxThreshold = 76.67f, meanThreshold = 0.138f; #else /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's worse */ const Float maxThreshold = 76.67f, meanThreshold = 3.908f; diff --git a/src/Magnum/Shaders/Test/MeshVisualizerGLTest.cpp b/src/Magnum/Shaders/Test/MeshVisualizerGLTest.cpp index ab013167c..a4326883d 100644 --- a/src/Magnum/Shaders/Test/MeshVisualizerGLTest.cpp +++ b/src/Magnum/Shaders/Test/MeshVisualizerGLTest.cpp @@ -100,6 +100,7 @@ struct MeshVisualizerGLTest: GL::OpenGLTester { - SwiftShader ES2/ES3 - ARM Mali (Huawei P10) ES2/ES3 - WebGL 1 / 2 (on Mesa Intel) + - iPhone 6 w/ iOS 12.4 */ using namespace Math::Literals; @@ -473,8 +474,9 @@ void MeshVisualizerGLTest::renderWireframe() { /* Test it's not *too* off, at least */ if(data.flags & MeshVisualizer::Flag::NoGeometryShader) { #if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL)) - /* SwiftShader has differently rasterized edges on four pixels */ - const Float maxThreshold = 170.0f, meanThreshold = 0.327f; + /* SwiftShader has differently rasterized edges on four pixels. Apple + A8 on more. */ + const Float maxThreshold = 170.0f, meanThreshold = 0.330f; #else /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */ const Float maxThreshold = 170.0f, meanThreshold = 1.699f; diff --git a/src/Magnum/Shaders/Test/PhongGLTest.cpp b/src/Magnum/Shaders/Test/PhongGLTest.cpp index f5e54fb38..424861056 100644 --- a/src/Magnum/Shaders/Test/PhongGLTest.cpp +++ b/src/Magnum/Shaders/Test/PhongGLTest.cpp @@ -123,6 +123,7 @@ struct PhongGLTest: GL::OpenGLTester { - NVidia Windows - Intel Windows - AMD on macOS + - iPhone 6 w/ iOS 12.4 */ constexpr struct { @@ -565,8 +566,8 @@ void PhongGLTest::renderColored() { #if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL)) /* SwiftShader has some minor rounding differences (max = 1). ARM Mali G71 - has bigger rounding differences. */ - const Float maxThreshold = 8.34f, meanThreshold = 0.066f; + and Apple A8 has bigger rounding differences. */ + const Float maxThreshold = 8.34f, meanThreshold = 0.100f; #else /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */ const Float maxThreshold = 15.34f, meanThreshold = 3.33f; @@ -651,8 +652,8 @@ void PhongGLTest::renderSinglePixelTextured() { #if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL)) /* SwiftShader has some minor rounding differences (max = 1). ARM Mali G71 - has bigger rounding differences. */ - const Float maxThreshold = 7.0f, meanThreshold = 0.066f; + and Apple A8 has bigger rounding differences. */ + const Float maxThreshold = 7.67f, meanThreshold = 0.100f; #else /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */ const Float maxThreshold = 15.34f, meanThreshold = 3.33f; @@ -749,8 +750,8 @@ void PhongGLTest::renderTextured() { #if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL)) /* SwiftShader has few rounding errors at the edges (giving a large max - error), but that's basically it. */ - const Float maxThreshold = 210.4f, meanThreshold = 0.126f; + error), but that's basically it. Apple A8 has more. */ + const Float maxThreshold = 210.4f, meanThreshold = 0.202f; #else /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's a bit worse */ const Float maxThreshold = 210.4f, meanThreshold = 3.434f; @@ -834,8 +835,9 @@ void PhongGLTest::renderTexturedNormal() { /* One pixel in the center didn't survive the transformation. But that's okay. Due to the density of the normal map, SwiftShader has an overally consistent off-by-a-bit error. AMD macOS drivers have one pixel off - due to a rounding error on the edge. */ - const Float maxThreshold = 191.0f, meanThreshold = 0.3421f; + due to a rounding error on the edge. Apple A8 has a slightly larger + overall difference. */ + const Float maxThreshold = 191.0f, meanThreshold = 0.438f; #else /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */ const Float maxThreshold = 191.0f, meanThreshold = 3.017f; @@ -895,8 +897,9 @@ template void PhongGLTest::renderVertexColor() { MAGNUM_VERIFY_NO_GL_ERROR(); #if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL)) - /* SwiftShader has some minor differences on the edges */ - const Float maxThreshold = 105.4f, meanThreshold = 0.075f; + /* SwiftShader has some minor differences on the edges, Apple A8 a bit + more */ + const Float maxThreshold = 105.4f, meanThreshold = 0.167f; #else /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's worse */ const Float maxThreshold = 105.4f, meanThreshold = 3.254f; @@ -931,7 +934,12 @@ void PhongGLTest::renderShininess() { CORRADE_SKIP("AnyImageImporter / TgaImageImporter plugins not found."); { - #if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL)) + #ifdef CORRADE_TARGET_IOS + /* Apple A8 has a large single-pixel difference in the shininess ~= 0 + case, but it's not nearly as bad as in the "huge ring" case on Mesa + etc. */ + const Float maxThreshold = 211.0f, meanThreshold = 0.052f; + #elif !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL)) /* SwiftShader has some minor rounding differences (max = 1.67). ARM Mali G71 has bigger rounding differences. */ const Float maxThreshold = 12.0f, meanThreshold = 0.043f; @@ -1072,8 +1080,9 @@ void PhongGLTest::renderAlpha() { #if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL)) /* In some cases (separate vs combined alpha) there are off-by-one errors. That's okay, as we have only 8bit texture precision. SwiftShader has - additionally a few minor rounding errors at the edges. */ - const Float maxThreshold = 172.667f, meanThreshold = 0.171f; + additionally a few minor rounding errors at the edges, Apple A8 a bit + more. */ + const Float maxThreshold = 172.667f, meanThreshold = 0.229f; #else /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */ const Float maxThreshold = 172.667f, meanThreshold = 4.736f; @@ -1142,8 +1151,8 @@ void PhongGLTest::renderObjectId() { /* Color output should have no difference -- same as in colored() */ #if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL)) /* SwiftShader has some minor rounding differences (max = 1). ARM Mali G71 - has bigger rounding differences. */ - const Float maxThreshold = 8.34f, meanThreshold = 0.066f; + and Apple A8 has bigger rounding differences. */ + const Float maxThreshold = 8.34f, meanThreshold = 0.100f; #else /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */ const Float maxThreshold = 15.34f, meanThreshold = 3.33f; @@ -1233,8 +1242,9 @@ void PhongGLTest::renderZeroLights() { #if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL)) /* Compared to FlatGLTest::renderAlpha3D(0.5), there's a bit more different pixels on the edges, caused by matrix multiplication being done in the - shader and not on the CPU side. */ - const Float maxThreshold = 139.0f, meanThreshold = 0.122f; + shader and not on the CPU side. Apple A8 sprinkles a bunch of tiny + differences here and there. */ + const Float maxThreshold = 139.0f, meanThreshold = 0.140f; #else /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */ const Float maxThreshold = 139.0f, meanThreshold = 2.896f; diff --git a/src/Magnum/Shaders/Test/VectorGLTest.cpp b/src/Magnum/Shaders/Test/VectorGLTest.cpp index 3dc1a1b22..6cf2abccc 100644 --- a/src/Magnum/Shaders/Test/VectorGLTest.cpp +++ b/src/Magnum/Shaders/Test/VectorGLTest.cpp @@ -88,6 +88,7 @@ struct VectorGLTest: GL::OpenGLTester { - SwiftShader ES2/ES3 - ARM Mali (Huawei P10) ES2/ES3 - WebGL 1 / 2 (on Mesa Intel) + - iPhone 6 w/ iOS 12.4 */ using namespace Math::Literals; diff --git a/src/Magnum/Shaders/Test/VertexColorGLTest.cpp b/src/Magnum/Shaders/Test/VertexColorGLTest.cpp index b50fdaf1d..3c0dc7e20 100644 --- a/src/Magnum/Shaders/Test/VertexColorGLTest.cpp +++ b/src/Magnum/Shaders/Test/VertexColorGLTest.cpp @@ -85,6 +85,7 @@ struct VertexColorGLTest: GL::OpenGLTester { - SwiftShader ES2/ES3 - ARM Mali (Huawei P10) ES2/ES3 - WebGL 1 / 2 (on Mesa Intel) + - iPhone 6 w/ iOS 12.4 */ using namespace Math::Literals; @@ -340,8 +341,8 @@ template void VertexColorGLTest::render3D() { #if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL)) /* AMD has one different pixel compared to Intel, SwiftShader has - differently rasterized edges on five pixels */ - const Float maxThreshold = 204.0f, meanThreshold = 0.158f; + differently rasterized edges on five pixels. Apple A8 some more. */ + const Float maxThreshold = 204.0f, meanThreshold = 0.167f; #else /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */ const Float maxThreshold = 204.0f, meanThreshold = 1.284f;