summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2004-10-08 01:03:10 +0000
committerIan Romanick <idr@us.ibm.com>2004-10-08 01:03:10 +0000
commita2dc424acfe83f3c66d3509f5a1efc24ce884367 (patch)
treeca2544b9908848d49345f148b66dee1e722e2c4c
parentaf0a4690db6d7f30ecc87b72d447856cd8c0a929 (diff)
Reject unsupported texture formats passed to glCompressedTexImage?D. This
fixes Mesa bug #1028405.
-rw-r--r--src/mesa/main/teximage.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 8f27af970c..3ef3d6442e 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -2798,6 +2798,9 @@ compressed_texture_error_check(GLcontext *ctx, GLint dimensions,
if (!is_compressed_format(ctx, internalFormat))
return GL_INVALID_ENUM;
+ if (_mesa_base_tex_format(ctx, internalFormat) < 0)
+ return GL_INVALID_ENUM;
+
if (border != 0)
return GL_INVALID_VALUE;