summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>2011-03-02 20:15:01 +0100
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>2011-03-02 20:59:53 +0100
commitb8646bc2af87f4b2cde50980da878b89d09cdf96 (patch)
treebc8b13afa64fd77b40a6536c1b76aa475af4b477 /src/gallium
parentddcb90248fb491a3a9e2ada8c595f94b0bd95515 (diff)
nv50: fix depth clamp for disabled primitive clipping
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/nv50/nv50_state_validate.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/gallium/drivers/nv50/nv50_state_validate.c b/src/gallium/drivers/nv50/nv50_state_validate.c
index d0b4af6c41..bf46296e7e 100644
--- a/src/gallium/drivers/nv50/nv50_state_validate.c
+++ b/src/gallium/drivers/nv50/nv50_state_validate.c
@@ -197,9 +197,19 @@ nv50_validate_clip(struct nv50_context *nv50)
struct nouveau_channel *chan = nv50->screen->base.channel;
uint32_t clip;
- clip = nv50->clip.depth_clamp ? 0x0018 : 0x0000;
+ if (nv50->clip.depth_clamp) {
+ clip =
+ NV50_3D_VIEW_VOLUME_CLIP_CTRL_DEPTH_CLAMP_NEAR |
+ NV50_3D_VIEW_VOLUME_CLIP_CTRL_DEPTH_CLAMP_FAR |
+ NV50_3D_VIEW_VOLUME_CLIP_CTRL_UNK12_UNK1;
+ } else {
+ clip = 0;
+ }
+
#ifndef NV50_SCISSORS_CLIPPING
- clip |= 0x1080;
+ clip |=
+ NV50_3D_VIEW_VOLUME_CLIP_CTRL_UNK7 |
+ NV50_3D_VIEW_VOLUME_CLIP_CTRL_UNK12_UNK1;
#endif
BEGIN_RING(chan, RING_3D(VIEW_VOLUME_CLIP_CTRL), 1);