From b4b864e40acc59e78422767e9ccda15b4bd477cf Mon Sep 17 00:00:00 2001 From: ocornut Date: Wed, 29 Nov 2023 14:24:25 +0100 Subject: [PATCH] Backends: Vulkan: Fixed mismatching allocator passed to vkCreateCommandPool() vs vkDestroyCommandPool(). (#7075) --- backends/imgui_impl_vulkan.cpp | 3 ++- docs/CHANGELOG.txt | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/backends/imgui_impl_vulkan.cpp b/backends/imgui_impl_vulkan.cpp index 3514f9c47..d58a28cbb 100644 --- a/backends/imgui_impl_vulkan.cpp +++ b/backends/imgui_impl_vulkan.cpp @@ -33,6 +33,7 @@ // CHANGELOG // (minor and older changes stripped away, please see git history for details) +// 2023-11-29: Vulkan: Fixed mismatching allocator passed to vkCreateCommandPool() vs vkDestroyCommandPool(). (#7075) // 2023-11-10: *BREAKING CHANGE*: Removed parameter from ImGui_ImplVulkan_CreateFontsTexture(): backend now creates its own command-buffer to upload fonts. // *BREAKING CHANGE*: Removed ImGui_ImplVulkan_DestroyFontUploadObjects() which is now unecessary as we create and destroy those objects in the backend. // ImGui_ImplVulkan_CreateFontsTexture() is automatically called by NewFrame() the first time. @@ -618,7 +619,7 @@ bool ImGui_ImplVulkan_CreateFontsTexture() info.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO; info.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT; info.queueFamilyIndex = v->QueueFamily; - vkCreateCommandPool(v->Device, &info, nullptr, &bd->FontCommandPool); + vkCreateCommandPool(v->Device, &info, v->Allocator, &bd->FontCommandPool); } if (bd->FontCommandBuffer == VK_NULL_HANDLE) { diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 1a64ba654..71d9f20e8 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -57,6 +57,8 @@ Other changes: like most printf implementations. (#7016, #3466, #6846) [@codefrog2002] - Misc: Renamed some defines in imstb_textedit.h to avoid conflicts when using unity/jumbo builds on a codebase where another copy of the library is used. +- Backends: Vulkan: Fixed mismatching allocator passed to vkCreateCommandPool() vs + vkDestroyCommandPool(). (#7075) [@FoonTheRaccoon] -----------------------------------------------------------------------