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:

committed by
Marge Bot

parent
88c03ddd34
commit
2be404f557
@@ -152,6 +152,9 @@ _eglAddDRMDevice(drmDevicePtr device)
|
||||
#endif
|
||||
|
||||
/* 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.
|
||||
*/
|
||||
@@ -186,6 +189,9 @@ _eglFindDevice(int fd, bool software)
|
||||
}
|
||||
}
|
||||
|
||||
/* Couldn't find an EGLDevice for the device. */
|
||||
dev = NULL;
|
||||
|
||||
#else
|
||||
_eglLog(_EGL_FATAL,
|
||||
"Driver bug: Built without libdrm, yet looking for HW device");
|
||||
|
Reference in New Issue
Block a user