summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/image.c12
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;