summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/image.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2011-12-04 20:14:09 +0000
committerDave Airlie <airlied@redhat.com>2011-12-10 09:02:17 +0000
commitf767e96131ba69cf61aa9f848d5f24e4396ac920 (patch)
tree02541b0e2e235db8c3ed8dab40c5835d9267d5e7 /src/mesa/main/image.c
parent06f217d80f3d1318da4974bf7b31ea7edcf5eb0b (diff)
mesa: add missing RG_INTEGER and some RED_INTEGER_EXT checks.
This just adds the correct checks and asserts in the right places. This doesn't fix all the tests that I've sent to piglit, need to add int paths to go alongside the uint paths that don't go via float to fix it up properly. I'm not sure how much of that could be templated/shared will have a look once I write it the long way. Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/mesa/main/image.c')
-rw-r--r--src/mesa/main/image.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
index 169508f289c..b37cd7e7d13 100644
--- a/src/mesa/main/image.c
+++ b/src/mesa/main/image.c
@@ -238,6 +238,7 @@ _mesa_components_in_format( GLenum format )
case GL_DEPTH_STENCIL_EXT:
case GL_DUDV_ATI:
case GL_DU8DV8_ATI:
+ case GL_RG_INTEGER:
return 2;
case GL_RGB:
@@ -527,6 +528,7 @@ _mesa_is_legal_format_and_type(const struct gl_context *ctx,
case GL_GREEN_INTEGER_EXT:
case GL_BLUE_INTEGER_EXT:
case GL_ALPHA_INTEGER_EXT:
+ case GL_RG_INTEGER:
switch (type) {
case GL_BYTE:
case GL_UNSIGNED_BYTE:
@@ -751,6 +753,7 @@ _mesa_is_color_format(GLenum format)
case GL_RGBA_INTEGER_EXT:
case GL_BGR_INTEGER_EXT:
case GL_BGRA_INTEGER_EXT:
+ case GL_RG_INTEGER:
case GL_LUMINANCE_INTEGER_EXT:
case GL_LUMINANCE_ALPHA_INTEGER_EXT:
/* sized integer formats */
@@ -954,6 +957,7 @@ _mesa_is_integer_format(GLenum format)
case GL_BGRA_INTEGER_EXT:
case GL_LUMINANCE_INTEGER_EXT:
case GL_LUMINANCE_ALPHA_INTEGER_EXT:
+ case GL_RG_INTEGER:
/* specific integer formats */
case GL_RGBA32UI_EXT:
case GL_RGB32UI_EXT: