GNOME Bugzilla – Bug 785263
mutter imports wl_buffers to EGLImages with wrong context
Last modified: 2017-07-22 09:45:21 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.
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.
Review of attachment 356161 [details] [review]: lgtm
Please commit for me, I don't have an account
Attachment 356161 [details] pushed as 9a348aa - wayland/buffer: Create EGLImage with no context