Adam Sawicki
52076ebf26
Added VmaDefragmentationInfo2::poolCount, pPools. Added test for it - TestDefragmentationWholePool. Removed VmaDefragmentationStats::allocationsLost. Optimized defragmentation algorithm.
2018-11-22 16:14:50 +01:00
Adam Sawicki
c6ede15fab
Written test for various defragmentation algorithms, in TestDefragmentationGpu.
2018-11-16 17:04:14 +01:00
Adam Sawicki
48a12aa835
Merge branch 'master' into allocation_defragmentation_strategies
...
# Conflicts:
# docs/html/vk__mem__alloc_8h_source.html
# src/Tests.cpp
# src/vk_mem_alloc.h
2018-11-16 14:36:57 +01:00
Adam Sawicki
b0c363693f
Added function vmaResizeAllocation.
...
Added tests: function TestResize. Bumped CSV recording file format version to 1.4.
2018-11-13 16:17:38 +01:00
Adam Sawicki
370ab184f8
Changed functions to validate and return VK_ERROR_VALIDATION_FAILED_EXT when trying to allocate memory of size 0, create buffer with size 0, or image with one of the dimensions 0.
...
That's because vkCreateBuffer returns VK_SUCCESS for buffer with size = 0, so VMA then proceeded to allocation of size 0, which is a critical error, checked by an assert, but apparently some users don't enable asserts in VMA.
Added tests: function TestInvalidAllocations.
2018-11-08 16:31:00 +01:00
Adam Sawicki
057040085c
Tests
2018-11-08 16:07:29 +01: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
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
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
c6432d1d45
Buddy allocation algorithm finished and documented!
2018-09-21 16:44:16 +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
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
a7863d9664
Implemented VmaBlockMetadata_Buddy::GetSumFreeSize.
2018-09-07 15:05:02 +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
a83793a63e
Buddy allocator - more coding.
2018-09-03 13:40:42 +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
0667e33bdd
Added allocation strategy to main benchmark.
2018-08-24 17:26:44 +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
0a60713b07
Added benchmark for linear allocator.
2018-08-24 11:18:41 +02:00
Adam Sawicki
cba11e8bfb
Deleted temporary code.
2018-08-23 13:21:15 +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
ee08277571
Implemented ring buffer.
2018-06-20 17:45:49 +02:00
Adam Sawicki
0876c0d493
Started coding linear allocator.
2018-06-20 15:18:11 +02:00
Adam Sawicki
e44c62684d
Added debug macro VMA_DEBUG_INITIALIZE_ALLOCATIONS to initialize contents of allocations with a bit pattern. Documented it. Added test for it.
...
Fixed some indentation.
2018-06-15 14:30:39 +02:00
Adam Sawicki
212a4a6567
Added new feature: corruption detection. Added debug macro VMA_DEBUG_DETECT_CORRUPTION, functions vmaCheckCorruption, vmaCheckPoolCorruption
2018-06-14 15:51:47 +02:00
Adam Sawicki
73b1665ea4
Changed behavior of VMA_DEBUG_MARGIN macro - it now adds margin also before first and after last allocation in a block. Improved validation of VMA_DEBUG_MARGIN. Added test for it - function TestDebugMargin().
2018-06-11 16:39:25 +02:00
Adam Sawicki
d292417cdb
Minor improvement in VmaBlockVector::Allocate. TestPool_SameSize: Added test for it.
2018-06-11 12:48:46 +02:00
Adam Sawicki
b8333fb925
Publishing testing environment. Tests are available under [T] key.
2018-03-13 16:15:53 +01:00
Adam Sawicki
f1a793cadd
Added source files to project: Common.*, Tests.*, VmaUsage.*.
2018-03-13 15:42:22 +01:00