From c9937f73a0388d93dce59442f0e2f718a828aa22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 1 Mar 2019 23:02:42 +0100 Subject: [PATCH] GL: disable indexed Mesh tests on drivers w/o indexed extensions. --- src/Magnum/GL/Test/MeshGLTest.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/Magnum/GL/Test/MeshGLTest.cpp b/src/Magnum/GL/Test/MeshGLTest.cpp index 83db1db3d..4e390eec7 100644 --- a/src/Magnum/GL/Test/MeshGLTest.cpp +++ b/src/Magnum/GL/Test/MeshGLTest.cpp @@ -1715,6 +1715,21 @@ void MeshGLTest::addVertexBufferTransferOwnwership() { } void MeshGLTest::addVertexBufferInstancedTransferOwnwership() { + #ifndef MAGNUM_TARGET_GLES + if(!Context::current().isExtensionSupported()) + CORRADE_SKIP(Extensions::ARB::draw_instanced::string() + std::string(" is not available.")); + #elif defined(MAGNUM_TARGET_GLES2) + #ifndef MAGNUM_TARGET_WEBGL + if(!Context::current().isExtensionSupported() && + !Context::current().isExtensionSupported() && + !Context::current().isExtensionSupported()) + CORRADE_SKIP("Required extension is not available."); + #else + if(!Context::current().isExtensionSupported()) + CORRADE_SKIP(Extensions::ANGLE::instanced_arrays::string() + std::string(" is not available.")); + #endif + #endif + const Float data = 1.0f; Buffer buffer; buffer.setData({&data, 1}, BufferUsage::StaticDraw); @@ -1775,6 +1790,21 @@ void MeshGLTest::addVertexBufferDynamicTransferOwnwership() { } void MeshGLTest::addVertexBufferInstancedDynamicTransferOwnwership() { + #ifndef MAGNUM_TARGET_GLES + if(!Context::current().isExtensionSupported()) + CORRADE_SKIP(Extensions::ARB::draw_instanced::string() + std::string(" is not available.")); + #elif defined(MAGNUM_TARGET_GLES2) + #ifndef MAGNUM_TARGET_WEBGL + if(!Context::current().isExtensionSupported() && + !Context::current().isExtensionSupported() && + !Context::current().isExtensionSupported()) + CORRADE_SKIP("Required extension is not available."); + #else + if(!Context::current().isExtensionSupported()) + CORRADE_SKIP(Extensions::ANGLE::instanced_arrays::string() + std::string(" is not available.")); + #endif + #endif + const Float data = 1.0f; Buffer buffer; buffer.setData({&data, 1}, BufferUsage::StaticDraw);