v3dv: don't batch regions with different depth offsets

As we will be creating an image view that covers the region to copy,
batch all the regions that share the same depth offset and depth extent.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34112>
This commit is contained in:
Juan A. Suarez Romero 2025-03-11 14:24:30 +01:00 committed by Marge Bot
parent f7de4ad0fb
commit 91ee8ab284

View file

@ -3321,11 +3321,13 @@ v3dv_CmdCopyBufferToImage2(VkCommandBuffer commandBuffer,
if (memcmp(rsc, rsc_s, sizeof(VkImageSubresourceLayers)) != 0)
break;
/* For 3D images we also need to check the depth extent */
/* For 3D images we also need to check the depth extent / Z-offset */
if (image->vk.image_type == VK_IMAGE_TYPE_3D &&
info->pRegions[s].imageExtent.depth !=
info->pRegions[r].imageExtent.depth) {
break;
(info->pRegions[s].imageExtent.depth !=
info->pRegions[r].imageExtent.depth ||
info->pRegions[s].imageOffset.z !=
info->pRegions[r].imageOffset.z)) {
break;
}
batch_size++;