Adam Sawicki
|
87e466bad6
|
VmaReplay: Finished support for --DefragmentAfterLine parameter. Better statistics printed, now supporting defragmentation of GPU memory. Creating VkQueue, VkCommandPool, VkCommandBuffer.
|
2018-11-06 17:23:16 +01:00 |
|
Adam Sawicki
|
e97495dd73
|
VmaReplay: Added parameter --DefragmentAfterLine.
|
2018-11-06 16:42:23 +01:00 |
|
Adam Sawicki
|
dec65ac4eb
|
Small addition to documentation.
|
2018-11-06 12:06:06 +01:00 |
|
Adam Sawicki
|
fa251ad7c8
|
Locked right mutexes during defragmentation. GPU memory defragmentation is now finished!
|
2018-10-18 15:22:40 +02:00 |
|
Adam Sawicki
|
440307e6bc
|
Fixed TestDefragmentationGpu() - it was test that was buggy. Defragmentation of GPU memory is working!!! - a major milestone :D
|
2018-10-18 15:05:19 +02:00 |
|
Adam Sawicki
|
ff0f7b8254
|
Added TestDefragmentationGpu. Not passing - apparently there is some bug...
|
2018-10-18 14:44:05 +02:00 |
|
Adam Sawicki
|
76c5bcabfd
|
Further refactoring of defragmentation, preparing for defragmentation of GPU memory.
|
2018-10-18 14:14:28 +02:00 |
|
Adam Sawicki
|
29b04041f7
|
Further refactoring of defragmentation classes.
|
2018-10-18 13:11:00 +02:00 |
|
Adam Sawicki
|
fc9db8dda7
|
Minor addition to documentation. #46
|
2018-10-18 12:03:50 +02:00 |
|
Adam Sawicki
|
2dcfcf8b63
|
More refactoring in preparation for GPU memory defragmentation. Created classes: VmaBlockDefragmentationContext, VmaBlockVectorDefragmentationContext. Class VmaDefragmentationContext_T is no longer empty.
|
2018-10-17 17:26:39 +02:00 |
|
Adam Sawicki
|
a9f030d7ba
|
Further refactoring of defragmentation.
|
2018-10-17 15:20:36 +02:00 |
|
Adam Sawicki
|
a114419b23
|
Refactored defragmentation code. Removed class VmaDefragmentator. Renamed struct to VmaDefragmentationMove.
Minor fixes in documentation and comments.
|
2018-10-16 15:30:55 +02:00 |
|
Adam Sawicki
|
ef6cc40b59
|
Defragmentation: added support for memory that is HOST_VISIBLE but not HOST_COHERENT - calling Invalidate and Flush internally.
Fixed a bug in VmaDefragmentator::Defragment.
|
2018-10-16 14:20:47 +02:00 |
|
Adam Sawicki
|
f2975346ef
|
Testing environment: Added class StagingBufferCollection, functions UploadGpuData, ValidateGpuData, TestGpuData, in preparation for testing defragmentation of GPU memory.
|
2018-10-16 13:49:02 +02:00 |
|
Adam Sawicki
|
fa87ae34a6
|
Small addition to documentation.
|
2018-10-15 18:15:11 +02:00 |
|
Adam Sawicki
|
6826f2d768
|
Small refactoring: Removed function VmaBlockVector::DestroyDefragmentator.
|
2018-10-10 16:49:36 +02:00 |
|
Adam Sawicki
|
f863a1dbd0
|
Used VMA_RW_MUTEX in 2 other places for optimization.
|
2018-10-10 16:43:44 +02:00 |
|
Adam Sawicki
|
de9181b2ba
|
Added configuration macro VMA_USE_STL_SHARED_MUTEX.
Added internal class VmaRWMutex, macro VMA_RW_MUTEX, classes VmaMutexLockRead, VmaMutexLockWrite. Used it in VmaAllocator_T::m_PoolsMutex.
|
2018-10-10 16:26:26 +02:00 |
|
Adam Sawicki
|
b0d4afbeed
|
Refactored defragmentation. Added class VmaDefragmentationAlgorithm, extracted from VmaDefragmentator.
|
2018-10-09 15:35:46 +02:00 |
|
Adam Sawicki
|
2aad902a66
|
Minor update in VmaDefragmentationInfo2.
|
2018-10-09 13:43:34 +02:00 |
|
Adam Sawicki
|
ad0989bfb4
|
Fixed bug in VmaAllocator_T::Defragment.
|
2018-10-09 13:26:33 +02:00 |
|
Adam Sawicki
|
012a4ac697
|
Designed and documented new interface for defragmentation.
Added: VmaDefragmentationContext, VmaDefragmentationFlagBits, VmaDefragmentationFlags, VmaDefragmentationInfo2, vmaDefragmentationBegin(), vmaDefragmentationEnd(). Extended VmaDefragmentationStats by allocationsLost. Deprecated VmaDefragmentationInfo2, vmaDefragment().
|
2018-10-09 13:25:01 +02:00 |
|
Adam Sawicki
|
b8d34d5e6a
|
Replaced assert() with new macro TEST() in all tests, to check conditions also in Release configuration.
# Conflicts:
# src/SparseBindingTest.cpp
# src/Tests.cpp
# src/VulkanSample.cpp
|
2018-10-03 17:41:20 +02:00 |
|
Adam Sawicki
|
1f7f8afdd7
|
Fixed tests for NVIDIA, where it asserted with OUT_OF_MEMORY, probably due to higher alignment requirements.
|
2018-10-03 17:37:55 +02:00 |
|
Adam Sawicki
|
a7d7769959
|
Replaced assert() with new macro TEST() in all tests, to check conditions also in Release configuration.
|
2018-10-03 16:15:27 +02:00 |
|
Adam Sawicki
|
4868c1f523
|
Fixed tests for NVIDIA, where it asserted with OUT_OF_MEMORY, probably due to higher alignment requirements.
|
2018-10-03 15:57:11 +02:00 |
|
Adam Sawicki
|
2e4d3eff98
|
Added BasicTestAllocatePages() - test for vmaAllocateMemoryPages, vmaFreeMemoryPages.
|
2018-10-03 15:48:17 +02:00 |
|
Adam Sawicki
|
d062b784d3
|
Added functions: vmaAllocateMemoryPages, vmaFreeMemoryPages to create and destroy multiple allocations at once.
|
2018-10-03 15:26:22 +02:00 |
|
Adam Sawicki
|
51fa96660e
|
Wrote basic test for sparse binding.
|
2018-10-03 13:44:29 +02:00 |
|
Adam Sawicki
|
7ce9630bbf
|
Improved documentation chapters: Defragmentation, vmaDefragment(), Features not supported.
|
2018-09-28 14:51:09 +02:00 |
|
Adam Sawicki
|
6aa6255741
|
Fixing macro VMA_VALIDATE for Linux compilation.
|
2018-09-24 15:16:47 +02:00 |
|
Adam Sawicki
|
02246f3eb8
|
CHANGING BRANCHING STRATEGY! No more "development" branch, now in-progress development will happen on "master".
Bumped version number to "development".
|
2018-09-24 15:10:06 +02:00 |
|
Adam Sawicki
|
3951aa5bc3
|
Merge branch 'allocation_defragmentation_strategies' into development
# Conflicts:
# docs/html/search/all_f.js
# docs/html/vk__mem__alloc_8h.html
# docs/html/vk__mem__alloc_8h_source.html
# src/vk_mem_alloc.h
|
2018-09-21 16:48:42 +02:00 |
|
Adam Sawicki
|
c6432d1d45
|
Buddy allocation algorithm finished and documented!
|
2018-09-21 16:44:16 +02:00 |
|
Adam Sawicki
|
0591535eb1
|
VmaBlockMetadata_Buddy: Fixed allocation of Node objects to use provided CPU allocation callbacks.
|
2018-09-21 15:23:32 +02:00 |
|
Adam Sawicki
|
1e8cf94558
|
VmaBlockMetadata_Buddy: Added (simple way of) respecting bufferImageGranularity.
Minor fixes in documentation.
|
2018-09-21 15:10:04 +02:00 |
|
Adam Sawicki
|
9933c5cadf
|
VmaBlockMetadata_Buddy: Added respecting of allocation alignment.
|
2018-09-21 14:57:24 +02:00 |
|
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
|
14d9e1a938
|
Minor optimization: Skip call to vkUnmapMemory before vkFreeMemory for dedicated allocations, which is allowed by the spec.
|
2018-09-17 17:06:42 +02:00 |
|
Adam Sawicki
|
1e425dda03
|
Added #ifdef NOMINMAX. Thanks Krzysztof Kondrak !
|
2018-09-10 16:52:13 +02:00 |
|
Adam Sawicki
|
c77a123a89
|
Fixed #include <windows.h> for compilation under Windows mingw64. Issue #41 thanks @turol !
|
2018-09-10 14:43:04 +02:00 |
|
Adam Sawicki
|
df1b88d387
|
Fixed formatting string in call to fprintf in VmaRecorder::RecordCreatePool. Issue #40 thanks @baldurk !
|
2018-09-10 14:39:45 +02:00 |
|
Adam Sawicki
|
f305aebdfd
|
Fixed version number in source file.
|
2018-09-10 14:07:32 +02:00 |
|
Adam Sawicki
|
f7baf623d0
|
Minor updates in documentation. Added VK9 to list of known usages. Issue #39 thanks @disks86 !
|
2018-09-10 11:09:03 +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
|
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
|
6689924517
|
Further fixes for compilation on Windows. Defined NOMINMAX for Windows.h. Issue #38
|
2018-09-07 12:40:31 +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
|
447e36fe9a
|
Fixed missing #include <Windows.h> for cases when it's needed but macro VK_USE_PLATFORM_WIN32_KHR is not defined. Issue #38 thanks @farnoy !
|
2018-09-06 11:38:37 +02:00 |
|
Adam Sawicki
|
a83793a63e
|
Buddy allocator - more coding.
|
2018-09-03 13:40:42 +02:00 |
|
Adam Sawicki
|
abf747a79f
|
Removed hack for clang compiler error. It didn't work anyway.
|
2018-09-03 11:48:40 +02:00 |
|
Adam Sawicki
|
655b87fd87
|
Small addition to documentation.
|
2018-08-28 14:32:15 +02:00 |
|
Adam Sawicki
|
c4227e5acf
|
Fixes warning: field 'm_Blocks' will be initialized after field 'm_HasEmptyBlock' [-Wreorder] #37 Thanks @TheLavaBlock !
|
2018-08-28 13:12:14 +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
|
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
|
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
|
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
|
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 |
|
Adam Sawicki
|
0dec444a58
|
Minor fixes.
|
2018-08-23 10:43:54 +02:00 |
|
Adam Sawicki
|
f799c4f146
|
Introduced a rule that custom pool with linear algorithm must have maxBlockCount = 1 (or 0 for default).
|
2018-08-23 10:40:30 +02:00 |
|
Adam Sawicki
|
0ebdf0c63e
|
Implemented vmaMakePoolAllocationsLost for pools with linear allocator.
|
2018-08-22 17:02:44 +02:00 |
|
Adam Sawicki
|
8cfe05fad9
|
Added support for lost allocations in ring buffer.
Fixed some more bugs.
|
2018-08-22 16:48:17 +02:00 |
|
Adam Sawicki
|
fd11d759dd
|
Added ManuallyTestLinearAllocator which allows me to manually inspect VmaStats, VmaPoolStats and stats string of custom pool. Fixed bug in VmaBlockMetadata_Linear::PrintDetailedMap.
|
2018-08-22 15:02:10 +02:00 |
|
Adam Sawicki
|
680b2251fa
|
Implemented double stack. Written tests for it.
|
2018-08-22 14:47:32 +02:00 |
|
Adam Sawicki
|
45cee6ee4f
|
Some code in preparation to implement double stack (SECOND_VECTOR_DOUBLE_STACK).
|
2018-08-22 13:21:08 +02:00 |
|
Adam Sawicki
|
0c6ca87695
|
Merge branch 'development' into linear_allocator
|
2018-08-22 11:58:16 +02:00 |
|
Adam Sawicki
|
62c0090112
|
Recompiled binaries. Bumped version number to Version 2.1.0-alpha.4.
|
2018-08-22 11:54:36 +02:00 |
|
Adam Sawicki
|
83e5ea42f7
|
VmaReplay: Added usage of VMA_ALLOCATOR_CREATE_EXTERNALLY_SYNCHRONIZED_BIT, as the app is currently single-threaded only anyway.
|
2018-08-22 11:46:26 +02:00 |
|