mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
egl/surfaceless: Fix EGL_DEVICE_EXT implementation
The native_display checks are incorrect and partially never
executed due to native_display always being NULL.
Fixes: 1efaa85889 ("egl: Fix attrib_list[0] == EGL_NONE check")
Signed-off-by: Robert Foss <rfoss@kernel.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26131>
This commit is contained in:
parent
59a7fc2054
commit
cda9980f96
1 changed files with 5 additions and 5 deletions
|
|
@ -642,6 +642,7 @@ _EGLDisplay *
|
|||
_eglGetSurfacelessDisplay(void *native_display, const EGLAttrib *attrib_list)
|
||||
{
|
||||
_EGLDisplay *dpy;
|
||||
_EGLDevice *dev = NULL;
|
||||
|
||||
/* Any native display must be an EGLDeviceEXT we know about */
|
||||
if (native_display != NULL) {
|
||||
|
|
@ -657,8 +658,8 @@ _eglGetSurfacelessDisplay(void *native_display, const EGLAttrib *attrib_list)
|
|||
|
||||
switch (attrib) {
|
||||
case EGL_DEVICE_EXT:
|
||||
if ((native_display && native_display != (void *)value) ||
|
||||
(native_display != _eglLookupDevice(native_display))) {
|
||||
dev = _eglLookupDevice((void *)value);
|
||||
if (!dev) {
|
||||
_eglError(EGL_BAD_DEVICE_EXT, "eglGetPlatformDisplay");
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -671,10 +672,9 @@ _eglGetSurfacelessDisplay(void *native_display, const EGLAttrib *attrib_list)
|
|||
}
|
||||
}
|
||||
|
||||
dpy =
|
||||
_eglFindDisplay(_EGL_PLATFORM_SURFACELESS, native_display, attrib_list);
|
||||
dpy = _eglFindDisplay(_EGL_PLATFORM_SURFACELESS, NULL, attrib_list);
|
||||
if (dpy) {
|
||||
dpy->Device = native_display;
|
||||
dpy->Device = dev;
|
||||
}
|
||||
|
||||
return dpy;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue