EGL: EGLDisplay can lose device, rendering EXT_device_base useless.
Currently an EGLDisplay returned from eglGetWaylandDisplay
gets it's device initialized in eglInitialize
by a call into the driver initialize dri2_initialize
However when sharing the native wl_display between independent EGL users, each user get an EGLDisplay (the same pointer in fact leading to this bug) and initialize it. This results in the 2nd eglGetWaylandDisplay
https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/egl/main/egldisplay.c#L556 deleting the device. The 2nd eglInitialize
will see the display as initialized and not set the device.
At this point the EGLDisplay is corrupt and things like eglQueryDisplayAttribEXT
on it will return EGL_TRUE and EGL_NO_DEVICE_EXT which seems forbidden by the spec (and is not very helpful to a user).