From: Tomeu Vizoso Date: Tue, 4 Feb 2020 07:29:50 +0000 (+0100) Subject: panfrost: Fix decoding of tiled 3D textures X-Git-Tag: upstream/20.1.8~3721 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=255227ececb4444fdf5cc2925fc1064d729021f4;p=platform%2Fupstream%2Fmesa.git panfrost: Fix decoding of tiled 3D textures From decoding cmd streams generated by the blob, the pointers in the payload don't seem to include those that refer to different depth levels when the texture is in tiled format. Signed-off-by: Tomeu Vizoso Reviewed-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c index 3e832b6..32a6ba4 100644 --- a/src/panfrost/pandecode/decode.c +++ b/src/panfrost/pandecode/decode.c @@ -2030,8 +2030,8 @@ pandecode_texture(mali_ptr u, /* Miptree for each face */ if (f.type == MALI_TEX_CUBE) bitmap_count *= 6; - else if (f.type == MALI_TEX_3D) - bitmap_count *= t->depth; + else if (f.type == MALI_TEX_3D && f.layout == MALI_TEXTURE_LINEAR) + bitmap_count *= (t->depth + 1); /* Array of textures */ bitmap_count *= (t->array_size + 1);