glx: move drisw dri3 handling for zink out to glxInitialize
this is much cleaner Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30375>
This commit is contained in:

committed by
Marge Bot

parent
82955b48aa
commit
725875cdea
@@ -996,19 +996,6 @@ driswCreateScreen(int screen, struct glx_display *priv, enum glx_driver glx_driv
|
|||||||
goto handle_error;
|
goto handle_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_DRI3)
|
|
||||||
if (glx_driver) {
|
|
||||||
if (!priv->has_multibuffer &&
|
|
||||||
!debug_get_bool_option("LIBGL_ALWAYS_SOFTWARE", false) &&
|
|
||||||
!debug_get_bool_option("LIBGL_KOPPER_DRI2", false)) {
|
|
||||||
/* only print error if zink was explicitly requested */
|
|
||||||
if (glx_driver & GLX_DRIVER_ZINK_YES)
|
|
||||||
CriticalErrorMessageF("DRI3 not available\n");
|
|
||||||
goto handle_error;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
glx_config_destroy_list(psc->base.configs);
|
glx_config_destroy_list(psc->base.configs);
|
||||||
psc->base.configs = configs;
|
psc->base.configs = configs;
|
||||||
glx_config_destroy_list(psc->base.visuals);
|
glx_config_destroy_list(psc->base.visuals);
|
||||||
|
@@ -928,6 +928,17 @@ __glXInitialize(Display * dpy)
|
|||||||
if (glx_direct)
|
if (glx_direct)
|
||||||
glx_driver |= GLX_DRIVER_SW;
|
glx_driver |= GLX_DRIVER_SW;
|
||||||
|
|
||||||
|
if (!dpyPriv->has_multibuffer && glx_accel && !debug_get_bool_option("LIBGL_KOPPER_DRI2", false)) {
|
||||||
|
if (glx_driver & GLX_DRIVER_ZINK_YES) {
|
||||||
|
/* only print error if zink was explicitly requested */
|
||||||
|
CriticalErrorMessageF("DRI3 not available\n");
|
||||||
|
free(dpyPriv);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
/* if no dri3 and not using dri2, disable zink */
|
||||||
|
glx_driver &= ~GLX_DRIVER_ZINK_INFER;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef GLX_USE_WINDOWSGL
|
#ifdef GLX_USE_WINDOWSGL
|
||||||
if (glx_direct && glx_accel)
|
if (glx_direct && glx_accel)
|
||||||
glx_driver |= GLX_DRIVER_WINDOWS;
|
glx_driver |= GLX_DRIVER_WINDOWS;
|
||||||
|
Reference in New Issue
Block a user