mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-25 00:40:40 +01:00
egl: Rename _eglAddDevice() to _eglFindDevice()
_eglAddDevice() is now only used to look up eglDevices, which means that the function name is a bit misleading. Since this function is only used for finding the eglDevice, it should also no longer support adding a device to the egl devices list. 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/23742>
This commit is contained in:
parent
3a9e1014e1
commit
1d9d72b3fb
1 changed files with 10 additions and 0 deletions
|
|
@ -183,6 +183,16 @@ _eglFindDevice(int fd, bool software)
|
|||
dev = NULL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
while (dev->Next) {
|
||||
dev = dev->Next;
|
||||
|
||||
if (_eglDeviceSupports(dev, _EGL_DEVICE_DRM) &&
|
||||
drmDevicesEqual(device, dev->device) != 0) {
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
_eglLog(_EGL_FATAL,
|
||||
"Driver bug: Built without libdrm, yet looking for HW device");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue