summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_atom_texture.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker/st_atom_texture.c')
-rw-r--r--src/mesa/state_tracker/st_atom_texture.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c
index afc6d9dab7e..928a4ffd2a3 100644
--- a/src/mesa/state_tracker/st_atom_texture.c
+++ b/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) ||