From 865a43ab4e7140935c39fb00c708de127903a019 Mon Sep 17 00:00:00 2001 From: GKraats Date: Fri, 21 Feb 2025 17:35:43 +0100 Subject: [PATCH] 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 Part-of: --- src/egl/drivers/dri2/platform_x11_dri3.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/egl/drivers/dri2/platform_x11_dri3.c b/src/egl/drivers/dri2/platform_x11_dri3.c index e40f3e8497a..cb222fc6a55 100644 --- a/src/egl/drivers/dri2/platform_x11_dri3.c +++ b/src/egl/drivers/dri2/platform_x11_dri3.c @@ -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"); }