Mesa (9.0): mesa: fix incorrect error for glCompressedSubTexImage
Ian Romanick
idr at kemper.freedesktop.org
Fri Sep 28 23:05:36 UTC 2012
Module: Mesa
Branch: 9.0
Commit: 5ef472dd83b7b96538432157e2569dedf5625161
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5ef472dd83b7b96538432157e2569dedf5625161
Author: Brian Paul <brianp at vmware.com>
Date: Sat Sep 22 09:30:23 2012 -0600
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 at anholt.net>
(cherry picked from commit 1f586684d62c4f5208d1f3929d067a79ea2140ac)
---
src/mesa/main/teximage.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 9822685..e764dd4 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -3633,13 +3633,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)
More information about the mesa-commit
mailing list