From 9547e798675330df5dacbed8a72feec012ff3ed5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Thu, 13 Jun 2024 20:32:12 -0700 Subject: [PATCH] VK: Disabled allocator callbacks. --- src/renderer_vk.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/renderer_vk.cpp b/src/renderer_vk.cpp index 7b783871c..ff9043a6b 100644 --- a/src/renderer_vk.cpp +++ b/src/renderer_vk.cpp @@ -1325,8 +1325,15 @@ VK_IMPORT if (BX_ENABLED(BGFX_CONFIG_DEBUG) ) { - s_allocationCb.pUserData = g_allocator; - m_allocatorCb = &s_allocationCb; + // Validation layer is calling freeFunction with pointers that are not allocated + // via callback mechanism. This is bug in validation layer, and work-around + // would be to keep track of allocated pointers and ignore those that are not + // allocated by it. + // + // Anyhow we just let VK take care of memory, until they fix the issue... + // + // s_allocationCb.pUserData = g_allocator; + // m_allocatorCb = &s_allocationCb; BX_UNUSED(s_allocationCb); }