x11: give error messages if Xorg only supports DRI2 and mesa only DRI3

By default mesa now only supports DRI3.

If Xorg is not activating DRI3, it will show an almost empty screen, which is not working.
No error message is given.
This e.g. happens at  Debian package
xserver-xorg-video-intel at the i915 gallium driver.

This commit generates error messages to explain the problem.

Signed-off-by: GKraats <vd.kraats@hccnet.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33679>
This commit is contained in:
GKraats 2025-02-21 17:35:43 +01:00 committed by Marge Bot
parent 7e2c3be454
commit 865a43ab4e

View file

@ -529,8 +529,12 @@ dri3_x11_connect(struct dri2_egl_display *dri2_dpy, bool zink, bool swrast)
if (dri2_dpy->fd_render_gpu < 0) {
int conn_error = xcb_connection_has_error(dri2_dpy->conn);
if (!swrast) {
#ifdef HAVE_X11_DRI2
_eglLog(_EGL_INFO, "DRI3: Could not get DRI3 device");
#else
_eglLog(_EGL_WARNING, "DRI3 error: Could not get DRI3 device");
_eglLog(_EGL_WARNING, "Activate DRI3 at Xorg or build mesa with DRI2");
#endif
if (conn_error)
_eglLog(_EGL_WARNING, "DRI3: Failed to initialize");
}