kwin: avoid SEGFAULT in case of egl_glx

The mesa egl_glx egl driver only provides indirect rendering which is
insufficient for GLES2.
icc-effect-5.14.5
Philipp Knechtges 2011-12-01 22:41:10 +01:00
parent 9e2b6edf02
commit cd585972ae
1 changed files with 6 additions and 0 deletions

View File

@ -310,6 +310,12 @@ bool CompositingPrefs::initEGLContext()
EGLConfig configs[1024];
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());
EGLConfig config = configs[0];