aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost/pandecode/decode.c
diff options
context:
space:
mode:
authorTomeu Vizoso <[email protected]>2020-02-04 08:29:50 +0100
committerTomeu Vizoso <[email protected]>2020-02-04 15:46:06 +0100
commit255227ececb4444fdf5cc2925fc1064d729021f4 (patch)
treec046bbcff6de8d40eab835786c2b3fbbd5e38ff8 /src/panfrost/pandecode/decode.c
parentfd27fb511386615cd6b44b037f9f5117846b51d4 (diff)
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 <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3692>
Diffstat (limited to 'src/panfrost/pandecode/decode.c')
-rw-r--r--src/panfrost/pandecode/decode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c
index 3e832b6e3db..32a6ba42a7a 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);