summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2009-12-10 20:54:18 +0100
committerChristoph Bumiller <[email protected]>2009-12-12 16:38:59 +0100
commitcc0ffaba7d1df234b3c62769ade9dee712117d2f (patch)
tree80bcee1a4e1c991114bd2a1ea1e6130d04014767 /src/gallium/drivers
parent6a689783b9f61fc12e35f7e613697a3f4b07766b (diff)
nv50: fix depth comparison func TSC bits
Unfortunately it seems that if depth comparison is active and we read a 2D texture, i.e. provide only 2 inputs, the second is used for comparison ...
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/nv50/nv50_state.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/nv50/nv50_state.c b/src/gallium/drivers/nv50/nv50_state.c
index 9c8c0c261e5..88aef52d08c 100644
--- a/src/gallium/drivers/nv50/nv50_state.c
+++ b/src/gallium/drivers/nv50/nv50_state.c
@@ -196,8 +196,9 @@ nv50_sampler_state_create(struct pipe_context *pipe,
}
if (cso->compare_mode == PIPE_TEX_COMPARE_R_TO_TEXTURE) {
- tsc[0] |= (1 << 8);
- tsc[0] |= (nvgl_comparison_op(cso->compare_func) & 0x7);
+ /* XXX: must be deactivated for non-shadow textures */
+ tsc[0] |= (1 << 9);
+ tsc[0] |= (nvgl_comparison_op(cso->compare_func) & 0x7) << 10;
}
limit = CLAMP(cso->lod_bias, -16.0, 15.0);