DEV Community

loading...

Vulkan Memory Allocator 2.1.0

Adam Sawicki
All opinions are my own and do not reflect that of my employer.
Originally published at asawicki.info on ・1 min read

Yesterday I merged changes in the code of Vulkan Memory Allocator that I've been working on for past few months to "master" branch, which I consider a major milestone, so I marked it as version 2.1.0-beta.1. There are many new features, including:

  • Added linear allocation algorithm, accessible for custom pools, that can be used as free-at-once, stack, double stack, or ring buffer.
  • Added feature to record sequence of calls to the library to a file and replay it using dedicated application.
  • Improved support for non-coherent memory.
  • Improved debug features related to detecting incorrect mapped memory usage.
  • Changed format of JSON dump to include more information and allow better coloring in VmaDumpVis.

The release also includes many smaller bug fixes, improvements and additions. Everything is tested and documented. Yet I call it "beta" version, to encourage you to test it in your project and send me your feedback.

GitHub logo GPUOpen-LibrariesAndSDKs / VulkanMemoryAllocator

Easy to integrate Vulkan memory allocation library

Vulkan Memory Allocator

Easy to integrate Vulkan memory allocation library.

Documentation: See Vulkan Memory Allocator (generated from Doxygen-style comments in src/vk_mem_alloc.h)

License: MIT. See LICENSE.txt

Changelog: See CHANGELOG.md

Product page: Vulkan Memory Allocator on GPUOpen

Build status:

  • Windows: Build status
  • Linux: Build Status

Problem

Memory allocation and resource (buffer and image) creation in Vulkan is difficult (comparing to older graphics API-s, like D3D11 or OpenGL) for several reasons:

  • It requires a lot of boilerplate code, just like everything else in Vulkan, because it is a low-level and high-performance API.
  • There is additional level of indirection: VkDeviceMemory is allocated separately from creating VkBuffer/VkImage and they must be bound together.
  • Driver must be queried for supported memory heaps and memory types. Different IHVs provide different types of it.
  • It is recommended practice to allocate bigger chunks of memory and assign parts of them to particular resources.

Features

This library can help game developers…

Discussion (0)