mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 04:00:10 +01:00
egl/glx: don't load non-sw zink without dri3 support
this is going to be broken, so don't bother trying also add LIBGL_KOPPER_DRI2 so people can continue to footgun if they really really want to Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25640>
This commit is contained in:
parent
ee04799d82
commit
cedb534a17
3 changed files with 23 additions and 5 deletions
|
|
@ -1062,6 +1062,13 @@ dri2_setup_extensions(_EGLDisplay *disp)
|
|||
dri2_dpy->present_minor_version >= 2)) &&
|
||||
(dri2_dpy->image && dri2_dpy->image->base.version >= 15);
|
||||
#endif
|
||||
if (disp->Options.Zink && !disp->Options.ForceSoftware &&
|
||||
#ifdef HAVE_DRI3_MODIFIERS
|
||||
dri2_dpy->dri3_major_version != -1 &&
|
||||
!dri2_dpy->multibuffers_available &&
|
||||
#endif
|
||||
!debug_get_bool_option("LIBGL_KOPPER_DRI2", false))
|
||||
return EGL_FALSE;
|
||||
|
||||
loader_bind_extensions(dri2_dpy, optional_core_extensions,
|
||||
ARRAY_SIZE(optional_core_extensions), extensions);
|
||||
|
|
|
|||
|
|
@ -550,6 +550,11 @@ dri3_x11_connect(struct dri2_egl_display *dri2_dpy)
|
|||
xcb_generic_error_t *error;
|
||||
const xcb_query_extension_reply_t *extension;
|
||||
|
||||
dri2_dpy->dri3_major_version = 0;
|
||||
dri2_dpy->dri3_minor_version = 0;
|
||||
dri2_dpy->present_major_version = 0;
|
||||
dri2_dpy->present_minor_version = 0;
|
||||
|
||||
xcb_prefetch_extension_data(dri2_dpy->conn, &xcb_dri3_id);
|
||||
xcb_prefetch_extension_data(dri2_dpy->conn, &xcb_present_id);
|
||||
xcb_prefetch_extension_data(dri2_dpy->conn, &xcb_xfixes_id);
|
||||
|
|
|
|||
|
|
@ -995,16 +995,22 @@ driswCreateScreenDriver(int screen, struct glx_display *priv,
|
|||
goto handle_error;
|
||||
}
|
||||
|
||||
if (pdpyp->zink) {
|
||||
bool err;
|
||||
psc->has_multibuffer = dri3_check_multibuffer(priv->dpy, &err);
|
||||
if (!psc->has_multibuffer &&
|
||||
!debug_get_bool_option("LIBGL_ALWAYS_SOFTWARE", false) &&
|
||||
!debug_get_bool_option("LIBGL_KOPPER_DRI2", false)) {
|
||||
CriticalErrorMessageF("DRI3 not available\n");
|
||||
goto handle_error;
|
||||
}
|
||||
}
|
||||
|
||||
glx_config_destroy_list(psc->base.configs);
|
||||
psc->base.configs = configs;
|
||||
glx_config_destroy_list(psc->base.visuals);
|
||||
psc->base.visuals = visuals;
|
||||
|
||||
if (pdpyp->zink) {
|
||||
bool err;
|
||||
psc->has_multibuffer = dri3_check_multibuffer(priv->dpy, &err);
|
||||
}
|
||||
|
||||
psc->driver_configs = driver_configs;
|
||||
|
||||
psc->base.vtable = &drisw_screen_vtable;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue