diff options
author | Boris Brezillon <boris.brezillon@collabora.com> | 2020-12-02 11:10:04 +0100 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@collabora.com> | 2020-12-05 13:33:45 +0100 |
commit | 764db6a223f9f3bd785edf9bf9bf5021835be22c (patch) | |
tree | a31f92921a70e2f8434cf31c1e3797da55741cb3 /src/panfrost | |
parent | 87ad5f5b0df3beb3e971b3e5a5187ce1f4ac828b (diff) |
panfrost: Fix texture payload decoding
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7921>
Diffstat (limited to 'src/panfrost')
-rw-r--r-- | src/panfrost/lib/decode.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/panfrost/lib/decode.c b/src/panfrost/lib/decode.c index dd761d5dd2d..cc79dc8c7ac 100644 --- a/src/panfrost/lib/decode.c +++ b/src/panfrost/lib/decode.c @@ -706,7 +706,7 @@ pandecode_texture_payload(mali_ptr payload, enum mali_texture_layout layout, bool manual_stride, uint8_t levels, - uint16_t depth, + uint16_t nr_samples, uint16_t array_size, struct pandecode_mapped_memory *tmem) { @@ -726,7 +726,7 @@ pandecode_texture_payload(mali_ptr payload, bitmap_count *= 6; /* Array of layers */ - bitmap_count *= depth; + bitmap_count *= nr_samples; /* Array of textures */ bitmap_count *= array_size; @@ -770,9 +770,11 @@ pandecode_texture(mali_ptr u, DUMP_UNPACKED(MIDGARD_TEXTURE, temp, "Texture:\n") pandecode_indent++; + unsigned nr_samples = temp.dimension == MALI_TEXTURE_DIMENSION_3D ? + 1 : temp.sample_count; pandecode_texture_payload(u + MALI_MIDGARD_TEXTURE_LENGTH, temp.dimension, temp.texel_ordering, temp.manual_stride, - temp.levels, temp.depth, temp.array_size, mapped_mem); + temp.levels, nr_samples, temp.array_size, mapped_mem); pandecode_indent--; } @@ -786,9 +788,11 @@ pandecode_bifrost_texture( DUMP_UNPACKED(BIFROST_TEXTURE, temp, "Texture:\n") struct pandecode_mapped_memory *tmem = pandecode_find_mapped_gpu_mem_containing(temp.surfaces); + unsigned nr_samples = temp.dimension == MALI_TEXTURE_DIMENSION_3D ? + 1 : temp.sample_count; pandecode_indent++; pandecode_texture_payload(temp.surfaces, temp.dimension, temp.texel_ordering, - true, temp.levels, 1, 1, tmem); + true, temp.levels, nr_samples, temp.array_size, tmem); pandecode_indent--; } |