gallium/u_transfer_helper: add util functions for doing deinterleaving during map
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 4 Jun 2020 15:31:28 +0000 (11:31 -0400)
committerMarge Bot <eric+marge@anholt.net>
Mon, 10 Aug 2020 23:25:57 +0000 (23:25 +0000)
commit2cd0c8d8ea1c59ebafba668a797f8bb05874fda3
tree707761865c69b714699e03223e3e859aa86e4e2d
parent2368813ce6f6e767226ae4698159106f467ce428
gallium/u_transfer_helper: add util functions for doing deinterleaving during map

in some cases (e.g., zink and d3d12) we only want to split the depth and stencil
buffers when we're mapping them, and we can handle packed buffers in other cases,
so being able to reuse the u_transfer_helper functionality is still desired but
only if we can preserve the underlying buffer the rest of the time

Kenneth Graunke notes during post-review:
Vulkan reads/copies on packed Z24S8 only return depth, so we need to use separate
Z24 and S8 reads and do packing tricks.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5338>
src/gallium/auxiliary/util/u_transfer_helper.c
src/gallium/auxiliary/util/u_transfer_helper.h