diff options
author | Brian Paul <[email protected]> | 2010-10-28 21:17:42 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-10-28 21:17:42 -0600 |
commit | 0a3566cec02f4fc3fef5a29b31ca990d2c08e293 (patch) | |
tree | 9abb31fb936ebb08647e5dd9ba14e6c4a768b73c /src/mesa/main/image.c | |
parent | 7faf521fad970d6f6706fc9d3c3f4644f2e158ac (diff) |
mesa: additional integer formats in _mesa_bytes_per_pixel()
Diffstat (limited to 'src/mesa/main/image.c')
-rw-r--r-- | src/mesa/main/image.c | 12 |
1 files changed, 8 insertions, 4 deletions
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; |