We need nmesa->driFd and friends setup before we call nouveauFifoInit
authorBen Skeggs <darktama@iinet.net.au>
Sun, 12 Nov 2006 02:06:30 +0000 (02:06 +0000)
committerBen Skeggs <darktama@iinet.net.au>
Sun, 12 Nov 2006 02:06:30 +0000 (02:06 +0000)
src/mesa/drivers/dri/nouveau/nouveau_context.c

index ff00782..37582f3 100644 (file)
@@ -78,6 +78,16 @@ GLboolean nouveauCreateContext( const __GLcontextModes *glVisual,
        if ( !nmesa )
                return GL_FALSE;
 
+       nmesa->driContext = driContextPriv;
+       nmesa->driScreen = sPriv;
+       nmesa->driDrawable = NULL;
+       nmesa->hHWContext = driContextPriv->hHWContext;
+       nmesa->driHwLock = &sPriv->pSAREA->lock;
+       nmesa->driFd = sPriv->fd;
+
+       nmesa->screen = (nouveauScreenPtr)(sPriv->private);
+       screen=nmesa->screen;
+
        /* Create the hardware context */
        if (!nouveauFifoInit(nmesa))
           return GL_FALSE;
@@ -104,16 +114,6 @@ GLboolean nouveauCreateContext( const __GLcontextModes *glVisual,
        driContextPriv->driverPrivate = nmesa;
        ctx = nmesa->glCtx;
 
-       nmesa->driContext = driContextPriv;
-       nmesa->driScreen = sPriv;
-       nmesa->driDrawable = NULL;
-       nmesa->hHWContext = driContextPriv->hHWContext;
-       nmesa->driHwLock = &sPriv->pSAREA->lock;
-       nmesa->driFd = sPriv->fd;
-
-       nmesa->screen = (nouveauScreenPtr)(sPriv->private);
-       screen=nmesa->screen;
-
        /* Parse configuration files */
        driParseConfigFiles (&nmesa->optionCache, &screen->optionCache,
                        screen->driScreen->myNum, "nouveau");