Commit Graph

522 Commits

Author SHA1 Message Date
Adam Sawicki
57fa5580c0 Documentation: Added "Recommended usage patterns" chapter. 2018-03-12 17:46:49 +01:00
Adam Sawicki
20622c6cfd Documented VmaAllocator, VmaAllocation, VmaPool. 2018-03-12 16:33:53 +01:00
Adam Sawicki
93ef5c2340 Minor addition to documentation. 2018-03-12 16:06:10 +01:00
Adam Sawicki
2283f4287a Minor fix in documentation. 2018-03-12 16:01:00 +01:00
Adam Sawicki
d8359cd295 Documentation: Written "Statistics" chapter. 2018-03-12 15:58:23 +01:00
Adam Sawicki
727e8b269f More documentation. Refactored table of contents. 2018-03-12 15:34:32 +01:00
Adam Sawicki
ec421f8763 Created documentation chapter "General considerations". 2018-03-12 13:27:31 +01:00
Adam Sawicki
e915c1b6e3 Updated documentation chapter about lost allocations. 2018-03-12 13:23:06 +01:00
Adam Sawicki
7568dfce76 Written more documentation - about lost allocations. 2018-03-09 18:18:34 +01:00
Adam Sawicki
67a2328f8c Written more documentation. 2018-03-09 18:01:03 +01:00
Adam Sawicki
95451ab2a6 Written more documentation. 2018-03-09 17:49:19 +01:00
Adam Sawicki
359793763a Many minor formatting tweaks in documentation. 2018-03-09 17:35:48 +01:00
Adam Sawicki
5ae219a982 Updated version numer to 2.0.0 final in code and documentation. 2018-03-09 16:03:40 +01:00
Unknown
e5b7332e89 Add android support. 2018-03-07 22:06:25 +01:00
Adam Sawicki
b31aac8a06 Minor fix bool -> VkBool32 on interface. 2018-03-06 10:34:15 +01:00
Adam Sawicki
9ecb59e847 Version 2.0.0-alpha.8. Added functions: vmaTouchAllocation, vmaFindMemoryTypeIndexForBufferInfo, vmaFindMemoryTypeIndexForImageInfo. 2018-03-05 18:20:23 +01:00
Sho Ikeda
3ee49f1843 Fix undeclared identifier for Apple. 2018-03-04 15:43:38 +09:00
Adam Sawicki
65231e3975 Minor fix in documentation. 2018-03-02 13:17:01 +01:00
Adam Sawicki
0c11b12574 More documentation. Especially added new section "Finding out if memory is mappable". 2018-03-02 13:05:39 +01:00
Adam Sawicki
a3e019d476 Written new contents of "Mapping memory" documentation chapter. 2018-03-01 12:19:37 +01:00
Adam Sawicki
f44305429c Fix for aligned_alloc for Apple MolenVK. Thanks @rextimmy ! 2018-02-28 11:24:46 +01:00
Adam Sawicki
94fa0a8e4d Normalized end of line characters after editing on Apple. 2018-02-27 11:23:51 +01:00
Tim
01d1d71aef Apple support 2018-02-27 18:53:50 +10:00
Adam Sawicki
c793ba342f Minor update in documentation. 2018-02-22 18:23:29 +01:00
Adam Sawicki
d566e37e22 Improved documentation - added "Custom memory pools" > "Choosing memory type index" 2018-02-19 17:28:35 +01:00
Adam Sawicki
c07e59acb8 Fixed 2 bugs in defragmentation.
1st was when defragmenting mapped allocations.
2nd was a nasty one, when defragmentation moved allocation earlier in the same block.

Also fixed some nullptr -> VMA_NULL, fixed compilation when VMA_HEAVY_ASSERT is enabled.
2018-02-16 17:03:16 +01:00
Adam Sawicki
1299c9ad79 Documentation of enum VmaMemoryUsage: Added DirectX 12 equivalents. 2018-02-13 11:49:59 +01:00
Adam Sawicki
20e500e3d0 Improved documentation of VmaMemoryUsage. 2018-02-12 15:12:32 +01:00
Adam Sawicki
e5ae29a5e4 Minor fix. 2018-02-09 16:59:01 +01:00
Adam Sawicki
a82e18346e Version 2.0.0-alpha.7. Removed VmaAllocatorCreateInfo::preferredSmallHeapBlockSize. VmaBlockVector::Allocate: New algorithm that allocates 1/8, 1/4, 1/2 of preferred block size as first blocks, to save memory. 2018-02-09 16:52:05 +01:00
Adam Sawicki
0186953b59 Used VK_NO_PROTOTYPES when defining default value for VMA_STATIC_VULKAN_FUNCTIONS. 2018-02-08 12:55:29 +01:00
Adam Sawicki
4cefd614dc Fixed VmaBlockVector::MakePoolAllocationsLost (thanks @kennyalive! #18) 2018-01-24 12:43:00 +01:00
Adam Sawicki
defbf3d975 Minor fix in documentation. 2018-01-23 13:58:07 +01:00
Adam Sawicki
4426bfbc19 Updated year to 2018. 2018-01-22 18:18:24 +01:00
Adam Sawicki
54ef95b610 Minor fix after last commit. 2018-01-22 12:45:13 +01:00
Adam Sawicki
213f2bc6a2
Merge pull request #17 from cdwfs/master
Fixed some avoidable warnings when building with -Wall
2018-01-22 12:43:35 +01:00
Cort Stratton
1311787760 Fixed some avoidable warnings when building with -Wall 2018-01-19 13:14:19 -08:00
Adam Sawicki
95f07262a8 VmaAllocator_T::CalcPreferredBlockSize: Minor improvement - treating HOST_CACHED memory type as small heap. 2018-01-19 16:09:04 +01:00
Adam Sawicki
f65a435483 Fix in documentation. 2017-12-06 13:39:59 +01:00
Adam Sawicki
ca0ccecf67 vmaCreateBuffer: Added some asserts. 2017-12-04 13:33:01 +01:00
Adam Sawicki
594a56260f Added VmaAllocationCreateInfo::memoryTypeBits. Wrote more documentation, including new page "Choosing memory type". 2017-11-21 15:01:29 +01:00
Adam Sawicki
b8ad8a09a1 VmaAllocator_T::ImportVulkanFunctions: Added automatic acquire of vkGetBufferMemoryRequirements2KHR, vkGetImageMemoryRequirements2KHR when using VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT. 2017-11-21 13:13:32 +01:00
Adam Sawicki
50cc36fbfc Improved documentation of VmaAllocatorCreateInfo::pHeapSizeLimit. 2017-11-21 12:38:55 +01:00
Adam Sawicki
495cb16fa3 Fixed bug in case vkBindImageMemory/vkBindBufferMemory fails. 2017-11-20 16:22:09 +01:00
Adam Sawicki
5bc033f19d Fixed reporting UserData in JSON dump for dedicated allocations. 2017-11-20 14:09:49 +01:00
Adam Sawicki
6a1f1e2d8d Fixed bug with mapping of non-dedicated allocations. 2017-11-14 16:21:12 +01:00
Adam Sawicki
8eb9d8e253 Fixed attachment layout transitions. #2 2017-11-13 16:30:14 +01:00
Adam Sawicki
3bd398a373 Fixed attachment layout transitions. 2017-11-13 16:10:38 +01:00
Adam Sawicki
c353ad0717 Version 2.0.0-alpha.6. Added VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT. 2017-11-13 15:03:04 +01:00
Adam Sawicki
5268dbbce5 Version 2.0.0-alpha.5. Major change in memory mapping - now it's internally reference-counted.
Renamed flag VMA_ALLOCATION_CREATE_PERSISTENT_MAP_BIT to VMA_ALLOCATION_CREATE_MAPPED_BIT.
See documentation of vmaMapMemory().
2017-11-08 12:52:05 +01:00
Adam Sawicki
ee92a03f59 VmaAllocator_T::AllocateMemoryOfType: Fixed major bug when VMA_ALLOCATION_CREATE_PERSISTENT_MAP_BIT is used with VMA_MEMORY_USAGE_GPU_ONLY. 2017-10-18 15:35:00 +02:00
Adam Sawicki
0fcf86292b Documentation: changed page identifier to lowercase to (hopefully) fix 404 error on GitHub. 2017-10-17 15:13:48 +02:00
Adam Sawicki
3057956f31 Minor improvements in documentation. 2017-10-17 12:14:41 +02:00
Adam Sawicki
07a7deb09d Improvements in documentation formatting. 2017-10-17 12:07:39 +02:00
Adam Sawicki
c005a84e37 Added documentation for VK_KHR_dedicated_allocation extension. 2017-10-17 11:57:56 +02:00
Adam Sawicki
d08dc0cd6a Reorganized Doxygen documentation into more separate pages. 2017-10-17 11:27:14 +02:00
Adam Sawicki
14137d11bc Removed unnecessary VkSubpassDependency. 2017-10-16 18:06:05 +02:00
Adam Sawicki
283207beb0 Renamed VMA_ALLOCATOR_ flags to VMA_ALLOCATOR_CREATE_. Improved support for VK_KHR_dedicated_allocation. 2017-10-13 17:54:47 +02:00
Adam Sawicki
f72365c0fc Small fix in VmaAllocator_T::AllocateDedicatedMemory. 2017-10-03 11:32:55 +02:00
Adam Sawicki
358bc78544 Fixed support for VK_KHR_dedicated_allocation: Added missing usage of VkMemoryDedicatedAllocateInfoKHR structure. 2017-10-03 11:26:58 +02:00
Adam Sawicki
5db51b1264 Added support for VMA_ALLOCATION_CREATE_PERSISTENT_MAP_BIT without HOST_VISIBLE.
Implemented usage of VK_KHR_dedicated_allocation.
Renamed "own allocation" to "dedicated allocation" everywhere.
2017-10-02 18:31:03 +02:00
Adam Sawicki
1bb85fa719 Added support for VMA_ALLOCATION_CREATE_PERSISTENT_MAP_BIT without HOST_VISIBLE. Improved empty block heuristics. 2017-10-02 14:28:51 +02:00
Adam Sawicki
951f66a841 Improvements in documentation 2017-09-27 14:14:42 +02:00
Adam Sawicki
c7b3e7c85d Updated documents - added links to GitHub repository and GPUOpen product page. 2017-09-27 13:40:58 +02:00
Adam Sawicki
a892d137ae Small fix. 2017-09-26 13:58:44 +02:00
Adam Sawicki
f8b70f0542 Merge pull request #13 from realitix/missing_vulkan_function
Fix vulkan calls
2017-09-26 13:57:59 +02:00
Jean-Sebastien Bevilacqua
b19740c4e5 Fix vulkan calls
Some calls are made in a static way
2017-09-26 13:20:05 +02:00
Jean-Sebastien Bevilacqua
4cfa3d02c0 Fix name mangling for C
This patch force the header to be compiled as C.
This behavior allows to use this library in a C program.
2017-09-26 12:47:42 +02:00
Adam Sawicki
3606138794 Removed redundant VmaDeviceMemoryBlock::m_Size. 2017-09-25 17:42:26 +02:00
Adam Sawicki
40fd505639 Refactored some code from class VmaDeviceMemoryBlock to new class VmaBlockMetadata. 2017-09-25 16:44:48 +02:00
Adam Sawicki
42af34a3b2 Renamed members of VmaStatInfo structure to start with lower case, to make it consistent with overall style. Compatibility breaking! 2017-09-25 15:46:47 +02:00
Adam Sawicki
067f9082a8 Some improvements in documentation. 2017-09-25 15:29:34 +02:00
Adam Sawicki
5c9047dbaa Added VmaPoolStats::unusedRangeSizeMax. 2017-09-25 15:24:31 +02:00
Adam Sawicki
19d74084f3 Improvements in documentation. Moved general description to README.md. 2017-09-25 15:07:34 +02:00
Adam Sawicki
eaf60ee784 Minor fixes around macro VMA_STATIC_VULKAN_FUNCTIONS (thanks @realitix!) #2 2017-09-25 10:35:40 +02:00
Adam Sawicki
ab0b39a783 Added structure VmaVulkanFunctions, macro VMA_STATIC_VULKAN_FUNCTIONS. 2017-09-22 16:57:38 +02:00
Jean-Sebastien Bevilacqua
231ea193fb Robustify VmaStat
Currently, VmaStat is not defined as typedef.
With GCC, this is not compiling.
2017-09-21 08:57:36 +02:00
Adam Sawicki
6ab1604070 Created vk_mem_alloc.natvis file. VmaVectorRemoveSorted: Fixed compilation error when STL is used. 2017-09-20 13:27:21 +02:00
Adam Sawicki
118049cda8 Added feature: VmaAllocatorCreateInfo::pHeapSizeLimit. 2017-09-19 11:38:01 +02:00
Adam Sawicki
a89a26c452 VmaBlockVector::VmaBlockVector: Fixed warning on GCC Linux (thanks @carlosga) 2017-09-14 11:17:20 +02:00
Adam Sawicki
853b251689 Fixed reporting custom pools and own allocations in statistics. Improved JSON printing of custom pools. Added convenience function VmaAllocator_T::MemoryTypeIndexToHeapIndex. 2017-09-14 11:11:36 +02:00
Adam Sawicki
14efd2a1cf VmaDefragmentator::DefragmentRound: Minor fix for warning in 32-bit version. 2017-09-13 12:53:50 +02:00
Adam Sawicki
6462ea6d2a Potential fix for Linux compilation with std::atomic. 2017-09-12 21:26:22 +02:00
Adam Sawicki
7d1c689f1e Fixes for Linux compilation (not everything fixed yet). 2017-09-12 20:57:27 +02:00
Adam Sawicki
976f920c15 Version 2.0.0-alpha.3 - major update. 2017-09-12 20:45:14 +02:00
Adam Sawicki
0c1c663062 Two small fixes. 2017-08-25 17:28:57 +02:00
Adam Sawicki
8dad535a9c vk_mem_alloc.h: Small fix found by clang compilation. .travis.yml: cleanup. 2017-08-21 17:06:45 +02:00
Adam Sawicki
59a3e7e885 Trying to setup Travis CI #2 2017-08-21 15:47:30 +02:00
duodenim
ffd093c993 Fix memcpy and VmaVector compile errors 2017-08-19 16:31:48 -05:00
Adam Sawicki
10844a8f1c Changed image memory barriers to fix validation layer errors. Simplified code - deleted functions CopyImage, TransitionImageLayout. 2017-08-16 17:32:09 +02:00
Dustin Land
f6bbb2053b Fill out the VmaAllocationInfo parameter passed to vmaAllocateMemory, vmaAllocateMemoryForBuffer, and vmaAllocateMemoryForImage. 2017-08-12 02:24:06 -05:00
Adam Sawicki
816b55748a VectorInsert, VectorRemove functions: Added missing Vma- prefix. 2017-08-10 14:49:54 +02:00
Adam Sawicki
89f6e44635 Fixed vmaCreateBuffer, vmaCreateImage to always return null as *pBuffer, *pImage, *pAllocation of not succeeded. Fixed that in documentation as well. 2017-08-09 13:06:41 +02:00
Adam Sawicki
e97e9b6637 Two fixes for "Portability issues" Issue #5 thanks @rextimmy! 2017-08-08 11:40:31 +02:00
Adam Sawicki
ea6da94c24 Functions VmaUint32ToStr, VmaUint64ToStr: Changed usage of _ultoa_s, _ui64toa_s to snprintf to rely on portable standard library only. (Issue #4 - thanks @Evangel63) 2017-08-07 11:43:49 +02:00
Adam Sawicki
73fb4aa325 Clarified documentation of vmaUnmapPersistentlyMappedMemory function (thanks @bobvodka) 2017-07-18 16:24:24 +02:00
Adam Sawicki
4db8d40385 Updated CHANGELOG.md. 2017-07-13 16:38:20 +02:00
Adam Sawicki
0851377d4e Merge branch 'v2' 2017-07-13 16:14:04 +02:00
Adam Sawicki
277288be9e Added { } after every if(). (Thanks @RCL) 2017-07-11 21:54:00 +02:00
Adam Sawicki
4dc9934eb4 Fixing = instead of == in VMA_HEAVY_ASSERT (thanks @zeux!) 2017-07-11 17:42:44 +02:00
Adam Sawicki
d55d084dd3 Fixing = instead of == in VMA_HEAVY_ASSERT (thanks @zeux!) 2017-07-11 17:41:40 +02:00
Adam Sawicki
9e1684f87a Small fix in documentation. 2017-07-11 15:27:08 +02:00
Adam Sawicki
0845f1c2e5 Small fix in VmaBlock::Free (thanks @dylanede for pointing this!) 2017-07-11 15:25:19 +02:00
Adam Sawicki
988ac4c05d Updated version number to 2.0.0-alpha.2. Regenerated Doxygen documentation. 2017-07-11 15:22:12 +02:00
Adam Sawicki
31341608f4 Added VmaAllocatorCreateInfo::flags, VmaAllocatorFlags, VMA_ALLOCATOR_EXTERNALLY_SYNCHRONIZED_BIT. 2017-07-11 15:21:10 +02:00
Adam Sawicki
f30ee85a15 Small fix in VmaBlock::Free (thanks @dylanede for pointing this!) 2017-07-11 15:00:11 +02:00
Adam Sawicki
a59788d60d Correct wording of comment about required flags
The word "subset" is used when it should be "superset" instead.
2017-07-11 14:43:43 +02:00
Adam Sawicki
4184ee53bd Updated documentation. 2017-07-11 14:42:45 +02:00
Dylan Ede
d0f7c97f76 Correct wording of comment about required flags
The word "subset" is used when it should be "superset" instead.
2017-07-08 11:32:45 +01:00
Adam Sawicki
2a22d61297 Changed "CONFIGURATION SECTION" to contain #ifndef so you can define these macros before including this header, not necessarily change them in the file. (Cherry pick from v1) 2017-07-04 15:52:30 +02:00
Adam Sawicki
b0425876ec Fix for Linux GCC cont'd. Enabled warning level 4 in Visual Studio for compilation of vk_mem_alloc.h. (Cherry pick from v1) 2017-07-04 15:47:00 +02:00
Adam Sawicki
7ec64121d8 Fixed for Linux GCC compilation. (Cherry pick from v1) 2017-07-04 15:45:59 +02:00
Adam Sawicki
5197efc676 Version 1.0.1 release. 2017-07-04 15:28:48 +02:00
Adam Sawicki
8bc1a7df83 Changed "CONFIGURATION SECTION" to contain #ifndef so you can define these macros before including this header, not necessarily change them in the file. 2017-07-04 15:22:57 +02:00
Adam Sawicki
86ccd63a98 Enabled warning level 4 in Visual Studio for compilation of vk_mem_alloc.h. 2017-07-04 14:57:53 +02:00
Adam Sawicki
b2c2d3bd0b Fixed for Linux GCC compilation. 2017-07-04 14:43:37 +02:00
Adam Sawicki
2f16fa52d8 Small fixes merge from v2. 2017-07-04 14:43:20 +02:00
Adam Sawicki
819860e1f0 Submitting version 2.0.0-alpha.1 to separate branch. 2017-07-04 14:30:38 +02:00
Adam Sawicki
0a41b12c10 Added CHANGELOG.md. Introduced semantic versioning - current version is 1.0.0. 2017-07-04 14:03:54 +02:00
Adam Sawicki
9137407734 Small addition to the documentation. 2017-06-20 12:52:26 +02:00
Adam Sawicki
9b3adfc9d0 Generated Doxygen documentation into docs/ directory. 2017-06-20 11:17:23 +02:00
Adam Sawicki
e6e498f63a First commit 2017-06-16 17:21:31 +02:00