The idea is that we also want to use the blit mechanism to implement the copy, like we do for partial image copies. Unfortunately, we can't sample from a linear image, so we first need to upload the buffer contents to a tiled image, and then blit from that image to the destination, which is not great for performance or memory usage.
In the future, we mihgt be able to do better by using a specialized shader for these copies that takes a UBO as input instead of a texture. The shader would then be able to access the linea buffer through the UBO directly without having to copy the buffer contents to a tiled image first.
This only supports color images for now, we will add support for depth/stencil images separately.
0a3c7ac9fad v3dv: implement partial buffer copies to color images
src/broadcom/vulkan/v3dv_meta_copy.c | 195 +++++++++++++++++++++++++++++++++--
1 file changed, 185 insertions(+), 10 deletions(-)