mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
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>
This commit is contained in:
parent
421eeff463
commit
1f586684d6
1 changed files with 3 additions and 3 deletions
|
|
@ -3574,13 +3574,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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue