summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAapo Tahkola <aet@rasterburn.org>2006-08-26 16:24:04 +0000
committerAapo Tahkola <aet@rasterburn.org>2006-08-26 16:24:04 +0000
commit2fd72a7844067989714236694df22d44936899af (patch)
treefeee01c2db26d3d17a80c447fcdf8b5b5b729da6
parent0c46a1236597667ca57b605e8a71eb6d2861402c (diff)
fix #8008
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index 05c5f70c70..606729e683 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -341,7 +341,7 @@ static void update_early_z(GLcontext *ctx)
/* disable early Z */
r300->hw.unk4F10.cmd[2] = 0x00000000;
else {
- if (ctx->Depth.Test && ctx->Depth.Func != GL_ALWAYS)
+ if (ctx->Depth.Test && ctx->Depth.Func != GL_NEVER)
/* enable early Z */
r300->hw.unk4F10.cmd[2] = 0x00000001;
else
@@ -438,7 +438,7 @@ static void update_depth(GLcontext* ctx)
r300->hw.zs.cmd[R300_ZS_CNTL_0] &= R300_RB3D_STENCIL_ENABLE;
r300->hw.zs.cmd[R300_ZS_CNTL_1] &= ~(R300_ZS_MASK << R300_RB3D_ZS1_DEPTH_FUNC_SHIFT);
- if (ctx->Depth.Test && ctx->Depth.Func != GL_ALWAYS) {
+ if (ctx->Depth.Test && ctx->Depth.Func != GL_NEVER) {
if (ctx->Depth.Mask)
r300->hw.zs.cmd[R300_ZS_CNTL_0] |= R300_RB3D_Z_TEST_AND_WRITE;
else
@@ -446,12 +446,8 @@ static void update_depth(GLcontext* ctx)
r300->hw.zs.cmd[R300_ZS_CNTL_1] |= translate_func(ctx->Depth.Func) << R300_RB3D_ZS1_DEPTH_FUNC_SHIFT;
} else {
- if (ctx->Depth.Mask) {
- r300->hw.zs.cmd[R300_ZS_CNTL_0] |= R300_RB3D_Z_WRITE_ONLY;
- r300->hw.zs.cmd[R300_ZS_CNTL_1] |= translate_func(GL_ALWAYS) << R300_RB3D_ZS1_DEPTH_FUNC_SHIFT;
- } else {
- r300->hw.zs.cmd[R300_ZS_CNTL_0] |= R300_RB3D_Z_DISABLED_1;
- }
+ r300->hw.zs.cmd[R300_ZS_CNTL_0] |= R300_RB3D_Z_DISABLED_1;
+ r300->hw.zs.cmd[R300_ZS_CNTL_1] |= translate_func(GL_NEVER) << R300_RB3D_ZS1_DEPTH_FUNC_SHIFT;
}
update_early_z(ctx);