mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
dri2: add complaints for more initialization failures.
Somehow we're running into DRI2Authenticate failing, and silent demotion to swrast is bad.
This commit is contained in:
parent
65d39a9eed
commit
0f72de5538
1 changed files with 9 additions and 3 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue