egl: don't make LIBGL_ALWAYS_SOFTWARE and MESA_LOADER_DRIVER_OVERRIDE=zink exclusive

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15857>
This commit is contained in:
Mike Blumenkrantz 2022-04-11 10:31:40 -04:00 committed by Marge Bot
parent 3abc66dc9f
commit 42ff02de14
1 changed files with 4 additions and 5 deletions

View File

@ -628,11 +628,10 @@ eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false);
if (disp->Options.ForceSoftware)
_eglLog(_EGL_DEBUG, "Found 'LIBGL_ALWAYS_SOFTWARE' set, will use a CPU renderer");
else {
const char *env = getenv("MESA_LOADER_DRIVER_OVERRIDE");
disp->Options.Zink = env && !strcmp(env, "zink");
disp->Options.ForceSoftware |= disp->Options.Zink;
}
const char *env = getenv("MESA_LOADER_DRIVER_OVERRIDE");
disp->Options.Zink = env && !strcmp(env, "zink");
disp->Options.ForceSoftware |= disp->Options.Zink;
/**
* Initialize the display using the driver's function.