VMA dumps

  • For memory management, Inexor uses AMD’s Vulkan Memory Allocator library (VMA).

  • VMA can export an overview of the current GPU memory allocations into a JSON file which can be converted into an image using VMA’s VmaDumpVis.

  • This way we can see which memory pools exist, which memory blocks are allocated, and what they are used for.

  • The example image provided here might look very simple, but with increasing complexity of our engine this will turn out very helpful.

This is a very simple example of such an image generated with VmaDumpVis:

Example of a memory allocation overview generated by VmaDumpVis.

Example: march 2020 texture memory corruption bug

  • In march 2020, a bug in Inexor’s early graphics memory management caused textures to corrupt on window resize.

  • VmaDumpVis helped to resolve the issue by proving the memory consumption increased after each resize, which means the texture memory was simply not freed when the swapchain was recreated.

  • This is an example of how VMA and VmaDumpVis make debugging graphics memory easier.

Example of a VmaDumpVis being used to detect memory leaks.