Commit f4af6581 authored by Lindsay Roberts's avatar Lindsay Roberts
Browse files

kcm_opengl: Fix EGL info retrieval.

Under certain contexts (tested with Mesa 18.0.1 + AMDGPU) eglMakeCurrent()
fails with EGL_BAD_ACCESS. At this point the KCM gives up on EGL info
retrieval. This seems to be caused - correctly or otherwise - by a dangling
glX context. Explictly setting no glX context current at cleanup fixes the

Test Plan: kcmshell5 opengl should correctly display EGL information.

Reviewers: #plasma, davidedmundson, graesslin

Reviewed By: #plasma, davidedmundson, graesslin

Subscribers: plasma-devel, #plasma

Tags: #plasma

Differential Revision:
parent 702c7ca8
......@@ -729,6 +729,7 @@ static QTreeWidgetItem *get_gl_info_glx(Display *dpy, int scrnum, Bool allowDire
qDebug() << "Error: glXMakeCurrent failed\n";
glXMakeCurrent(dpy, GL_NONE, nullptr);
glXDestroyContext(dpy, ctx);
XDestroyWindow(dpy, win);
......@@ -845,6 +846,7 @@ static QTreeWidgetItem *get_gl_info_egl(Display *dpy, int scrnum, QTreeWidgetIte
qDebug() <<"Error: eglMakeCurrent() failed\n";
eglDestroyContext(egl_dpy, ctx);
eglDestroySurface(egl_dpy, surf);
XDestroyWindow(dpy, win);
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