kwin: avoid SEGFAULT in case of egl_glx
The mesa egl_glx egl driver only provides indirect rendering which is insufficient for GLES2.
This commit is contained in:
parent
9e2b6edf02
commit
cd585972ae
1 changed files with 6 additions and 0 deletions
|
@ -310,6 +310,12 @@ bool CompositingPrefs::initEGLContext()
|
||||||
EGLConfig configs[1024];
|
EGLConfig configs[1024];
|
||||||
eglChooseConfig(mEGLDisplay, config_attribs, configs, 1024, &count);
|
eglChooseConfig(mEGLDisplay, config_attribs, configs, 1024, &count);
|
||||||
|
|
||||||
|
if (count == 0) {
|
||||||
|
// egl_glx only supports indirect rendering, which itself does not allow GLES2
|
||||||
|
kWarning(1212) << "You might be using mesa egl_glx, which is not supported!";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
EGLint visualId = XVisualIDFromVisual((Visual*)QX11Info::appVisual());
|
EGLint visualId = XVisualIDFromVisual((Visual*)QX11Info::appVisual());
|
||||||
|
|
||||||
EGLConfig config = configs[0];
|
EGLConfig config = configs[0];
|
||||||
|
|
Loading…
Reference in a new issue