aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2013-11-07 15:44:57 -0800
committerEric Anholt <[email protected]>2013-11-07 19:08:09 -0800
commit4b5d0d10f106ef7659917235dfbcd6d0e00e5bf0 (patch)
tree510545e8dd6b55383d3df3d2ba196bbb68c8f85c /src
parent2d94601582e4f0fcaf8c02a15b23cba39dec7bb1 (diff)
glx: Add a more informative debug message in a DRI3 error path.
Diffstat (limited to 'src')
-rw-r--r--src/glx/dri3_glx.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c
index a78fc800bdb..61cb2de1d00 100644
--- a/src/glx/dri3_glx.c
+++ b/src/glx/dri3_glx.c
@@ -1579,6 +1579,7 @@ static const struct glx_screen_vtable dri3_screen_vtable = {
static struct glx_screen *
dri3_create_screen(int screen, struct glx_display * priv)
{
+ xcb_connection_t *c = XGetXCBConnection(priv->dpy);
const __DRIconfig **driver_configs;
const __DRIextension **extensions;
const struct dri3_display *const pdp = (struct dri3_display *)
@@ -1602,9 +1603,15 @@ dri3_create_screen(int screen, struct glx_display * priv)
psc->fd = dri3_open(priv->dpy, RootWindow(priv->dpy, screen), None);
if (psc->fd < 0) {
+ int conn_error = xcb_connection_has_error(c);
+
glx_screen_cleanup(&psc->base);
free(psc);
InfoMessageF("screen %d does not appear to be DRI3 capable\n", screen);
+
+ if (conn_error)
+ ErrorMessageF("Connection closed during DRI3 initialization failure");
+
return NULL;
}
deviceName = NULL;