Browse Source

Shaders: update notes about what platforms got tested.

Besides expanding the tested platform set and updating thresholds where
needed, it makes more sense to list what is tested than what is not,
because when I forget to update the list it looks like I tested while I
did not.
pull/518/head
Vladimír Vondruš 5 years ago
parent
commit
a5f662072d
  1. 38
      src/Magnum/Shaders/Test/DistanceFieldVectorGLTest.cpp
  2. 44
      src/Magnum/Shaders/Test/FlatGLTest.cpp
  3. 76
      src/Magnum/Shaders/Test/MeshVisualizerGLTest.cpp
  4. 55
      src/Magnum/Shaders/Test/PhongGLTest.cpp
  5. 38
      src/Magnum/Shaders/Test/VectorGLTest.cpp
  6. 37
      src/Magnum/Shaders/Test/VertexColorGLTest.cpp

38
src/Magnum/Shaders/Test/DistanceFieldVectorGLTest.cpp

@ -126,15 +126,27 @@ struct DistanceFieldVectorGLTest: GL::OpenGLTester {
}; };
/* /*
Rendering tests done on: Rendering tests done:
- Mesa Intel [B] base
- Mesa AMD [O] draw offset
- Mesa llvmpipe
- SwiftShader ES2/ES3 Mesa Intel BO
- ARM Mali (Huawei P10) ES2/ES3 ES2 x
- WebGL 1 / 2 (on Mesa Intel) ES3 BO
- iPhone 6 w/ iOS 12.4 Mesa AMD B
Mesa llvmpipe B
SwiftShader ES2 Bx
ES3 B
ARM Mali (Huawei P10) ES2 Bx
ES3 BO
WebGL (on Mesa Intel) 1.0 Bx
2.0 BO
NVidia
Intel Windows
AMD macOS
Intel macOS BO
iPhone 6 w/ iOS 12.4 ES3 B
*/ */
using namespace Math::Literals; using namespace Math::Literals;
@ -206,9 +218,13 @@ constexpr struct {
Float maxThreshold, meanThreshold; Float maxThreshold, meanThreshold;
} RenderMultiData[] { } RenderMultiData[] {
{"bind with offset", "multidraw2D-distancefield.tga", "multidraw3D-distancefield.tga", {"bind with offset", "multidraw2D-distancefield.tga", "multidraw3D-distancefield.tga",
1, 1, 16, 0.0f, 0.0f}, 1, 1, 16,
/* Minor differences on ARM Mali */
1.67f, 0.012f},
{"draw offset", "multidraw2D-distancefield.tga", "multidraw3D-distancefield.tga", {"draw offset", "multidraw2D-distancefield.tga", "multidraw3D-distancefield.tga",
2, 3, 1, 0.0f, 0.0f}, 2, 3, 1,
/* Minor differences on ARM Mali */
1.67f, 0.012f},
}; };
#endif #endif

44
src/Magnum/Shaders/Test/FlatGLTest.cpp

