glformats: support _mesa_bytes_per_pixel for 2101010+GL_RGB
authorJordan Justen <jordan.l.justen@intel.com>
Fri, 28 Dec 2012 19:08:20 +0000 (11:08 -0800)
committerJordan Justen <jordan.l.justen@intel.com>
Sat, 12 Jan 2013 09:45:01 +0000 (01:45 -0800)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/main/glformats.c

index fb69421c086769c7aef849801b529bfb34044ef4..ff56ffad04fb6e0fc08ec50110e5050c83d7b7aa 100644 (file)
@@ -271,7 +271,8 @@ _mesa_bytes_per_pixel(GLenum format, GLenum type)
    case GL_UNSIGNED_INT_10_10_10_2:
    case GL_UNSIGNED_INT_2_10_10_10_REV:
       if (format == GL_RGBA || format == GL_BGRA || format == GL_ABGR_EXT ||
-          format == GL_RGBA_INTEGER_EXT || format == GL_BGRA_INTEGER_EXT)
+          format == GL_RGBA_INTEGER_EXT || format == GL_BGRA_INTEGER_EXT ||
+          format == GL_RGB)
          return sizeof(GLuint);
       else
          return -1;