summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopengl.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-04-10 13:55:10 +0200
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-05-08 15:11:32 +0000
commit4fe68ffbe5c93244562f2b56292d4ecf5ce39f56 (patch)
treeac8b39a6630ad35495a539bf8599b5590310e27d /src/gui/opengl/qopengl.cpp
parente6ffb36b5517d1d4025718b56423db9bdf0a63f8 (diff)
Add GPU_BLACKLIST support to QTestLib
In addition to BLACKLIST, Qt will now look for GPU_BLACKLIST too. Test cases that are specified as disabled in the GPU blacklist will be skipped. This is particularly relevant when running tests on Embedded Linux devices. For example, the following JSON would configure the test case glxContextWrap to be skipped on drivers where GL_VENDOR contains UnstableDriverVendor: { "entries": [ { "gl_vendor": "UnstableDriverVendor", "features": [ "disable_glxContextWrap" ] } ] } In contrast to the regular blacklist, GPU-blacklisted test cases are not run at all. This is because driver problems and instabilities often lead to crashes. Change-Id: I340cf5c0261a206109b78409774408981bba5c68 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/gui/opengl/qopengl.cpp')
-rw-r--r--src/gui/opengl/qopengl.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gui/opengl/qopengl.cpp b/src/gui/opengl/qopengl.cpp
index 622e014746..1c008ccb42 100644
--- a/src/gui/opengl/qopengl.cpp
+++ b/src/gui/opengl/qopengl.cpp
@@ -47,6 +47,8 @@
#include <QtCore/QFile>
#include <QtCore/QDir>
+#include <set>
+
QT_BEGIN_NAMESPACE
#if defined(QT_OPENGL_3)
@@ -474,4 +476,13 @@ QOpenGLConfig::Gpu QOpenGLConfig::Gpu::fromContext()
return gpu;
}
+Q_GUI_EXPORT std::set<QByteArray> *qgpu_features(const QString &filename)
+{
+ const QSet<QString> features = QOpenGLConfig::gpuFeatures(QOpenGLConfig::Gpu::fromContext(), filename);
+ std::set<QByteArray> *result = new std::set<QByteArray>;
+ foreach (const QString &feature, features)
+ result->insert(feature.toUtf8());
+ return result;
+}
+
QT_END_NAMESPACE