diff options
author | Brian Paul <[email protected]> | 2014-08-15 16:55:40 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2014-08-16 06:48:45 -0600 |
commit | 9d9879abed5bf99bc7beb9e20ac71a179585ff90 (patch) | |
tree | b29516bd2418c17013ee3393222c0a87ae496318 /src/mesa/main/teximage.c | |
parent | cf8b680f40a4d1a48be82798b7a09da2d828bee5 (diff) |
mesa: fix compressed_subtexture_error_check() return value
The function should return GLboolean, not GLenum.
If we detect invalid compressed pixel storage parameters, we should
return GL_TRUE, not GL_FALSE so that the function is no-op'd.
An update to the piglit s3tc-errors test will check this.
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r-- | 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 4414a66182a..647d28ab3d1 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -4182,9 +4182,9 @@ out: /** * Error checking for glCompressedTexSubImage[123]D(). - * \return error code or GL_NO_ERROR. + * \return GL_TRUE if error, GL_FALSE if no error */ -static GLenum +static GLboolean compressed_subtexture_error_check(struct gl_context *ctx, GLint dims, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, @@ -4246,7 +4246,7 @@ compressed_subtexture_error_check(struct gl_context *ctx, GLint dims, if (!_mesa_compressed_pixel_storage_error_check(ctx, dims, &ctx->Unpack, "glCompressedTexSubImage")) { - return GL_FALSE; + return GL_TRUE; } expectedSize = compressed_tex_size(width, height, depth, format); |