kwin-gles: check for EGL_image OR EGL_image_base + EGL_image_pixmap

EGL_KHR_image is a functional superset of both EGL_KHR_image_base and
EGL_KHR_image_pixmap, which were split off later to allow the former to be
more modular. Older drivers might only expose EGL_KHR_image if they were
released before the split happened.

REVIEW: 102879
This commit is contained in:
Pierre-Loup A. Griffais 2011-10-15 23:53:11 -07:00 committed by Martin Gräßlin
parent 1ea54ef44f
commit 5971daf1c6
2 changed files with 7 additions and 3 deletions

View file

@ -301,7 +301,9 @@ glEGLImageTargetTexture2DOES_func glEGLImageTargetTexture2DOES;
void eglResolveFunctions()
{
if (hasGLExtension("EGL_KHR_image_pixmap")) {
if (hasGLExtension("EGL_KHR_image") ||
(hasGLExtension("EGL_KHR_image_base") &&
hasGLExtension("EGL_KHR_image_pixmap"))) {
eglCreateImageKHR = (eglCreateImageKHR_func)eglGetProcAddress("eglCreateImageKHR");
eglDestroyImageKHR = (eglDestroyImageKHR_func)eglGetProcAddress("eglDestroyImageKHR");
} else {

View file

@ -35,8 +35,10 @@ SceneOpenGL::SceneOpenGL(Workspace* ws)
return;
initEGL();
if (!hasGLExtension("EGL_KHR_image_pixmap")) {
kError(1212) << "Required extension EGL_KHR_image_pixmap not found, disabling compositing";
if (!hasGLExtension("EGL_KHR_image") &&
(!hasGLExtension("EGL_KHR_image_base") ||
!hasGLExtension("EGL_KHR_image_pixmap"))) {
kError(1212) << "Required support for binding pixmaps to EGLImages not found, disabling compositing";
return;
}
initGL();