mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 00:30:11 +01:00
egl: Use _eglPreloadDrivers.
Replace the use of _eglPreloadDriver by _eglPreloadDrivers. The latter supports EGL_DISPLAY which have a better chance to "just work".
This commit is contained in:
parent
b3bcd33f7a
commit
57929eda3e
2 changed files with 3 additions and 9 deletions
|
|
@ -101,6 +101,8 @@ eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
|
|||
|
||||
drv = disp->Driver;
|
||||
if (!drv) {
|
||||
_eglPreloadDrivers();
|
||||
|
||||
drv = _eglOpenDriver(disp);
|
||||
if (!drv)
|
||||
return _eglError(EGL_NOT_INITIALIZED, __FUNCTION__);
|
||||
|
|
@ -710,9 +712,7 @@ void (* EGLAPIENTRY eglGetProcAddress(const char *procname))()
|
|||
}
|
||||
}
|
||||
|
||||
/* preload a driver if there isn't one */
|
||||
if (!_eglGlobal.NumDrivers)
|
||||
_eglPreloadDriver(NULL);
|
||||
_eglPreloadDrivers();
|
||||
|
||||
/* now loop over drivers to query their procs */
|
||||
for (i = 0; i < _eglGlobal.NumDrivers; i++) {
|
||||
|
|
|
|||
|
|
@ -81,12 +81,6 @@ _eglNewDisplay(NativeDisplayType nativeDisplay)
|
|||
_EGLDisplay *dpy = (_EGLDisplay *) calloc(1, sizeof(_EGLDisplay));
|
||||
if (dpy) {
|
||||
dpy->NativeDisplay = nativeDisplay;
|
||||
|
||||
dpy->DriverName = _eglPreloadDriver(dpy);
|
||||
if (!dpy->DriverName) {
|
||||
free(dpy);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
return dpy;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue