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

Dave Airlie airlied at kemper.freedesktop.org
Mon Nov 28 09:15:47 UTC 2011


Module: Mesa
Branch: master
Commit: 47e2e367170edec022481f1487cd980e00ef3203
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=47e2e367170edec022481f1487cd980e00ef3203

Author: Dave Airlie <airlied at redhat.com>
Date:   Sun Nov 27 17:16:27 2011 +0000

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 at redhat.com>
Reviewed-by: Eric Anholt <eric at anholt.net>

---

 src/mesa/main/image.c |    2 ++
 src/mesa/main/pack.c  |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
index ca31e53..72e944e 100644
--- a/src/mesa/main/image.c
+++ b/src/mesa/main/image.c
@@ -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:
diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c
index bd85031..4754d34 100644
--- a/src/mesa/main/pack.c
+++ b/src/mesa/main/pack.c
@@ -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;




More information about the mesa-commit mailing list