From 0ecfd9fd32d92cf520c05b61378f296989b71c55 Mon Sep 17 00:00:00 2001 From: Maxim Solovyov Date: Fri, 30 Dec 2022 07:38:28 +0300 Subject: [PATCH] backend: egl: fix creating eglpixmap according to the specification of the EGL_KHR_image_pixmap extension, if target is EGL_NATIVE_PIXMAP_KHR then ctx must be EGL_NO_CONTEXT, otherwise, the EGL_BAD_PARAMETER error is generated. source: https://registry.khronos.org/EGL/extensions/KHR/EGL_KHR_image_pixmap.txt fixes #981 --- src/backend/gl/egl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/backend/gl/egl.c b/src/backend/gl/egl.c index e6d4d901..c83ff3c7 100644 --- a/src/backend/gl/egl.c +++ b/src/backend/gl/egl.c @@ -285,8 +285,9 @@ egl_bind_pixmap(backend_t *base, xcb_pixmap_t pixmap, struct xvisual_info fmt, b eglpixmap = cmalloc(struct egl_pixmap); eglpixmap->pixmap = pixmap; - eglpixmap->image = eglCreateImageProc(gd->display, gd->ctx, EGL_NATIVE_PIXMAP_KHR, - (EGLClientBuffer)(uintptr_t)pixmap, NULL); + eglpixmap->image = + eglCreateImageProc(gd->display, EGL_NO_CONTEXT, EGL_NATIVE_PIXMAP_KHR, + (EGLClientBuffer)(uintptr_t)pixmap, NULL); eglpixmap->owned = owned; if (eglpixmap->image == EGL_NO_IMAGE) {