start removing old (pre-renderbuffer) span code
authorBrian Paul <brian.paul@tungstengraphics.com>
Thu, 2 Jun 2005 04:05:45 +0000 (04:05 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Thu, 2 Jun 2005 04:05:45 +0000 (04:05 +0000)
src/mesa/drivers/dri/common/dri_util.c
src/mesa/drivers/dri/common/dri_util.h
src/mesa/drivers/dri/mach64/mach64_span.c
src/mesa/drivers/dri/r128/r128_span.c
src/mesa/drivers/dri/savage/savagespan.c
src/mesa/drivers/dri/tdfx/tdfx_span.c

index 0c07cc0c1485d3c32b65515214e39d2d4ae31176..b633ae0dcefd195d18b2c58ee851684f843b14ed 100644 (file)
@@ -1648,7 +1648,8 @@ float
 driCalculateSwapUsage( __DRIdrawablePrivate *dPriv, int64_t last_swap_ust,
                       int64_t current_ust )
 {
-   static PFNGLXGETMSCRATEOMLPROC get_msc_rate = NULL;
+#if 0
+   static glXGetMscRateOML_t get_msc_rate = NULL;
    int32_t   n;
    int32_t   d;
    int       interval;
@@ -1656,7 +1657,7 @@ driCalculateSwapUsage( __DRIdrawablePrivate *dPriv, int64_t last_swap_ust,
 
 
    if ( get_msc_rate == NULL ) {
-      get_msc_rate = (PFNGLXGETMSCRATEOMLPROC)
+      get_msc_rate = (glXGetMscRateOML_t)
          glXGetProcAddress( (const GLubyte *) "glXGetMscRateOML" );
    }
    
@@ -1685,6 +1686,9 @@ driCalculateSwapUsage( __DRIdrawablePrivate *dPriv, int64_t last_swap_ust,
    }
    
    return usage;
+#else
+   return 0;
+#endif
 }
 
 /*@}*/
index 6ef1b114f9c684bc361ef93f685d00ba592f6909..cb4e519d8076f3fc2ece54e884b518a09e700b70 100644 (file)
@@ -568,9 +568,11 @@ driCalculateSwapUsage( __DRIdrawablePrivate *dPriv,
                       int64_t last_swap_ust, int64_t current_ust );
 
 /* Test for the GLX header glx.h */
+#if 0
 #ifndef GLX
 extern void 
 (*glXGetProcAddress(const GLubyte *procname))( void );
 #endif
+#endif
 
 #endif /* _DRI_UTIL_H_ */
index 575a36486282eae08f99bfcb5924757f28c39de6..067ffab8eddaf3cb7b7fd3551bdd8dff07f29294 100644 (file)
@@ -239,6 +239,7 @@ void mach64DDInitSpanFuncs( GLcontext *ctx )
    swdd->ReadDepthPixels       = mach64ReadDepthPixels_16;
    swdd->WriteDepthPixels      = mach64WriteDepthPixels_16;
 #endif
+#if 0
    /* No hardware stencil buffer */
    swdd->ReadStencilSpan       = NULL;
    swdd->WriteStencilSpan      = NULL;
@@ -252,6 +253,7 @@ void mach64DDInitSpanFuncs( GLcontext *ctx )
    swdd->WriteMonoCIPixels     = NULL;
    swdd->ReadCI32Span          = NULL;
    swdd->ReadCI32Pixels                = NULL;
+#endif
    swdd->SpanRenderStart       = mach64SpanRenderStart;
    swdd->SpanRenderFinish      = mach64SpanRenderFinish;
 }
index 7b02fc60a19373890d1cc120aac2431dda844582..9a2bf742b6bfa12caaabf8b986f74e70db0db8b2 100644 (file)
@@ -357,54 +357,6 @@ void r128DDInitSpanFuncs( GLcontext *ctx )
    struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference(ctx);
 
    swdd->SetBuffer = r128DDSetBuffer;
-
-   switch ( rmesa->r128Screen->cpp ) {
-   case 2:
-#if 0
-      r128InitPointers_RGB565( swdd );
-#endif
-      break;
-
-   case 4:
-#if 0
-      r128InitPointers_ARGB8888( swdd );
-#endif
-      break;
-
-   default:
-      break;
-   }
-
-   switch ( rmesa->glCtx->Visual.depthBits ) {
-   case 16:
-#if 0
-      swdd->ReadDepthSpan      = r128ReadDepthSpan_16;
-      swdd->WriteDepthSpan     = r128WriteDepthSpan_16;
-      swdd->ReadDepthPixels    = r128ReadDepthPixels_16;
-      swdd->WriteDepthPixels   = r128WriteDepthPixels_16;
-#endif
-      break;
-
-   case 24:
-#if 0
-      swdd->ReadDepthSpan      = r128ReadDepthSpan_24_8;
-      swdd->WriteDepthSpan     = r128WriteDepthSpan_24_8;
-      swdd->ReadDepthPixels    = r128ReadDepthPixels_24_8;
-      swdd->WriteDepthPixels   = r128WriteDepthPixels_24_8;
-#endif
-      break;
-
-   default:
-      break;
-   }
-
-   swdd->WriteCI8Span          = NULL;
-   swdd->WriteCI32Span         = NULL;
-   swdd->WriteMonoCISpan       = NULL;
-   swdd->WriteCI32Pixels       = NULL;
-   swdd->WriteMonoCIPixels     = NULL;
-   swdd->ReadCI32Span          = NULL;
-   swdd->ReadCI32Pixels                = NULL;
    swdd->SpanRenderStart       = r128SpanRenderStart;
    swdd->SpanRenderFinish      = r128SpanRenderFinish;
 }
