image/pack: fix missing GL_BGR(A)_INTEGER support.

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>
This commit is contained in:
Dave Airlie 2011-11-27 17:16:27 +00:00
parent 537c687116
commit 47e2e36717
2 changed files with 4 additions and 0 deletions

View 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:

View 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;