summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkeithw <keithw>2003-11-28 10:44:24 +0000
committerkeithw <keithw>2003-11-28 10:44:24 +0000
commit894004ce81b582093e5022df7c84be4f2e5d9ccb (patch)
tree0ff7f35c5ee603e64a0c4f628770072dc3e82d75
parent6f9011e8dabcf8470dd4ceb6762716dadc5d4f95 (diff)
Disable stencil write when stencil test disabled. Should hopefully fix
some lingering problems on the i845.
-rw-r--r--xc/lib/GL/mesa/src/drv/i830/i830_state.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xc/lib/GL/mesa/src/drv/i830/i830_state.c b/xc/lib/GL/mesa/src/drv/i830/i830_state.c
index 6eb46fac4..004b49ace 100644
--- a/xc/lib/GL/mesa/src/drv/i830/i830_state.c
+++ b/xc/lib/GL/mesa/src/drv/i830/i830_state.c
@@ -1248,11 +1248,14 @@ static void i830Enable(GLcontext *ctx, GLenum cap, GLboolean state)
if (imesa->hw_stencil) {
I830_STATECHANGE(imesa, I830_UPLOAD_CTX);
imesa->Setup[I830_CTXREG_ENABLES_1] &= ~ENABLE_STENCIL_TEST;
+ imesa->Setup[I830_CTXREG_ENABLES_2] &= ~ENABLE_STENCIL_WRITE;
if (state) {
imesa->Setup[I830_CTXREG_ENABLES_1] |= ENABLE_STENCIL_TEST;
+ imesa->Setup[I830_CTXREG_ENABLES_2] |= ENABLE_STENCIL_WRITE;
} else {
imesa->Setup[I830_CTXREG_ENABLES_1] |= DISABLE_STENCIL_TEST;
+ imesa->Setup[I830_CTXREG_ENABLES_2] |= DISABLE_STENCIL_WRITE;
}
} else {
FALLBACK( imesa, I830_FALLBACK_STENCIL, state );