diff options
author | marha <marha@users.sourceforge.net> | 2015-04-30 23:26:47 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2015-04-30 23:29:47 +0200 |
commit | 055e5645a789d2822d3c4e5a3bc81ff6a969ff31 (patch) | |
tree | 8a923f19c3586f9341114be6c81784ab9018aef8 /mesalib/src/mesa/state_tracker/st_atom_texture.c | |
parent | 0f7871ff824bcf064db3ab6bdfe26645ba6c8087 (diff) | |
parent | a71d524ecad48837e0124a03124bc05f59a48be7 (diff) | |
download | vcxsrv-055e5645a789d2822d3c4e5a3bc81ff6a969ff31.tar.gz vcxsrv-055e5645a789d2822d3c4e5a3bc81ff6a969ff31.tar.bz2 vcxsrv-055e5645a789d2822d3c4e5a3bc81ff6a969ff31.zip |
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_atom_texture.c')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_atom_texture.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_atom_texture.c b/mesalib/src/mesa/state_tracker/st_atom_texture.c index eff28fc6f..04ba86448 100644 --- a/mesalib/src/mesa/state_tracker/st_atom_texture.c +++ b/mesalib/src/mesa/state_tracker/st_atom_texture.c @@ -287,16 +287,22 @@ st_get_texture_sampler_view_from_stobj(struct st_context *st, enum pipe_format format) { struct pipe_sampler_view **sv; - + const struct st_texture_image *firstImage; if (!stObj || !stObj->pt) { return NULL; } 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 (util_format_is_depth_and_stencil(format)) { + if (stObj->base.StencilSampling) + format = util_format_stencil_only(format); + else { + firstImage = st_texture_image_const(_mesa_base_tex_image(&stObj->base)); + if (firstImage->base._BaseFormat == GL_STENCIL_INDEX) + format = util_format_stencil_only(format); + } + } /* if sampler view has changed dereference it */ if (*sv) { |