summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2017-02-12 14:14:28 -0500
committerIlia Mirkin <imirkin@alum.mit.edu>2017-02-12 19:26:25 -0500
commit3970257cef5e0c7b5b31c023450f1ea55b784e88 (patch)
tree1fd534a655bdd9a8c3eb882584bafd55a7cf4070
parent3f8b886e737b8453ec69597dd53552a36b79967b (diff)
st/mesa: don't pass compare mode for stencil-sampled textures
Fixes dEQP-GLES31.functional.stencil_texturing.misc.compare_mode_effect Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Cc: mesa-stable@lists.freedesktop.org
-rw-r--r--src/mesa/state_tracker/st_atom_sampler.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c
index daf98c3abb0b..661e0f268e31 100644
--- a/src/mesa/state_tracker/st_atom_sampler.c
+++ b/src/mesa/state_tracker/st_atom_sampler.c
@@ -226,7 +226,7 @@ convert_sampler(struct st_context *st,
/* If sampling a depth texture and using shadow comparison */
if ((texBaseFormat == GL_DEPTH_COMPONENT ||
- texBaseFormat == GL_DEPTH_STENCIL) &&
+ (texBaseFormat == GL_DEPTH_STENCIL && !texobj->StencilSampling)) &&
msamp->CompareMode == GL_COMPARE_R_TO_TEXTURE) {
sampler->compare_mode = PIPE_TEX_COMPARE_R_TO_TEXTURE;
sampler->compare_func = st_compare_func_to_pipe(msamp->CompareFunc);