From 5f8c32f05d06fc90423a4635b97bf923d6ad5e3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 2 Jan 2016 01:49:57 +0100 Subject: [PATCH] Expect failure on NVidia with array/cubemap compressed pixel storages. I'm tired of these. Finally all pixel storage tests are working again. --- src/Magnum/Test/CubeMapTextureArrayGLTest.cpp | 12 +++++++++--- src/Magnum/Test/CubeMapTextureGLTest.cpp | 12 +++++++++--- src/Magnum/Test/TextureArrayGLTest.cpp | 18 +++++++++++++++--- 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/src/Magnum/Test/CubeMapTextureArrayGLTest.cpp b/src/Magnum/Test/CubeMapTextureArrayGLTest.cpp index 6dc471bb4..e97073d02 100644 --- a/src/Magnum/Test/CubeMapTextureArrayGLTest.cpp +++ b/src/Magnum/Test/CubeMapTextureArrayGLTest.cpp @@ -741,9 +741,15 @@ void CubeMapTextureArrayGLTest::compressedSubImage() { MAGNUM_VERIFY_NO_ERROR(); CORRADE_COMPARE(image.size(), (Vector3i{12, 12, 6})); - CORRADE_COMPARE_AS( - (Containers::ArrayView{image.data(), image.data().size()}), - Containers::ArrayView{CompressedSubDataComplete}, TestSuite::Compare::Container); + + { + CORRADE_EXPECT_FAIL_IF(Context::current()->isExtensionSupported() && (Context::current()->detectedDriver() & Context::DetectedDriver::NVidia), + "Non-default compressed pixel storage for cube map textures behaves weirdly on NVidia for client-memory images"); + + CORRADE_COMPARE_AS( + (Containers::ArrayView{image.data(), image.data().size()}), + Containers::ArrayView{CompressedSubDataComplete}, TestSuite::Compare::Container); + } #endif } diff --git a/src/Magnum/Test/CubeMapTextureGLTest.cpp b/src/Magnum/Test/CubeMapTextureGLTest.cpp index 06c22c6cd..324f81a57 100644 --- a/src/Magnum/Test/CubeMapTextureGLTest.cpp +++ b/src/Magnum/Test/CubeMapTextureGLTest.cpp @@ -879,9 +879,15 @@ void CubeMapTextureGLTest::compressedSubImage() { MAGNUM_VERIFY_NO_ERROR(); CORRADE_COMPARE(image.size(), Vector2i{12}); - CORRADE_COMPARE_AS( - (Containers::ArrayView{image.data(), image.data().size()}), - Containers::ArrayView{CompressedSubDataComplete}, TestSuite::Compare::Container); + + { + CORRADE_EXPECT_FAIL_IF(Context::current()->isExtensionSupported() && (Context::current()->detectedDriver() & Context::DetectedDriver::NVidia), + "Non-default compressed pixel storage for cube map textures behaves weirdly on NVidia for client-memory images"); + + CORRADE_COMPARE_AS( + (Containers::ArrayView{image.data(), image.data().size()}), + Containers::ArrayView{CompressedSubDataComplete}, TestSuite::Compare::Container); + } #endif } diff --git a/src/Magnum/Test/TextureArrayGLTest.cpp b/src/Magnum/Test/TextureArrayGLTest.cpp index 5e32ca8a9..ad79e364f 100644 --- a/src/Magnum/Test/TextureArrayGLTest.cpp +++ b/src/Magnum/Test/TextureArrayGLTest.cpp @@ -1129,8 +1129,14 @@ void TextureArrayGLTest::compressedSubImage2D() { MAGNUM_VERIFY_NO_ERROR(); CORRADE_COMPARE(image.size(), (Vector3i{12, 4, 4})); - CORRADE_COMPARE_AS( - Containers::ArrayView(image.data(), image.data().size()), Containers::ArrayView{CompressedSubData2DComplete}, TestSuite::Compare::Container); + + { + CORRADE_EXPECT_FAIL_IF(Context::current()->isExtensionSupported() && (Context::current()->detectedDriver() & Context::DetectedDriver::NVidia), + "Non-default compressed pixel storage for array textures behaves weirdly on NVidia"); + + CORRADE_COMPARE_AS( + Containers::ArrayView(image.data(), image.data().size()), Containers::ArrayView{CompressedSubData2DComplete}, TestSuite::Compare::Container); + } #endif } @@ -1213,7 +1219,13 @@ void TextureArrayGLTest::compressedSubImage2DBuffer() { MAGNUM_VERIFY_NO_ERROR(); CORRADE_COMPARE(image.size(), (Vector3i{12, 4, 4})); - CORRADE_COMPARE_AS(imageData, Containers::ArrayView{CompressedSubData2DComplete}, TestSuite::Compare::Container); + + { + CORRADE_EXPECT_FAIL_IF(Context::current()->isExtensionSupported() && (Context::current()->detectedDriver() & Context::DetectedDriver::NVidia), + "Non-default compressed pixel storage for array textures behaves weirdly on NVidia"); + + CORRADE_COMPARE_AS(imageData, Containers::ArrayView{CompressedSubData2DComplete}, TestSuite::Compare::Container); + } #endif }