mesa: Fix the baseFormat for GL_COMPRESSED_SLUMINANCE_EXT.
authorEric Anholt <eric@anholt.net>
Tue, 4 Jan 2011 23:25:35 +0000 (15:25 -0800)
committerEric Anholt <eric@anholt.net>
Tue, 4 Jan 2011 23:25:35 +0000 (15:25 -0800)
It's just LUMINANCE, not LUMINANCE_ALPHA.  Fixes
fbo-generatemipmap-formats GL_EXT_texture_sRGB-s3tc assertion failure
when it tries to pack the L8 channels into LUMINANCE_ALPHA and wonders
why it's trying to do that.

src/mesa/main/teximage.c

index c5ae63052a740e12bf7ea2659805fd29fcd03206..7e8ec03641998cc9362e91673b5aaf95968f3e1f 100644 (file)
@@ -340,11 +340,11 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
          return GL_RGBA;
       case GL_SLUMINANCE_ALPHA_EXT:
       case GL_SLUMINANCE8_ALPHA8_EXT:
-      case GL_COMPRESSED_SLUMINANCE_EXT:
       case GL_COMPRESSED_SLUMINANCE_ALPHA_EXT:
          return GL_LUMINANCE_ALPHA;
       case GL_SLUMINANCE_EXT:
       case GL_SLUMINANCE8_EXT:
+      case GL_COMPRESSED_SLUMINANCE_EXT:
          return GL_LUMINANCE;
       default:
          ; /* fallthrough */