pvr: Fix cubemap layer stride
authorKarmjit Mahil <Karmjit.Mahil@imgtec.com>
Tue, 19 Sep 2023 16:08:41 +0000 (17:08 +0100)
committerMarge Bot <emma+marge@anholt.net>
Mon, 9 Oct 2023 13:35:56 +0000 (13:35 +0000)
commit2a3aa6da5038e50a34f22d986fb36870024fd57e
tree536aca9d68a4e0b60c241222c4e8f3367a8fe07d
parent3808cb0696264d88a5813d18963acfccbb30a7be
pvr: Fix cubemap layer stride

The hw calculates the layer stride with the assumption of a full
mip chain being there even though certain levels might never be
used.

Fix the `layer_size` by accounting for any missing mip levels.

Fixes: 8991e6464 ("pvr: Add a Vulkan driver for Imagination Technologies PowerVR Rogue GPUs")
Reported-by: James Glanville <james.glanville@imgtec.com>
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25344>
src/imagination/vulkan/pvr_image.c