summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/gl_integrations
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-04-16 12:23:26 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-04-16 10:41:52 +0000
commit7ee449a18695f7ec17bed18b59956003fabfe53e (patch)
tree51120d7eda407bb3bb152cf81a7da0ce1f3b1449 /src/plugins/platforms/xcb/gl_integrations
parent0bd27f80e0fff56e5450bb10aa7da8ba1ac00406 (diff)
Fix threaded QOpenGL when robustness is requested
If the shared context had robustness set then all child contexts must as well, otherwise we will fallback to a non-shared context breaking threaded rendering. Change-Id: Ie5526e632ad21289b6164c1ca06e54ec714187c7 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/gl_integrations')
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
index 476de6d1e5..4adf662152 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
@@ -270,7 +270,9 @@ void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share)
// ES does not support any format option
m_format.setOptions(QSurfaceFormat::FormatOptions());
}
-
+ // Robustness must match that of the shared context.
+ if (share && share->format().testOption(QSurfaceFormat::ResetNotification))
+ m_format.setOption(QSurfaceFormat::ResetNotification);
Q_ASSERT(glVersions.count() > 0);
for (int i = 0; !m_context && i < glVersions.count(); i++) {