From 38627f4e37d7a9b13214fd267ec60e0e877e3997 Mon Sep 17 00:00:00 2001 From: Adam Sawicki Date: Tue, 6 Feb 2024 13:13:24 +0100 Subject: [PATCH] Added VMA_LEN_IF_NOT_NULL decoration to the new functions vmaCopyMemoryToAllocation, vmaCopyAllocationToMemory Fixes #406 - thanks @qbojj --- include/vk_mem_alloc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/vk_mem_alloc.h b/include/vk_mem_alloc.h index 2360945..98553aa 100644 --- a/include/vk_mem_alloc.h +++ b/include/vk_mem_alloc.h @@ -2204,7 +2204,7 @@ Do not pass allocation's offset within device memory block this parameter! */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaCopyMemoryToAllocation( VmaAllocator VMA_NOT_NULL allocator, - const void* VMA_NOT_NULL pSrcHostPointer, + const void* VMA_NOT_NULL VMA_LEN_IF_NOT_NULL(size) pSrcHostPointer, VmaAllocation VMA_NOT_NULL dstAllocation, VkDeviceSize dstAllocationLocalOffset, VkDeviceSize size); @@ -2234,7 +2234,7 @@ VMA_CALL_PRE VkResult VMA_CALL_POST vmaCopyAllocationToMemory( VmaAllocator VMA_NOT_NULL allocator, VmaAllocation VMA_NOT_NULL srcAllocation, VkDeviceSize srcAllocationLocalOffset, - void* VMA_NOT_NULL pDstHostPointer, + void* VMA_NOT_NULL VMA_LEN_IF_NOT_NULL(size) pDstHostPointer, VkDeviceSize size); /** \brief Checks magic number in margins around all allocations in given memory types (in both default and custom pools) in search for corruptions.