Browse Source

DebugTools,MeshTools,Shaders: increase test thresholds for llvmpipe.

These are all just minor off-by-one errors, nothing to worry about.
Except maybe for that one case with MeshTools::compile() but the rest of
the image renders fine, so it's not like I'd have some critical issue
there.
pull/680/head
Vladimír Vondruš 10 months ago
parent
commit
6de14c4605
  1. 11
      src/Magnum/DebugTools/Test/ForceRendererGLTest.cpp
  2. 12
      src/Magnum/DebugTools/Test/ObjectRendererGLTest.cpp
  3. 7
      src/Magnum/MeshTools/Test/CompileGLTest.cpp
  4. 4
      src/Magnum/MeshTools/Test/CompileLinesGLTest.cpp
  5. 63
      src/Magnum/Shaders/Test/DistanceFieldVectorGLTest.cpp
  6. 41
      src/Magnum/Shaders/Test/FlatGLTest.cpp
  7. 6
      src/Magnum/Shaders/Test/LineGLTest.cpp
  8. 212
      src/Magnum/Shaders/Test/MeshVisualizerGLTest.cpp
  9. 21
      src/Magnum/Shaders/Test/PhongGLTest.cpp

11
src/Magnum/DebugTools/Test/ForceRendererGLTest.cpp

