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:
parent
1ea54ef44f
commit
5971daf1c6
2 changed files with 7 additions and 3 deletions
|
@ -301,7 +301,9 @@ glEGLImageTargetTexture2DOES_func glEGLImageTargetTexture2DOES;
|
||||||
|
|
||||||
void eglResolveFunctions()
|
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");
|
eglCreateImageKHR = (eglCreateImageKHR_func)eglGetProcAddress("eglCreateImageKHR");
|
||||||
eglDestroyImageKHR = (eglDestroyImageKHR_func)eglGetProcAddress("eglDestroyImageKHR");
|
eglDestroyImageKHR = (eglDestroyImageKHR_func)eglGetProcAddress("eglDestroyImageKHR");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -35,8 +35,10 @@ SceneOpenGL::SceneOpenGL(Workspace* ws)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
initEGL();
|
initEGL();
|
||||||
if (!hasGLExtension("EGL_KHR_image_pixmap")) {
|
if (!hasGLExtension("EGL_KHR_image") &&
|
||||||
kError(1212) << "Required extension EGL_KHR_image_pixmap not found, disabling compositing";
|
(!hasGLExtension("EGL_KHR_image_base") ||
|
||||||
|
!hasGLExtension("EGL_KHR_image_pixmap"))) {
|
||||||
|
kError(1212) << "Required support for binding pixmaps to EGLImages not found, disabling compositing";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
initGL();
|
initGL();
|
||||||
|
|
Loading…
Reference in a new issue