summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2010-02-23 16:12:30 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2010-02-26 12:17:54 (GMT)
commit7ff5a5bc4b67a807200cae3ac83884d721bad373 (patch)
tree569fa58fe506ebe013dd74c0737f6263c21a5147 /tests/auto
parentd2820de2c61c7061943046b8cb678a88466d546e (diff)
downloadQt-7ff5a5bc4b67a807200cae3ac83884d721bad373.zip
Qt-7ff5a5bc4b67a807200cae3ac83884d721bad373.tar.gz
Qt-7ff5a5bc4b67a807200cae3ac83884d721bad373.tar.bz2
Skip complex FBO tests if combined depth-stencil isn't supported
Reviewed-By: Trond Kjernåsen
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qgl/tst_qgl.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp
index 2983af3..a0656d0 100644
--- a/tests/auto/qgl/tst_qgl.cpp
+++ b/tests/auto/qgl/tst_qgl.cpp
@@ -1036,6 +1036,11 @@ void tst_QGL::glFBORendering()
// Don't complicate things by using NPOT:
QGLFramebufferObject *fbo = new QGLFramebufferObject(256, 128, fboFormat);
+ if (fbo->attachment() != QGLFramebufferObject::CombinedDepthStencil) {
+ delete fbo;
+ QSKIP("FBOs missing combined depth~stencil support", SkipSingle);
+ }
+
QPainter fboPainter;
bool painterBegun = fboPainter.begin(fbo);
QVERIFY(painterBegun);
@@ -1098,6 +1103,16 @@ void tst_QGL::multipleFBOInterleavedRendering()
QGLFramebufferObject *fbo2 = new QGLFramebufferObject(256, 128, fboFormat);
QGLFramebufferObject *fbo3 = new QGLFramebufferObject(256, 128, fboFormat);
+ if ( (fbo1->attachment() != QGLFramebufferObject::CombinedDepthStencil) ||
+ (fbo2->attachment() != QGLFramebufferObject::CombinedDepthStencil) ||
+ (fbo3->attachment() != QGLFramebufferObject::CombinedDepthStencil) )
+ {
+ delete fbo1;
+ delete fbo2;
+ delete fbo3;
+ QSKIP("FBOs missing combined depth~stencil support", SkipSingle);
+ }
+
QPainter fbo1Painter;
QPainter fbo2Painter;
QPainter fbo3Painter;
@@ -1203,7 +1218,7 @@ protected:
QPainter widgetPainter;
widgetPainterBeginOk = widgetPainter.begin(this);
QGLFramebufferObjectFormat fboFormat;
- fboFormat.setAttachment(QGLFramebufferObject::CombinedDepthStencil);
+ fboFormat.setAttachment(QGLFramebufferObject::NoAttachment);
QGLFramebufferObject *fbo = new QGLFramebufferObject(128, 128, fboFormat);
QPainter fboPainter;