index acdfde097b539c314892c6292e18a85c682313f3..fef0aeec7842e562dcc0452c6a23ef272024d79b 100644 (file)
@@ -305,65 +305,6 @@ void savageDDInitSpanFuncs( GLcontext *ctx )
    struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference(ctx);
 
    swdd->SetBuffer = savageDDSetBuffer;
-   
-#if 0
-   switch (imesa->savageScreen->cpp) 
-   {
-   case 2: savageInitPointers_565( swdd ); break;
-   case 4: savageInitPointers_8888( swdd );
-   }
-#endif
-
-   switch (imesa->savageScreen->zpp)
-   {
-   case 2:
-#if 0
-       if (imesa->float_depth) {
-          swdd->ReadDepthSpan = savageReadDepthSpan_16f;
-          swdd->WriteDepthSpan = savageWriteDepthSpan_16f;
-          swdd->WriteMonoDepthSpan = savageWriteMonoDepthSpan_16f;
-          swdd->ReadDepthPixels = savageReadDepthPixels_16f;
-          swdd->WriteDepthPixels = savageWriteDepthPixels_16f;
-       } else {
-          swdd->ReadDepthSpan = savageReadDepthSpan_16;
-          swdd->WriteDepthSpan = savageWriteDepthSpan_16;
-          swdd->WriteMonoDepthSpan = savageWriteMonoDepthSpan_16;
-          swdd->ReadDepthPixels = savageReadDepthPixels_16;
-          swdd->WriteDepthPixels = savageWriteDepthPixels_16;
-       }
-#endif
-       break;
-   case 4:
-#if 0
-       if (imesa->float_depth) {
-          swdd->ReadDepthSpan = savageReadDepthSpan_8_24f;
-          swdd->WriteDepthSpan = savageWriteDepthSpan_8_24f;
-          swdd->WriteMonoDepthSpan = savageWriteMonoDepthSpan_8_24f;
-          swdd->ReadDepthPixels = savageReadDepthPixels_8_24f;
-          swdd->WriteDepthPixels = savageWriteDepthPixels_8_24f;    
-       } else {
-          swdd->ReadDepthSpan = savageReadDepthSpan_8_24;
-          swdd->WriteDepthSpan = savageWriteDepthSpan_8_24;
-          swdd->WriteMonoDepthSpan = savageWriteMonoDepthSpan_8_24;
-          swdd->ReadDepthPixels = savageReadDepthPixels_8_24;
-          swdd->WriteDepthPixels = savageWriteDepthPixels_8_24;    
-       }
-       swdd->ReadStencilSpan = savageReadStencilSpan_8_24;
-       swdd->WriteStencilSpan = savageWriteStencilSpan_8_24;
-       swdd->ReadStencilPixels = savageReadStencilPixels_8_24;
-       swdd->WriteStencilPixels = savageWriteStencilPixels_8_24;
-#endif
-       break;   
-   
-   }
-   swdd->WriteCI8Span        =NULL;
-   swdd->WriteCI32Span       =NULL;
-   swdd->WriteMonoCISpan     =NULL;
-   swdd->WriteCI32Pixels     =NULL;
-   swdd->WriteMonoCIPixels   =NULL;
-   swdd->ReadCI32Span        =NULL;
-   swdd->ReadCI32Pixels      =NULL;
-
    swdd->SpanRenderStart = savageSpanRenderStart;
 
    /* Pixel path fallbacks.
index 1fab811b74dbe4816e00d0661ba180617c043fae..f27af2efcff091aab31190ba8a3fd0162b3f0e99 100644 (file)
@@ -1372,74 +1372,8 @@ static void tdfxDDSetBuffer( GLcontext *ctx,
 
 void tdfxDDInitSpanFuncs( GLcontext *ctx )
 {
-   tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
    struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference( ctx );
-
    swdd->SetBuffer = tdfxDDSetBuffer;
-
-#if 0
-   if ( VISUAL_EQUALS_RGBA(ctx->Visual, 5, 6, 5, 0) )
-   {
-      /* 16bpp mode */
-      swdd->WriteRGBASpan      = tdfxWriteRGBASpan_RGB565;
-      swdd->WriteRGBSpan       = tdfxWriteRGBSpan_RGB565;
-      swdd->WriteMonoRGBASpan  = tdfxWriteMonoRGBASpan_RGB565;
-      swdd->WriteRGBAPixels    = tdfxWriteRGBAPixels_RGB565;
-      swdd->WriteMonoRGBAPixels        = tdfxWriteMonoRGBAPixels_RGB565;
-      swdd->ReadRGBASpan       = tdfxReadRGBASpan_RGB565;
-      swdd->ReadRGBAPixels     = tdfxReadRGBAPixels_RGB565;
-   }
-   else if ( VISUAL_EQUALS_RGBA(ctx->Visual, 8, 8, 8, 0) )
-   {
-      /* 24bpp mode */
-      swdd->WriteRGBASpan      = tdfxWriteRGBASpan_RGB888;
-      swdd->WriteRGBSpan       = tdfxWriteRGBSpan_RGB888;
-      swdd->WriteMonoRGBASpan  = tdfxWriteMonoRGBASpan_RGB888;
-      swdd->WriteRGBAPixels    = tdfxWriteRGBAPixels_RGB888;
-      swdd->WriteMonoRGBAPixels        = tdfxWriteMonoRGBAPixels_RGB888;
-      swdd->ReadRGBASpan       = tdfxReadRGBASpan_RGB888;
-      swdd->ReadRGBAPixels     = tdfxReadRGBAPixels_RGB888;
-   }
-   else if ( VISUAL_EQUALS_RGBA(ctx->Visual, 8, 8, 8, 8) )
-   {
-      /* 32bpp mode */
-      swdd->WriteRGBASpan      = tdfxWriteRGBASpan_ARGB8888;
-      swdd->WriteRGBSpan       = tdfxWriteRGBSpan_ARGB8888;
-      swdd->WriteMonoRGBASpan  = tdfxWriteMonoRGBASpan_ARGB8888;
-      swdd->WriteRGBAPixels    = tdfxWriteRGBAPixels_ARGB8888;
-      swdd->WriteMonoRGBAPixels        = tdfxWriteMonoRGBAPixels_ARGB8888;
-      swdd->ReadRGBAPixels      = tdfxReadRGBAPixels_ARGB8888;
-      swdd->ReadRGBASpan       = tdfxReadRGBASpan_ARGB8888;
-   }
-   else
-   {
-      abort();
-   }
-#endif
-
-   if ( fxMesa->haveHwStencil ) {
-#if 0
-      swdd->WriteStencilSpan   = write_stencil_span;
-      swdd->ReadStencilSpan    = read_stencil_span;
-      swdd->WriteStencilPixels = write_stencil_pixels;
-      swdd->ReadStencilPixels  = read_stencil_pixels;
-#endif
-   }
-
-#if 0
-   swdd->WriteDepthSpan                = tdfxDDWriteDepthSpan;
-   swdd->WriteDepthPixels      = tdfxDDWriteDepthPixels;
-   swdd->ReadDepthSpan         = tdfxDDReadDepthSpan;
-   swdd->ReadDepthPixels       = tdfxDDReadDepthPixels;
-#endif
-   swdd->WriteCI8Span          = NULL;
-   swdd->WriteCI32Span         = NULL;
-   swdd->WriteMonoCISpan       = NULL;
-   swdd->WriteCI32Pixels       = NULL;
-   swdd->WriteMonoCIPixels     = NULL;
-   swdd->ReadCI32Span          = NULL;
-   swdd->ReadCI32Pixels                = NULL;
-
    swdd->SpanRenderStart          = tdfxSpanRenderStart;
    swdd->SpanRenderFinish         = tdfxSpanRenderFinish; 
 }