summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/image.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2011-11-26 16:54:29 +0000
committerDave Airlie <airlied@redhat.com>2011-11-27 20:44:01 +0000
commit923f143335ad1cba4795276e79cb1a5b0cd19bbc (patch)
treee5273240f5d8e4c84e8b673055736d501419635c /src/mesa/main/image.c
parent9608ef5dec4d70024e68a49c64faed9ec7e4d2e0 (diff)
downloadexternal_mesa3d-923f143335ad1cba4795276e79cb1a5b0cd19bbc.zip
external_mesa3d-923f143335ad1cba4795276e79cb1a5b0cd19bbc.tar.gz
external_mesa3d-923f143335ad1cba4795276e79cb1a5b0cd19bbc.tar.bz2
image: fix legal types for packed integer formats.
After reading ARB_texture_rgb10_a2ui it appears the packed formats for integer types are only specified via this extension, and not via the original ones. So condition the checks on this. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src/mesa/main/image.c')
-rw-r--r--src/mesa/main/image.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
index 914a999..ca31e53 100644
--- a/src/mesa/main/image.c
+++ b/src/mesa/main/image.c
@@ -545,11 +545,12 @@ _mesa_is_legal_format_and_type(const struct gl_context *ctx,
case GL_UNSIGNED_SHORT:
case GL_INT:
case GL_UNSIGNED_INT:
+ return ctx->Extensions.EXT_texture_integer;
case GL_UNSIGNED_BYTE_3_3_2:
case GL_UNSIGNED_BYTE_2_3_3_REV:
case GL_UNSIGNED_SHORT_5_6_5:
case GL_UNSIGNED_SHORT_5_6_5_REV:
- return ctx->Extensions.EXT_texture_integer;
+ return ctx->Extensions.ARB_texture_rgb10_a2ui;
default:
return GL_FALSE;
}
@@ -577,6 +578,7 @@ _mesa_is_legal_format_and_type(const struct gl_context *ctx,
case GL_UNSIGNED_SHORT:
case GL_INT:
case GL_UNSIGNED_INT:
+ return ctx->Extensions.EXT_texture_integer;
case GL_UNSIGNED_SHORT_4_4_4_4:
case GL_UNSIGNED_SHORT_4_4_4_4_REV:
case GL_UNSIGNED_SHORT_5_5_5_1:
@@ -585,7 +587,7 @@ _mesa_is_legal_format_and_type(const struct gl_context *ctx,
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:
- return ctx->Extensions.EXT_texture_integer;
+ return ctx->Extensions.ARB_texture_rgb10_a2ui;
default:
return GL_FALSE;
}