Basic work to support deep color channels:
[mesa.git] / src / mesa / drivers / glide / fxdd.c
index 2705d6bc17dbe4909f3787bda7caf27fe387ff1e..b69b6999ea6328e402067a659ab16752563ef281 100644 (file)
@@ -102,21 +102,6 @@ void fxInitPixelTables(fxMesaContext fxMesa, GLboolean bgrOrder)
 /*****                 Miscellaneous functions                    *****/
 /**********************************************************************/
 
-/* Enalbe/Disable dithering */
-static void fxDDDither(GLcontext *ctx, GLboolean enable)
-{
-  if (MESA_VERBOSE&VERBOSE_DRIVER) {
-    fprintf(stderr,"fxmesa: fxDDDither()\n");
-  }
-
-  if (enable) {
-    FX_grDitherMode(GR_DITHER_4x4);
-  } else {
-    FX_grDitherMode(GR_DITHER_DISABLE);
-  }
-}
-
-
 /* Return buffer size information */
 static void fxDDBufferSize(GLcontext *ctx, GLuint *width, GLuint *height)
 {
@@ -274,6 +259,8 @@ static GLbitfield fxDDClear(GLcontext *ctx, GLbitfield mask, GLboolean all,
       FX_grColorMask(FXTRUE, ctx->Color.ColorMask[ACOMP] && fxMesa->haveAlphaBuffer);
       if (ctx->Color.DrawDestMask & FRONT_LEFT_BIT)
         FX_grRenderBuffer(GR_BUFFER_FRONTBUFFER);
+      if (!ctx->Depth.Test || !ctx->Depth.Mask)
+        FX_grDepthMask(FXFALSE);
       break;
     default:
       /* error */
@@ -533,7 +520,7 @@ static GLboolean fxDDReadPixels( GLcontext *ctx, GLint x, GLint y,
                                  const struct gl_pixelstore_attrib *packing,
                                  GLvoid *dstImage )
 {
-  if (ctx->Pixel.ScaleOrBiasRGBA || ctx->Pixel.MapColorFlag) {
+  if (ctx->ImageTransferState) {
     return GL_FALSE;  /* can't do this */
   }
   else {
@@ -844,7 +831,6 @@ int fxDDInitFxMesaContext( fxMesaContext fxMesa )
    fxMesa->glCtx->Const.MaxTextureLevels=9;
    fxMesa->glCtx->Const.MaxTextureSize=256;
    fxMesa->glCtx->Const.MaxTextureUnits=fxMesa->emulateTwoTMUs ? 2 : 1;
-   fxMesa->glCtx->NewState|=NEW_DRVSTATE1;
    fxMesa->new_state = NEW_ALL;
   
    fxDDSetupInit();
@@ -877,7 +863,7 @@ int fxDDInitFxMesaContext( fxMesaContext fxMesa )
         fxMesa->glCtx->NrPipelineStages);
 
    /* Run the config file */
-   gl_context_initialize( fxMesa->glCtx );
+   _mesa_context_initialize( fxMesa->glCtx );
 
    return 1;
 }
@@ -900,6 +886,7 @@ void fxDDInitExtensions( GLcontext *ctx )
    gl_extensions_disable(ctx, "GL_EXT_blend_minmax");
    gl_extensions_disable(ctx, "GL_EXT_blend_subtract");
    gl_extensions_disable(ctx, "GL_EXT_blend_color");
+   gl_extensions_disable(ctx, "GL_EXT_fog_coord");
 
    gl_extensions_add(ctx, DEFAULT_ON, "3DFX_set_global_palette", 0);
    
@@ -1097,8 +1084,6 @@ void fxSetupDDPointers(GLcontext *ctx)
          
   ctx->Driver.GetString=fxDDGetString;
 
-  ctx->Driver.Dither=fxDDDither;
-
   ctx->Driver.NearFar=fxDDSetNearFar;
 
   ctx->Driver.GetParameteri=fxDDGetParameteri;