1
0
Fork 0
mirror of https://github.com/yshui/picom.git synced 2024-11-18 13:55:36 -05:00

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
This commit is contained in:
Maxim Solovyov 2022-12-30 07:38:28 +03:00
parent 60ac2b64db
commit 0ecfd9fd32
No known key found for this signature in database

View file

@ -285,7 +285,8 @@ 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,
eglpixmap->image =
eglCreateImageProc(gd->display, EGL_NO_CONTEXT, EGL_NATIVE_PIXMAP_KHR,
(EGLClientBuffer)(uintptr_t)pixmap, NULL);
eglpixmap->owned = owned;