summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-03-11 15:02:39 +0100
committerMarek Olšák <[email protected]>2014-03-21 00:50:53 +0100
commit55cf320ed87f902d817dfea363e6612be0c3b675 (patch)
treec0d67bbf6cb9c64803f900635209ca2cd0a925a5
parent54690a5f3b113914224537ec14f88cf2fa9e6403 (diff)
mesa: fix texture border handling for cube arrays
Cc: [email protected] Reviewed-by: Brian Paul <[email protected]>
-rw-r--r--src/mesa/main/teximage.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index a57a53526ff..57a766f99f0 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;