Mesa (10.4): mesa: fix height error check for 1D array textures
Emil Velikov
evelikov at kemper.freedesktop.org
Wed Dec 3 23:44:47 UTC 2014
Module: Mesa
Branch: 10.4
Commit: 57057c439e03e7b7d7bdc130d35523d4143b62ac
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=57057c439e03e7b7d7bdc130d35523d4143b62ac
Author: Brian Paul <brianp at vmware.com>
Date: Tue Dec 2 09:41:20 2014 -0700
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 at lists.freedesktop.org>
Reviewed-by: José Fonseca <jfonseca at vmware.com>
(cherry picked from commit 4e6244e80f7dd6dad526ff04f5103ed24d61d38a)
---
src/mesa/main/teximage.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 4f4bb11..7766904 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))
More information about the mesa-commit
mailing list