summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/VulkanMemoryAllocator/patches/0002-Fix-gcc8-warning.patch
blob: 57a2f1a0f105438c275b1ebb0d64a3006d1c69c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/3rdparty/VulkanMemoryAllocator/vk_mem_alloc.h b/src/3rdparty/VulkanMemoryAllocator/vk_mem_alloc.h
index fbe6f9e3e8..f043bdc289 100644
--- a/src/3rdparty/VulkanMemoryAllocator/vk_mem_alloc.h
+++ b/src/3rdparty/VulkanMemoryAllocator/vk_mem_alloc.h
@@ -12074,7 +12074,8 @@ void VmaBlockVector::ApplyDefragmentationMovesGpu(
     const size_t blockCount = m_Blocks.size();
 
     pDefragCtx->blockContexts.resize(blockCount);
-    memset(pDefragCtx->blockContexts.data(), 0, blockCount * sizeof(VmaBlockDefragmentationContext));
+    for (size_t i = 0; i < blockCount; ++i)
+        pDefragCtx->blockContexts[i] = VmaBlockDefragmentationContext();
 
     // Go over all moves. Mark blocks that are used with BLOCK_FLAG_USED.
     const size_t moveCount = moves.size();