dzn: Fix 3D to 2D image copies

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26795>
This commit is contained in:
Jesse Natalie 2023-12-21 14:58:24 -08:00 committed by Marge Bot
parent 629b15f446
commit 555955fc9f

View file

@ -4190,7 +4190,7 @@ dzn_CmdCopyImage2(VkCommandBuffer commandBuffer,
const VkImageCopy2 *region = &info->pRegions[i];
dzn_foreach_aspect(aspect, region->srcSubresource.aspectMask) {
for (uint32_t l = 0; l < region->srcSubresource.layerCount; l++)
for (uint32_t l = 0; l < MAX2(region->srcSubresource.layerCount, region->dstSubresource.layerCount); l++)
dzn_cmd_buffer_copy_img_chunk(cmdbuf, info, &tmp_desc, &tmp_loc, i, aspect, l);
}
}