summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFelix Kuehling <fxkuehl@gmx.de>2004-03-20 17:12:06 +0000
committerFelix Kuehling <fxkuehl@gmx.de>2004-03-20 17:12:06 +0000
commitef8cb129f452555a11e0c347b5b4f16604124c3b (patch)
tree64e1d8a8dad147600b9ec3262dfd31f2818ea7e7 /src
parenta212e9670ba31b062c48ed9dd23f28f08fa15b5e (diff)
Cleaned up and fixed stencil fallback.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/savage/savagestate.c33
1 files changed, 9 insertions, 24 deletions
diff --git a/src/mesa/drivers/dri/savage/savagestate.c b/src/mesa/drivers/dri/savage/savagestate.c
index 8c9669a4ad..9b9488c290 100644
--- a/src/mesa/drivers/dri/savage/savagestate.c
+++ b/src/mesa/drivers/dri/savage/savagestate.c
@@ -1189,31 +1189,13 @@ static void savageDDEnable_s4(GLcontext *ctx, GLenum cap, GLboolean state)
break;
case GL_STENCIL_TEST:
imesa->dirty |= SAVAGE_UPLOAD_CTX;
- if (state)
- {
-#if HW_STENCIL
- if(imesa->hw_stencil)
- {
-#endif /* end if HW_STENCIL */
- if(!imesa->hw_stencil)
- FALLBACK (ctx, SAVAGE_FALLBACK_STENCIL, GL_TRUE);
-
+ if (!imesa->hw_stencil)
+ FALLBACK (ctx, SAVAGE_FALLBACK_STENCIL, state);
#if HW_STENCIL
- imesa->regs.s4.stencilCtrl.ni.stencilEn=GL_TRUE;
- }
-#endif /* end if HW_STENCIL */
- }
-
- else
- {
-#if HW_STENCIL
- if(imesa->hw_stencil)
- {
- imesa->regs.s4.stencilCtrl.ni.stencilEn=GL_FALSE;
- }
-#endif
- FALLBACK (ctx, SAVAGE_FALLBACK_STENCIL, GL_FALSE);
- }
+ else
+ imesa->regs.s4.stencilCtrl.ni.stencilEn =
+ state ? GL_TRUE : GL_FALSE;
+#endif
break;
case GL_FOG:
imesa->dirty |= SAVAGE_UPLOAD_CTX;
@@ -1292,6 +1274,9 @@ static void savageDDEnable_s3d(GLcontext *ctx, GLenum cap, GLboolean state)
imesa->scissor = state;
imesa->dirty |= SAVAGE_UPLOAD_CLIPRECTS;
break;
+ case GL_STENCIL_TEST:
+ FALLBACK (ctx, SAVAGE_FALLBACK_STENCIL, state);
+ break;
case GL_FOG:
imesa->dirty |= SAVAGE_UPLOAD_CTX;
savageDDFogfv(ctx,0,0);