summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/glide/fxdd.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-03-29 15:48:43 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-03-29 15:48:43 +0000
commita14ee6b081e7436cb48c7e384f9c4a3b1d3fdae8 (patch)
treeb6ebd2162d25973c0ab9bbdf03ac6ba60aeef042 /src/mesa/drivers/glide/fxdd.c
parent7d69e9e93f9f5e87fc7e4782a2eeecccf1b65c8e (diff)
fixed some buffer clear bugs
Diffstat (limited to 'src/mesa/drivers/glide/fxdd.c')
-rw-r--r--src/mesa/drivers/glide/fxdd.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c
index cb8ae09335..3fdb60c2c2 100644
--- a/src/mesa/drivers/glide/fxdd.c
+++ b/src/mesa/drivers/glide/fxdd.c
@@ -211,6 +211,7 @@ static GLbitfield fxDDClear(GLcontext *ctx, GLbitfield mask, GLboolean all,
* This is a work-around/
*/
/* clear depth */
+ FX_grDepthMask(FXTRUE);
FX_grRenderBuffer(GR_BUFFER_BACKBUFFER);
FX_grColorMask(FXFALSE,FXFALSE);
FX_grBufferClear(fxMesa->clearC, fxMesa->clearA, clearD);
@@ -224,8 +225,8 @@ static GLbitfield fxDDClear(GLcontext *ctx, GLbitfield mask, GLboolean all,
FX_grDepthMask(FXFALSE);
FX_grRenderBuffer(GR_BUFFER_BACKBUFFER);
FX_grBufferClear(fxMesa->clearC, fxMesa->clearA, clearD);
- if (!ctx->Depth.Mask) {
- FX_grDepthMask(FXFALSE);
+ if (ctx->Depth.Mask) {
+ FX_grDepthMask(FXTRUE);
}
break;
case DD_FRONT_LEFT_BIT:
@@ -233,8 +234,8 @@ static GLbitfield fxDDClear(GLcontext *ctx, GLbitfield mask, GLboolean all,
FX_grDepthMask(FXFALSE);
FX_grRenderBuffer(GR_BUFFER_FRONTBUFFER);
FX_grBufferClear(fxMesa->clearC, fxMesa->clearA, clearD);
- if (!ctx->Depth.Mask) {
- FX_grDepthMask(FXFALSE);
+ if (ctx->Depth.Mask) {
+ FX_grDepthMask(FXTRUE);
}
break;
case DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT:
@@ -244,8 +245,8 @@ static GLbitfield fxDDClear(GLcontext *ctx, GLbitfield mask, GLboolean all,
FX_grBufferClear(fxMesa->clearC, fxMesa->clearA, clearD);
FX_grRenderBuffer(GR_BUFFER_FRONTBUFFER);
FX_grBufferClear(fxMesa->clearC, fxMesa->clearA, clearD);
- if (!ctx->Depth.Mask) {
- FX_grDepthMask(FXFALSE);
+ if (ctx->Depth.Mask) {
+ FX_grDepthMask(FXTRUE);
}
break;
case DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT | DD_DEPTH_BIT:
@@ -263,10 +264,13 @@ static GLbitfield fxDDClear(GLcontext *ctx, GLbitfield mask, GLboolean all,
break;
case DD_DEPTH_BIT:
/* just the depth buffer */
+ FX_grRenderBuffer(GR_BUFFER_BACKBUFFER);
FX_grColorMask(FXFALSE,FXFALSE);
- FX_grBufferClear(fxMesa->clearC, fxMesa->clearA,
- (FxU16)(ctx->Depth.Clear*0xffff));
+ FX_grDepthMask(FXTRUE);
+ FX_grBufferClear(fxMesa->clearC, fxMesa->clearA, clearD);
FX_grColorMask(FXTRUE, ctx->Color.ColorMask[ACOMP] && fxMesa->haveAlphaBuffer);
+ if (ctx->Color.DrawDestMask & FRONT_LEFT_BIT)
+ FX_grRenderBuffer(GR_BUFFER_FRONTBUFFER);
break;
default:
/* error */