Remove unnecessary #include "mach64_common.h" which breaks the build for me.
[mesa.git] / src / mesa / drivers / dri / mach64 / mach64_context.c
index 4ebca8774af367d2a6b1fd89f64d1c597c9e63c9..bac6b2d7eff7924a5d1c305afd843613b64334e5 100644 (file)
@@ -26,7 +26,7 @@
  * Authors:
  *     Gareth Hughes <gareth@valinux.com>
  *     Leif Delgass <ldelgass@retinalburn.net>
- *     José Fonseca <j_r_fonseca@yahoo.co.uk>
+ *     JosFonseca <j_r_fonseca@yahoo.co.uk>
  */
 
 #include "glheader.h"
@@ -139,8 +139,12 @@ GLboolean mach64CreateContext( const __GLcontextModes *glVisual,
 
    mach64Screen = mmesa->mach64Screen = (mach64ScreenPtr)driScreen->private;
 
-   mmesa->sarea = (ATISAREAPrivPtr)((char *)driScreen->pSAREA +
-                                   sizeof(XF86DRISAREARec));
+   /* Parse configuration files */
+   driParseConfigFiles (&mmesa->optionCache, &mach64Screen->optionCache,
+                        mach64Screen->driScreen->myNum, "mach64");
+
+   mmesa->sarea = (drm_mach64_sarea_t *)((char *)driScreen->pSAREA +
+                                   sizeof(drm_mach64_sarea_t));
 
    mmesa->CurrentTexObj[0] = NULL;
    mmesa->CurrentTexObj[1] = NULL;
@@ -204,19 +208,19 @@ GLboolean mach64CreateContext( const __GLcontextModes *glVisual,
 /*     _tnl_destroy_pipeline( ctx ); */
 /*     _tnl_install_pipeline( ctx, mach64_pipeline ); */
 
-   /* Configure swrast to match hardware characteristics:
+   /* Configure swrast and T&L to match hardware characteristics:
     */
    _swrast_allow_pixel_fog( ctx, GL_FALSE );
    _swrast_allow_vertex_fog( ctx, GL_TRUE );
+   _tnl_allow_pixel_fog( ctx, GL_FALSE );
+   _tnl_allow_vertex_fog( ctx, GL_TRUE );
 
    driInitExtensions( ctx, card_extensions, GL_TRUE );
+
    mach64InitVB( ctx );
    mach64InitTriFuncs( ctx );
-   mach64DDInitDriverFuncs( ctx );
-   mach64DDInitIoctlFuncs( ctx );
    mach64DDInitStateFuncs( ctx );
    mach64DDInitSpanFuncs( ctx );
-   mach64DDInitTextureFuncs( ctx );
    mach64DDInitState( mmesa );
 
    mmesa->do_irqs = (mmesa->mach64Screen->irq && !getenv("MACH64_NO_IRQS"));
@@ -294,6 +298,9 @@ mach64MakeCurrent( __DRIcontextPrivate *driContextPriv,
         newMach64Ctx->dirty = MACH64_UPLOAD_ALL;
       }
 
+      
+      driDrawableInitVBlank( driDrawPriv, newMach64Ctx->vblank_flags );
+
       if ( newMach64Ctx->driDrawable != driDrawPriv ) {
         newMach64Ctx->driDrawable = driDrawPriv;
         mach64CalcViewport( newMach64Ctx->glCtx );