diff options
author | Michael BrĂ¼ning <michael.bruning@qt.io> | 2018-10-19 11:36:00 +0200 |
---|---|---|
committer | Michael BrĂ¼ning <michael.bruning@qt.io> | 2018-10-30 10:46:34 +0000 |
commit | e73bd4a5be059dcef5f8afca567f9aca31866230 (patch) | |
tree | c564404021ac332bb0b660bb88f25bef6b0632c1 | |
parent | a3670dd982f83d5eaf4990ec202af4ce61c2f164 (diff) |
[cocoa] Disable offline renderers for dual AMD FirePro GPU
The AMD FirePro dual gpus on the MacPro have a problem with offline
renderers in Chromium. Therefore, Chromium and thus Qt WebEngine
disable this option via the pixel format attributes.
The Qt Cocoa plugin on the other hand enables it in the recent versions,
causing context creation in Qt WebEngine to fail when run on a MacPro
with dual AMD FirePro gpus due to incompatible context options.
This patch uses the environment variable QT_MAC_PRO_WEBENGINE_WORKAROUND
which is set by Qt WebEngine upon application startup if the application
is running on a late 2013 Mac Pro.
[ChangeLog] Offline renderers will be disabled when the application is
using Qt WebEngine and running on one of the late 2013 MacPro models.
Backport from Qt 5.11
Task-number: QTBUG-70062
Change-Id: I0b0831efb6f4073ebd37672040aaed6370853fc0
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
-rw-r--r-- | src/platformsupport/cglconvenience/cglconvenience.mm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/platformsupport/cglconvenience/cglconvenience.mm b/src/platformsupport/cglconvenience/cglconvenience.mm index 85add35879..e284e5a8a2 100644 --- a/src/platformsupport/cglconvenience/cglconvenience.mm +++ b/src/platformsupport/cglconvenience/cglconvenience.mm @@ -115,7 +115,12 @@ void *qcgl_createNSOpenGLPixelFormat(const QSurfaceFormat &format) if (format.stereo()) attrs << NSOpenGLPFAStereo; - attrs << NSOpenGLPFAAllowOfflineRenderers; + //Workaround for problems with Chromium and offline renderers on the lat 2013 Mac Pros. + static bool offlineRenderersAllowed = qEnvironmentVariableIsEmpty("QT_MAC_PRO_WEBENGINE_WORKAROUND"); + if (offlineRenderersAllowed) { + // Allow rendering on GPUs without a connected display + attrs << NSOpenGLPFAAllowOfflineRenderers; + } QByteArray useLayer = qgetenv("QT_MAC_WANTS_LAYER"); if (!useLayer.isEmpty() && useLayer.toInt() > 0) { |