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.
Vulkan Memory Allocator
Easy to integrate Vulkan memory allocation library.
License: MIT. See LICENSE.txt
Changelog: See CHANGELOG.md
Product page: Vulkan Memory Allocator on GPUOpen
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:
VkDeviceMemoryis allocated separately from creating
VkImageand 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.
This library can help game developers…