image/pack: fix missing GL_BGR(A)_INTEGER support.
authorDave Airlie <airlied@redhat.com>
Sun, 27 Nov 2011 17:16:27 +0000 (17:16 +0000)
committerDave Airlie <airlied@redhat.com>
Mon, 28 Nov 2011 09:03:17 +0000 (09:03 +0000)
These codepaths were missing the cases for BGR_INTEGER/BGRA_INTEGER.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/main/image.c
src/mesa/main/pack.c

index ca31e53a8cfbf046e39c32aca83e7e897ac459fc..72e944e11accdfa34aa28ab957e803586d3ae9c1 100644 (file)
@@ -243,12 +243,14 @@ _mesa_components_in_format( GLenum format )
       case GL_RGB:
       case GL_BGR:
       case GL_RGB_INTEGER_EXT:
+      case GL_BGR_INTEGER_EXT:
         return 3;
 
       case GL_RGBA:
       case GL_BGRA:
       case GL_ABGR_EXT:
       case GL_RGBA_INTEGER_EXT:
+      case GL_BGRA_INTEGER_EXT:
          return 4;
 
       default:
index bd8503168fb316249aba51fa4b5e1126a43ccec7..4754d34c64663fd304a5d2b5b00641549bacdbac 100644 (file)
@@ -2291,6 +2291,7 @@ get_component_mapping(GLenum format,
       *aDst = 3;
       break;
    case GL_BGR:
+   case GL_BGR_INTEGER:
       *rSrc = 2;
       *gSrc = 1;
       *bSrc = 0;
@@ -2312,6 +2313,7 @@ get_component_mapping(GLenum format,
       *aDst = 3;
       break;
    case GL_BGRA:
+   case GL_BGRA_INTEGER:
       *rSrc = 2;
       *gSrc = 1;
       *bSrc = 0;