Merge branch 'llvm-cliptest-viewport'
[mesa.git] / src / mesa / drivers / dri / tdfx / tdfx_context.c
index edb1875f767f9f5a5e6eb21eb60b91725f5c3d9d..63dfa5ae746687e139339f60354da475f9164da7 100644 (file)
@@ -124,7 +124,7 @@ static const struct dri_extension napalm_extensions[] =
 /*
  * Enable/Disable the extensions for this context.
  */
-static void tdfxDDInitExtensions( GLcontext *ctx )
+static void tdfxDDInitExtensions( struct gl_context *ctx )
 {
    tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
 
@@ -136,8 +136,6 @@ static void tdfxDDInitExtensions( GLcontext *ctx )
 
    if ( TDFX_IS_NAPALM( fxMesa ) ) {
       driInitExtensions( ctx, napalm_extensions, GL_FALSE );
-   } else {
-      _mesa_enable_extension( ctx, "GL_SGIS_generate_mipmap" );
    }
 }
 
@@ -164,12 +162,13 @@ static const struct dri_debug_control debug_control[] =
     { NULL,    0 }
 };
 
-GLboolean tdfxCreateContext( const __GLcontextModes *mesaVis,
+GLboolean tdfxCreateContext( gl_api api,
+                            const struct gl_config *mesaVis,
                             __DRIcontext *driContextPriv,
                              void *sharedContextPrivate )
 {
    tdfxContextPtr fxMesa;
-   GLcontext *ctx, *shareCtx;
+   struct gl_context *ctx, *shareCtx;
    __DRIscreen *sPriv = driContextPriv->driScreenPriv;
    tdfxScreenPrivate *fxScreen = (tdfxScreenPrivate *) sPriv->private;
    TDFXSAREAPriv *saPriv = (TDFXSAREAPriv *) ((char *) sPriv->pSAREA +
@@ -636,7 +635,7 @@ tdfxMakeCurrent( __DRIcontext *driContextPriv,
 
    if ( driContextPriv ) {
       tdfxContextPtr newFx = (tdfxContextPtr) driContextPriv->driverPrivate;
-      GLcontext *newCtx = newFx->glCtx;
+      struct gl_context *newCtx = newFx->glCtx;
       GET_CURRENT_CONTEXT(curCtx);
 
       if ((newFx->driDrawable != driDrawPriv)
@@ -652,8 +651,8 @@ tdfxMakeCurrent( __DRIcontext *driContextPriv,
              * dispatch is set correctly.
              */
             _mesa_make_current( newCtx,
-                                (GLframebuffer *) driDrawPriv->driverPrivate,
-                                (GLframebuffer *) driReadPriv->driverPrivate );
+                                (struct gl_framebuffer *) driDrawPriv->driverPrivate,
+                                (struct gl_framebuffer *) driReadPriv->driverPrivate );
             return GL_TRUE;
         }
         /* [dBorca] tunnel2 requires this */
@@ -690,8 +689,8 @@ tdfxMakeCurrent( __DRIcontext *driContextPriv,
       }
 
       _mesa_make_current( newCtx,
-                          (GLframebuffer *) driDrawPriv->driverPrivate,
-                          (GLframebuffer *) driReadPriv->driverPrivate );
+                          (struct gl_framebuffer *) driDrawPriv->driverPrivate,
+                          (struct gl_framebuffer *) driReadPriv->driverPrivate );
    } else {
       _mesa_make_current( NULL, NULL, NULL );
    }