From 0a3566cec02f4fc3fef5a29b31ca990d2c08e293 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 28 Oct 2010 21:17:42 -0600 Subject: mesa: additional integer formats in _mesa_bytes_per_pixel() --- src/mesa/main/image.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/mesa/main') diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index a945ba2e146..6b12f6a48c6 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main/image.c @@ -315,13 +315,15 @@ _mesa_bytes_per_pixel( GLenum format, GLenum type ) return comps * sizeof(GLhalfARB); case GL_UNSIGNED_BYTE_3_3_2: case GL_UNSIGNED_BYTE_2_3_3_REV: - if (format == GL_RGB || format == GL_BGR) + if (format == GL_RGB || format == GL_BGR || + format == GL_RGB_INTEGER_EXT || format == GL_BGR_INTEGER_EXT) return sizeof(GLubyte); else return -1; /* error */ case GL_UNSIGNED_SHORT_5_6_5: case GL_UNSIGNED_SHORT_5_6_5_REV: - if (format == GL_RGB || format == GL_BGR) + if (format == GL_RGB || format == GL_BGR || + format == GL_RGB_INTEGER_EXT || format == GL_BGR_INTEGER_EXT) return sizeof(GLushort); else return -1; /* error */ @@ -329,7 +331,8 @@ _mesa_bytes_per_pixel( GLenum format, GLenum type ) case GL_UNSIGNED_SHORT_4_4_4_4_REV: case GL_UNSIGNED_SHORT_5_5_5_1: case GL_UNSIGNED_SHORT_1_5_5_5_REV: - if (format == GL_RGBA || format == GL_BGRA || format == GL_ABGR_EXT) + if (format == GL_RGBA || format == GL_BGRA || format == GL_ABGR_EXT || + format == GL_RGBA_INTEGER_EXT || format == GL_BGRA_INTEGER_EXT) return sizeof(GLushort); else return -1; @@ -337,7 +340,8 @@ _mesa_bytes_per_pixel( GLenum format, GLenum type ) case GL_UNSIGNED_INT_8_8_8_8_REV: 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) + if (format == GL_RGBA || format == GL_BGRA || format == GL_ABGR_EXT || + format == GL_RGBA_INTEGER_EXT || format == GL_BGRA_INTEGER_EXT) return sizeof(GLuint); else return -1; -- cgit v1.2.3