radeonsi: Copy all planes with multi-plane staging textures
authorDavid Rosca <nowrep@gmail.com>
Sun, 30 Jul 2023 10:39:15 +0000 (12:39 +0200)
committerMarge Bot <emma+marge@anholt.net>
Thu, 3 Aug 2023 13:36:58 +0000 (13:36 +0000)
commit4f047c9583a0ef3dc23017c3eb37d01aaf1d61dd
tree26ce0d09522c666dd6a0869e5aa0165d32d36858
parent2cb3c2cbfb2132d4b2f3c97bc3edd3cccdb70b47
radeonsi: Copy all planes with multi-plane staging textures

Multi-plane format textures are allocated as a single buffer
for all planes, so when mapping first plane it will map
all planes.
However, when staging texture is used, only the first
plane will be available.

When asked to map first plane of multi-plane texture,
create a staging texture with matching multi-plane format
and copy all planes on map/unmap.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24389>
src/gallium/drivers/radeonsi/si_pipe.h
src/gallium/drivers/radeonsi/si_texture.c