From 337c279215fa6daf12a1cd1370bcbf10db809bb0 Mon Sep 17 00:00:00 2001 From: Volker Krause Date: Fri, 1 May 2015 13:15:22 +0200 Subject: Make data tables const. Moves some of them to the .rodata section, the rest at least to .data.rel.ro[.local]. Change-Id: I85676ddf22b0c0097f3f0dce4c3dc018dc29d045 Reviewed-by: Marc Mutz Reviewed-by: Thiago Macieira Reviewed-by: Giuseppe D'Angelo --- src/gui/opengl/qopengl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/opengl/qopengl.cpp') diff --git a/src/gui/opengl/qopengl.cpp b/src/gui/opengl/qopengl.cpp index c8d33df4ba..622e014746 100644 --- a/src/gui/opengl/qopengl.cpp +++ b/src/gui/opengl/qopengl.cpp @@ -128,7 +128,7 @@ QDebug operator<<(QDebug d, const QOpenGLConfig::Gpu &g) } enum Operator { NotEqual, LessThan, LessEqualThan, Equals, GreaterThan, GreaterEqualThan }; -static const char *operators[] = {"!=", "<", "<=", "=", ">", ">="}; +static const char operators[][3] = {"!=", "<", "<=", "=", ">", ">="}; static inline QString valueKey() { return QStringLiteral("value"); } static inline QString opKey() { return QStringLiteral("op"); } -- cgit v1.2.3 From 4fe68ffbe5c93244562f2b56292d4ecf5ce39f56 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 10 Apr 2015 13:55:10 +0200 Subject: 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 Reviewed-by: Simon Hausmann --- src/gui/opengl/qopengl.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/gui/opengl/qopengl.cpp') 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 #include +#include + QT_BEGIN_NAMESPACE #if defined(QT_OPENGL_3) @@ -474,4 +476,13 @@ QOpenGLConfig::Gpu QOpenGLConfig::Gpu::fromContext() return gpu; } +Q_GUI_EXPORT std::set *qgpu_features(const QString &filename) +{ + const QSet features = QOpenGLConfig::gpuFeatures(QOpenGLConfig::Gpu::fromContext(), filename); + std::set *result = new std::set; + foreach (const QString &feature, features) + result->insert(feature.toUtf8()); + return result; +} + QT_END_NAMESPACE -- cgit v1.2.3