egl/wayland: Allow EGLSurface to outlive wl_egl_window
According to the EGL spec, it is entirely valid for an EGLSurface to outlive the native_window it was created from, provided that SwapBuffers and MakeCurrent return EGL_BAD_NATIVE_WINDOW. We don't have any facility to error on MakeCurrent, so just make sure we can bundle on safely through rendering for now, then return EGL_BAD_NATIVE_WINDOW from SwapBuffers. Signed-off-by:Daniel Stone <daniels@collabora.com> Reviewed-by:
Simon Ser <contact@emersion.fr> Closes: #2251 Closes: #4902 Cc: mesa-stable Part-of: <!11979> (cherry picked from commit 6455ab6e)