From 78c60d1b630c2c21dd987ea1bb3713802f22cd29 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 11 Mar 2014 15:04:33 +0100 Subject: [PATCH] mesa: fix software fallback for generating mipmaps for cube arrays Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Brian Paul --- src/mesa/main/mipmap.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c index 521b2d8eb0e..98af0a3a76c 100644 --- a/src/mesa/main/mipmap.c +++ b/src/mesa/main/mipmap.c @@ -1746,6 +1746,7 @@ _mesa_generate_mipmap_level(GLenum target, } break; case GL_TEXTURE_2D_ARRAY_EXT: + case GL_TEXTURE_CUBE_MAP_ARRAY: for (i = 0; i < dstDepth; i++) { make_2d_mipmap(datatype, comps, border, srcWidth, srcHeight, srcData[i], srcRowStride, @@ -1788,7 +1789,8 @@ _mesa_next_mipmap_level_size(GLenum target, GLint border, } if ((srcDepth - 2 * border > 1) && - (target != GL_TEXTURE_2D_ARRAY_EXT)) { + (target != GL_TEXTURE_2D_ARRAY_EXT && + target != GL_TEXTURE_CUBE_MAP_ARRAY)) { *dstDepth = (srcDepth - 2 * border) / 2 + 2 * border; } else { @@ -2029,7 +2031,8 @@ generate_mipmap_compressed(struct gl_context *ctx, GLenum target, /* only two types of compressed textures at this time */ assert(texObj->Target == GL_TEXTURE_2D || texObj->Target == GL_TEXTURE_2D_ARRAY || - texObj->Target == GL_TEXTURE_CUBE_MAP_ARB); + texObj->Target == GL_TEXTURE_CUBE_MAP_ARB || + texObj->Target == GL_TEXTURE_CUBE_MAP_ARRAY); /* * Choose a format for the temporary, uncompressed base image. -- 2.30.2