mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
egl: check for EGL_DRIVER env var to override normal driver selection process
This commit is contained in:
parent
80ed996803
commit
834aa8cfbc
1 changed files with 9 additions and 2 deletions
|
|
@ -92,14 +92,21 @@ _eglChooseDriver(_EGLDisplay *dpy)
|
|||
const char *displayString = (const char *) dpy->NativeDisplay;
|
||||
const char *driverName = NULL;
|
||||
|
||||
/* First, if the EGL_DRIVER env var is set, use that */
|
||||
driverName = getenv("EGL_DRIVER");
|
||||
if (driverName)
|
||||
return _eglstrdup(driverName);
|
||||
|
||||
|
||||
if (!displayString) {
|
||||
/* choose a default */
|
||||
displayString = DefaultDriverName;
|
||||
}
|
||||
|
||||
/* extract default DriverArgs = whatever follows ':' */
|
||||
if (displayString[0] == '!' ||
|
||||
displayString[0] == ':') {
|
||||
if (displayString &&
|
||||
(displayString[0] == '!' ||
|
||||
displayString[0] == ':')) {
|
||||
const char *args = strchr(displayString, ':');
|
||||
if (args)
|
||||
dpy->DriverArgs = _eglstrdup(args + 1);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue