Commit Graph

261 Commits

Author SHA1 Message Date
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
Adam Sawicki
3b96fb8130 VmaReplay: Added comparison of memory heaps and types and appropriate warnings.
Fixed major bug in SecondsToFriendlyStr.
2018-08-22 11:44:44 +02:00
Adam Sawicki
cb4e8da23b Updated file format to 1,3. Added configuration section. 2018-08-21 17:56:25 +02:00
Adam Sawicki
ac3c67fd5d Added parameters: --DumpStatsAfterLine, --DumpDetailedStatsAfterLine, to dump VMA stats to JSON file.
Set --MemStats default to 0.
2018-08-21 16:18:42 +02:00
Adam Sawicki
a2d6395ec4 VmaReplay: Added parameter --MemStats and memory statistics. 2018-08-21 15:05:21 +02:00
Adam Sawicki
1dcc72d7dd VmaReplay: Added parameter --VK_LAYER_LUNARG_standard_validation to enable/disable Vulkan validation layers. 2018-08-21 14:33:12 +02:00
Adam Sawicki
33c1e8ddef VmaReplay: added command line option --VK_KHR_dedicated_allocation. 2018-08-21 14:26:37 +02:00
Adam Sawicki
f17013e699 Added constant CLEANUP_LEAKED_OBJECTS. 2018-08-21 14:12:38 +02:00
Adam Sawicki
821e36705f VmaReplay: Added parameter --UserData which allows to disable setting pUserData while playing. 2018-08-21 14:10:16 +02:00
Adam Sawicki
7c1868ba32 VmaReplay: Added parameter --PhysicalDevice for choice of Vulkan physical device. 2018-08-21 14:01:04 +02:00
Adam Sawicki
eaa10d11fa Added function InitVulkanFeatures - better code for enabling Vulkan device features. 2018-08-21 13:53:46 +02:00
Adam Sawicki
4b360aa9a8 VmaReplay: Added -i parameter for repeating playback a number of times (iterations). 2018-08-21 13:31:04 +02:00
Adam Sawicki
069dc11452 VmaReplay: added --Lines command line argument to limit playback to only range of file lines.
Created template class RangeSequence. Moved struct StrRange, class LineSplit, class CsvSplit and related functions to Common.*.
2018-08-21 13:19:27 +02:00
Adam Sawicki
2556b377f7 Record and replay: Added support for function vmaMakePoolAllocationsLost. 2018-08-21 12:04:19 +02:00
Adam Sawicki
5de71e1d28 VmaReplay: Added statistics for number of calls to VMA functions. 2018-08-21 11:54:49 +02:00
Adam Sawicki
fd64a60957 Added documentation of the whole "Record and replay" feature to Doxygen docs and README.md. 2018-08-21 11:38:32 +02:00
Adam Sawicki
6ea177877a Added binary of VmaReplay. 2018-08-21 11:09:50 +02:00
Adam Sawicki
80cb2365c5 Added recording and replaying of calls to functions: vmaTouchAllocation, vmaGetAllocationInfo. VmaReplay: fixed handling of null allocation. 2018-08-21 10:59:53 +02:00
Adam Sawicki
b3ea2c62f1 "Recording file format.md": added example file. 2018-08-21 10:45:23 +02:00
Adam Sawicki
3eb870d6d6 Added documentation for new code elements related to recording. Added "Recording file format.md" file. 2018-08-20 17:53:02 +02:00
Adam Sawicki
dd715fbf9f Fixed support for pUserData in object creation functions, as well as vmaSetAllocationUserData, whether it's null, custom pointer, or character string. 2018-08-20 17:12:24 +02:00
Adam Sawicki
c49eb6282f Deleted calculation of number of vmaCreateAllocator calls, as there is always at most one. 2018-08-20 16:36:07 +02:00
Adam Sawicki
5c49bebe10 Added support for recording and replaying object creation also when it originally failed. 2018-08-20 16:10:11 +02:00
Adam Sawicki
e5d9b01a3a Added macro VMA_RECORDING_ENABLED, enabled only on Windows for now. 2018-08-20 15:50:03 +02:00
Adam Sawicki
0e0f20fd57 Major refactoring: Defined clean API for recording, added VmaRecordFlagBits, VmaRecordFlags, VmaRecordSettings, VmaAllocatorCreateInfo::pRecordSettings. Created VmaRecorder class. 2018-08-20 15:34:55 +02:00
Adam Sawicki
daec26e5ea Minor fixes. VkResult is printed as signed int. 2018-08-20 14:03:46 +02:00
Adam Sawicki
5557b0ed63 Added support for vmaMapMemory, vmaUnmapMemory, vmaFlushAllocation, vmaInvalidateAllocation. 2018-08-20 13:54:54 +02:00
Adam Sawicki
29785d1169 VmaReplay.cpp, Player class: Small refactoring. 2018-08-20 13:42:13 +02:00
Adam Sawicki
404d12e18e Format version 1,2. Added support for vmaAllocateMemory, vmaAllocateMemoryForBuffer, vmaAllocateMemoryForImage, vmaCreateLostAllocation. 2018-08-20 13:33:34 +02:00
Adam Sawicki
f5c61eda92 Merge branch 'development' into record_and_replay 2018-08-20 12:27:59 +02:00
Adam Sawicki
94e8206598 Added new validation layer message to ignores, and documented it.
"Mapping an image with layout VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL can result in undefined behavior if this memory is used by the device. Only GENERAL or PREINITIALIZED should be used."

Issue #34 thanks @victorbush !
2018-08-20 11:14:07 +02:00
Adam Sawicki
87c8189002 Foo 2018-08-20 10:52:54 +02:00
Adam Sawicki
ab8550340c Added more detailed statistics about created buffers and images based on human-friendly classification (see http://asawicki.info/news_1682_human-friendly_classification_of_vulkan_resources.html) 2018-08-13 15:15:36 +02:00
Adam Sawicki
385b716276 Added statistics for number of VmaAllocator nad VmaPool objects. 2018-08-13 14:06:17 +02:00