Browse Source

Test: don't even try if there are not enough XFB streams available.

Fixes unnecessary test failure on soft Mesa.
pull/203/merge
Vladimír Vondruš 9 years ago
parent
commit
96fa501f0b
  1. 8
      src/Magnum/Test/TransformFeedbackGLTest.cpp

8
src/Magnum/Test/TransformFeedbackGLTest.cpp

@ -551,16 +551,16 @@ void TransformFeedbackGLTest::interleaved() {
}
void TransformFeedbackGLTest::draw() {
setTestCaseDescription(DrawData[testCaseInstanceId()].name);
/* ARB_transform_feedback2 needed as base, other optional */
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::transform_feedback2>())
CORRADE_SKIP(Extensions::GL::ARB::transform_feedback2::string() + std::string(" is not supported."));
if(DrawData[testCaseInstanceId()].stream && !Context::current().isExtensionSupported<Extensions::GL::ARB::transform_feedback3>())
CORRADE_SKIP(Extensions::GL::ARB::transform_feedback3::string() + std::string(" is not supported."));
if(DrawData[testCaseInstanceId()].stream && (!Context::current().isExtensionSupported<Extensions::GL::ARB::transform_feedback3>() || TransformFeedback::maxVertexStreams() < 2))
CORRADE_SKIP(Extensions::GL::ARB::transform_feedback3::string() + std::string(" is not supported well enough."));
if(DrawData[testCaseInstanceId()].instances && !Context::current().isExtensionSupported<Extensions::GL::ARB::transform_feedback_instanced>())
CORRADE_SKIP(Extensions::GL::ARB::transform_feedback_instanced::string() + std::string(" is not supported."));
setTestCaseDescription(DrawData[testCaseInstanceId()].name);
/* Bind some FB to avoid errors on contexts w/o default FB */
Renderbuffer color;
color.setStorage(RenderbufferFormat::RGBA8, Vector2i{1});

Loading…
Cancel
Save