[Mesa-dev] [PATCH 1/9] mesa: fix texture border handling for cube arrays

Marek Olšák maraeo at gmail.com
Sat Mar 15 10:17:51 PDT 2014


From: Marek Olšák <marek.olsak at amd.com>

Cc: mesa-stable at lists.freedesktop.org
---
 src/mesa/main/teximage.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index a6c3581..1baabf9 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -1662,7 +1662,10 @@ error_check_subtexture_dimensions(struct gl_context *ctx,
 
    /* check zoffset and depth */
    if (dims > 2) {
-      GLint zBorder = (target == GL_TEXTURE_2D_ARRAY) ? 0 : destImage->Border;
+      GLint zBorder = (target == GL_TEXTURE_2D_ARRAY ||
+                       target == GL_TEXTURE_CUBE_MAP_ARRAY) ?
+                         0 : destImage->Border;
+
       if (zoffset < -zBorder) {
          _mesa_error(ctx, GL_INVALID_VALUE, "%s3D(zoffset)", function);
          return GL_TRUE;
-- 
1.8.3.2



More information about the mesa-dev mailing list