diff options
author | Brian Paul <[email protected]> | 2014-12-02 09:41:20 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2014-12-02 10:00:03 -0700 |
commit | 4e6244e80f7dd6dad526ff04f5103ed24d61d38a (patch) | |
tree | 067d353207e0bad45c48a890d41712b55d18bfd4 | |
parent | ca0616f17e2ed16d44a7105c02f761ec353a39cb (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]>
-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)) |