After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 785263 - mutter imports wl_buffers to EGLImages with wrong context
mutter imports wl_buffers to EGLImages with wrong context
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: wayland
git master
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2017-07-22 07:42 UTC by Daniel Stone
Modified: 2017-07-22 09:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wayland/buffer: Create EGLImage with no context (2.12 KB, patch)
2017-07-22 07:42 UTC, Daniel Stone
committed Details | Review

Description Daniel Stone 2017-07-22 07:42:26 UTC
EGL_WL_bind_wayland_display says EGLContext must be EGL_NO_CONTEXT when importing wl_buffers. Cogl used to do this (7d9af9585d888291797e61ef0822240db5510999 / bug #769731), but the fix got lost when moving away from Cogl.
Comment 1 Daniel Stone 2017-07-22 07:42:49 UTC
Created attachment 356161 [details] [review]
wayland/buffer: Create EGLImage with no context

Since a wl_buffer is independent of the GL context in use (unlike, e.g.,
a GL renderbuffer), EGLImages with the EGL_WAYLAND_BUFFER_WL target must
pass EGL_NO_CONTEXT as the context. Quoting from the
EGL_WL_bind_wayland_display spec:

    After querying the wl_buffer layout, create EGLImages for the
    planes by calling eglCreateImageKHR with wl_buffer as
    EGLClientBuffer, EGL_WAYLAND_BUFFER_WL as the target, NULL
    context.

The check was already present inside _cogl_egl_create_image.
Comment 2 Jonas Ådahl 2017-07-22 09:05:11 UTC
Review of attachment 356161 [details] [review]:

lgtm
Comment 3 Daniel Stone 2017-07-22 09:33:45 UTC
Please commit for me, I don't have an account
Comment 4 Florian Müllner 2017-07-22 09:45:17 UTC
Attachment 356161 [details] pushed as 9a348aa - wayland/buffer: Create EGLImage with no context