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