dzn: Add for condition to break nested loop

Fixes: d132ec92 ("dzn: Support native image copies when formats are compatible")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17377>
This commit is contained in:
Jesse Natalie 2022-07-06 09:22:08 -07:00 committed by Marge Bot
parent 36516b869e
commit f7c741c058
1 changed files with 1 additions and 1 deletions

View File

@ -3014,7 +3014,7 @@ dzn_CmdCopyImage2(VkCommandBuffer commandBuffer,
bool requires_temp_res = false;
for (uint32_t i = 0; i < info->regionCount; i++) {
for (uint32_t i = 0; i < info->regionCount && !requires_temp_res; i++) {
const VkImageCopy2 *region = &info->pRegions[i];
dzn_foreach_aspect(aspect, region->srcSubresource.aspectMask) {