From: Brian Date: Thu, 8 Nov 2007 16:33:13 +0000 (-0700) Subject: set sampler state for shadow test X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a736670219c67a45483f58b07ab9d55095efdbbd;p=mesa.git set sampler state for shadow test --- 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 */ }