const FxU16 clearD = (FxU16) (ctx->Depth.Clear * 0xffff);
GLbitfield softwareMask = mask & (DD_STENCIL_BIT | DD_ACCUM_BIT);
+ /* we can't clear stencil or accum buffers */
+ mask &= ~(DD_STENCIL_BIT | DD_ACCUM_BIT);
+
if (MESA_VERBOSE & VERBOSE_DRIVER) {
fprintf(stderr,"fxmesa: fxDDClear(%d,%d,%d,%d)\n", (int) x, (int) y,
(int) width, (int) height);
}
if (colorMask != 0xffffffff) {
- /* do color buffer clears in software */
+ /* do masked color buffer clears in software */
softwareMask |= (mask & (DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT));
mask &= ~(DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT);
}
/* 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;
}
else {
fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx;
GrLfbInfo_t info;
- GLboolean result;
+ GLboolean result = GL_FALSE;
BEGIN_BOARD_LOCK();
if (grLfbLock(GR_LFB_READ_ONLY,
grLfbUnlock(GR_LFB_READ_ONLY, fxMesa->currentFB);
}
END_BOARD_LOCK();
-
return result;
}
}
}
}
/* now make the GL_RENDERER string */
- sprintf(buffer, "Mesa DRI %s 20000329", hardware);
+ sprintf(buffer, "Mesa DRI %s 20000510", hardware);
return buffer;
}
case GL_VENDOR:
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_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) ||
}
if (ctx->Texture.ReallyEnabled & TEXTURE0_2D) {
- if (ctx->Texture.Unit[0].EnvMode == GL_BLEND)
+ if (ctx->Texture.Unit[0].EnvMode == GL_BLEND &&
+ (ctx->Texture.ReallyEnabled & TEXTURE1_2D ||
+ ctx->Texture.Unit[0].EnvColor[0] != 0 ||
+ ctx->Texture.Unit[0].EnvColor[1] != 0 ||
+ ctx->Texture.Unit[0].EnvColor[2] != 0 ||
+ ctx->Texture.Unit[0].EnvColor[3] != 1)) {
return GL_FALSE;
+ }
if (ctx->Texture.Unit[0].Current->Image[0]->Border > 0)
return GL_FALSE;
}