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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user