mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
glx: fix automatic zink fallback loading between hw and sw drivers on MacOS
The combination of defines used when compile the code on MacOS is hiding variables. Patch allows basic MacOS build to compile and run. Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25992>
This commit is contained in:
parent
c8b64452c0
commit
4ef573735e
1 changed files with 8 additions and 2 deletions
|
|
@ -878,12 +878,16 @@ __glXInitialize(Display * dpy)
|
|||
|
||||
dpyPriv->glXDrawHash = __glxHashCreate();
|
||||
|
||||
Bool zink = False;
|
||||
Bool try_zink = False;
|
||||
|
||||
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
||||
Bool glx_direct = !debug_get_bool_option("LIBGL_ALWAYS_INDIRECT", false);
|
||||
Bool glx_accel = !debug_get_bool_option("LIBGL_ALWAYS_SOFTWARE", false);
|
||||
const char *env = getenv("MESA_LOADER_DRIVER_OVERRIDE");
|
||||
Bool zink = env && !strcmp(env, "zink");
|
||||
Bool try_zink = False;
|
||||
|
||||
zink = env && !strcmp(env, "zink");
|
||||
try_zink = False;
|
||||
|
||||
dpyPriv->drawHash = __glxHashCreate();
|
||||
|
||||
|
|
@ -928,12 +932,14 @@ __glXInitialize(Display * dpy)
|
|||
|
||||
if (!AllocAndFetchScreenConfigs(dpy, dpyPriv, zink | try_zink)) {
|
||||
Bool fail = True;
|
||||
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
||||
if (try_zink) {
|
||||
free(dpyPriv->screens);
|
||||
dpyPriv->driswDisplay->destroyDisplay(dpyPriv->driswDisplay);
|
||||
dpyPriv->driswDisplay = driswCreateDisplay(dpy, false);
|
||||
fail = !AllocAndFetchScreenConfigs(dpy, dpyPriv, False);
|
||||
}
|
||||
#endif
|
||||
if (fail) {
|
||||
free(dpyPriv);
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue