aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_atom_texture.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_atom_texture.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom_texture.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_atom_texture.c b/mesalib/src/mesa/state_tracker/st_atom_texture.c
index afc6d9dab..928a4ffd2 100644
--- a/mesalib/src/mesa/state_tracker/st_atom_texture.c
+++ b/mesalib/src/mesa/state_tracker/st_atom_texture.c
@@ -271,6 +271,10 @@ st_get_texture_sampler_view_from_stobj(struct st_context *st,
sv = st_texture_get_sampler_view(st, stObj);
+ if (stObj->base.StencilSampling &&
+ util_format_is_depth_and_stencil(format))
+ format = util_format_stencil_only(format);
+
/* if sampler view has changed dereference it */
if (*sv) {
if (check_sampler_swizzle(stObj, *sv) ||