@ -118,12 +118,15 @@ void ForceRendererGLTest::render2D() {
/* ARM Mali G71 (Huawei P10) has some rounding differences causing the
the arrowhead to be on a different place (but the rest is okay and the
3D case matches exactly), however to avoid false negatives elsewhere I'm
making it conditional. */
making it conditional. Same for llvmpipe. */
Containers::Optional<CompareImageToFile> comparator{InPlaceInit, _manager};
#ifdef CORRADE_TARGET_ANDROID
if(GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::ArmMali)
if(
#ifdef CORRADE_TARGET_ANDROID
GL::Context::current().detectedDriver() >= GL::Context::DetectedDriver::ArmMali ||
#endif
GL::Context::current().rendererString().contains("llvmpipe")
)
comparator.emplace(_manager, 79.0f, 0.22f);
#endif
CORRADE_COMPARE_WITH(
framebuffer.read({{}, {64, 64}}, {PixelFormat::RGBA8Unorm}),

12
src/Magnum/DebugTools/Test/ObjectRendererGLTest.cpp

@ -165,13 +165,15 @@ void ObjectRendererGLTest::render3D() {
ARM Mali G71 (Huawei P10) has some rounding differences causing the
the bottom blue line to be on a different place (but the rest is
okay and the 2D case matches exactly), however to avoid false negatives
elsewhere I'm making it conditional. */
elsewhere I'm making it conditional. Same for llvmpipe. */
Containers::Optional<CompareImageToFile> comparator{InPlaceInit, _manager, 71.6f, 0.018f};
#ifdef CORRADE_TARGET_ANDROID
if(GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::ArmMali)
if(
#ifdef CORRADE_TARGET_ANDROID
GL::Context::current().detectedDriver() >= GL::Context::DetectedDriver::ArmMali ||
#endif
GL::Context::current().rendererString().contains("llvmpipe")
)
comparator.emplace(_manager, 127.6f, 0.54f);
#endif
CORRADE_COMPARE_WITH(
framebuffer.read({{}, {64, 64}}, {PixelFormat::RGBA8Unorm}),
Utility::Path::join(DEBUGTOOLS_TEST_DIR, "ObjectRenderer3D.tga"),

7
src/Magnum/MeshTools/Test/CompileGLTest.cpp

@ -1103,8 +1103,11 @@ template<class T> void CompileGLTest::threeDimensions() {
CORRADE_COMPARE_WITH(
_framebuffer.read({{}, {32, 32}}, {PixelFormat::RGBA8Unorm}),
Utility::Path::join(MESHTOOLS_TEST_DIR, "CompileTestFiles/tbn.tga"),
/* SwiftShader has some minor off-by-one precision differences */
(DebugTools::CompareImageToFile{_manager, 1.0f, 0.0948f}));
/* SwiftShader has some minor off-by-one precision differences. Old
llvmpipe doesn't render the vertical line in the middle, but
does all others. Not sure why, maybe it narrowly escapes the NDC
or there's some division by zero accident. */
(DebugTools::CompareImageToFile{_manager, 127.5f, 1.37f}));
#else
CORRADE_SKIP("Geometry shaders not available on ES2 or WebGL.");
#endif

4
src/Magnum/MeshTools/Test/CompileLinesGLTest.cpp

@ -186,8 +186,8 @@ void CompileLinesGLTest::twoDimensions() {
_framebuffer.read({{}, {32, 32}}, {PixelFormat::RGBA8Unorm}),
Utility::Path::join({MESHTOOLS_TEST_DIR, "CompileLinesTestFiles", data.expected}),
/* Minor differences in vertex color rendering on NVidia vs Mesa
Intel */
(DebugTools::CompareImageToFile{_manager, 0.25f, 0.007f}));
Intel, llvmpipe also */
(DebugTools::CompareImageToFile{_manager, 0.5f, 0.009f}));
}
void CompileLinesGLTest::threeDimensions() {

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

@ -302,57 +302,57 @@ constexpr struct {
} RenderMultiData[] {
{"bind with offset", "multidraw2D-distancefield.tga", "multidraw3D-distancefield.tga",
{}, 1, 1, true, 16,
/* Minor differences on ARM Mali */
1.67f, 0.012f},
/* Minor differences on ARM Mali and llvmpipe, old llvmpipe more */
10.67f, 0.12f},
{"bind with offset, texture array", "multidraw2D-distancefield.tga", "multidraw3D-distancefield.tga",
DistanceFieldVectorGL2D::Flag::TextureArrays, 1, 1, true, 16,
/* Minor differences on ARM Mali */
1.67f, 0.012f},
/* Minor differences on ARM Mali and llvmpipe, old llvmpipe more */
10.67f, 0.12f},
#ifndef MAGNUM_TARGET_WEBGL
{"bind with offset, shader storage", "multidraw2D-distancefield.tga", "multidraw3D-distancefield.tga",
DistanceFieldVectorGL2D::Flag::ShaderStorageBuffers, 0, 0, true, 16,
/* Minor differences on ARM Mali */
1.67f, 0.012f},
/* Minor differences on ARM Mali and llvmpipe, old llvmpipe more */
10.67f, 0.12f},
{"bind with offset, texture array, shader storage", "multidraw2D-distancefield.tga", "multidraw3D-distancefield.tga",
DistanceFieldVectorGL2D::Flag::TextureArrays|DistanceFieldVectorGL2D::Flag::ShaderStorageBuffers, 0, 0, true, 16,
/* Minor differences on ARM Mali */
1.67f, 0.012f},
/* Minor differences on ARM Mali and llvmpipe, old llvmpipe more */
10.67f, 0.12f},
#endif
{"draw offset", "multidraw2D-distancefield.tga", "multidraw3D-distancefield.tga",
{}, 2, 3, false, 1,
/* Minor differences on ARM Mali */
1.67f, 0.012f},
/* Minor differences on ARM Mali and llvmpipe, old llvmpipe more */
10.67f, 0.12f},
{"draw offset, texture array", "multidraw2D-distancefield.tga", "multidraw3D-distancefield.tga",
DistanceFieldVectorGL2D::Flag::TextureArrays, 2, 3, false, 1,
/* Minor differences on ARM Mali */
1.67f, 0.012f},
/* Minor differences on ARM Mali and llvmpipe, old llvmpipe more */
10.67f, 0.12f},
#ifndef MAGNUM_TARGET_WEBGL
{"draw offset, shader storage", "multidraw2D-distancefield.tga", "multidraw3D-distancefield.tga",
DistanceFieldVectorGL2D::Flag::ShaderStorageBuffers, 0, 0, false, 1,
/* Minor differences on ARM Mali */
1.67f, 0.012f},
/* Minor differences on ARM Mali and llvmpipe, old llvmpipe more */
10.67f, 0.12f},
{"draw offset, texture array, shader storage", "multidraw2D-distancefield.tga", "multidraw3D-distancefield.tga",
DistanceFieldVectorGL2D::Flag::TextureArrays|DistanceFieldVectorGL2D::Flag::ShaderStorageBuffers, 0, 0, false, 1,
/* Minor differences on ARM Mali */
1.67f, 0.012f},
/* Minor differences on ARM Mali and llvmpipe, old llvmpipe more */
10.67f, 0.12f},
#endif
{"multidraw", "multidraw2D-distancefield.tga", "multidraw3D-distancefield.tga",
DistanceFieldVectorGL2D::Flag::MultiDraw, 2, 3, false, 1,
/* Minor differences on ARM Mali */
1.67f, 0.012f},
/* Minor differences on ARM Mali and llvmpipe, old llvmpipe more */
10.67f, 0.12f},
{"multidraw, texture array", "multidraw2D-distancefield.tga", "multidraw3D-distancefield.tga",
DistanceFieldVectorGL2D::Flag::TextureArrays|DistanceFieldVectorGL2D::Flag::MultiDraw, 2, 3, false, 1,
/* Minor differences on ARM Mali */
1.67f, 0.012f},
/* Minor differences on ARM Mali and llvmpipe, old llvmpipe more */
10.67f, 0.12f},
#ifndef MAGNUM_TARGET_WEBGL
{"multidraw, shader storage", "multidraw2D-distancefield.tga", "multidraw3D-distancefield.tga",
DistanceFieldVectorGL2D::Flag::ShaderStorageBuffers|DistanceFieldVectorGL2D::Flag::MultiDraw, 0, 0, false, 1,
/* Minor differences on ARM Mali */
1.67f, 0.012f},
/* Minor differences on ARM Mali and llvmpipe, old llvmpipe more */
10.67f, 0.12f},
{"multidraw, texture array, shader storage", "multidraw2D-distancefield.tga", "multidraw3D-distancefield.tga",
DistanceFieldVectorGL2D::Flag::TextureArrays|DistanceFieldVectorGL2D::Flag::ShaderStorageBuffers|DistanceFieldVectorGL2D::Flag::MultiDraw, 0, 0, false, 1,
/* Minor differences on ARM Mali */
1.67f, 0.012f},
/* Minor differences on ARM Mali and llvmpipe, old llvmpipe more */
10.67f, 0.12f},
#endif
};
#endif
@ -1024,12 +1024,13 @@ template<DistanceFieldVectorGL2D::Flag flag> void DistanceFieldVectorGLTest::ren
/* Dropping the alpha channel, as it's always 1.0 */
_framebuffer.read(_framebuffer.viewport(), {PixelFormat::RGBA8Unorm}).pixels<Color4ub>().slice(&Color4ub::rgb),
Utility::Path::join(_testDir, "VectorTestFiles/defaults.tga"),
(DebugTools::CompareImageToFile{_manager, 131.0f, 1.83f}));
/* llvmpipe has a bit extra difference */
(DebugTools::CompareImageToFile{_manager, 134.0f, 2.24f}));
#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. Apple A8 & llvmpipe off-by-more. */
const Float maxThreshold = 32.0f, meanThreshold = 0.583f;
const Float maxThreshold = 32.0f, meanThreshold = 0.596f;
#else
/* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */
const Float maxThreshold = 17.0f, meanThreshold = 0.480f;
@ -1134,12 +1135,13 @@ template<DistanceFieldVectorGL3D::Flag flag> void DistanceFieldVectorGLTest::ren
/* Dropping the alpha channel, as it's always 1.0 */
_framebuffer.read(_framebuffer.viewport(), {PixelFormat::RGBA8Unorm}).pixels<Color4ub>().slice(&Color4ub::rgb),
Utility::Path::join(_testDir, "VectorTestFiles/defaults.tga"),
(DebugTools::CompareImageToFile{_manager, 131.0f, 1.83f}));
/* llvmpipe has a bit extra difference */
(DebugTools::CompareImageToFile{_manager, 134.0f, 2.24f}));
#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. Apple A8 and llvmpipe off-by-more. */
const Float maxThreshold = 32.0f, meanThreshold = 0.583f;
const Float maxThreshold = 32.0f, meanThreshold = 0.596f;
#else
/* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */
const Float maxThreshold = 17.0f, meanThreshold = 0.480f;
@ -1516,8 +1518,9 @@ template<DistanceFieldVectorGL3D::Flag flag> void DistanceFieldVectorGLTest::ren
#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, Apple A8 & llvmpipe a bit more. */
const Float maxThreshold = 32.0f, meanThreshold = 0.642f;
different pixels on primitive edges, Apple A8 & old llvmpipe a bit
more. */
const Float maxThreshold = 32.0f, meanThreshold = 0.660f;
#else
/* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */
const Float maxThreshold = 32.0f, meanThreshold = 1.613f;

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

