st/mesa: don't pass compare mode for stencil-sampled textures
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 12 Feb 2017 19:14:28 +0000 (14:14 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Mon, 13 Feb 2017 00:26:25 +0000 (19:26 -0500)
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
src/mesa/state_tracker/st_atom_sampler.c

index daf98c3abb0b6148f68909fe6ddd2a9f6ac3e9b0..661e0f268e317a6beb75dc7862b7b23bd16746a6 100644 (file)
@@ -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);