Enable mipmap test on all platforms, except early Mesa.
authorGunnar Sletta <gunnar.sletta@jollamobile.com>
Fri, 27 Mar 2015 10:32:27 +0000 (11:32 +0100)
committerGunnar Sletta <gunnar@sletta.org>
Wed, 13 May 2015 08:43:51 +0000 (08:43 +0000)
Change-Id: Ib6e17755cdb281de164c9eb79c3b0eeca391c291
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
tests/auto/quick/scenegraph/tst_scenegraph.cpp

index f82163dcece33ef4ccc128d6e53af87c77c0f49d..3e1285b7fe3db0958de6d840d3b42f73fc2b0f04 100644 (file)
@@ -103,6 +103,9 @@ private slots:
     void render();
 
     void hideWithOtherContext();
+
+private:
+    bool m_brokenMipmapSupport;
 };
 
 template <typename T> class ScopedList : public QList<T> {
@@ -138,12 +141,16 @@ void tst_SceneGraph::initTestCase()
     qDebug() << "Max Texture Size:  " << textureSize;
     qDebug() << "GL_VENDOR:         " << (const char *) funcs->glGetString(GL_VENDOR);
     qDebug() << "GL_RENDERER:       " << (const char *) funcs->glGetString(GL_RENDERER);
-    qDebug() << "GL_VERSION:        " << (const char *) funcs->glGetString(GL_VERSION);
+    QByteArray version = (const char *) funcs->glGetString(GL_VERSION);
+    qDebug() << "GL_VERSION:        " << version.constData();
     QSet<QByteArray> exts = context.extensions();
     QByteArray all;
     foreach (const QByteArray &e, exts) all += ' ' + e;
     qDebug() << "GL_EXTENSIONS:    " << all.constData();
 
+    m_brokenMipmapSupport = version.contains("Mesa 10.1") || version.contains("Mesa 9.");
+    qDebug() << "Broken Mipmap:    " << m_brokenMipmapSupport;
+
     context.doneCurrent();
 }
 
@@ -408,13 +415,9 @@ void tst_SceneGraph::render_data()
           << "data/render_StackingOrder.qml"
           << "data/render_ImageFiltering.qml"
           << "data/render_bug37422.qml"
-          << "data/render_OpacityThroughBatchRoot.qml"
-#if defined(Q_OS_OSX) || defined(Q_OS_WIN)
-          // We've had some problems with this particular test in the CI, so
-          // we'll leave it out for now..
-          << "data/render_Mipmap.qml"
-#endif
-        ;
+          << "data/render_OpacityThroughBatchRoot.qml";
+    if (!m_brokenMipmapSupport)
+          files << "data/render_Mipmap.qml";
 
     QRegExp sampleCount("#samples: *(\\d+)");
     //                          X:int   Y:int   R:float       G:float       B:float       Error:float