Vulkan-Guide icon indicating copy to clipboard operation
Vulkan-Guide copied to clipboard

vkFreeMemory() memory leaks while the VkDeviceMemory object was allocated with VkExportMemoryAllocateInfo

Open lxrui opened this issue 3 years ago • 2 comments

I am using the VK_KHR_external_memory_win32 extension to share GPU memory with OpenGL on Windows, the shared texture works fine. The memory was allocated by vkAllocateMemory() with VkMemoryAllocateInfo that the pNext contains a VkExternalMemoryImageCreateInfo structure whose handleTypes is VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT/VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV, but the memory will not return to GPU memory heap after the related VkDeviceMemory object was freed by vkFreeMemory(). I have test Intel HD 630 / AMD RX 5700XT / Nvidia 1660 Ti graphics cards, all of them have the memory leaks issue no matter if the dedicated memory is enable or not.

lxrui avatar Sep 14 '22 03:09 lxrui

Hello @lxrui

The Vulkan Guide is not a dedicated place to ask for debugging help, my advice would to ask your questions in one of the community platforms instead https://vulkan.org/#join-our-community

sjfricke avatar Sep 14 '22 03:09 sjfricke

Thanks @sjfricke I post this issue on stackoverflow

lxrui avatar Sep 14 '22 04:09 lxrui

Is there anything else to do on this one, or shall we close it out? Thx

marty-johnson59 avatar Nov 04 '22 16:11 marty-johnson59