Adam Sawicki
af88c1bde1
Fix tests and documentation to use vmaBind* instead of vkBind* functions after defragmentation
2019-07-02 12:34:26 +02:00
Adam Sawicki
daa6a551f8
Fix VmaAllocator_T::AllocateMemory for case when VMA_ALLOCATION_CREATE_MAPPED_BIT is used with custom memory pool created in memory type that is not VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT
...
Also add test for it - function TestDeviceLocalMapped.
2019-06-25 15:26:37 +02:00
Adam Sawicki
94ce3d7da2
Update premake5 to latest version; rebuild binaries using Visual Studio 2019
...
Fix missing include in Tests.cpp.
2019-04-17 14:59:25 +02:00
Adam Sawicki
a1f727c9d0
Fixed compilation of Tests.cpp.
2019-01-24 16:25:11 +01:00
Adam Sawicki
4d844e2d29
Minor fixes in both the library and tests.
2019-01-24 16:21:05 +01:00
Adam Sawicki
4d35a5d663
Fixed bugs in VmaBlockMetadata_Linear::MakeAllocationsLost, VmaBlockVector::IsCorruptionDetectionEnabled.
2019-01-24 15:51:59 +01:00
Adam Sawicki
fd366b60b4
Minor fixes in tests. Found a bug. Minor refactoring - added VmaAllocationRequestType. Fixed minor bug in VmaBlockMetadata_Linear::CreateAllocationRequest_LowerAddress.
2019-01-24 15:26:43 +01:00
Adam Sawicki
ae5c4661ec
Updated copyright headers after New Year.
2019-01-02 10:23:35 +01:00
Adam Sawicki
bdb89a93eb
Final fixes before v2.2.0 release. Minor fixes after tests. Rebuilt binaries and documentation again.
2018-12-13 11:56:30 +01:00
Adam Sawicki
1a8424f41a
Preparations for v2.0.0 release. Updated version numbers. Rebuilt binaries and documentation.
2018-12-13 11:01:16 +01:00
Adam Sawicki
71db590d7d
Merge branch 'sparse_binding_example' into v2.2
...
# Conflicts:
# docs/html/vk__mem__alloc_8h_source.html
# src/Tests.cpp
# src/VmaReplay/VmaReplay.cpp
# src/VulkanSample.cpp
# src/vk_mem_alloc.h
2018-12-10 14:45:56 +01:00
Adam Sawicki
5c8af7b8b2
Rebuilt binary and Doxygen documentation.
2018-12-10 13:34:54 +01:00
Adam Sawicki
2af57d7f47
Fixed bug in VmaBlockMetadata_Generic::IsBufferImageGranularityConflictPossible. Another minor fix.
2018-12-06 15:35:05 +01:00
Adam Sawicki
978fcf54ab
Testing environment: Added class StagingBufferCollection, functions UploadGpuData, ValidateGpuData, TestGpuData, in preparation for testing defragmentation of GPU memory.
...
# Conflicts:
# src/Tests.cpp
# src/VulkanSample.cpp
2018-12-05 14:38:48 +01:00
Adam Sawicki
6a6d8c6ea2
Merge branch 'master' into sparse_binding_example
...
# Conflicts:
# docs/html/vk__mem__alloc_8h.html
# docs/html/vk__mem__alloc_8h_source.html
# src/Tests.cpp
# src/VulkanSample.cpp
# src/vk_mem_alloc.h
2018-12-05 13:20:32 +01:00
Adam Sawicki
647cf24b7f
VmaDefragmentationAlgorithm_Fast: Added support for memmove() of overlapping memory regions when defragmenting on CPU.
2018-11-23 17:58:00 +01:00
Adam Sawicki
e168191f3d
Added test for defragmentation of empty pool.
2018-11-23 17:50:12 +01:00
Adam Sawicki
9a4f508f88
Added VmaDefragmentationAlgorithm_Fast - fast path for defragmentation, a completely new algorithm.
2018-11-23 17:26:05 +01:00
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
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
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