Module: Mesa
Branch: master
Commit: 55cf320ed87f902d817dfea363e6612be0c3b675
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=55cf320ed87f902d817dfea363e6612be0c3b675

Author: Marek Olšák <marek.ol...@amd.com>
Date:   Tue Mar 11 15:02:39 2014 +0100

mesa: fix texture border handling for cube arrays

Cc: mesa-sta...@lists.freedesktop.org
Reviewed-by: Brian Paul <bri...@vmware.com>

---

 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 a57a535..57a766f 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -1657,7 +1657,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;

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to