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
1 changed files with 3 additions and 2 deletions

View File

@ -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) {