egl: Fix attrib_list[0] == EGL_NONE check
_eglGetSurfacelessDisplay(), _eglGetWaylandDisplay() and
_eglGetGbmDisplay() handle the attrib_list[0] == EGL_NONE
case incorrectly by returning an EGL_BAD_ATTRIBUTE error.
Fix this bug, and switch the functions to use switch/case
in order to have the same structure as the sibling
_eglGetXXXDisplay() functions which support multiple attributes.
Fixes:
c237539d621 ("egl: Implement EGL_EXT_explicit_device")
Signed-off-by: Robert Foss <rfoss@kernel.org>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24394>