@ -155,18 +155,30 @@ struct FlatGLTest: GL::OpenGLTester {
}; };
/* /*
Rendering tests done on: Rendering tests done:
- Mesa Intel [B] base
- Mesa AMD [A] alpha mask
- Mesa llvmpipe [D] object ID
- SwiftShader ES2/ES3 [I] instancing
- ARM Mali (Huawei P10) ES2/ES3 (except instancing) [O] draw offset
- WebGL 1 / 2 (on Mesa Intel) (except instancing)
- NVidia Windows (except instancing) Mesa Intel BADIO
- Intel Windows (except instancing) ES2 x
- AMD on macOS (except instancing) ES3 BADIO
- iPhone 6 w/ iOS 12.4 (except instancing) Mesa AMD BADI
Mesa llvmpipe BADI
SwiftShader ES2 BADIx
ES3 BADI
ARM Mali (Huawei P10) ES2 BAD x
ES3 BADIO
WebGL (on Mesa Intel) 1.0 BAD x
2.0 BADIO
NVidia BAD
Intel Windows BAD
AMD macOS BAD
Intel macOS BADIO
iPhone 6 w/ iOS 12.4 ES3 BAD
*/ */
using namespace Math::Literals; using namespace Math::Literals;
@ -274,12 +286,16 @@ constexpr struct {
{}, 1, 16, 0.0f, 0.0f}, {}, 1, 16, 0.0f, 0.0f},
{"bind with offset, textured", "multidraw-textured2D.tga", "multidraw-textured3D.tga", {"bind with offset, textured", "multidraw-textured2D.tga", "multidraw-textured3D.tga",
FlatGL2D::Flag::TextureTransformation|FlatGL2D::Flag::Textured, FlatGL2D::Flag::TextureTransformation|FlatGL2D::Flag::Textured,
1, 16, 0.0f, 0.0f}, 1, 16,
/* Minor differences on ARM Mali */
2.34f, 0.01f},
{"draw offset, colored", "multidraw2D.tga", "multidraw3D.tga", {"draw offset, colored", "multidraw2D.tga", "multidraw3D.tga",
{}, 3, 1, 0.0f, 0.0f}, {}, 3, 1, 0.0f, 0.0f},
{"draw offset, textured", "multidraw-textured2D.tga", "multidraw-textured3D.tga", {"draw offset, textured", "multidraw-textured2D.tga", "multidraw-textured3D.tga",
FlatGL2D::Flag::TextureTransformation|FlatGL2D::Flag::Textured, FlatGL2D::Flag::TextureTransformation|FlatGL2D::Flag::Textured,
3, 1, 0.0f, 0.0f} 3, 1,
/* Minor differences on ARM Mali */
2.34f, 0.01f}
}; };
#endif #endif

76
src/Magnum/Shaders/Test/MeshVisualizerGLTest.cpp

