st/mesa: apply DepthMode swizzle to stencil texturing as well
authorIlia Mirkin <imirkin@alum.mit.edu>
Tue, 16 Feb 2016 23:58:42 +0000 (18:58 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Thu, 18 Feb 2016 02:20:24 +0000 (21:20 -0500)
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 <imirkin@alum.mit.edu>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/mesa/state_tracker/st_atom_texture.c

index b4e6f9b639adf49225e6d01ca445f0129847ca12..ab4b2a9ef5f2a9df072049a5842b8ec936e8e453 100644 (file)
@@ -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) {