From: Eric Anholt Date: Tue, 27 Jan 2009 22:34:29 +0000 (-0800) Subject: dri2: add complaints for more initialization failures. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0f72de55386c391c4cc3ee346216f09152a6b5ab;p=mesa.git dri2: add complaints for more initialization failures. Somehow we're running into DRI2Authenticate failing, and silent demotion to swrast is bad. --- diff --git a/src/glx/x11/dri2_glx.c b/src/glx/x11/dri2_glx.c index 2bee67780bd..d16f8091265 100644 --- a/src/glx/x11/dri2_glx.c +++ b/src/glx/x11/dri2_glx.c @@ -282,8 +282,10 @@ static __GLXDRIscreen *dri2CreateScreen(__GLXscreenConfigs *psc, int screen, return NULL; psc->driver = driOpenDriver(driverName); - if (psc->driver == NULL) + if (psc->driver == NULL) { + ErrorMessageF("driver pointer missing\n"); goto handle_error; + } extensions = dlsym(psc->driver, __DRI_DRIVER_EXTENSIONS); if (extensions == NULL) { @@ -309,11 +311,15 @@ static __GLXDRIscreen *dri2CreateScreen(__GLXscreenConfigs *psc, int screen, return NULL; } - if (drmGetMagic(psc->fd, &magic)) + if (drmGetMagic(psc->fd, &magic)) { + ErrorMessageF("failed to get magic\n"); return NULL; + } - if (!DRI2Authenticate(psc->dpy, RootWindow(psc->dpy, screen), magic)) + if (!DRI2Authenticate(psc->dpy, RootWindow(psc->dpy, screen), magic)) { + ErrorMessageF("failed to authenticate magic %d\n", magic); return NULL; + } psc->__driScreen = psc->dri2->createNewScreen(screen, psc->fd,