diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-02-05 15:45:53 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-02-14 16:23:47 +0000 |
commit | 4dd7aeee10fc4d3883fd26fd70662405b533b6b4 (patch) | |
tree | 4e3d848561bb3571db83f94b74d5dd09bca0de55 /src/gui/opengl/qopengl_p.h | |
parent | af495c2042b6c460580041fd0c39697c144e45f7 (diff) |
Add support for GPU bug list reading.
- Add support for reading out feature lists from GPU bug lists
in Chromium format (supporting OS + version, exceptions lists,
device ids and vendor ids).
Add a overloads allowing for passing file name,
data or JSON documents.
- Test reading in tst_qopenglconfig
- Prototypically have the Windows plugin read the file
from the environment variable "QT_OPENGL_BUGLIST" and
turn off renderers depending on the standard keyword
"disable_d3d11" and newly introduced keywords
"disable_d3d9", "disable_desktopgl".
- QT_OPENGL_BUGLIST can point to an absolute or relative
path, in which case it is resolved via QLibraryInfo::SettingsPath
and QStandardPaths::ConfigLocation.
[ChangeLog][QtGui][Windows]
Introduce experimental feature allowing the user to specify
a GPU driver buglist with some additional keywords to chooose
the GL renderer backend depending on GPU.
Task-number: QTBUG-43263
Change-Id: I8c20b0e8ee3cf575b91d0672bf405c42d3e9fb64
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src/gui/opengl/qopengl_p.h')
-rw-r--r-- | src/gui/opengl/qopengl_p.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/gui/opengl/qopengl_p.h b/src/gui/opengl/qopengl_p.h index a82195757d..377440455a 100644 --- a/src/gui/opengl/qopengl_p.h +++ b/src/gui/opengl/qopengl_p.h @@ -48,9 +48,13 @@ #include <qopengl.h> #include <private/qopenglcontext_p.h> #include <QtCore/qset.h> +#include <QtCore/qstring.h> +#include <private/qversionnumber_p.h> QT_BEGIN_NAMESPACE +class QJsonDocument; + class Q_GUI_EXPORT QOpenGLExtensionMatcher { public: @@ -67,6 +71,28 @@ private: QSet<QByteArray> m_extensions; }; +class Q_GUI_EXPORT QOpenGLConfig +{ +public: + struct Gpu { + Gpu() : vendorId(0), deviceId(0) {} + bool isValid() const { return deviceId; } + + uint vendorId; + uint deviceId; + QVersionNumber driverVersion; + }; + + static QSet<QString> gpuFeatures(const Gpu &gpu, + const QString &osName, const QVersionNumber &kernelVersion, + const QJsonDocument &doc); + static QSet<QString> gpuFeatures(const Gpu &gpu, + const QString &osName, const QVersionNumber &kernelVersion, + const QString &fileName); + static QSet<QString> gpuFeatures(const Gpu &gpu, const QJsonDocument &doc); + static QSet<QString> gpuFeatures(const Gpu &gpu, const QString &fileName); +}; + QT_END_NAMESPACE #endif // QOPENGL_H |