summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/VulkanMemoryAllocator/patches/0003-Fix-gcc-8-warning.patch
blob: 87fa8e4cc329906cc10e8606515cafc58f61cd08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From 2c51f161e9730482b6ebcc4a73b525d5aa4e539a Mon Sep 17 00:00:00 2001
From: Laszlo Agocs <laszlo.agocs@qt.io>
Date: Thu, 14 Jan 2021 11:26:48 +0100
Subject: [PATCH 3/4] Fix gcc 8 warning

Change-Id: I150223178ecc1e177f669f7415b147f9779f019c
---
 src/3rdparty/VulkanMemoryAllocator/vk_mem_alloc.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/3rdparty/VulkanMemoryAllocator/vk_mem_alloc.h b/src/3rdparty/VulkanMemoryAllocator/vk_mem_alloc.h
index 10369475c7..79efc1f0da 100644
--- a/src/3rdparty/VulkanMemoryAllocator/vk_mem_alloc.h
+++ b/src/3rdparty/VulkanMemoryAllocator/vk_mem_alloc.h
@@ -12640,7 +12640,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();
-- 
2.23.0.windows.1