diff options
author | Brian Paul <[email protected]> | 2014-12-02 09:41:20 -0700 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2014-12-03 23:16:36 +0000 |
commit | 57057c439e03e7b7d7bdc130d35523d4143b62ac (patch) | |
tree | 4b3589937b31db0c3396937d9e02a6da3cb90594 /src/mesa/main/teximage.c | |
parent | b5cc04b6ade33738166d6a3d5d4aab3eae5eb4cc (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" <[email protected]>
Reviewed-by: José Fonseca <[email protected]>
(cherry picked from commit 4e6244e80f7dd6dad526ff04f5103ed24d61d38a)
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r-- | src/mesa/main/teximage.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 4f4bb11dd5c..7766904c91f 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)) |