summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-09-03 12:45:05 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-10-23 07:30:01 +0000
commit1288c5b0bbdb51cf4467c84cc9bfd5b03972b5c5 (patch)
tree485cc4ee667e4bb593d68c9ceb8e74f96cd5d7bc
parentec298193baae320410deac41e4884aa3474dcd6d (diff)
Windows: Disable shader disk cache for Intel HD Graphics 620
Set Qt::AA_DisableShaderDiskCache when the feature "disable_program_cache" (modeled after the Chromium driver bug list) is present and set it for the Intel HD Graphics 620 card. Task-number: QTBUG-64697 Change-Id: Ibba588d2ab296b5c959ab8ee9712b47ec7cc906e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit dff9bb2f9b981e263d8d3d5b1ef67054297e731c)
-rw-r--r--src/plugins/platforms/windows/openglblacklists/default.json12
-rw-r--r--src/plugins/platforms/windows/qwindowsintegration.cpp4
-rw-r--r--src/plugins/platforms/windows/qwindowsopengltester.cpp4
-rw-r--r--src/plugins/platforms/windows/qwindowsopengltester.h3
4 files changed, 22 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/openglblacklists/default.json b/src/plugins/platforms/windows/openglblacklists/default.json
index d1e9f85247..b618d8567a 100644
--- a/src/plugins/platforms/windows/openglblacklists/default.json
+++ b/src/plugins/platforms/windows/openglblacklists/default.json
@@ -141,6 +141,18 @@
"features": [
"disable_desktopgl", "disable_d3d11", "disable_d3d9"
]
+ },
+ {
+ "id": 12,
+ "description": "Intel HD Graphics 620 crash in conjunction with shader caches (QTBUG-64697)",
+ "vendor_id": "0x8086",
+ "device_id": [ "0x5916" ],
+ "os": {
+ "type": "win"
+ },
+ "features": [
+ "disable_program_cache"
+ ]
}
]
}
diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp
index 17cab69891..30859a5c78 100644
--- a/src/plugins/platforms/windows/qwindowsintegration.cpp
+++ b/src/plugins/platforms/windows/qwindowsintegration.cpp
@@ -413,6 +413,10 @@ QWindowsStaticOpenGLContext *QWindowsStaticOpenGLContext::doCreate()
}
const QWindowsOpenGLTester::Renderers supportedRenderers = QWindowsOpenGLTester::supportedRenderers();
+ if (supportedRenderers.testFlag(QWindowsOpenGLTester::DisableProgramCacheFlag)
+ && !QCoreApplication::testAttribute(Qt::AA_DisableShaderDiskCache)) {
+ QCoreApplication::setAttribute(Qt::AA_DisableShaderDiskCache);
+ }
if (supportedRenderers & QWindowsOpenGLTester::DesktopGl) {
if (QWindowsStaticOpenGLContext *glCtx = QOpenGLStaticContext::create()) {
if ((supportedRenderers & QWindowsOpenGLTester::DisableRotationFlag)
diff --git a/src/plugins/platforms/windows/qwindowsopengltester.cpp b/src/plugins/platforms/windows/qwindowsopengltester.cpp
index a511cc6164..564350bf88 100644
--- a/src/plugins/platforms/windows/qwindowsopengltester.cpp
+++ b/src/plugins/platforms/windows/qwindowsopengltester.cpp
@@ -259,6 +259,10 @@ QWindowsOpenGLTester::Renderers QWindowsOpenGLTester::detectSupportedRenderers(c
qCDebug(lcQpaGl) << "Disabling rotation: " << gpu;
result |= DisableRotationFlag;
}
+ if (features.contains(QStringLiteral("disable_program_cache"))) {
+ qCDebug(lcQpaGl) << "Disabling program cache: " << gpu;
+ result |= DisableProgramCacheFlag;
+ }
srCache->insert(qgpu, result);
return result;
#endif // !QT_NO_OPENGL
diff --git a/src/plugins/platforms/windows/qwindowsopengltester.h b/src/plugins/platforms/windows/qwindowsopengltester.h
index e3fec59dd5..987ac2b9ef 100644
--- a/src/plugins/platforms/windows/qwindowsopengltester.h
+++ b/src/plugins/platforms/windows/qwindowsopengltester.h
@@ -82,7 +82,8 @@ public:
GlesMask = Gles | AngleBackendMask,
SoftwareRasterizer = 0x0020,
RendererMask = 0x00FF,
- DisableRotationFlag = 0x0100
+ DisableRotationFlag = 0x0100,
+ DisableProgramCacheFlag = 0x0200
};
Q_DECLARE_FLAGS(Renderers, Renderer)