mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 02:58:05 +02:00
mesa: fix error check for zero-sized compressed subtexture
For glCompressedTexSubImage, width or height = 0 is legal. Fixes a failure in piglit's s3tc-errors test. This is for the 9.0 and 8.0 branches. Already fixed on master.
This commit is contained in:
parent
32faf7ab0d
commit
e75051d196
1 changed files with 2 additions and 2 deletions
|
|
@ -3598,10 +3598,10 @@ compressed_subtexture_error_check(struct gl_context *ctx, GLint dimensions,
|
|||
if (!_mesa_is_compressed_format(ctx, format))
|
||||
return GL_INVALID_ENUM;
|
||||
|
||||
if (width < 1 || width > maxTextureSize)
|
||||
if (width < 0 || width > maxTextureSize)
|
||||
return GL_INVALID_VALUE;
|
||||
|
||||
if ((height < 1 || height > maxTextureSize)
|
||||
if ((height < 0 || height > maxTextureSize)
|
||||
&& dimensions > 1)
|
||||
return GL_INVALID_VALUE;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue