meta: Add GL_RED/GL_RG support to meta CopyTexImage.
authorEric Anholt <eric@anholt.net>
Tue, 10 Jan 2012 00:41:02 +0000 (16:41 -0800)
committerEric Anholt <eric@anholt.net>
Thu, 12 Jan 2012 20:34:10 +0000 (12:34 -0800)
Fixes some _mesa_problem()s in oglconform.

Reviewed-by: Brian Paul <brianp@vmware.com>
NOTE: This is a candidate for the 8.0 branch.

src/mesa/drivers/common/meta.c

index abf2f1f35ecd2383f109b4e9add5546c9961eee0..dca3613a610eb4f78bb3f44e834df11379761789 100644 (file)
@@ -3071,6 +3071,8 @@ get_temp_image_type(struct gl_context *ctx, GLenum baseFormat)
    switch (baseFormat) {
    case GL_RGBA:
    case GL_RGB:
+   case GL_RG:
+   case GL_RED:
    case GL_ALPHA:
    case GL_LUMINANCE:
    case GL_LUMINANCE_ALPHA:
@@ -3086,7 +3088,8 @@ get_temp_image_type(struct gl_context *ctx, GLenum baseFormat)
    case GL_DEPTH_STENCIL:
       return GL_UNSIGNED_INT_24_8;
    default:
-      _mesa_problem(ctx, "Unexpected format in get_temp_image_type()");
+      _mesa_problem(ctx, "Unexpected format %d in get_temp_image_type()",
+                   baseFormat);
       return 0;
    }
 }