set sampler state for shadow test
authorBrian <brian.paul@tungstengraphics.com>
Thu, 8 Nov 2007 16:33:13 +0000 (09:33 -0700)
committerBrian <brian.paul@tungstengraphics.com>
Thu, 8 Nov 2007 16:33:13 +0000 (09:33 -0700)
src/mesa/state_tracker/st_atom_sampler.c

index bdc60244776cd9f8261f13a37d589751472152b4..67a9159069167868c57c8fc32d514b37ecce4d07 100644 (file)
@@ -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 */
       }