summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_state.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-07-20 16:37:22 +0200
committerMarek Olšák <[email protected]>2010-07-21 22:54:34 +0200
commitca7ead03da4481cd34933175898f4a924e588ad4 (patch)
tree32d5104ff971aca40b2b22d7eefc36d515b4fb24 /src/gallium/drivers/r300/r300_state.c
parent5725738ef6a4b5110064d4e2e0ce4f7609e875e4 (diff)
r300g: implement depth clamp
Depth clamping seems to be implicit if clipping is disabled. It's not perfect, but it's good enough for wine and passes the corresponding piglit tests.
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r--src/gallium/drivers/r300/r300_state.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index 0bbc022f837..f52265b1c03 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -440,7 +440,8 @@ static void r300_set_clip_state(struct pipe_context* pipe,
OUT_CB_TABLE(state->ucp, state->nr * 4);
}
OUT_CB_REG(R300_VAP_CLIP_CNTL, ((1 << state->nr) - 1) |
- R300_PS_UCP_MODE_CLIP_AS_TRIFAN);
+ R300_PS_UCP_MODE_CLIP_AS_TRIFAN |
+ (state->depth_clamp ? R300_CLIP_DISABLE : 0));
END_CB;
r300->clip_state.dirty = TRUE;