You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-11Lines changed: 12 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -26,22 +26,23 @@ Memory allocation and resource (buffer and image) creation in Vulkan is difficul
26
26
27
27
# Features
28
28
29
-
This library can help game developers to manage memory allocations and resource creation by offering some higher-level functions. Features of the library are divided into several layers, low level to high level:
29
+
This library can help game developers to manage memory allocations and resource creation by offering some higher-level functions:
30
30
31
31
1. Functions that help to choose correct and optimal memory type based on intended usage of the memory.
32
32
- Required or preferred traits of the memory are expressed using higher-level description comparing to Vulkan flags.
33
33
2. Functions that allocate memory blocks, reserve and return parts of them (`VkDeviceMemory` + offset + size) to the user.
34
-
- Library keeps track of allocated memory blocks, used and unused ranges inside them, finds best matching unused ranges for new allocations, takes all the rules of alignment and buffer/image granularity into consideration.
34
+
- Library keeps track of allocated memory blocks, used and unused ranges inside them, finds best matching unused ranges for new allocations, respects all the rules of alignment and buffer/image granularity.
35
35
3. Functions that can create an image/buffer, allocate memory for it and bind them together - all in one call.
36
36
37
37
Additional features:
38
38
39
+
- Well-documented - description of all functions and structures provided, along with chapters that contain general description and example code.
39
40
- Thread-safety: Library is designed to be used by multithreaded code.
40
-
- Configuration: Fill optional members of CreateInfo structure to provide custom CPU memory allocator and other parameters.
41
+
- Configuration: Fill optional members of CreateInfo structure to provide custom CPU memory allocator, pointers to Vulkan functions and other parameters.
41
42
- Customization: Predefine appropriate macros to provide your own implementation of all external facilities used by the library, from assert, mutex, and atomic, to vector and linked list.
42
-
- Support memory mapping, reference-counted internally. Support for persistently mapped memory: Just allocate with appropriate flag and you get access to mapped pointer.
43
+
- Support for memory mapping, reference-counted internally. Support for persistently mapped memory: Just allocate with appropriate flag and you get access to mapped pointer.
43
44
- Custom memory pools: Create a pool with desired parameters (e.g. fixed or limited maximum size) and allocate memory out of it.
44
-
- Support for VK_KHR_dedicated_allocation extension: Enable it and it will be used automatically by the library.
45
+
- Support for VK_KHR_dedicated_allocation extension: Just enable it and it will be used automatically by the library.
45
46
- Defragmentation: Call one function and let the library move data around to free some memory blocks and make your allocations better compacted.
46
47
- Lost allocations: Allocate memory with appropriate flags and let the library remove allocations that are not used for many frames to make room for new ones.
47
48
- Statistics: Obtain detailed statistics about the amount of memory used, unused, number of allocated blocks, number of allocations etc. - globally, per memory heap, and per memory type.
@@ -53,9 +54,9 @@ Additional features:
53
54
54
55
- Self-contained C++ library in single header file. No external dependencies other than standard C and C++ library and of course Vulkan.
55
56
- Public interface in C, in same convention as Vulkan API. Implementation in C++.
56
-
- Interface documented using Doxygen-style comments.
57
-
- Platform-independent, but developed and tested on Windows using Visual Studio.
58
57
- Error handling implemented by returning `VkResult` error codes - same way as in Vulkan.
58
+
- Interface documented using Doxygen-style comments.
59
+
- Platform-independent, but developed and tested on Windows using Visual Studio. Continuous integration setup for Windows and Linux. Tested also on Android and MacOS.
59
60
60
61
# Example
61
62
@@ -80,17 +81,17 @@ With this one function call:
80
81
2. `VkDeviceMemory` block is allocated if needed.
81
82
3. An unused region of the memory block is bound to this buffer.
82
83
83
-
`VmaAllocation` is an object that represents memory assigned to this buffer. It can be queried for parameters useful e.g. if you want to map the memory on host.
84
+
`VmaAllocation` is an object that represents memory assigned to this buffer. It can be queried for parameters like Vulkan memory handle and offset.
84
85
85
86
# Read more
86
87
87
88
See **[Documentation](https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/)**.
88
89
89
90
# Software using this library
90
91
91
-
- **[Anvil](https://github.com/GPUOpen-LibrariesAndSDKs/Anvil)** - cross-platform framework for Vulkan
92
-
- **[vkDOOM3](https://github.com/DustinHLand/vkDOOM3)** - Vulkan port of GPL DOOM 3 BFG Edition
93
-
- **[Lightweight Java Game Library (LWJGL)](https://www.lwjgl.org/)** - includes binding of the library for Java
92
+
- **[Anvil](https://github.com/GPUOpen-LibrariesAndSDKs/Anvil)** - cross-platform framework for Vulkan. License: MIT.
93
+
- **[vkDOOM3](https://github.com/DustinHLand/vkDOOM3)** - Vulkan port of GPL DOOM 3 BFG Edition. License: GNU GPL.
94
+
- **[Lightweight Java Game Library (LWJGL)](https://www.lwjgl.org/)** - includes binding of the library for Java. License: BSD.
0 commit comments