summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2014-12-02 09:41:20 -0700
committerEmil Velikov <emil.l.velikov@gmail.com>2014-12-03 23:59:28 +0000
commitb7c2711e40d7228a4f0fe4ac52309c62e82fdf50 (patch)
tree98346cde61f1a6956c82691cffcd95b33052f0ed
parent0810238cf23ec91fff911d13816ccf3f916fd20d (diff)
mesa: fix height error check for 1D array textures
height=0 is legal for 1D array textures (as depth=0 is legal for 2D arrays). Fixes new piglit ext_texture_array-errors test. Cc: "10.3 10.4" <mesa-stable@lists.freedesktop.org> Reviewed-by: José Fonseca <jfonseca@vmware.com> (cherry picked from commit 4e6244e80f7dd6dad526ff04f5103ed24d61d38a)
-rw-r--r--src/mesa/main/teximage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 647d28ab3d1..7af52c948f4 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -1542,7 +1542,7 @@ _mesa_legal_texture_dimensions(struct gl_context *ctx, GLenum target,
maxSize >>= level;
if (width < 2 * border || width > 2 * border + maxSize)
return GL_FALSE;
- if (height < 1 || height > ctx->Const.MaxArrayTextureLayers)
+ if (height < 0 || height > ctx->Const.MaxArrayTextureLayers)
return GL_FALSE;
if (!ctx->Extensions.ARB_texture_non_power_of_two) {
if (width > 0 && !_mesa_is_pow_two(width - 2 * border))