@ -702,23 +702,23 @@ constexpr struct {
"multidraw-textured2D.tga", "multidraw-textured3D.tga", {},
FlatGL2D::Flag::TextureTransformation|FlatGL2D::Flag::Textured,
1, 1, true, 16,
/* Minor differences on ARM Mali */
2.34f, 0.01f},
/* Minor differences on ARM Mali, on old llvmpipe */
2.34f, 0.023f},
{"bind with offset, texture array",
"multidraw-textured2D.tga", "multidraw-textured3D.tga", {},
FlatGL2D::Flag::TextureTransformation|FlatGL2D::Flag::Textured|FlatGL2D::Flag::TextureArrays,
1, 1, true, 16,
/* Some difference at the UV edge (texture is wrapping in the 2D case
while the 2D array has a black area around) */
65.0f, 0.15f},
while the 2D array has a black area around), more on old llvmpipe */
65.0f, 0.167f},
#ifndef MAGNUM_TARGET_WEBGL
{"bind with offset, texture array, shader storage",
"multidraw-textured2D.tga", "multidraw-textured3D.tga", {},
FlatGL2D::Flag::ShaderStorageBuffers|FlatGL2D::Flag::TextureTransformation|FlatGL2D::Flag::Textured|FlatGL2D::Flag::TextureArrays,
0, 0, true, 16,
/* Some difference at the UV edge (texture is wrapping in the 2D case
while the 2D array has a black area around) */
65.0f, 0.15f},
while the 2D array has a black area around), bit more on llvmpipe */
65.0f, 0.167f},
#endif
{"draw offset, colored",
"multidraw2D.tga", "multidraw3D.tga", {},
@ -740,23 +740,23 @@ constexpr struct {
"multidraw-textured2D.tga", "multidraw-textured3D.tga", {},
FlatGL2D::Flag::TextureTransformation|FlatGL2D::Flag::Textured,
2, 3, false, 1,
/* Minor differences on ARM Mali */
2.34f, 0.01f},
/* Minor differences on ARM Mali, on old llvmpipe */
2.34f, 0.023f},
{"draw offset, texture array",
"multidraw-textured2D.tga", "multidraw-textured3D.tga", {},
FlatGL2D::Flag::TextureTransformation|FlatGL2D::Flag::Textured|FlatGL2D::Flag::TextureArrays,
2, 3, false, 1,
/* Some difference at the UV edge (texture is wrapping in the 2D case
while the 2D array has a black area around) */
65.0f, 0.15f},
while the 2D array has a black area around), more on old llvmpipe */
65.0f, 0.167f},
#ifndef MAGNUM_TARGET_WEBGL
{"draw offset, texture array, shader storage",
"multidraw-textured2D.tga", "multidraw-textured3D.tga", {},
FlatGL2D::Flag::ShaderStorageBuffers|FlatGL2D::Flag::TextureTransformation|FlatGL2D::Flag::Textured|FlatGL2D::Flag::TextureArrays,
0, 0, false, 1,
/* Some difference at the UV edge (texture is wrapping in the 2D case
while the 2D array has a black area around) */
65.0f, 0.15f},
while the 2D array has a black area around), bit more on llvmpipe */
65.0f, 0.167f},
#endif
{"multidraw, colored",
"multidraw2D.tga", "multidraw3D.tga", {},
@ -778,23 +778,23 @@ constexpr struct {
"multidraw-textured2D.tga", "multidraw-textured3D.tga", {},
FlatGL2D::Flag::MultiDraw|FlatGL2D::Flag::TextureTransformation|FlatGL2D::Flag::Textured,
2, 3, false, 1,
/* Minor differences on ARM Mali */
2.34f, 0.01f},
/* Minor differences on ARM Mali, on old llvmpipe */
2.34f, 0.023f},
{"multidraw, texture array",
"multidraw-textured2D.tga", "multidraw-textured3D.tga", {},
FlatGL2D::Flag::MultiDraw|FlatGL2D::Flag::TextureTransformation|FlatGL2D::Flag::Textured|FlatGL2D::Flag::TextureArrays,
2, 3, false, 1,
/* Some difference at the UV edge (texture is wrapping in the 2D case
while the 2D array has a black area around) */
65.0f, 0.15f},
while the 2D array has a black area around), more on old llvmpipe */
65.0f, 0.167f},
#ifndef MAGNUM_TARGET_WEBGL
{"multidraw, texture array, shader storage",
"multidraw-textured2D.tga", "multidraw-textured3D.tga", {},
FlatGL2D::Flag::ShaderStorageBuffers|FlatGL2D::Flag::MultiDraw|FlatGL2D::Flag::TextureTransformation|FlatGL2D::Flag::Textured|FlatGL2D::Flag::TextureArrays,
0, 0, false, 1,
/* Some difference at the UV edge (texture is wrapping in the 2D case
while the 2D array has a black area around) */
65.0f, 0.15f}
while the 2D array has a black area around), bit more on llvmpipe */
65.0f, 0.167f},
#endif
};
@ -3099,8 +3099,9 @@ template<FlatGL2D::Flag flag> void FlatGLTest::renderAlpha2D() {
MAGNUM_VERIFY_NO_GL_ERROR();
#if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL))
/* Minor differences between opaque and diffuse, not sure why */
const Float maxThreshold = 24.34f, meanThreshold = 0.305f;
/* Minor differences between opaque and diffuse, not sure why, some more on
llvmpipe */
const Float maxThreshold = 24.34f, meanThreshold = 0.311f;
#else
/* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */
const Float maxThreshold = 31.34f, meanThreshold = 3.945f;

6
src/Magnum/Shaders/Test/LineGLTest.cpp

@ -1259,7 +1259,8 @@ template<LineGL2D::Flag flag> void LineGLTest::renderDefaults2D() {
/* Dropping the alpha channel, as it's always 1.0 */
_framebuffer.read(_framebuffer.viewport(), {PixelFormat::RGBA8Unorm}).pixels<Color4ub>().slice(&Color4ub::rgb),
Utility::Path::join(SHADERS_TEST_DIR, "LineTestFiles/defaults.tga"),
(DebugTools::CompareImageToFile{_manager}));
/* llvmpipe has one pixel different */
(DebugTools::CompareImageToFile{_manager, 238.0f, 0.038f}));
}
template<LineGL3D::Flag flag> void LineGLTest::renderDefaults3D() {
@ -1357,7 +1358,8 @@ template<LineGL3D::Flag flag> void LineGLTest::renderDefaults3D() {
/* Dropping the alpha channel, as it's always 1.0 */
_framebuffer.read(_framebuffer.viewport(), {PixelFormat::RGBA8Unorm}).pixels<Color4ub>().slice(&Color4ub::rgb),
Utility::Path::join(SHADERS_TEST_DIR, "LineTestFiles/defaults.tga"),
(DebugTools::CompareImageToFile{_manager}));
/* llvmpipe has one pixel different */
(DebugTools::CompareImageToFile{_manager, 238.0f, 0.038f}));
}
const Vector2 RenderLineCapsJoins2DLineData[]{

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

@ -1048,8 +1048,8 @@ const struct {
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
{"wireframe", "instanced-wireframe2D.tga",
MeshVisualizerGL2D::Flag::Wireframe,
/* Minor differences on ARM Mali, NVidia */
0.667f, 0.012f},
/* Minor differences on ARM Mali, NVidia, llvmpipe */
0.667f, 0.0191f},
#endif
{"wireframe w/o GS", "instanced-wireframe-nogeo2D.tga",
MeshVisualizerGL2D::Flag::Wireframe|MeshVisualizerGL2D::Flag::NoGeometryShader,
@ -1058,24 +1058,24 @@ const struct {
#ifndef MAGNUM_TARGET_GLES2
{"vertex ID", "instanced-vertexid2D.tga",
MeshVisualizerGL2D::Flag::VertexId,
/* SwiftShader has a few rounding errors on edges */
138.7f, 0.08f},
/* SwiftShader has a few rounding errors on edges, old llvmpipe too */
138.7f, 0.121f},
{"instanced object ID", "instanced-instancedobjectid2D.tga",
MeshVisualizerGL2D::Flag::InstancedObjectId,
/* SwiftShader has a few rounding errors on edges */
133.0f, 0.12f},
{"textured object ID", "instanced-objectidtexture2D.tga",
MeshVisualizerGL2D::Flag::ObjectIdTexture|MeshVisualizerGL2D::Flag::InstancedTextureOffset,
/* SwiftShader has a few rounding errors on edges */
146.7f, 0.097f},
/* SwiftShader has a few rounding errors on edges, old llvmpipe too */
146.7f, 0.138f},
{"instanced textured object ID", "instanced-instancedobjectidtexture2D.tga",
MeshVisualizerGL2D::Flag::InstancedObjectId|MeshVisualizerGL2D::Flag::ObjectIdTexture|MeshVisualizerGL2D::Flag::InstancedTextureOffset,
/* SwiftShader has a few rounding errors on edges */
133.0f, 0.071f},
/* SwiftShader has a few rounding errors on edges, old llvmpipe too */
133.0f, 0.103f},
{"instanced textured array object ID", "instanced-instancedobjectidtexture2D.tga",
MeshVisualizerGL2D::Flag::InstancedObjectId|MeshVisualizerGL2D::Flag::ObjectIdTexture|MeshVisualizerGL2D::Flag::InstancedTextureOffset|MeshVisualizerGL2D::Flag::TextureArrays,
/* SwiftShader has a few rounding errors on edges */
133.0f, 0.071f},
/* SwiftShader has a few rounding errors on edges, old llvmpipe too */
133.0f, 0.103f},
#endif
};
@ -1088,14 +1088,14 @@ const struct {
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
{"wireframe", "instanced-wireframe3D.tga",
MeshVisualizerGL3D::Flag::Wireframe,
/* Minor differences on NVidia */
0.667f, 0.0054f},
/* Minor differences on NVidia, llvmpipe */
0.667f, 0.0079f},
#endif
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
{"wireframe + TBN", "instanced-wireframe-tbn3D.tga",
MeshVisualizerGL3D::Flag::Wireframe|MeshVisualizerGL3D::Flag::TangentDirection|MeshVisualizerGL3D::Flag::BitangentFromTangentDirection|MeshVisualizerGL3D::Flag::NormalDirection,
/* Minor differences on NVidia */
0.667f, 0.0050f},
/* Minor differences on NVidia, llvmpipe */
0.667f, 0.0059f},
#endif
{"wireframe w/o GS", "instanced-wireframe-nogeo3D.tga",
MeshVisualizerGL3D::Flag::Wireframe|MeshVisualizerGL3D::Flag::NoGeometryShader,
@ -1104,24 +1104,24 @@ const struct {
#ifndef MAGNUM_TARGET_GLES2
{"vertex ID", "instanced-vertexid3D.tga",
MeshVisualizerGL3D::Flag::VertexId,
/* SwiftShader has a minor rounding error */
5.667f, 0.034f},
/* SwiftShader has a minor rounding error, old llvmpipe too */
5.667f, 0.067f},
{"instanced object ID", "instanced-instancedobjectid3D.tga",
MeshVisualizerGL3D::Flag::InstancedObjectId,
/* SwiftShader has an off-by-one error on certain colors */
0.334f, 0.042f},
/* SwiftShader has an off-by-one error on some colors, llvmpipe too */
0.667f, 0.059f},
{"textured object ID", "instanced-objectidtexture3D.tga",
MeshVisualizerGL3D::Flag::ObjectIdTexture|MeshVisualizerGL3D::Flag::InstancedTextureOffset,
/* SwiftShader has a few rounding errors on edges */
28.67f, 0.097f},
/* SwiftShader has a few rounding errors on edges, old llvmpipe too */
28.67f, 0.144f},
{"instanced textured object ID", "instanced-instancedobjectidtexture3D.tga",
MeshVisualizerGL3D::Flag::InstancedObjectId|MeshVisualizerGL3D::Flag::ObjectIdTexture|MeshVisualizerGL3D::Flag::InstancedTextureOffset,
/* SwiftShader has a few rounding errors on edges */
32.67f, 0.101f},
/* SwiftShader has a few rounding errors on edges, old llvmpipe too */
33.34f, 0.139f},
{"instanced textured array object ID", "instanced-instancedobjectidtexture3D.tga",
MeshVisualizerGL3D::Flag::InstancedObjectId|MeshVisualizerGL3D::Flag::ObjectIdTexture|MeshVisualizerGL3D::Flag::InstancedTextureOffset|MeshVisualizerGL3D::Flag::TextureArrays,
/* SwiftShader has a few rounding errors on edges */
32.67f, 0.101f},
/* SwiftShader has a few rounding errors on edges, old llvmpipe too */
33.34f, 0.134f},
#endif
};
@ -1145,34 +1145,34 @@ constexpr struct {
{"bind with offset, wireframe w/o GS", "multidraw-wireframe-nogeo2D.tga",
MeshVisualizerGL2D::Flag::Wireframe|MeshVisualizerGL2D::Flag::NoGeometryShader,
1, 1, true, 16,
/* Minor differences on ARM Mali */
0.67f, 0.02f},
/* Minor differences on ARM Mali, llvmpipe */
0.67f, 0.021f},
{"bind with offset, vertex ID", "multidraw-vertexid2D.tga",
MeshVisualizerGL2D::Flag::VertexId,
1, 1, true, 16,
/* Minor differences on ARM Mali */
0.67f, 0.01f},
/* Minor differences on ARM Mali, llvmpipe */
1.0f, 0.106f},
{"bind with offset, instanced object ID", "multidraw-instancedobjectid2D.tga",
MeshVisualizerGL2D::Flag::InstancedObjectId,
1, 1, true, 16,
/* Minor differences on ARM Mali */
0.67f, 0.108f},
/* Minor differences on ARM Mali, llvmpipe */
0.67f, 0.117f},
{"bind with offset, textured object ID", "multidraw-objectidtexture2D.tga",
MeshVisualizerGL2D::Flag::TextureTransformation|MeshVisualizerGL2D::Flag::ObjectIdTexture,
1, 1, true, 16,
/* Minor differences on ARM Mali */
0.67f, 0.073f},
/* Minor differences on ARM Mali, old llvmpipe */
0.67f, 0.074f},
{"bind with offset, textured array object ID", "multidraw-objectidtexture2D.tga",
MeshVisualizerGL2D::Flag::TextureTransformation|MeshVisualizerGL2D::Flag::ObjectIdTexture|MeshVisualizerGL2D::Flag::TextureArrays,
1, 1, true, 16,
/* Minor differences on ARM Mali */
0.67f, 0.073f},
/* Minor differences on ARM Mali, old llvmpipe */
0.67f, 0.074f},
#ifndef MAGNUM_TARGET_WEBGL
{"bind with offset, textured array object ID, shader storage", "multidraw-objectidtexture2D.tga",
MeshVisualizerGL2D::Flag::ShaderStorageBuffers|MeshVisualizerGL2D::Flag::TextureTransformation|MeshVisualizerGL2D::Flag::ObjectIdTexture|MeshVisualizerGL2D::Flag::TextureArrays,
0, 0, true, 16,
/* Minor differences on NVidia */
0.667f, 0.056f},
/* Minor differences on NVidia, llvmpipe */
0.667f, 0.074f},
#endif
#ifndef MAGNUM_TARGET_WEBGL
{"draw offset, wireframe", "multidraw-wireframe2D.tga",
@ -1184,34 +1184,34 @@ constexpr struct {
{"draw offset, wireframe w/o GS", "multidraw-wireframe-nogeo2D.tga",
MeshVisualizerGL2D::Flag::Wireframe|MeshVisualizerGL2D::Flag::NoGeometryShader,
2, 3, false, 1,
/* Minor differences on ARM Mali */
0.67f, 0.02f},
/* Minor differences on ARM Mali, llvmpipe */
0.67f, 0.021f},
{"draw offset, vertex ID", "multidraw-vertexid2D.tga",
MeshVisualizerGL2D::Flag::VertexId,
2, 3, false, 1,
/* Minor differences on ARM Mali */
0.67f, 0.01f},
/* Minor differences on ARM Mali, llvmpipe */
1.0f, 0.106f},
{"draw offset, instanced object ID", "multidraw-instancedobjectid2D.tga",
MeshVisualizerGL2D::Flag::InstancedObjectId,
2, 3, false, 1,
/* Minor differences on ARM Mali */
0.67f, 0.108f},
/* Minor differences on ARM Mali, llvmpipe */
0.67f, 0.117f},
{"draw offset, textured object ID", "multidraw-objectidtexture2D.tga",
MeshVisualizerGL2D::Flag::TextureTransformation|MeshVisualizerGL2D::Flag::ObjectIdTexture,
2, 3, false, 1,
/* Minor differences on ARM Mali */
0.67f, 0.073f},
/* Minor differences on ARM Mali, old llvmpipe */
0.67f, 0.074f},
{"draw offset, textured array object ID", "multidraw-objectidtexture2D.tga",
MeshVisualizerGL2D::Flag::TextureTransformation|MeshVisualizerGL2D::Flag::ObjectIdTexture|MeshVisualizerGL2D::Flag::TextureArrays,
2, 3, false, 1,
/* Minor differences on ARM Mali */
0.67f, 0.073f},
/* Minor differences on ARM Mali, old llvmpipe */
0.67f, 0.074f},
#ifndef MAGNUM_TARGET_WEBGL
{"draw offset, textured array object ID, shader storage", "multidraw-objectidtexture2D.tga",
MeshVisualizerGL2D::Flag::ShaderStorageBuffers|MeshVisualizerGL2D::Flag::TextureTransformation|MeshVisualizerGL2D::Flag::ObjectIdTexture|MeshVisualizerGL2D::Flag::TextureArrays,
0, 0, false, 1,
/* Minor differences on NVidia */
0.667f, 0.056f},
/* Minor differences on NVidia, llvmpipe */
0.667f, 0.074f},
#endif
#ifndef MAGNUM_TARGET_WEBGL
{"multidraw, wireframe", "multidraw-wireframe2D.tga",
@ -1223,30 +1223,34 @@ constexpr struct {
{"multidraw, wireframe w/o GS", "multidraw-wireframe-nogeo2D.tga",
MeshVisualizerGL2D::Flag::MultiDraw|MeshVisualizerGL2D::Flag::Wireframe|MeshVisualizerGL2D::Flag::NoGeometryShader,
2, 3, false, 1,
/* Minor differences on ARM Mali */
0.67f, 0.02f},
/* Minor differences on ARM Mali, llvmpipe */
0.67f, 0.021f},
{"multidraw, vertex ID", "multidraw-vertexid2D.tga",
MeshVisualizerGL2D::Flag::MultiDraw|MeshVisualizerGL2D::Flag::VertexId,
2, 3, false, 1,
/* Minor differences on ARM Mali */
0.67f, 0.01f},
/* Minor differences on ARM Mali, llvmpipe */
1.0f, 0.106f},
{"multidraw, instanced object ID", "multidraw-instancedobjectid2D.tga",
MeshVisualizerGL2D::Flag::MultiDraw|MeshVisualizerGL2D::Flag::InstancedObjectId,
2, 3, false, 1,
0.0f, 0.0f},
/* Minor differences on llvmpipe */
0.67f, 0.117f},
{"multidraw, textured object ID", "multidraw-objectidtexture2D.tga",
MeshVisualizerGL2D::Flag::MultiDraw|MeshVisualizerGL2D::Flag::TextureTransformation|MeshVisualizerGL2D::Flag::ObjectIdTexture,
2, 3, false, 1,
0.0f, 0.0f},
/* Minor differences on llvmpipe */
0.67f, 0.074f},
{"multidraw, textured array object ID", "multidraw-objectidtexture2D.tga",
MeshVisualizerGL2D::Flag::MultiDraw|MeshVisualizerGL2D::Flag::TextureTransformation|MeshVisualizerGL2D::Flag::ObjectIdTexture|MeshVisualizerGL2D::Flag::TextureArrays,
2, 3, false, 1,
0.0f, 0.0f},
/* Minor differences on llvmpipe */
0.67f, 0.074f},
#ifndef MAGNUM_TARGET_WEBGL
{"multidraw, textured array object ID, shader storage", "multidraw-objectidtexture2D.tga",
MeshVisualizerGL2D::Flag::ShaderStorageBuffers|MeshVisualizerGL2D::Flag::MultiDraw|MeshVisualizerGL2D::Flag::TextureTransformation|MeshVisualizerGL2D::Flag::ObjectIdTexture|MeshVisualizerGL2D::Flag::TextureArrays,
0, 0, false, 1,
0.0f, 0.0f},
/* Minor differences on NVidia, llvmpipe */
0.667f, 0.074f},
#endif
};
@ -1263,13 +1267,13 @@ constexpr struct {
{"bind with offset, wireframe", "multidraw-wireframe3D.tga",
MeshVisualizerGL3D::Flag::Wireframe,
1, 1, true, 16,
/* Minor differences on NVidia */
0.667f, 0.0055f},
/* Minor differences on NVidia, llvmpipe */
0.667f, 0.0099f},
{"bind with offset, wireframe + TBN", "multidraw-wireframe-tbn3D.tga",
MeshVisualizerGL3D::Flag::Wireframe|MeshVisualizerGL3D::Flag::TangentDirection|MeshVisualizerGL3D::Flag::BitangentFromTangentDirection|MeshVisualizerGL3D::Flag::NormalDirection,
1, 1, true, 16,
/* Minor differences on NVidia */
0.667f, 0.0054f},
/* Minor differences on NVidia, llvmpipe */
0.667f, 0.0097f},
#endif
{"bind with offset, wireframe w/o GS", "multidraw-wireframe-nogeo3D.tga",
MeshVisualizerGL3D::Flag::Wireframe|MeshVisualizerGL3D::Flag::NoGeometryShader,
@ -1279,38 +1283,41 @@ constexpr struct {
{"bind with offset, vertex ID", "multidraw-vertexid3D.tga",
MeshVisualizerGL3D::Flag::VertexId,
1, 1, true, 16,
/* Minor differences on ARM Mali */
0.67f, 0.01f},
/* Minor differences on ARM Mali, llvmpipe */
1.0f, 0.091f},
{"bind with offset, instanced object ID", "multidraw-instancedobjectid3D.tga",
MeshVisualizerGL3D::Flag::InstancedObjectId,
1, 1, true, 16,
/* Minor differences on ARM Mali */
0.34f, 0.007f},
/* Minor differences on ARM Mali, old llvmpipe */
0.67f, 0.103f},
{"bind with offset, textured object ID", "multidraw-objectidtexture3D.tga",
MeshVisualizerGL3D::Flag::TextureTransformation|MeshVisualizerGL3D::Flag::ObjectIdTexture,
1, 1, true, 16,
0.0f, 0.0f},
/* Minor differences on old llvmpipe */
0.67f, 0.105f},
{"bind with offset, textured array object ID", "multidraw-objectidtexture3D.tga",
MeshVisualizerGL3D::Flag::TextureTransformation|MeshVisualizerGL3D::Flag::ObjectIdTexture|MeshVisualizerGL3D::Flag::TextureArrays,
1, 1, true, 16,
0.0f, 0.0f},
/* Minor differences on old llvmpipe */
0.67f, 0.105f},
#ifndef MAGNUM_TARGET_WEBGL
{"bind with offset, textured array object ID, shader storage", "multidraw-objectidtexture3D.tga",
MeshVisualizerGL3D::Flag::ShaderStorageBuffers|MeshVisualizerGL3D::Flag::TextureTransformation|MeshVisualizerGL3D::Flag::ObjectIdTexture|MeshVisualizerGL3D::Flag::TextureArrays,
0, 0, true, 16,
0.0f, 0.0f},
/* Minor differences on llvmpipe */
0.67f, 0.105f},
#endif
#ifndef MAGNUM_TARGET_WEBGL
{"draw offset, wireframe", "multidraw-wireframe3D.tga",
MeshVisualizerGL3D::Flag::Wireframe,
2, 3, false, 1,
/* Minor differences on NVidia */
0.667f, 0.0055f},
/* Minor differences on NVidia, llvmpipe */
0.667f, 0.0099f},
{"draw offset, wireframe + TBN", "multidraw-wireframe-tbn3D.tga",
MeshVisualizerGL3D::Flag::Wireframe|MeshVisualizerGL3D::Flag::TangentDirection|MeshVisualizerGL3D::Flag::BitangentFromTangentDirection|MeshVisualizerGL3D::Flag::NormalDirection,
2, 3, false, 1,
/* Minor differences on NVidia */
0.667f, 0.0054f},
/* Minor differences on NVidia, llvmpipe */
0.667f, 0.0097f},
#endif
{"draw offset, wireframe w/o GS", "multidraw-wireframe-nogeo3D.tga",
MeshVisualizerGL3D::Flag::Wireframe|MeshVisualizerGL3D::Flag::NoGeometryShader,
@ -1320,66 +1327,73 @@ constexpr struct {
{"draw offset, vertex ID", "multidraw-vertexid3D.tga",
MeshVisualizerGL3D::Flag::VertexId,
2, 3, false, 1,
/* Minor differences on ARM Mali */
0.67f, 0.01f},
/* Minor differences on ARM Mali, llvmpipe */
1.0f, 0.091f},
{"draw offset, instanced object ID", "multidraw-instancedobjectid3D.tga",
MeshVisualizerGL3D::Flag::InstancedObjectId,
2, 3, false, 1,
/* Minor differences on ARM Mali */
0.34f, 0.007f},
/* Minor differences on ARM Mali, old llvmpipe */
0.67f, 0.103f},
{"draw offset, textured object ID", "multidraw-objectidtexture3D.tga",
MeshVisualizerGL3D::Flag::TextureTransformation|MeshVisualizerGL3D::Flag::ObjectIdTexture,
2, 3, false, 1,
0.0f, 0.0f},
/* Minor differences on old llvmpipe */
0.67f, 0.105f},
{"draw offset, textured array object ID", "multidraw-objectidtexture3D.tga",
MeshVisualizerGL3D::Flag::TextureTransformation|MeshVisualizerGL3D::Flag::ObjectIdTexture|MeshVisualizerGL3D::Flag::TextureArrays,
2, 3, false, 1,
0.0f, 0.0f},
/* Minor differences on old llvmpipe */
0.67f, 0.105f},
#ifndef MAGNUM_TARGET_WEBGL
{"draw offset, textured array object ID, shader storage", "multidraw-objectidtexture3D.tga",
MeshVisualizerGL3D::Flag::ShaderStorageBuffers|MeshVisualizerGL3D::Flag::TextureTransformation|MeshVisualizerGL3D::Flag::ObjectIdTexture|MeshVisualizerGL3D::Flag::TextureArrays,
0, 0, false, 1,
0.0f, 0.0f},
/* Minor differences on llvmpipe */
0.67f, 0.105f},
#endif
#ifndef MAGNUM_TARGET_WEBGL
{"multidraw, wireframe", "multidraw-wireframe3D.tga",
MeshVisualizerGL3D::Flag::MultiDraw|MeshVisualizerGL3D::Flag::Wireframe,
2, 3, false, 1,
/* Minor differences on NVidia */
0.667f, 0.003f},
/* Minor differences on NVidia, llvmpipe */
0.667f, 0.0099f},
{"multidraw, wireframe + TBN", "multidraw-wireframe-tbn3D.tga",
MeshVisualizerGL3D::Flag::MultiDraw|MeshVisualizerGL3D::Flag::Wireframe|MeshVisualizerGL3D::Flag::TangentDirection|MeshVisualizerGL3D::Flag::BitangentFromTangentDirection|MeshVisualizerGL3D::Flag::NormalDirection,
2, 3, false, 1,
/* Minor differences on NVidia */
0.667f, 0.003f},
/* Minor differences on NVidia, llvmpipe */
0.667f, 0.0097f},
#endif
{"multidraw, wireframe w/o GS", "multidraw-wireframe-nogeo3D.tga",
MeshVisualizerGL3D::Flag::MultiDraw|MeshVisualizerGL3D::Flag::Wireframe|MeshVisualizerGL3D::Flag::NoGeometryShader,
2, 3, false, 1,
/* Minor differences on ARM Mali, NVidia */
11.34f, 0.066f},
11.34f, 0.068f},
{"multidraw, vertex ID", "multidraw-vertexid3D.tga",
MeshVisualizerGL3D::Flag::MultiDraw|MeshVisualizerGL3D::Flag::VertexId,
2, 3, false, 1,
/* Minor differences on ARM Mali */
0.67f, 0.01f},
/* Minor differences on ARM Mali, llvmpipe */
1.0f, 0.091f},
{"multidraw, instanced object ID", "multidraw-instancedobjectid3D.tga",
MeshVisualizerGL3D::Flag::MultiDraw|MeshVisualizerGL3D::Flag::InstancedObjectId,
2, 3, false, 1,
0.0f, 0.0f},
/* Minor differences on ARM Mali, old llvmpipe */
0.67f, 0.103f},
{"multidraw, textured object ID", "multidraw-objectidtexture3D.tga",
MeshVisualizerGL3D::Flag::MultiDraw|MeshVisualizerGL3D::Flag::TextureTransformation|MeshVisualizerGL3D::Flag::ObjectIdTexture,
2, 3, false, 1,
0.0f, 0.0f},
/* Minor differences on old llvmpipe */
0.67f, 0.105f},
{"multidraw, textured array object ID", "multidraw-objectidtexture3D.tga",
MeshVisualizerGL3D::Flag::MultiDraw|MeshVisualizerGL3D::Flag::TextureTransformation|MeshVisualizerGL3D::Flag::ObjectIdTexture|MeshVisualizerGL3D::Flag::TextureArrays,
2, 3, false, 1,
0.0f, 0.0f},
/* Minor differences on old llvmpipe */
0.67f, 0.105f},
#ifndef MAGNUM_TARGET_WEBGL
{"multidraw, textured array object ID, shader storage", "multidraw-objectidtexture3D.tga",
MeshVisualizerGL3D::Flag::ShaderStorageBuffers|MeshVisualizerGL3D::Flag::MultiDraw|MeshVisualizerGL3D::Flag::TextureTransformation|MeshVisualizerGL3D::Flag::ObjectIdTexture|MeshVisualizerGL3D::Flag::TextureArrays,
0, 0, false, 1,
0.0f, 0.0f},
/* Minor differences on llvmpipe */
0.67f, 0.105f},
#endif
};
@ -3866,8 +3880,8 @@ template<MeshVisualizerGL2D::Flag flag> void MeshVisualizerGLTest::renderDefault
/* Dropping the alpha channel, as it's always 1.0 */
_framebuffer.read(_framebuffer.viewport(), {PixelFormat::RGBA8Unorm}).pixels<Color4ub>().slice(&Color4ub::rgb),
Utility::Path::join(_testDir, "MeshVisualizerTestFiles/defaults-vertexid2D.tga"),
/* Minor differences on NVidia */
(DebugTools::CompareImageToFile{_manager, 1.0f, 0.022f}));
/* Minor differences on NVidia, old llvmpipe */
(DebugTools::CompareImageToFile{_manager, 1.0f, 0.380f}));
}
template<MeshVisualizerGL3D::Flag flag> void MeshVisualizerGLTest::renderDefaultsVertexId3D() {
@ -3945,8 +3959,8 @@ template<MeshVisualizerGL3D::Flag flag> void MeshVisualizerGLTest::renderDefault
/* Dropping the alpha channel, as it's always 1.0 */
_framebuffer.read(_framebuffer.viewport(), {PixelFormat::RGBA8Unorm}).pixels<Color4ub>().slice(&Color4ub::rgb),
Utility::Path::join(_testDir, "MeshVisualizerTestFiles/defaults-vertexid3D.tga"),
/* Minor differences on NVidia */
(DebugTools::CompareImageToFile{_manager, 1.0f, 0.018f}));
/* Minor differences on NVidia, old llvmpipe */
(DebugTools::CompareImageToFile{_manager, 1.0f, 0.291f}));
}
template<MeshVisualizerGL2D::Flag flag> void MeshVisualizerGLTest::renderDefaultsPrimitiveId2D() {
@ -4782,9 +4796,9 @@ template<MeshVisualizerGL2D::Flag flag> void MeshVisualizerGLTest::renderObjectV
/* Dropping the alpha channel, as it's always 1.0 */
_framebuffer.read(_framebuffer.viewport(), {PixelFormat::RGBA8Unorm}).pixels<Color4ub>().slice(&Color4ub::rgb),
Utility::Path::join({_testDir, "MeshVisualizerTestFiles", data.file2D}),
/* AMD has slight off-by-one errors compared to Intel, SwiftShader a
bit more */
(DebugTools::CompareImageToFile{_manager, 4.67f, 0.141f}));
/* AMD has slight off-by-one errors compared to Intel, llvmpipe also,
SwiftShader a bit more */
(DebugTools::CompareImageToFile{_manager, 4.67f, 0.205f}));
}
template<MeshVisualizerGL3D::Flag flag> void MeshVisualizerGLTest::renderObjectVertexPrimitiveId3D() {
@ -5005,7 +5019,7 @@ template<MeshVisualizerGL3D::Flag flag> void MeshVisualizerGLTest::renderObjectV
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;
Float maxThreshold = 138.4f, meanThreshold = 0.284f;
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
if(data.flags3D & MeshVisualizerGL3D::Flag::Wireframe && !GL::Context::current().isExtensionSupported<GL::Extensions::NV::shader_noperspective_interpolation>()) {
/* SwiftShader has a bit more rounding errors */
@ -5258,10 +5272,10 @@ template<MeshVisualizerGL3D::Flag flag> void MeshVisualizerGLTest::renderTangent
!(_manager.loadState("TgaImporter") & PluginManager::LoadState::Loaded))
CORRADE_SKIP("AnyImageImporter / TgaImporter plugins not found.");
/* Slight rasterization differences on AMD. If
/* Slight rasterization differences on AMD and old llvmpipe. If
GL_NV_shader_noperspective_interpolation is not supported, the artifacts
are bigger. */
Float maxThreshold = 1.334f, meanThreshold = 0.018f;
Float maxThreshold = 1.334f, meanThreshold = 0.077f;
#ifdef MAGNUM_TARGET_GLES
if(!GL::Context::current().isExtensionSupported<GL::Extensions::NV::shader_noperspective_interpolation>()) {
maxThreshold = 58.0f;

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

@ -1086,7 +1086,7 @@ constexpr struct {
2, 2, 1, 1, true, 16,
/* Some difference at the UV edge (texture is wrapping in the 2D case
while the 2D array has a black area around) */
50.34f, 0.146f},
50.67f, 0.146f},
#ifndef MAGNUM_TARGET_WEBGL
{"bind with offset, texture array, shader storage",
"multidraw-textured.tga", {},
@ -1094,7 +1094,7 @@ constexpr struct {
0, 2, 0, 0, true, 16,
/* Some difference at the UV edge (texture is wrapping in the 2D case
while the 2D array has a black area around) */
50.34f, 0.146f},
50.67f, 0.146f},
#endif
{"draw offset, colored",
"multidraw.tga", {},
@ -1138,7 +1138,7 @@ constexpr struct {
4, 4, 2, 3, false, 1,
/* Some difference at the UV edge (texture is wrapping in the 2D case
while the 2D array has a black area around) */
50.34f, 0.146f},
50.67f, 0.146f},
#ifndef MAGNUM_TARGET_WEBGL
{"draw offset, texture array, shader storage",
"multidraw-textured.tga", {},
@ -1146,7 +1146,7 @@ constexpr struct {
0, 2, 0, 0, false, 1,
/* Some difference at the UV edge (texture is wrapping in the 2D case
while the 2D array has a black area around) */
50.34f, 0.146f},
50.67f, 0.146f},
#endif
{"multidraw, colored",
"multidraw.tga", {},
@ -1190,7 +1190,7 @@ constexpr struct {
4, 4, 2, 3, false, 1,
/* Some difference at the UV edge (texture is wrapping in the 2D case
while the 2D array has a black area around) */
50.34f, 0.141f},
50.67f, 0.146f},
#ifndef MAGNUM_TARGET_WEBGL
{"multidraw, texture array, shader storage",
"multidraw-textured.tga", {},
@ -1198,7 +1198,7 @@ constexpr struct {
0, 4, 0, 0, false, 1,
/* Some difference at the UV edge (texture is wrapping in the 2D case
while the 2D array has a black area around) */
50.34f, 0.141f},
50.67f, 0.146f},
#endif
/** @todo test normal and per-draw scaling when there's usable texture */
};
@ -3228,8 +3228,9 @@ template<PhongGL::Flag flag> void PhongGLTest::renderTexturedNormal() {
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. Apple A8 has a slightly larger
overall difference; llvmpipe is off also. */
const Float maxThreshold = 191.0f, meanThreshold = 0.918f;
overall difference; llvmpipe is off also, older versions more for
left-handed (lol?). */
const Float maxThreshold = 191.0f, meanThreshold = 1.035f;
#else
/* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */
const Float maxThreshold = 191.0f, meanThreshold = 3.017f;
@ -3727,8 +3728,8 @@ template<PhongGL::Flag flag> void PhongGLTest::renderAlpha() {
/* 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, Apple A8 a bit
more. */
const Float maxThreshold = 189.4f, meanThreshold = 0.385f;
more. Old llvmpipe also. */
const Float maxThreshold = 189.4f, meanThreshold = 0.485f;
#else
/* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */
const Float maxThreshold = 189.4f, meanThreshold = 4.736f;

Loading…
Cancel
Save