egl: Always set _EGLDisplay->Device during eglGetPlatformDisplay()

Make sure that all platform specific implementations of
eglGetPlatformDisplay() overwrite the Device field.

Fixes: c237539d62 ("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>
This commit is contained in:
Robert Foss
2023-07-31 16:45:39 +02:00
committed by Marge Bot
parent 1efaa85889
commit 71db99e566

View File

@@ -508,7 +508,7 @@ _eglGetX11Display(Display *native_display, const EGLAttrib *attrib_list)
}
dpy = _eglFindDisplay(_EGL_PLATFORM_X11, native_display, attrib_list);
if (dpy && dev) {
if (dpy) {
dpy->Device = dev;
}
@@ -552,7 +552,7 @@ _eglGetXcbDisplay(xcb_connection_t *native_display,
}
dpy = _eglFindDisplay(_EGL_PLATFORM_XCB, native_display, attrib_list);
if (dpy && dev) {
if (dpy) {
dpy->Device = dev;
}