/***** 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)
{
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 */
/* Set the buffer used for drawing */
/* XXX support for separate read/draw buffers hasn't been tested */
-static GLboolean fxDDSetDrawBuffer(GLcontext *ctx, GLenum mode )
+static GLboolean fxDDSetDrawBuffer(GLcontext *ctx, GLenum mode)
{
fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx;
FX_grRenderBuffer(fxMesa->currentFB);
return GL_TRUE;
}
+ else if (mode == GL_NONE) {
+ FX_grColorMask(FXFALSE,FXFALSE);
+ return GL_TRUE;
+ }
else {
return GL_FALSE;
}
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 {
}
}
/* now make the GL_RENDERER string */
- sprintf(buffer, "Mesa DRI %s 20000420", hardware);
+ sprintf(buffer, "Mesa DRI %s 20000510", hardware);
return buffer;
}
case GL_VENDOR:
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();
fxMesa->glCtx->NrPipelineStages);
/* Run the config file */
- gl_context_initialize( fxMesa->glCtx );
+ _mesa_context_initialize( fxMesa->glCtx );
return 1;
}
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_paletted_texture");
+ gl_extensions_disable(ctx, "GL_EXT_fog_coord");
gl_extensions_add(ctx, DEFAULT_ON, "3DFX_set_global_palette", 0);
if (!ctx->Hint.AllowDrawMem)
return GL_TRUE; /* you'll take it and like it */
- if((ctx->RasterMask & STENCIL_BIT) ||
+ if((ctx->RasterMask & (STENCIL_BIT | MULTI_DRAW_BIT)) ||
((ctx->Color.BlendEnabled) && (ctx->Color.BlendEquation!=GL_FUNC_ADD_EXT)) ||
((ctx->Color.ColorLogicOpEnabled) && (ctx->Color.LogicOp!=GL_COPY)) ||
(ctx->Light.Model.ColorControl==GL_SEPARATE_SPECULAR_COLOR) ||
ctx->Driver.GetString=fxDDGetString;
- ctx->Driver.Dither=fxDDDither;
-
ctx->Driver.NearFar=fxDDSetNearFar;
ctx->Driver.GetParameteri=fxDDGetParameteri;