From 5d9971bc636b3800ccf8a8d868ba5cb61b65b2d3 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Thu, 2 Feb 2023 08:03:30 +0100 Subject: [PATCH] Vulkan: Fix compilation warning in VMA. --- .../patches/remove_compilation_warning.diff | 15 +++++++++++++++ extern/vulkan_memory_allocator/vk_mem_alloc.h | 4 ++-- source/tools | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 extern/vulkan_memory_allocator/patches/remove_compilation_warning.diff diff --git a/extern/vulkan_memory_allocator/patches/remove_compilation_warning.diff b/extern/vulkan_memory_allocator/patches/remove_compilation_warning.diff new file mode 100644 index 00000000000..de4b8d10878 --- /dev/null +++ b/extern/vulkan_memory_allocator/patches/remove_compilation_warning.diff @@ -0,0 +1,15 @@ +diff --git a/extern/vulkan_memory_allocator/vk_mem_alloc.h b/extern/vulkan_memory_allocator/vk_mem_alloc.h +index 60f572038c0..63a9994ba46 100644 +--- a/extern/vulkan_memory_allocator/vk_mem_alloc.h ++++ b/extern/vulkan_memory_allocator/vk_mem_alloc.h +@@ -13371,8 +13371,8 @@ bool VmaDefragmentationContext_T::IncrementCounters(VkDeviceSize bytes) + // Early return when max found + if (++m_PassStats.allocationsMoved >= m_MaxPassAllocations || m_PassStats.bytesMoved >= m_MaxPassBytes) + { +- VMA_ASSERT(m_PassStats.allocationsMoved == m_MaxPassAllocations || +- m_PassStats.bytesMoved == m_MaxPassBytes && "Exceeded maximal pass threshold!"); ++ VMA_ASSERT((m_PassStats.allocationsMoved == m_MaxPassAllocations || ++ m_PassStats.bytesMoved == m_MaxPassBytes) && "Exceeded maximal pass threshold!"); + return true; + } + return false; diff --git a/extern/vulkan_memory_allocator/vk_mem_alloc.h b/extern/vulkan_memory_allocator/vk_mem_alloc.h index 60f572038c0..63a9994ba46 100644 --- a/extern/vulkan_memory_allocator/vk_mem_alloc.h +++ b/extern/vulkan_memory_allocator/vk_mem_alloc.h @@ -13371,8 +13371,8 @@ bool VmaDefragmentationContext_T::IncrementCounters(VkDeviceSize bytes) // Early return when max found if (++m_PassStats.allocationsMoved >= m_MaxPassAllocations || m_PassStats.bytesMoved >= m_MaxPassBytes) { - VMA_ASSERT(m_PassStats.allocationsMoved == m_MaxPassAllocations || - m_PassStats.bytesMoved == m_MaxPassBytes && "Exceeded maximal pass threshold!"); + VMA_ASSERT((m_PassStats.allocationsMoved == m_MaxPassAllocations || + m_PassStats.bytesMoved == m_MaxPassBytes) && "Exceeded maximal pass threshold!"); return true; } return false; diff --git a/source/tools b/source/tools index d5a1cc67212..e133fc08cd3 160000 --- a/source/tools +++ b/source/tools @@ -1 +1 @@ -Subproject commit d5a1cc672121237f7ce7b85383f4bd6457678f64 +Subproject commit e133fc08cd3254bb3d3bd1345028c8486700bca4