nvk: Fix uninitialized var warnings in host_copy

Fixes: 6c5420cd30 ("nvk: Add host copy functions")
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
(cherry picked from commit 5a65300439)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
This commit is contained in:
M Henning
2024-10-29 14:14:43 -04:00
committed by Dylan Baker
parent d96ad7736d
commit e806d032e1
2 changed files with 4 additions and 4 deletions

View File

@@ -54,7 +54,7 @@
"description": "nvk: Fix uninitialized var warnings in host_copy",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "6c5420cd30a97096ecb6854c70b923bf990915c6",
"notes": null

View File

@@ -180,7 +180,7 @@ nvk_CopyMemoryToImageEXT(VkDevice _device,
{
VK_FROM_HANDLE(nvk_image, dst_image, info->dstImage);
VkResult result;
VkResult result = VK_SUCCESS;
/* From the EXT spec:
* VK_HOST_IMAGE_COPY_MEMCPY_EXT specifies that no memory layout swizzling is
@@ -306,7 +306,7 @@ nvk_CopyImageToMemoryEXT(VkDevice _device,
{
VK_FROM_HANDLE(nvk_image, image, info->srcImage);
VkResult result;
VkResult result = VK_SUCCESS;
const bool use_memcpy = info->flags &
VK_HOST_IMAGE_COPY_MEMCPY_EXT;
@@ -544,7 +544,7 @@ nvk_CopyImageToImageEXT(VkDevice _device,
VK_FROM_HANDLE(nvk_image, src, pCopyImageToImageInfo->srcImage);
VK_FROM_HANDLE(nvk_image, dst, pCopyImageToImageInfo->dstImage);
VkResult result;
VkResult result = VK_SUCCESS;
for (unsigned r = 0; r < pCopyImageToImageInfo->regionCount; r++) {
result = nvk_copy_image_to_image(device, src, dst,