mesa: fix/add some cases in _mesa_get_linear_internalformat()
authorBrian Paul <brianp@vmware.com>
Wed, 22 Jan 2014 00:09:10 +0000 (16:09 -0800)
committerBrian Paul <brianp@vmware.com>
Thu, 23 Jan 2014 15:13:13 +0000 (08:13 -0700)
In some cases we were converting generic formats to sized formats
and vice versa.  The point is to simply convert sRGB formats to
corresponding linear formats.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/main/glformats.c

index bec7a9bbb6d7dc3b671cb86c5df397627102ddd8..02709a17cf0a9c07ee948d81cf09898ad45a77bb 100644 (file)
@@ -1229,10 +1229,16 @@ _mesa_get_linear_internalformat(GLenum format)
    case GL_SRGB8_ALPHA8:
       return GL_RGBA8;
 
-   case GL_SLUMINANCE:
+   case GL_SLUMINANCE8:
       return GL_LUMINANCE8;
 
+   case GL_SLUMINANCE:
+      return GL_LUMINANCE;
+
    case GL_SLUMINANCE_ALPHA:
+      return GL_LUMINANCE_ALPHA;
+
+   case GL_SLUMINANCE8_ALPHA8:
       return GL_LUMINANCE8_ALPHA8;
 
    default: