Reject unsupported texture formats passed to glCompressedTexImage?D. This
authorIan Romanick <idr@us.ibm.com>
Fri, 8 Oct 2004 01:03:10 +0000 (01:03 +0000)
committerIan Romanick <idr@us.ibm.com>
Fri, 8 Oct 2004 01:03:10 +0000 (01:03 +0000)
fixes Mesa bug #1028405.

src/mesa/main/teximage.c

index 8f27af970c4eb9f625dad49243e6d84ac4fb4455..3ef3d6442ef6d651aed259cab9edcf359c755c83 100644 (file)
@@ -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;