Module: Mesa Branch: main Commit: 555955fc9f616042e669df2be6f7a16f544c2473 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=555955fc9f616042e669df2be6f7a16f544c2473
Author: Jesse Natalie <[email protected]> Date: Thu Dec 21 14:58:24 2023 -0800 dzn: Fix 3D to 2D image copies Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26795> --- src/microsoft/vulkan/dzn_cmd_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/microsoft/vulkan/dzn_cmd_buffer.c b/src/microsoft/vulkan/dzn_cmd_buffer.c index 18f1d50a75a..8f3b114064f 100644 --- a/src/microsoft/vulkan/dzn_cmd_buffer.c +++ b/src/microsoft/vulkan/dzn_cmd_buffer.c @@ -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); } }
