Browse Source

Shaders,TextureTools: XFAIL tests that hit weird bugs on SwiftShader 4.0.

No patience to investigate.
pull/539/head
Vladimír Vondruš 4 years ago
parent
commit
361d87cd9e
  1. 14
      src/Magnum/Shaders/Test/PhongGLTest.cpp
  2. 21
      src/Magnum/TextureTools/Test/DistanceFieldGLTest.cpp

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

@ -392,6 +392,7 @@ constexpr struct {
};
#endif
using namespace Containers::Literals;
using namespace Math::Literals;
const struct {
@ -3250,7 +3251,18 @@ void PhongGLTest::renderLightsSetOneByOne() {
.setProjectionMatrix(Matrix4::perspectiveProjection(80.0_degf, 1.0f, 0.1f, 20.0f))
.draw(plane);
MAGNUM_VERIFY_NO_GL_ERROR();
#ifdef MAGNUM_TARGET_GLES
{
/* The setLightPosition(1) is the first call that causes the error.
Works with 4.1, didn't find any commit in between that would clearly
affect this. */
CORRADE_EXPECT_FAIL_IF(GL::Context::current().versionString().contains("SwiftShader 4.0.0"_s),
"SwiftShader 4.0.0 has a bug where setting array uniform elements other than 0 causes GL_INVALID_OPERATION.");
MAGNUM_VERIFY_NO_GL_ERROR();
if(GL::Context::current().versionString().contains("SwiftShader 4.0.0"_s))
CORRADE_SKIP("Skipping the rest of the test.");
}
#endif
const Image2D image = _framebuffer.read(_framebuffer.viewport(), {PixelFormat::RGBA8Unorm});

21
src/Magnum/TextureTools/Test/DistanceFieldGLTest.cpp

@ -49,6 +49,10 @@
#include "configure.h"
#ifdef MAGNUM_TARGET_GLES
#include <Corrade/Containers/StringView.h> /* for SwiftShader detection */
#endif
namespace Magnum { namespace TextureTools { namespace Test { namespace {
struct DistanceFieldGLTest: GL::OpenGLTester {
@ -64,6 +68,10 @@ struct DistanceFieldGLTest: GL::OpenGLTester {
std::string _testDir;
};
#ifdef MAGNUM_TARGET_GLES
using namespace Containers::Literals; /* for SwiftShader detection */
#endif
DistanceFieldGLTest::DistanceFieldGLTest() {
addTests({&DistanceFieldGLTest::test});
@ -162,7 +170,18 @@ void DistanceFieldGLTest::test() {
#endif
);
MAGNUM_VERIFY_NO_GL_ERROR();
#ifdef MAGNUM_TARGET_GLES
{
/* Probably due to the luminance target pixel format? Works with 4.1,
didn't find any commit in between that would clearly affect
this. */
CORRADE_EXPECT_FAIL_IF(GL::Context::current().versionString().contains("SwiftShader 4.0.0"_s),
"SwiftShader 4.0.0 has a bug where the framebuffer is considered incomplete.");
MAGNUM_VERIFY_NO_GL_ERROR();
if(GL::Context::current().versionString().contains("SwiftShader 4.0.0"_s))
CORRADE_SKIP("Skipping the rest of the test.");
}
#endif
Containers::Optional<Image2D> actualOutputImage;
#ifndef MAGNUM_TARGET_GLES2

Loading…
Cancel
Save