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:
Robert Foss 2023-06-23 17:50:12 +02:00 committed by Marge Bot
parent 3a9e1014e1
commit 1d9d72b3fb

View file

@ -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");