meta: fix redBits size test in get_temp_image_type()
authorBrian Paul <brianp@vmware.com>
Thu, 13 Oct 2011 23:11:57 +0000 (17:11 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 13 Oct 2011 23:12:44 +0000 (17:12 -0600)
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=41768

src/mesa/drivers/common/meta.c

index 5b73dcdfbcfeddf21b7dcc853755e1c1be4a4e12..a9c7f9aa967131aaa9f618ba510077235e771b52 100644 (file)
@@ -2942,7 +2942,7 @@ get_temp_image_type(struct gl_context *ctx, GLenum baseFormat)
    case GL_INTENSITY:
       if (ctx->DrawBuffer->Visual.redBits <= 8)
          return GL_UNSIGNED_BYTE;
-      else if (ctx->DrawBuffer->Visual.redBits <= 8)
+      else if (ctx->DrawBuffer->Visual.redBits <= 16)
          return GL_UNSIGNED_SHORT;
       else
          return GL_FLOAT;