summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_atom_sampler.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-11-08 09:33:13 -0700
committerBrian <[email protected]>2007-11-08 09:33:13 -0700
commita736670219c67a45483f58b07ab9d55095efdbbd (patch)
treec846bdab9319d3b7a13fa45baa5bb9f7bf8e49fa /src/mesa/state_tracker/st_atom_sampler.c
parentb18763141d651ae1112e80bb7ef3e813c8ce1d18 (diff)
set sampler state for shadow test
Diffstat (limited to 'src/mesa/state_tracker/st_atom_sampler.c')
-rw-r--r--src/mesa/state_tracker/st_atom_sampler.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c
index bdc60244776..67a91590691 100644
--- a/src/mesa/state_tracker/st_atom_sampler.c
+++ b/src/mesa/state_tracker/st_atom_sampler.c
@@ -153,6 +153,14 @@ update_samplers(struct st_context *st)
sampler.max_anisotropy = texobj->MaxAnisotropy;
+ /* only care about ARB_shadow, not SGI shadow */
+ if (texobj->CompareMode == GL_COMPARE_R_TO_TEXTURE) {
+ sampler.compare = 1;
+ sampler.compare_mode = PIPE_TEX_COMPARE_R_TO_TEXTURE;
+ sampler.compare_func
+ = st_compare_func_to_pipe(texobj->CompareFunc);
+ }
+
/* XXX more sampler state here */
}