Commit Graph

311 Commits

Author SHA1 Message Date
Adam Sawicki
a01d4587df VmaBlockMetadata_Buddy: Introduced m_LevelCount to limit number of levels in use by particular memory block, considering new constant MIN_NODE_SIZE. 2018-09-21 14:22:35 +02:00
Adam Sawicki
d6e6d6bdf2 VmaBlockMetadata_Buddy: Introduced concept of m_UsableSize to always use powers of two even when memory block size is not. 2018-09-21 14:07:02 +02:00
Adam Sawicki
a79d2746f1 Added dummy implementation of VmaBlockMetadata_Buddy methods related to lost allocations. Lost allocations are not supported in buddy algorithm for now. 2018-09-21 13:26:12 +02:00
Adam Sawicki
0dbbaad040 Minor additions, including function VmaPrevPow2. 2018-09-07 17:43:40 +02:00
Adam Sawicki
8092715d2c VmaBlockMetadata_Buddy: Fixed reporting of space wasted due to internal fragmentation as unused blocks. Added test for multi-block pool with buddy algorithm. 2018-09-07 17:27:23 +02:00
Adam Sawicki
21017c6cbe Implemented VmaBlockMetadata_Linear::AddPoolStats. 2018-09-07 15:26:59 +02:00
Adam Sawicki
6540b19ed5 Implemented VmaBlockMetadata_Buddy::GetUnusedRangeSizeMax(). 2018-09-07 15:09:41 +02:00
Adam Sawicki
a7863d9664 Implemented VmaBlockMetadata_Buddy::GetSumFreeSize. 2018-09-07 15:05:02 +02:00
Adam Sawicki
8796504f62 Added macro VMA_VALIDATE to simplify validation methods. Implemented proper calculation of VmaBlockMetadata_Buddy::GetAllocationCount. 2018-09-07 15:00:13 +02:00
Adam Sawicki
ca5db0b8a5 Rebuilt Doxygen documentation after upgrading Doxygen version. 2018-09-07 14:58:49 +02:00
Adam Sawicki
4338f6667d Added internal function VmaIsPow2 and asserts checking if various alignment parameters are power of 2. 2018-09-07 14:12:37 +02:00
Adam Sawicki
a70e05dbc5 . 2018-09-07 12:36:38 +02:00
Adam Sawicki
24c4f45abf Changed VmaBlockMetadata_Buddy::m_FreeList into a doubly linked list. Implemented merging of free blocks. Buddy allocation algorithm now works. 2018-09-06 17:39:11 +02:00
Adam Sawicki
bf1a931a2d Next small step: moved split logic from VmaBlockMetadata_Buddy::CreateAllocationRequest to VmaBlockMetadata_Buddy::Alloc. 2018-09-06 17:04:32 +02:00
Adam Sawicki
a83793a63e Buddy allocator - more coding. 2018-09-03 13:40:42 +02:00
Adam Sawicki
6d9d718343 TEMP started coding buddy algorithm. 2018-08-28 13:09:27 +02:00
Adam Sawicki
0a3fb6ca60 Tests: benchmark of linear allocator now compares to various allocation strategies. 2018-08-27 14:40:27 +02:00
Adam Sawicki
33d2ce744b Added writing results of linear allocator benchmark to file "LinearAllocator.csv". 2018-08-27 13:59:13 +02:00
Adam Sawicki
740b08f6eb Testing environment: Improved formatting of CSV faile with results of main benchmark. 2018-08-27 13:42:07 +02:00
Adam Sawicki
1d2d627146 Merge branch 'master' into allocation_defragmentation_strategies 2018-08-27 13:20:43 +02:00
Adam Sawicki
c7d1b584b7 Fixes for compilation under Linux gcc and clang. #2 2018-08-27 12:30:53 +02:00
Adam Sawicki
6277abb3c4 Fixes for compilation under Linux gcc and clang. 2018-08-27 12:21:35 +02:00
Adam Sawicki
2b3e416cdf Merge branch 'development' 2018-08-27 12:14:28 +02:00
Adam Sawicki
2cf37c8c57 Minor fixes in CHANGELOG.md. 2018-08-27 12:13:56 +02:00
Adam Sawicki
eaab97ca85 Rebuilt binaries again. 2018-08-27 12:09:29 +02:00
Adam Sawicki
c5b223fe4b VmaAllocator_T::FreeMemory: Fixed synchronization bug for cases when an allocation becomes lost at the same time as it is being freed. 2018-08-27 11:53:02 +02:00
Adam Sawicki
a5d5ffafe2 Updated CHANGELOG.md. Recompiled binaries and Doxygen documentation. 2018-08-27 11:05:24 +02:00
Adam Sawicki
751f1460d5 Updated date next to version number. 2018-08-27 11:03:21 +02:00
Adam Sawicki
7ec3930906 Documentation "Introduction" - added paragraph about macros define before including headers. Issue #36 Thanks @chaoticbob ! 2018-08-27 11:00:06 +02:00
Adam Sawicki
53e9239797 Merge commit '70a683e53fcc3a8733a0876617f212e0a66ae7c7' into development 2018-08-27 10:47:44 +02:00
Adam Sawicki
0667e33bdd Added allocation strategy to main benchmark. 2018-08-24 17:26:44 +02:00
Adam Sawicki
1852036194 Added VMA_ALLOCATION_CREATE_STRATEGY_BEST_FIT_BIT, WORST_FIT, FIRST_FIT, and aliases: VMA_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT, MIN_TIME, MIN_FRAGMENTATION.
Deleted VMA_BEST_FIT macro.
2018-08-24 16:28:28 +02:00
Adam Sawicki
70a683e53f Added support for multiple Vulkan memory blocks in custom pools with VMA_POOL_CREATE_LINEAR_ALGORITHM_BIT. Works with free-at-once and stack, doesn't work with double stack or ring buffer.
Added new structure members VmaPoolStats::blockCount.
2018-08-24 15:36:32 +02:00
Adam Sawicki
6897d827c7 Documented recent change in CHANGELOG.md. 2018-08-24 14:21:53 +02:00
Adam Sawicki
ee79c63d61 VmaDumpVis.py: Fixed wrong visualization of custom pools that have multiple blocks. 2018-08-24 14:15:06 +02:00
Adam Sawicki
90eb51c225 Changed behavior of custom pools: VmaPoolCreateInfo::blockSize 0 (default) now means that pool may use variable block sizes, just like default pools do. 2018-08-24 13:43:52 +02:00
Adam Sawicki
f9b6868cf1 Described version 2.1.0-beta.1 in CHANGELOG.md.
Minor fixes in documentation.
2018-08-24 12:13:37 +02:00
Adam Sawicki
4c6e9e81bc Linear allocation algorithm is finished! Recompiled binaries, regenerated Doxygen documentation. Announcing version 2.1.0-beta.1. 2018-08-24 11:23:37 +02:00
Adam Sawicki
0a60713b07 Added benchmark for linear allocator. 2018-08-24 11:18:41 +02:00
Adam Sawicki
dedab850e9 Documented linear allocation algorithm. Added "Linear allocation algorithm" documentation chapter. 2018-08-23 15:00:58 +02:00
Adam Sawicki
cba11e8bfb Deleted temporary code. 2018-08-23 13:21:15 +02:00
Adam Sawicki
477b22ebf1 Added 'LinearAlgorithm' member to JSON dump format and its usage in VmaDumpVis.py. 2018-08-23 13:20:22 +02:00
Adam Sawicki
35e9aca80f Minor refactoring. 2018-08-23 13:05:05 +02:00
Adam Sawicki
d0100e9d1a Ensured that allocations from pools with linear algorithm are ignored in vmaDefragment.
Made vmaDefragment work only with memory types that are HOST_VISIBLE and HOST_COHERENT.
2018-08-23 12:56:58 +02:00
Adam Sawicki
0270b98d2f Optimized VmaBlockMetadata_Linear::FreeAtOffset to use binary search.
Refactored VmaBinaryFindFirstNotLess.
2018-08-23 12:18:01 +02:00
Adam Sawicki
bc7fea61d2 Implemented VmaBlockMetadata_Linear::CheckCorruption. 2018-08-23 11:45:20 +02:00
Adam Sawicki
53d96e8c93 Minor addition to VmaBlockMetadata_Linear::Validate. 2018-08-23 11:37:56 +02:00
Adam Sawicki
2bd99038d5 Implemented VmaBlockMetadata_Linear::GetUnusedRangeSizeMax. 2018-08-23 11:36:32 +02:00
Adam Sawicki
51b0e82e60 Implemented VmaBlockMetadata_Linear::GetSumFreeSize. 2018-08-23 11:20:09 +02:00
Adam Sawicki
1f6c388348 Optimized VmaBlockVector::Allocate for certain cases. 2018-08-23 10:52:07 +02:00