v2.3.0
Major release after a year of development in "master" branch and feature branches. Notable new features: supporting Vulkan 1.1, supporting query for memory budget.
Major changes:
- Added support for Vulkan 1.1.
- Added member
VmaAllocatorCreateInfo::vulkanApiVersion. - When Vulkan 1.1 is used, there is no need to enable VK_KHR_dedicated_allocation or VK_KHR_bind_memory2 extensions, as they are promoted to Vulkan itself.
- Added member
- Added support for query for memory budget and staying within the budget.
- Added function
vmaGetBudget, structureVmaBudget. This can also serve as simple statistics, more efficient thanvmaCalculateStats. - By default the budget it is estimated based on memory heap sizes. It may be queried from the system using VK_EXT_memory_budget extension if you use
VMA_ALLOCATOR_CREATE_EXT_MEMORY_BUDGET_BITflag andVmaAllocatorCreateInfo::instancemember. - Added flag
VMA_ALLOCATION_CREATE_WITHIN_BUDGET_BITthat fails an allocation if it would exceed the budget.
- Added function
- Added new memory usage options:
VMA_MEMORY_USAGE_CPU_COPYfor memory that is preferably notDEVICE_LOCALbut not guaranteed to beHOST_VISIBLE.VMA_MEMORY_USAGE_GPU_LAZILY_ALLOCATEDfor memory that isLAZILY_ALLOCATED.
- Added support for VK_KHR_bind_memory2 extension:
- Added
VMA_ALLOCATION_CREATE_DONT_BIND_BITflag that lets you create both buffer/image and allocation, but don't bind them together. - Added flag
VMA_ALLOCATOR_CREATE_KHR_BIND_MEMORY2_BIT, functionsvmaBindBufferMemory2,vmaBindImageMemory2that let you specify additional local offset andpNextpointer while binding.
- Added
- Added functions
vmaSetPoolName,vmaGetPoolNamethat let you assign string names to custom pools. JSON dump file format and VmaDumpVis tool is updated to show these names. - Defragmentation is legal only on buffers and images in
VK_IMAGE_TILING_LINEAR. This is due to the way it is currently implemented in the library and the restrictions of the Vulkan specification. Clarified documentation in this regard. See discussion in #59.
Minor changes:
- Made
vmaResizeAllocationfunction deprecated, always returning failure. - Made changes in the internal algorithm for the choice of memory type. Be careful! You may now get a type that is not
HOST_VISIBLEorHOST_COHERENTif it's not stated as always ensured by someVMA_MEMORY_USAGE_*flag. - Extended VmaReplay application with more detailed statistics printed at the end.
- Added macros
VMA_CALL_PRE,VMA_CALL_POSTthat let you decorate declarations of all library functions if you want to e.g. export/import them as dynamically linked library. - Optimized
VmaAllocationobjects to be allocated out of an internal free-list allocator. This makes allocation and deallocation causing 0 dynamic CPU heap allocations on average. - Updated recording CSV file format version to 1.8, to support new functions.
- Many additions and fixes in documentation. Many compatibility fixes for various compilers and platforms. Other internal bugfixes, optimizations, updates, refactoring...