diff options
author | Keith Whitwell <[email protected]> | 2006-05-08 09:03:35 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2006-05-08 09:03:35 +0000 |
commit | 71b2504e0390fa19f133647c8686d830f8f40eb6 (patch) | |
tree | 21b31e5e240f5bd83fa5b7d8a1907e4f6f6ecb3c /src/mesa/drivers/dri/tdfx | |
parent | 960973b2ecfffc3b09563851e86c863e5304f48f (diff) |
updates to dri drivers for recent stencil changes
Diffstat (limited to 'src/mesa/drivers/dri/tdfx')
-rw-r--r-- | src/mesa/drivers/dri/tdfx/tdfx_render.c | 28 | ||||
-rw-r--r-- | src/mesa/drivers/dri/tdfx/tdfx_state.c | 6 |
2 files changed, 17 insertions, 17 deletions
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_render.c b/src/mesa/drivers/dri/tdfx/tdfx_render.c index 56f5f147eeb..a30ec78a558 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_render.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_render.c @@ -70,7 +70,7 @@ static void tdfxClear( GLcontext *ctx, mask &= ~(BUFFER_BIT_ACCUM); if (mask & BUFFER_BIT_STENCIL) { - if (!fxMesa->haveHwStencil || ctx->Stencil.WriteMask[0] != 0xff) { + if (!fxMesa->haveHwStencil || (ctx->Stencil.WriteMask[0] & 0xff) != 0xff) { /* Napalm seems to have trouble with stencil write masks != 0xff */ /* do stencil clear in software */ mask &= ~(BUFFER_BIT_STENCIL); @@ -98,7 +98,7 @@ static void tdfxClear( GLcontext *ctx, fxMesa->Glide.grStencilMask(/*ctx->Stencil.WriteMask*/ 0xff); /* set stencil ref value = desired clear value */ fxMesa->Glide.grStencilFunc(GR_CMP_ALWAYS, - fxMesa->Stencil.Clear, 0xff); + (fxMesa->Stencil.Clear & 0xff), 0xff); fxMesa->Glide.grStencilOp(GR_STENCILOP_REPLACE, GR_STENCILOP_REPLACE, GR_STENCILOP_REPLACE); fxMesa->Glide.grEnable(GR_STENCIL_MODE_EXT); @@ -129,7 +129,7 @@ static void tdfxClear( GLcontext *ctx, fxMesa->Glide.grBufferClearExt(fxMesa->Color.ClearColor, fxMesa->Color.ClearAlpha, fxMesa->Depth.Clear, - (FxU32) ctx->Stencil.Clear); + (FxU32) (ctx->Stencil.Clear & 0xff)); } else fxMesa->Glide.grBufferClear(fxMesa->Color.ClearColor, @@ -152,11 +152,11 @@ static void tdfxClear( GLcontext *ctx, fxMesa->Glide.grBufferClearExt(fxMesa->Color.ClearColor, fxMesa->Color.ClearAlpha, fxMesa->Depth.Clear, - (FxU32) ctx->Stencil.Clear); + (FxU32) (ctx->Stencil.Clear & 0xff)); else fxMesa->Glide.grBufferClear(fxMesa->Color.ClearColor, fxMesa->Color.ClearAlpha, - fxMesa->Depth.Clear); + fxMesa->Depth.Clear & 0xff); /* clear front */ FX_grColorMaskv_NoLock(ctx, true4); fxMesa->Glide.grRenderBuffer(GR_BUFFER_FRONTBUFFER); @@ -164,7 +164,7 @@ static void tdfxClear( GLcontext *ctx, fxMesa->Glide.grBufferClearExt(fxMesa->Color.ClearColor, fxMesa->Color.ClearAlpha, fxMesa->Depth.Clear, - (FxU32) ctx->Stencil.Clear); + (FxU32) (ctx->Stencil.Clear & 0xff)); else fxMesa->Glide.grBufferClear(fxMesa->Color.ClearColor, fxMesa->Color.ClearAlpha, @@ -181,7 +181,7 @@ static void tdfxClear( GLcontext *ctx, fxMesa->Glide.grBufferClearExt(fxMesa->Color.ClearColor, fxMesa->Color.ClearAlpha, fxMesa->Depth.Clear, - (FxU32) ctx->Stencil.Clear); + (FxU32) (ctx->Stencil.Clear & 0xff)); else fxMesa->Glide.grBufferClear(fxMesa->Color.ClearColor, fxMesa->Color.ClearAlpha, @@ -198,7 +198,7 @@ static void tdfxClear( GLcontext *ctx, fxMesa->Glide.grBufferClearExt(fxMesa->Color.ClearColor, fxMesa->Color.ClearAlpha, fxMesa->Depth.Clear, - (FxU32) ctx->Stencil.Clear); + (FxU32) (ctx->Stencil.Clear & 0xff)); else fxMesa->Glide.grBufferClear(fxMesa->Color.ClearColor, fxMesa->Color.ClearAlpha, @@ -215,7 +215,7 @@ static void tdfxClear( GLcontext *ctx, fxMesa->Glide.grBufferClearExt(fxMesa->Color.ClearColor, fxMesa->Color.ClearAlpha, fxMesa->Depth.Clear, - (FxU32) ctx->Stencil.Clear); + (FxU32) (ctx->Stencil.Clear & 0xff)); else fxMesa->Glide.grBufferClear(fxMesa->Color.ClearColor, fxMesa->Color.ClearAlpha, @@ -225,7 +225,7 @@ static void tdfxClear( GLcontext *ctx, fxMesa->Glide.grBufferClearExt(fxMesa->Color.ClearColor, fxMesa->Color.ClearAlpha, fxMesa->Depth.Clear, - (FxU32) ctx->Stencil.Clear); + (FxU32) (ctx->Stencil.Clear & 0xff)); else fxMesa->Glide.grBufferClear(fxMesa->Color.ClearColor, fxMesa->Color.ClearAlpha, @@ -242,7 +242,7 @@ static void tdfxClear( GLcontext *ctx, fxMesa->Glide.grBufferClearExt(fxMesa->Color.ClearColor, fxMesa->Color.ClearAlpha, fxMesa->Depth.Clear, - (FxU32) ctx->Stencil.Clear); + (FxU32) (ctx->Stencil.Clear & 0xff)); else fxMesa->Glide.grBufferClear(fxMesa->Color.ClearColor, fxMesa->Color.ClearAlpha, @@ -254,7 +254,7 @@ static void tdfxClear( GLcontext *ctx, fxMesa->Glide.grBufferClearExt(fxMesa->Color.ClearColor, fxMesa->Color.ClearAlpha, fxMesa->Depth.Clear, - (FxU32) ctx->Stencil.Clear); + (FxU32) (ctx->Stencil.Clear & 0xff)); else fxMesa->Glide.grBufferClear(fxMesa->Color.ClearColor, fxMesa->Color.ClearAlpha, @@ -272,7 +272,7 @@ static void tdfxClear( GLcontext *ctx, fxMesa->Glide.grBufferClearExt(fxMesa->Color.ClearColor, fxMesa->Color.ClearAlpha, fxMesa->Depth.Clear, - (FxU32) ctx->Stencil.Clear); + (FxU32) (ctx->Stencil.Clear & 0xff)); else fxMesa->Glide.grBufferClear(fxMesa->Color.ClearColor, fxMesa->Color.ClearAlpha, @@ -293,7 +293,7 @@ static void tdfxClear( GLcontext *ctx, fxMesa->Glide.grBufferClearExt(fxMesa->Color.ClearColor, fxMesa->Color.ClearAlpha, fxMesa->Depth.Clear, - (FxU32) ctx->Stencil.Clear); + (FxU32) (ctx->Stencil.Clear & 0xff)); if (ctx->Depth.Mask && ctx->Depth.Test) { fxMesa->Glide.grDepthMask(FXTRUE); } diff --git a/src/mesa/drivers/dri/tdfx/tdfx_state.c b/src/mesa/drivers/dri/tdfx/tdfx_state.c index 1869de47374..a389273b2f0 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_state.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_state.c @@ -462,9 +462,9 @@ static void tdfxUpdateStencil( GLcontext *ctx ) if (fxMesa->haveHwStencil) { if (ctx->Stencil.Enabled) { fxMesa->Stencil.Function = ctx->Stencil.Function[0] - GL_NEVER + GR_CMP_NEVER; - fxMesa->Stencil.RefValue = ctx->Stencil.Ref[0]; - fxMesa->Stencil.ValueMask = ctx->Stencil.ValueMask[0]; - fxMesa->Stencil.WriteMask = ctx->Stencil.WriteMask[0]; + fxMesa->Stencil.RefValue = ctx->Stencil.Ref[0] & 0xff; + fxMesa->Stencil.ValueMask = ctx->Stencil.ValueMask[0] & 0xff; + fxMesa->Stencil.WriteMask = ctx->Stencil.WriteMask[0] & 0xff; fxMesa->Stencil.FailFunc = convertGLStencilOp(ctx->Stencil.FailFunc[0]); fxMesa->Stencil.ZFailFunc = convertGLStencilOp(ctx->Stencil.ZFailFunc[0]); fxMesa->Stencil.ZPassFunc = convertGLStencilOp(ctx->Stencil.ZPassFunc[0]); |