egl/wayland: Error on invalid native window
We unconditionally require a wl_egl_window to be passed as the native window type, and do not permit a default window. The spec requires us to return EGL_BAD_NATIVE_WINDOW when doing this, rather than crashing. Further, if an EGLSurface has already been created for an existing native window, we are required to return EGL_BAD_ALLOC. Signed-off-by:Daniel Stone <daniels@collabora.com> Reviewed-by:
Simon Ser <contact@emersion.fr> Closes: mesa/mesa#2251 Closes: mesa/mesa#4902 Cc: mesa-stable Part-of: <mesa/mesa!11979> (cherry picked from commit 0e2464d2)