[Mesa-dev] [PATCH 2/2] mesa: Don't minify depth for cube map arrays.
Marek Olšák
maraeo at gmail.com
Thu Mar 20 06:51:51 PDT 2014
I had already done this in my Mesa patch:
"[PATCH 3/9] mesa: fix software fallback for generating mipmaps for cube arrays"
I will commit it shortly.
Marek
On Thu, Mar 20, 2014 at 10:18 AM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> Minifying depth really only make sense for 3D textures. For 2D and Cube
> arrays, we don't want to minify it.
>
> Fixes oglconform's texture_view/basic.castTarget.cubeMapArray test,
> which called glTexStorage3D to set up a cube map array with 18 layers
> and 3 miplevels. We only allocated 9 slices for miplevel 1, leading to
> assertion failures when it tried to populate all 18 slices of data.
>
> Also fixes oglconform's texture_view/basic.castTarget.2dArray test.
>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> Cc: Chris Forbes <chrisf at ijw.co.nz>
> ---
> src/mesa/main/mipmap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Should apply to master - this isn't really texture view related.
> It's just a bug.
>
> diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
> index 521b2d8..2ad24f1 100644
> --- a/src/mesa/main/mipmap.c
> +++ b/src/mesa/main/mipmap.c
> @@ -1788,7 +1788,7 @@ _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 && target != GL_TEXTURE_CUBE_MAP_ARRAY) {
> *dstDepth = (srcDepth - 2 * border) / 2 + 2 * border;
> }
> else {
> --
> 1.9.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list