core: Disable VMA leak check (#4100)

This commit is contained in:
Adrian Cojocaru
2026-02-16 16:23:36 +02:00
committed by GitHub
parent e4a96d205e
commit 31237f0803
2 changed files with 10 additions and 2 deletions

View File

@@ -22,7 +22,7 @@
#if !defined(NDEBUG) && !defined(__ANDROID__)
#define ENABLE_VULKAN_VALIDATION
// #define ENABLE_VULKAN_GPU_ASSISTED_VALIDATION
// #define ENABLE_VMA_DEBUG
// #define ENABLE_VMA_DEBUG
#endif
namespace mbgl {

View File

@@ -36,7 +36,7 @@
#ifdef ENABLE_VMA_DEBUG
#define VMA_DEBUG_MARGIN 16
#define VMA_DEBUG_MARGIN 4
#define VMA_DEBUG_DETECT_CORRUPTION 1
#define VMA_DEBUG_INITIALIZE_ALLOCATIONS 1
@@ -52,6 +52,14 @@
#define VMA_DEBUG_LOG(str) VMA_DEBUG_LOG_FORMAT("%s", (str))
#define VMA_LEAK_LOG_FORMAT(...) VMA_DEBUG_LOG_FORMAT(__VA_ARGS__)
#else
// - triggering VMA_ASSERT_LEAK in `VmaDeviceMemoryBlock::Destroy` without any log printed by
// `VmaBlockMetadata_TLSF::DebugLogAllAllocations` (since all blocks are free).
// - VMA_LEAK_LOG_FORMAT logs generate an equal number of alloc/free events.
// - https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/issues/276
#undef VMA_ASSERT_LEAK
#endif
#define VMA_IMPLEMENTATION