summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNicolai Haehnle <nhaehnle@gmail.com>2008-06-07 20:25:47 +0200
committerNicolai Haehnle <nhaehnle@gmail.com>2008-06-07 20:28:04 +0200
commit731686b7132ff50d78ef2dc5bfab550750925132 (patch)
tree47d3134d8c2df2bc251d5f3416e940052d61cac3 /src
parent75bfe630ff9df8b827cbdbf88b08e5da5d3eccfa (diff)
r300: Fix stencil buffer clear
The glean/readPixSanity test passes now.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/r300/r300_ioctl.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_ioctl.c b/src/mesa/drivers/dri/r300/r300_ioctl.c
index b0225453d3..2da0ac0e1a 100644
--- a/src/mesa/drivers/dri/r300/r300_ioctl.c
+++ b/src/mesa/drivers/dri/r300/r300_ioctl.c
@@ -130,8 +130,6 @@ static void r300ClearBuffer(r300ContextPtr r300, int flags, int buffer)
t1 |= R300_Z_ENABLE | R300_Z_WRITE_ENABLE;
t2 |=
(R300_ZS_ALWAYS << R300_Z_FUNC_SHIFT);
- } else { //XXX
- t1 |= R300_STENCIL_FRONT_BACK; // disable
}
if (flags & CLEARBUFFER_STENCIL) {
@@ -144,20 +142,12 @@ static void r300ClearBuffer(r300ContextPtr r300, int flags, int buffer)
(R300_ZS_REPLACE <<
R300_S_FRONT_ZPASS_OP_SHIFT) |
(R300_ZS_REPLACE <<
- R300_S_FRONT_ZFAIL_OP_SHIFT) |
- (R300_ZS_ALWAYS <<
- R300_S_BACK_FUNC_SHIFT) |
- (R300_ZS_REPLACE <<
- R300_S_BACK_SFAIL_OP_SHIFT) |
- (R300_ZS_REPLACE <<
- R300_S_BACK_ZPASS_OP_SHIFT) |
- (R300_ZS_REPLACE <<
- R300_S_BACK_ZFAIL_OP_SHIFT);
+ R300_S_FRONT_ZFAIL_OP_SHIFT);
}
e32(t1);
e32(t2);
- e32(r300->state.stencil.clear);
+ e32(R300_STENCILWRITEMASK_MASK | r300->state.stencil.clear);
}
cmd2 = (drm_r300_cmd_header_t *) r300AllocCmdBuf(r300, 9, __FUNCTION__);
@@ -307,7 +297,6 @@ static void r300EmitClearState(GLcontext * ctx)
reg_start(R300_RS_INST_0, 0);
e32(R300_RS_INST_COL_CN_WRITE);
} else {
-
R300_STATECHANGE(r300, ri);
reg_start(R500_RS_IP_0, 7);
for (i = 0; i < 8; ++i) {