main/base_tex_format: Properly handle STENCIL_INDEX1/4/16
authorJason Ekstrand <jason@jlekstrand.net>
Fri, 27 Feb 2015 23:53:11 +0000 (18:53 -0500)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 2 Mar 2015 19:06:44 +0000 (11:06 -0800)
This takes "fbo-stencil blit GL_STENCIL_INDEX1/4/16" from crash to pass on
BDW.

Cc: 10.5 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/main/teximage.c

index 5ea48c5e549d785995aa86cd3a36601205917620..611d664b6c0fb91db4292300f4c0b16841c548b8 100644 (file)
@@ -224,7 +224,10 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
    if (ctx->Extensions.ARB_stencil_texturing) {
       switch (internalFormat) {
       case GL_STENCIL_INDEX:
+      case GL_STENCIL_INDEX1:
+      case GL_STENCIL_INDEX4:
       case GL_STENCIL_INDEX8:
+      case GL_STENCIL_INDEX16:
          return GL_STENCIL_INDEX;
       default:
          ; /* fallthrough */