The loader may issue dri ioctls to determine the driver name. Signed-off-by: Jonathan Gray <j...@jsg.id.au> --- src/glx/dri2_glx.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
diff --git src/glx/dri2_glx.c src/glx/dri2_glx.c index 5a960b0..b61422f 100644 --- src/glx/dri2_glx.c +++ src/glx/dri2_glx.c @@ -1200,6 +1200,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. */ @@ -1231,16 +1241,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, -- 1.8.5.3 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev