summaryrefslogtreecommitdiff
path: root/src/glx/x11/dri2_glx.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-01-27 14:34:29 -0800
committerEric Anholt <eric@anholt.net>2009-01-27 14:34:29 -0800
commit0f72de55386c391c4cc3ee346216f09152a6b5ab (patch)
treec79c7cde3c905df9636b3f6afd7d95bc2a19380c /src/glx/x11/dri2_glx.c
parent65d39a9eed9ae60944dd3c5db392a382c5946cbc (diff)
dri2: add complaints for more initialization failures.
Somehow we're running into DRI2Authenticate failing, and silent demotion to swrast is bad.
Diffstat (limited to 'src/glx/x11/dri2_glx.c')
-rw-r--r--src/glx/x11/dri2_glx.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/glx/x11/dri2_glx.c b/src/glx/x11/dri2_glx.c
index 2bee67780b..d16f809126 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,