@ -174,15 +174,29 @@ struct MeshVisualizerGLTest: GL::OpenGLTester {
}; };
/* /*
Rendering tests done on: Rendering tests done:
- Mesa Intel [W] wireframe
- Mesa AMD [D] primitive/vertex/object ID
. Mesa llvmpipe [T] TBN visualization
- SwiftShader ES2/ES3 [O] draw offset
- ARM Mali (Huawei P10) ES2/ES3 (except TBN visualization)
- WebGL 1 / 2 (on Mesa Intel) (except primitive/vertex/object ID) Mesa Intel WDTO
- iPhone 6 w/ iOS 12.4 (except primitive/vertex/object ID) ES2 x
ES3
Mesa AMD WDT
Mesa llvmpipe WDT
SwiftShader ES2 WDxx
ES3 WDx
ARM Mali (Huawei P10) ES2 W xx
ES3 W O (WDT big diffs, needs investigation)
WebGL (on Mesa Intel) 1.0 W xx
2.0 W x
NVidia
Intel Windows
AMD macOS
Intel macOS WDTO
iPhone 6 w/ iOS 12.4 ES3 W x
*/ */
using namespace Math::Literals; using namespace Math::Literals;
@ -554,25 +568,37 @@ constexpr struct {
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
{"bind with offset, wireframe", "multidraw-wireframe2D.tga", {"bind with offset, wireframe", "multidraw-wireframe2D.tga",
MeshVisualizerGL2D::Flag::Wireframe, MeshVisualizerGL2D::Flag::Wireframe,
1, 1, 16, 0.0f, 0.0f}, 1, 1, 16,
/* Minor differences on ARM Mali */
0.67f, 0.01f},
#endif #endif
{"bind with offset, w/o GS", "multidraw-wireframe-nogeo2D.tga", {"bind with offset, w/o GS", "multidraw-wireframe-nogeo2D.tga",
MeshVisualizerGL2D::Flag::Wireframe|MeshVisualizerGL2D::Flag::NoGeometryShader, MeshVisualizerGL2D::Flag::Wireframe|MeshVisualizerGL2D::Flag::NoGeometryShader,
1, 1, 16, 0.0f, 0.0f}, 1, 1, 16,
/* Minor differences on ARM Mali */
0.67f, 0.02f},
{"bind with offset, vertex ID", "multidraw-vertexid2D.tga", {"bind with offset, vertex ID", "multidraw-vertexid2D.tga",
MeshVisualizerGL2D::Flag::VertexId, MeshVisualizerGL2D::Flag::VertexId,
1, 1, 16, 0.0f, 0.0f}, 1, 1, 16,
/* Minor differences on ARM Mali */
0.67f, 0.01f},
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
{"draw offset, wireframe", "multidraw-wireframe2D.tga", {"draw offset, wireframe", "multidraw-wireframe2D.tga",
MeshVisualizerGL2D::Flag::Wireframe, MeshVisualizerGL2D::Flag::Wireframe,
2, 3, 1, 0.0f, 0.0f}, 2, 3, 1,
/* Minor differences on ARM Mali */
0.67f, 0.01f},
#endif #endif
{"draw offset, wireframe w/o GS", "multidraw-wireframe-nogeo2D.tga", {"draw offset, wireframe w/o GS", "multidraw-wireframe-nogeo2D.tga",
MeshVisualizerGL2D::Flag::Wireframe|MeshVisualizerGL2D::Flag::NoGeometryShader, MeshVisualizerGL2D::Flag::Wireframe|MeshVisualizerGL2D::Flag::NoGeometryShader,
2, 3, 1, 0.0f, 0.0f}, 2, 3, 1,
/* Minor differences on ARM Mali */
0.67f, 0.02f},
{"draw offset, vertex ID", "multidraw-vertexid2D.tga", {"draw offset, vertex ID", "multidraw-vertexid2D.tga",
MeshVisualizerGL2D::Flag::VertexId, MeshVisualizerGL2D::Flag::VertexId,
2, 3, 1, 0.0f, 0.0f} 2, 3, 1,
/* Minor differences on ARM Mali */
0.67f, 0.01f},
}; };
constexpr struct { constexpr struct {
@ -593,10 +619,14 @@ constexpr struct {
#endif #endif
{"bind with offset, wireframe w/o GS", "multidraw-wireframe-nogeo3D.tga", {"bind with offset, wireframe w/o GS", "multidraw-wireframe-nogeo3D.tga",
MeshVisualizerGL3D::Flag::Wireframe|MeshVisualizerGL3D::Flag::NoGeometryShader, MeshVisualizerGL3D::Flag::Wireframe|MeshVisualizerGL3D::Flag::NoGeometryShader,
1, 1, 16, 0.0f, 0.0f}, 1, 1, 16,
/* Minor differences on ARM Mali */
6.0f, 0.04f},
{"bind with offset, vertex ID", "multidraw-vertexid3D.tga", {"bind with offset, vertex ID", "multidraw-vertexid3D.tga",
MeshVisualizerGL3D::Flag::VertexId, MeshVisualizerGL3D::Flag::VertexId,
1, 1, 16, 0.0f, 0.0f}, 1, 1, 16,
/* Minor differences on ARM Mali */
0.67f, 0.01f},
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
{"draw offset, wireframe", "multidraw-wireframe3D.tga", {"draw offset, wireframe", "multidraw-wireframe3D.tga",
MeshVisualizerGL3D::Flag::Wireframe, MeshVisualizerGL3D::Flag::Wireframe,
@ -607,10 +637,14 @@ constexpr struct {
#endif #endif
{"draw offset, wireframe w/o GS", "multidraw-wireframe-nogeo3D.tga", {"draw offset, wireframe w/o GS", "multidraw-wireframe-nogeo3D.tga",
MeshVisualizerGL3D::Flag::Wireframe|MeshVisualizerGL3D::Flag::NoGeometryShader, MeshVisualizerGL3D::Flag::Wireframe|MeshVisualizerGL3D::Flag::NoGeometryShader,
2, 3, 1, 0.0f, 0.0f}, 2, 3, 1,
/* Minor differences on ARM Mali */
6.0f, 0.04f},
{"draw offset, vertex ID", "multidraw-vertexid3D.tga", {"draw offset, vertex ID", "multidraw-vertexid3D.tga",
MeshVisualizerGL3D::Flag::VertexId, MeshVisualizerGL3D::Flag::VertexId,
2, 3, 1, 0.0f, 0.0f} 2, 3, 1,
/* Minor differences on ARM Mali */
0.67f, 0.01f},
}; };
#endif #endif
@ -3084,8 +3118,8 @@ template<MeshVisualizerGL3D::Flag flag> void MeshVisualizerGLTest::renderTangent
Float maxThreshold = 1.334f, meanThreshold = 0.018f; Float maxThreshold = 1.334f, meanThreshold = 0.018f;
#ifdef MAGNUM_TARGET_GLES #ifdef MAGNUM_TARGET_GLES
if(!GL::Context::current().isExtensionSupported<GL::Extensions::NV::shader_noperspective_interpolation>()) { if(!GL::Context::current().isExtensionSupported<GL::Extensions::NV::shader_noperspective_interpolation>()) {
maxThreshold = 39.0f; maxThreshold = 58.0f;
meanThreshold = 1.207f; meanThreshold = 1.547f;
} }
#endif #endif
CORRADE_COMPARE_WITH( CORRADE_COMPARE_WITH(

55
src/Magnum/Shaders/Test/PhongGLTest.cpp

@ -162,18 +162,31 @@ struct PhongGLTest: GL::OpenGLTester {
}; };
/* /*
Rendering tests done on: Rendering tests done:
- Mesa Intel [B] base
- Mesa AMD [A] alpha mask
. Mesa llvmpipe [D] object ID
- SwiftShader ES2/ES3 [L] point lights
- ARM Mali (Huawei P10) ES2/ES3 (except instancing) [I] instancing
- WebGL 1 / 2 (on Mesa Intel) (except instancing) [O] draw offset
- NVidia Windows (except instancing)
- Intel Windows (except instancing) Mesa Intel BADLIO
- AMD on macOS (except instancing) ES2 x
- iPhone 6 w/ iOS 12.4 (except instancing) ES3 BADLIO
Mesa AMD BAD I
Mesa llvmpipe BAD I
SwiftShader ES2 BADLIx
ES3 BADLI
ARM Mali (Huawei P10) ES2 BAD x
ES3 BADLIO
WebGL (on Mesa Intel) 1.0 BAD x
2.0 BADLIO
NVidia BAD
Intel Windows BAD
AMD macOS BAD
Intel macOS BADLIO
iPhone 6 w/ iOS 12.4 ES3 BAD
*/ */
constexpr struct { constexpr struct {
@ -565,16 +578,24 @@ constexpr struct {
} RenderMultiData[] { } RenderMultiData[] {
{"bind with offset, colored", "multidraw.tga", {"bind with offset, colored", "multidraw.tga",
{}, {},
2, 1, 1, 16, 0.0f, 0.0f}, 2, 1, 1, 16,
/* Minor differences on ARM Mali */
3.34f, 0.01f},
{"bind with offset, textured", "multidraw-textured.tga", {"bind with offset, textured", "multidraw-textured.tga",
PhongGL::Flag::TextureTransformation|PhongGL::Flag::DiffuseTexture, PhongGL::Flag::TextureTransformation|PhongGL::Flag::DiffuseTexture,
2, 1, 1, 16, 0.0f, 0.0f}, 2, 1, 1, 16,
/* Minor differences on ARM Mali */
4.67f, 0.02f},
{"draw offset, colored", "multidraw.tga", {"draw offset, colored", "multidraw.tga",
{}, {},
4, 2, 3, 1, 0.0f, 0.0f}, 4, 2, 3, 1,
/* Minor differences on ARM Mali */
3.34f, 0.01f},
{"draw offset, textured", "multidraw-textured.tga", {"draw offset, textured", "multidraw-textured.tga",
PhongGL::Flag::TextureTransformation|PhongGL::Flag::DiffuseTexture, PhongGL::Flag::TextureTransformation|PhongGL::Flag::DiffuseTexture,
4, 2, 3, 1, 0.0f, 0.0f} 4, 2, 3, 1,
/* Minor differences on ARM Mali */
4.67f, 0.02f},
}; };
#endif #endif
@ -2022,7 +2043,7 @@ template<PhongGL::Flag flag> void PhongGLTest::renderShininess() {
#elif !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL)) #elif !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL))
/* SwiftShader has some minor rounding differences (max = 1.67). ARM /* SwiftShader has some minor rounding differences (max = 1.67). ARM
Mali G71 has bigger rounding differences. */ Mali G71 has bigger rounding differences. */
const Float maxThreshold = 12.0f, meanThreshold = 0.043f; const Float maxThreshold = 221.0f, meanThreshold = 0.106f;
#else #else
/* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */ /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */
const Float maxThreshold = 16.667f, meanThreshold = 2.583f; const Float maxThreshold = 16.667f, meanThreshold = 2.583f;

38
src/Magnum/Shaders/Test/VectorGLTest.cpp

@ -125,15 +125,27 @@ struct VectorGLTest: GL::OpenGLTester {
}; };
/* /*
Rendering tests done on: Rendering tests done:
- Mesa Intel [B] base
- Mesa AMD [O] draw offset
- Mesa llvmpipe
- SwiftShader ES2/ES3 Mesa Intel BO
- ARM Mali (Huawei P10) ES2/ES3 ES2 x
- WebGL 1 / 2 (on Mesa Intel) ES3 BO
- iPhone 6 w/ iOS 12.4 Mesa AMD B
Mesa llvmpipe B
SwiftShader ES2 Bx
ES3 B
ARM Mali (Huawei P10) ES2 Bx
ES3 BO
WebGL (on Mesa Intel) 1.0 Bx
2.0 BO
NVidia
Intel Windows
AMD macOS
Intel macOS BO
iPhone 6 w/ iOS 12.4 ES3 B
*/ */
using namespace Math::Literals; using namespace Math::Literals;
@ -188,9 +200,13 @@ constexpr struct {
Float maxThreshold, meanThreshold; Float maxThreshold, meanThreshold;
} RenderMultiData[] { } RenderMultiData[] {
{"bind with offset", "multidraw2D.tga", "multidraw3D.tga", {"bind with offset", "multidraw2D.tga", "multidraw3D.tga",
1, 16, 0.0f, 0.0f}, 1, 16,
/* Minor differences on ARM Mali */
1.34f, 0.02f},
{"draw offset", "multidraw2D.tga", "multidraw3D.tga", {"draw offset", "multidraw2D.tga", "multidraw3D.tga",
3, 1, 0.0f, 0.0f}, 3, 1,
/* Minor differences on ARM Mali */
1.34f, 0.02f},
}; };
#endif #endif

37
src/Magnum/Shaders/Test/VertexColorGLTest.cpp

@ -112,14 +112,27 @@ struct VertexColorGLTest: GL::OpenGLTester {
}; };
/* /*
Rendering tests done on: Rendering tests done:
- Mesa Intel [B] base
- Mesa AMD [O] draw offset
- SwiftShader ES2/ES3
- ARM Mali (Huawei P10) ES2/ES3 Mesa Intel BO
- WebGL 1 / 2 (on Mesa Intel) ES2 x
- iPhone 6 w/ iOS 12.4 ES3 BO
Mesa AMD B
Mesa llvmpipe B
SwiftShader ES2 Bx
ES3 B
ARM Mali (Huawei P10) ES2 Bx
ES3 BO
WebGL (on Mesa Intel) 1.0 Bx
2.0 BO
NVidia
Intel Windows
AMD macOS
Intel macOS BO
iPhone 6 w/ iOS 12.4 ES3 B
*/ */
using namespace Math::Literals; using namespace Math::Literals;
@ -148,9 +161,13 @@ constexpr struct {
Float maxThreshold, meanThreshold; Float maxThreshold, meanThreshold;
} RenderMultiData[] { } RenderMultiData[] {
{"bind with offset", "multidraw2D.tga", "multidraw3D.tga", {"bind with offset", "multidraw2D.tga", "multidraw3D.tga",
1, 16, 0.0f, 0.0f}, 1, 16,
/* Minor differences on ARM Mali */
0.34f, 0.01f},
{"draw offset", "multidraw2D.tga", "multidraw3D.tga", {"draw offset", "multidraw2D.tga", "multidraw3D.tga",
3, 1, 0.0f, 0.0f} 3, 1,
/* Minor differences on ARM Mali */
0.34f, 0.01f},
}; };
#endif #endif

Loading…
Cancel
Save