From d7b0f3f4eade2475ce5be1138b4c0e6855896cbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 11 Apr 2017 23:43:46 +0200 Subject: [PATCH] Test: expect failure in CubeMapTexture::invalidateSubImage() on Mesa. It's been like this for some time and I don't see any obvious workaround to it except to invalidating the whole texture. --- src/Magnum/Test/CubeMapTextureGLTest.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Magnum/Test/CubeMapTextureGLTest.cpp b/src/Magnum/Test/CubeMapTextureGLTest.cpp index 5a2d0496c..b1ee025c7 100644 --- a/src/Magnum/Test/CubeMapTextureGLTest.cpp +++ b/src/Magnum/Test/CubeMapTextureGLTest.cpp @@ -1173,7 +1173,16 @@ void CubeMapTextureGLTest::invalidateSubImage() { texture.setStorage(2, TextureFormat::RGBA8, Vector2i(32)); texture.invalidateSubImage(1, Vector3i(2), Vector3i(Vector2i(8), 4)); - MAGNUM_VERIFY_NO_ERROR(); + { + /* Mesa (last checked version 12.0.6) treats cube map images as having + only single layer instead of 6, so the above invalidation call + fails. Relevant source code (scroll up to see imageDepth = 1): + https://github.com/anholt/mesa/blob/1c0ac1976ac7a87bfd2ade47f25047c31527f18a/src/mesa/main/texobj.c#L2179 */ + CORRADE_EXPECT_FAIL_IF((Context::current().detectedDriver() & Context::DetectedDriver::Mesa), + "Broken on Mesa."); + + MAGNUM_VERIFY_NO_ERROR(); + } } }}