aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Loup A. Griffais <pgriffais@nvidia.com>2011-10-16 06:53:11 (GMT)
committerMartin Gräßlin <mgraesslin@kde.org>2011-10-26 17:23:34 (GMT)
commit4085ebdc2d9c849f27c812bf180aa9adb42f2901 (patch)
tree694acb6237b88f941c900e9488f1b27a9ed9118f
parentb6dbabf76a355dfee869ff076d50cce25184b57c (diff)
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
-rw-r--r--kwin/libkwineffects/kwinglutils_funcs.cpp4
-rw-r--r--kwin/scene_opengl_egl.cpp6
2 files changed, 7 insertions, 3 deletions
diff --git a/kwin/libkwineffects/kwinglutils_funcs.cpp b/kwin/libkwineffects/kwinglutils_funcs.cpp
index dfdf6e7..57cedf0 100644
--- a/kwin/libkwineffects/kwinglutils_funcs.cpp
+++ b/kwin/libkwineffects/kwinglutils_funcs.cpp
@@ -296,7 +296,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 {
diff --git a/kwin/scene_opengl_egl.cpp b/kwin/scene_opengl_egl.cpp
index 9d2c61c..7fa2972 100644
--- a/kwin/scene_opengl_egl.cpp
+++ b/kwin/scene_opengl_egl.cpp
@@ -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();