summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2012-09-22 09:30:23 -0600
committerIan Romanick <ian.d.romanick@intel.com>2012-10-24 11:41:07 -0700
commit47a509c0461e1bfb37a5d0ec0ef4bc65150221e1 (patch)
treede6bebc8004265d54074cfac65fdbe371126a7ce
parent59b1e4a29e756d291f815d4429c8af0e4cf068aa (diff)
mesa: fix incorrect error for glCompressedSubTexImage
If a subtexture region isn't aligned to the compressed block size, return GL_INVALID_OPERATION, not gl_INVALID_VALUE. NOTE: This is a candidate for the stable branches. Reviewed-by: Eric Anholt <eric@anholt.net> (cherry picked from commit 1f586684d62c4f5208d1f3929d067a79ea2140ac)
-rw-r--r--src/mesa/main/teximage.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 888c7ad230c..3aecc0fff14 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -3403,13 +3403,13 @@ compressed_subtexture_error_check(struct gl_context *ctx, GLint dimensions,
get_compressed_block_size(format, &bw, &bh);
if ((xoffset % bw != 0) || (yoffset % bh != 0))
- return GL_INVALID_VALUE;
+ return GL_INVALID_OPERATION;
if ((width % bw != 0) && width != 2 && width != 1)
- return GL_INVALID_VALUE;
+ return GL_INVALID_OPERATION;
if ((height % bh != 0) && height != 2 && height != 1)
- return GL_INVALID_VALUE;
+ return GL_INVALID_OPERATION;
expectedSize = compressed_tex_size(width, height, depth, format);
if (expectedSize != imageSize)