mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 17:50:12 +01:00
egl: error out if we can't find an EGLDevice in _eglFindDevice()
Follow up of "egl/drm: get compatible render-only device fd for kms-only device". Now we can properly error out when we don't find the EGLDevice in _eglFindDevice(). Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com> Reviewed-by: Simon Ser <contact@emersion.fr> Reviewed-by: Daniel Stone <daniels@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24825>
This commit is contained in:
parent
88c03ddd34
commit
2be404f557
1 changed files with 6 additions and 0 deletions
|
|
@ -152,6 +152,9 @@ _eglAddDRMDevice(drmDevicePtr device)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Finds a device in DeviceList, for the given fd.
|
/* Finds a device in DeviceList, for the given fd.
|
||||||
|
*
|
||||||
|
* The fd must be of a render-capable device, as there are only render-capable
|
||||||
|
* devices in DeviceList.
|
||||||
*
|
*
|
||||||
* If a software device, the fd is ignored.
|
* If a software device, the fd is ignored.
|
||||||
*/
|
*/
|
||||||
|
|
@ -186,6 +189,9 @@ _eglFindDevice(int fd, bool software)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Couldn't find an EGLDevice for the device. */
|
||||||
|
dev = NULL;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
_eglLog(_EGL_FATAL,
|
_eglLog(_EGL_FATAL,
|
||||||
"Driver bug: Built without libdrm, yet looking for HW device");
|
"Driver bug: Built without libdrm, yet looking for HW device");
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue