From dff9bb2f9b981e263d8d3d5b1ef67054297e731c Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 3 Sep 2018 12:45:05 +0200 Subject: 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 --- src/plugins/platforms/windows/openglblacklists/default.json | 12 ++++++++++++ src/plugins/platforms/windows/qwindowsintegration.cpp | 4 ++++ src/plugins/platforms/windows/qwindowsopengltester.cpp | 4 ++++ src/plugins/platforms/windows/qwindowsopengltester.h | 3 ++- 4 files changed, 22 insertions(+), 1 deletion(-) (limited to 'src') 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 4824de5c9c..0694435427 100644 --- a/src/plugins/platforms/windows/qwindowsintegration.cpp +++ b/src/plugins/platforms/windows/qwindowsintegration.cpp @@ -418,6 +418,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 6af9f168a5..9a630aff4f 100644 --- a/src/plugins/platforms/windows/qwindowsopengltester.cpp +++ b/src/plugins/platforms/windows/qwindowsopengltester.cpp @@ -301,6 +301,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 22170f30b0..bec87c1f86 100644 --- a/src/plugins/platforms/windows/qwindowsopengltester.h +++ b/src/plugins/platforms/windows/qwindowsopengltester.h @@ -83,7 +83,8 @@ public: GlesMask = Gles | AngleBackendMask, SoftwareRasterizer = 0x0020, RendererMask = 0x00FF, - DisableRotationFlag = 0x0100 + DisableRotationFlag = 0x0100, + DisableProgramCacheFlag = 0x0200 }; Q_DECLARE_FLAGS(Renderers, Renderer) -- cgit v1.2.3