summaryrefslogtreecommitdiffstats
path: root/src/glx
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx')
-rw-r--r--src/glx/dri2_glx.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index d4255599f31..79f6ecc9933 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -1201,6 +1201,16 @@ dri2CreateScreen(int screen, struct glx_display * priv)
goto handle_error;
}
+ if (drmGetMagic(psc->fd, &magic)) {
+ ErrorMessageF("failed to get magic\n");
+ goto handle_error;
+ }
+
+ if (!DRI2Authenticate(priv->dpy, RootWindow(priv->dpy, screen), magic)) {
+ ErrorMessageF("failed to authenticate magic %d\n", magic);
+ goto handle_error;
+ }
+
/* If Mesa knows about the appropriate driver for this fd, then trust it.
* Otherwise, default to the server's value.
*/
@@ -1232,16 +1242,6 @@ dri2CreateScreen(int screen, struct glx_display * priv)
goto handle_error;
}
- if (drmGetMagic(psc->fd, &magic)) {
- ErrorMessageF("failed to get magic\n");
- goto handle_error;
- }
-
- if (!DRI2Authenticate(priv->dpy, RootWindow(priv->dpy, screen), magic)) {
- ErrorMessageF("failed to authenticate magic %d\n", magic);
- goto handle_error;
- }
-
if (psc->dri2->base.version >= 4) {
psc->driScreen =
psc->dri2->createNewScreen2(screen, psc->fd,