Commit 0b9967d0 authored by Paul Olav Tvete's avatar Paul Olav Tvete
Browse files

Workaround for i.MX6 Wayland client crash

There is a bug in some versions of the Vivante driver, causing clients
to crash when a window is closed. This patch avoids a crash on startup,
confirmed with GL version "OpenGL ES 3.0 V5.0.11.p4.25762". The crash
happens with both Weston and Qt-based compositors.

Since we do not yet know exactly which versions are affected, we
avoid destroying the temporary surface for all Vivante versions.

Change-Id: I4b5b0ebb04b8441559aebb54a6ec3eb534c5c8e0
Reviewed-by: default avatarJan Arne Petersen <>
Reviewed-by: default avatarEskil Abrahamsen Blomfeldt <>
parent 6d90bf2a
......@@ -308,6 +308,8 @@ void QWaylandGLContext::updateGLFormat()
wl_egl_window *eglWindow = wl_egl_window_create(wlSurface, 1, 1);
EGLSurface eglSurface = eglCreateWindowSurface(m_eglDisplay, m_config, eglWindow, 0);
static bool vivanteEglWorkaround = strstr(eglQueryString(m_eglDisplay, EGL_VENDOR), "Vivante Corporation") != 0;
if (eglMakeCurrent(m_eglDisplay, eglSurface, eglSurface, m_context)) {
if (m_format.renderableType() == QSurfaceFormat::OpenGL
|| m_format.renderableType() == QSurfaceFormat::OpenGLES) {
......@@ -347,7 +349,8 @@ void QWaylandGLContext::updateGLFormat()
eglMakeCurrent(prevDisplay, prevSurfaceDraw, prevSurfaceRead, prevContext);
eglDestroySurface(m_eglDisplay, eglSurface);
if (!vivanteEglWorkaround)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment