Calling eglCreateImageKHR with anything but EGL_NO_CONTEXT should throw a error.
* If <target> is EGL_NATIVE_PIXMAP_KHR, and <ctx> is not EGL_NO_CONTEXT,
the error EGL_BAD_PARAMETER is generated.
Xorg has recently been fixed to incorporate this : https://gitlab.freedesktop.org/xorg/xserver/commit/cc05c01925755310f027c61daa29648a10155f96
Same for dmabuf import: https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_image_dma_buf_import.txt
Mutter used to pass a context though, so we should only do this with care.
Fix here: https://gitlab.freedesktop.org/mesa/mesa/merge_requests/454
But we'll have to wait before actually landing it.