From: Ilia Mirkin Date: Tue, 16 Feb 2016 23:58:42 +0000 (-0500) Subject: st/mesa: apply DepthMode swizzle to stencil texturing as well X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6f4a725073fcef6b7b5a7b9acdc99539fa3fa1f4;p=mesa.git st/mesa: apply DepthMode swizzle to stencil texturing as well Gallium doesn't present these as GL_RED-style. A swizzle is necessary to present the proper data in the unused components. Signed-off-by: Ilia Mirkin Reviewed-by: Roland Scheidegger --- diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c index b4e6f9b639a..ab4b2a9ef5f 100644 --- a/src/mesa/state_tracker/st_atom_texture.c +++ b/src/mesa/state_tracker/st_atom_texture.c @@ -147,9 +147,7 @@ compute_texture_format_swizzle(GLenum baseFormat, GLenum depthMode, else return SWIZZLE_XYZW; case GL_STENCIL_INDEX: - return SWIZZLE_XYZW; case GL_DEPTH_STENCIL: - /* fall-through */ case GL_DEPTH_COMPONENT: /* Now examine the depth mode */ switch (depthMode) {