mesa: fix texture border handling for cube arrays

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
Marek Olšák 2014-03-11 15:02:39 +01:00
parent 54690a5f3b
commit 55cf320ed8

View file

@ -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;