summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50/nv50_state.c
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2009-01-13 10:58:17 +1000
committerBen Skeggs <[email protected]>2009-01-13 13:57:22 +1000
commit68bb26b62d87ae6737ba51a4bffda49eeb7647cb (patch)
treec0bf6a792666fa04e1a801a80db6da7be02fe3eb /src/gallium/drivers/nv50/nv50_state.c
parentf7c2010525a3fb37079c2cff51d4c593ef8e807b (diff)
nv50: shadow mapping
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_state.c')
-rw-r--r--src/gallium/drivers/nv50/nv50_state.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv50/nv50_state.c b/src/gallium/drivers/nv50/nv50_state.c
index cabe54bde3a..38c1d938b8e 100644
--- a/src/gallium/drivers/nv50/nv50_state.c
+++ b/src/gallium/drivers/nv50/nv50_state.c
@@ -196,6 +196,11 @@ nv50_sampler_state_create(struct pipe_context *pipe,
if (cso->max_anisotropy >= 2.0)
tsc[0] |= (1 << 20);
+ if (cso->compare_mode == PIPE_TEX_COMPARE_R_TO_TEXTURE) {
+ tsc[0] |= (1 << 8);
+ tsc[0] |= (nvgl_comparison_op(cso->compare_func) & 0x7);
+ }
+
return (void *)tsc;
}