v3dv: implement partial image to buffer copies

We implement this by blitting the requested region to a linear image
setup to use the buffer memory store at the requested offset.

Because we can't store linear depth/stencil images, we implement
copies of depth/stencil aspects by using a compatible color blit.
To do this, we also need to account for the fact that when we are
copying depth from a d24 format we need to copy them from the MSB
24-bits of each word as provided by the hardware and store them
in the LSB 24-bit of the buffer (as per Vulkan requirements). This
is achieved by expanding our blit interface to also accept a swizzle
to apply to the source texture.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
2 files changed