From aa13d08bac77b6f7fa7256befa27114ab7d2d688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 10 Sep 2020 13:21:46 +0200 Subject: [PATCH] GL: newer SwiftShader implements NV_read_stencil, but it's broken. XFAIl on that. --- src/Magnum/GL/Test/FramebufferGLTest.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Magnum/GL/Test/FramebufferGLTest.cpp b/src/Magnum/GL/Test/FramebufferGLTest.cpp index f5b9c1319..140e81eff 100644 --- a/src/Magnum/GL/Test/FramebufferGLTest.cpp +++ b/src/Magnum/GL/Test/FramebufferGLTest.cpp @@ -1304,6 +1304,14 @@ void FramebufferGLTest::clearStencil() { Image2D stencilImage = framebuffer.read({{}, Vector2i{1}}, {PixelFormat::StencilIndex, PixelType::UnsignedByte}); MAGNUM_VERIFY_NO_GL_ERROR(); + + #ifdef MAGNUM_TARGET_GLES + /* If you're bored -- here's the code in question, I have no idea where + to look for the error: https://github.com/google/swiftshader/commit/d1ed57e6942ec88e2c925d602b3830c7dc3bf213 */ + CORRADE_EXPECT_FAIL_IF(Context::current().detectedDriver() & Context::DetectedDriver::SwiftShader, + "SwiftShader has buggy NV_read_stencil."); + #endif + CORRADE_COMPARE(Containers::arrayCast(stencilImage.data())[0], 67); } #endif @@ -1515,6 +1523,14 @@ void FramebufferGLTest::read() { Image2D stencilImage = framebuffer.read({{}, Vector2i{1}}, {PixelFormat::StencilIndex, PixelType::UnsignedByte}); MAGNUM_VERIFY_NO_GL_ERROR(); + + #ifdef MAGNUM_TARGET_GLES + /* If you're bored -- here's the code in question, I have no idea where + to look for the error: https://github.com/google/swiftshader/commit/d1ed57e6942ec88e2c925d602b3830c7dc3bf213 */ + CORRADE_EXPECT_FAIL_IF(Context::current().detectedDriver() & Context::DetectedDriver::SwiftShader, + "SwiftShader has buggy NV_read_stencil."); + #endif + CORRADE_COMPARE(Containers::arrayCast(stencilImage.data())[0], 67); }