egl: When EGL_DRIVER is set, do not add other drivers.
Setting EGL_DRIVER forces the driver to be loaded, as documented. There should be no fallbacks.
This commit is contained in:
parent
4924cb9036
commit
1e4f412242
|
@ -432,7 +432,7 @@ _eglGetSearchPath(void)
|
|||
*
|
||||
* The user driver is specified by EGL_DRIVER.
|
||||
*/
|
||||
static void
|
||||
static EGLBoolean
|
||||
_eglAddUserDriver(void)
|
||||
{
|
||||
const char *search_path = _eglGetSearchPath();
|
||||
|
@ -463,7 +463,11 @@ _eglAddUserDriver(void)
|
|||
mod->BuiltIn = _eglBuiltInDrivers[i].main;
|
||||
}
|
||||
}
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -507,10 +511,14 @@ _eglAddDrivers(void)
|
|||
if (_eglModules)
|
||||
return EGL_TRUE;
|
||||
|
||||
/* the order here decides the priorities of the drivers */
|
||||
_eglAddUserDriver();
|
||||
if (!_eglAddUserDriver()) {
|
||||
/*
|
||||
* Add other drivers only when EGL_DRIVER is not set. The order here
|
||||
* decides the priorities.
|
||||
*/
|
||||
_eglAddGalliumDriver();
|
||||
_eglAddBuiltInDrivers();
|
||||
}
|
||||
|
||||
return (_eglModules != NULL);
|
||||
}
|
||||
|
@ -535,6 +543,7 @@ _eglMatchDriver(_EGLDisplay *dpy, EGLBoolean use_probe)
|
|||
|
||||
if (!_eglAddDrivers()) {
|
||||
_eglUnlockMutex(&_eglModuleMutex);
|
||||
_eglLog(_EGL_WARNING, "failed to find any driver");
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue