Commit Graph

536 Commits

Author SHA1 Message Date
Adam Sawicki
52d0272459 Regenerate documentation, rebuild binaries
Switched binaries from vs2017 to vs2019.
2019-11-18 15:03:59 +01:00
Adam Sawicki
4ac8ff89c2 Multiple fixes in budget management
Including correct handling of lost allocation.
2019-11-18 14:47:33 +01:00
Adam Sawicki
a63e37c656 Add support for memory budget to record&replay system 2019-11-18 13:40:03 +01:00
Adam Sawicki
b68b368c67 Merge branch 'master' into MemoryBudget 2019-11-18 13:15:18 +01:00
Adam Sawicki
8317ba9d5e Sample/testing app: enable custom CPU allocation callbacks by default
Added allocation counting to make sure there are no memory leaks at the end.
2019-11-18 13:14:11 +01:00
Adam Sawicki
b3f5110987 Fix TestHeapSizeLimit to work on Radeon R7 APU with 256 MB of DEVICE_LOCAL memory 2019-11-18 13:05:56 +01:00
Adam Sawicki
ba2bdea58e Remove redundant variable VmaBlockVector::m_IsCustomPool 2019-11-18 12:42:32 +01:00
Adam Sawicki
bc266d6f09 Update Doxyfile to latest Doxygen version 2019-11-18 12:38:51 +01:00
Adam Sawicki
dd24989837 Update recording file format documentation
I forgot to commit this file.
2019-11-18 12:38:09 +01:00
Adam Sawicki
aeb9836f4c Finish implementation of vmaSetPoolName, vmaGetPoolName
vmaSetPoolName was added to recording format. Recording format version was bumped to 1.7. #82
2019-11-18 12:34:54 +01:00
Adam Sawicki
49defd6056 Further development of custom pool names 2019-11-18 11:45:30 +01:00
Adam Sawicki
b85ff83bf3 Add budget information to JSON dump
Doesn't require detailedMap=VK_TRUE.
2019-11-15 17:47:16 +01:00
Adam Sawicki
4f900cd1b3 Delete empty block unconditionally if budget is exceeded.
Also fixed crash when freeing lost allocation.
2019-11-13 15:20:31 +01:00
Adam Sawicki
e6e3329a58 Doxyfile: expand VMA_CALL_PRE and VMA_CALL_POST macros to remove them from documentation 2019-11-13 14:51:01 +01:00
Adam Sawicki
48b8a33869 Fixes and adjustments for budget, regenerate documentation 2019-11-02 15:24:33 +01:00
Adam Sawicki
27c84e2464 Merge remote-tracking branch 'origin/MemoryBudget' into MemoryBudget
# Conflicts:
#	src/vk_mem_alloc.h
2019-11-02 15:16:00 +01:00
Adam Sawicki
a020fb81cb Add prototype function vmaGetName, vmaSetName, change JSON format and VmaDumpVis.py to use that 2019-11-02 14:43:06 +01:00
Adam Sawicki
353e3675d3 Further development of budget management 2019-11-02 14:12:05 +01:00
Adam Sawicki
bc95d25c7f Add draft of general documentation chapter about memory budget
Work in progress...
2019-10-31 16:03:25 +01:00
Adam Sawicki
5f573f588a Minor addition 2019-10-11 15:59:58 +02:00
Adam Sawicki
40ffe988a0 Add struct VmaBudget, function vmaGetBudget
Changed the way HeapSizeLimit is handled to better one.
Added VMA_ATOMIC_UINT64.
2019-10-11 15:56:02 +02:00
Adam Sawicki
6ac1d3a4b7 Improve implementation of function VmaStringBuilder::AddNumber 2019-10-11 12:23:51 +02:00
Adam Sawicki
470399abf0
Merge pull request #80 from malte-v/patch-2
Mention VulkanMemoryAllocator-Hpp in README
2019-09-30 10:38:17 +02:00
malte-v
27e426ab35
Mention VulkanMemoryAllocator-Hpp in README
Could be interesting for C++ programmers already using Vulkan-Hpp.
2019-09-28 15:17:02 +02:00
Adam Sawicki
909f36b714 Fix for aligned_alloc for Windows GCC
As discussed in ff9ac65fe2
2019-09-16 11:28:24 +02:00
Adam Sawicki
bbdcdae100
Merge pull request #75 from dreamer/steam-runtime-compilation-error
Use fallback aligned_alloc for pre-C++17 glibc++
2019-09-06 14:52:30 +02:00
Adam Sawicki
5c2c7f3e7a Add macros VMA_CALL_PRE, VMA_CALL_POST to easily declare public functions as exported
Fixes #76
2019-09-06 14:46:48 +02:00
Adam Sawicki
744459ff8c Add link to the new D3D12 Memory Allocator library 2019-09-02 13:41:18 +02:00
Patryk Obara
ff9ac65fe2 Use fallback aligned_alloc for older glibc++
This function was introduced in C++17, then backported to older versions
of glibc++ library, but is not available in older releases (it's missing
from Ubuntu 12.04 derived SteamRT for example).
2019-08-15 13:23:13 +02:00
Adam Sawicki
188a365ed4 Fix ignore warning C4324 also in VmaReplay project
See #71
2019-07-26 15:22:51 +02:00
Adam Sawicki
91d019523f Add comment to the new VmaVector constructor
See #74
2019-07-26 15:16:04 +02:00
Adam Sawicki
b3687caab2
Merge pull request #74 from benvanik/patch-1
Adding a VmaVector constructor for C++11 compatibility
2019-07-26 15:14:27 +02:00
Adam Sawicki
5afe7845a1 Fix alignment of VmaPoolAllocator::Item::Value
Disable Visual Studio warning C4324.

See #71
2019-07-26 15:09:07 +02:00
Ben Vanik
fd5077cd36
Adding a VmaVector constructor for C++11 compatibility
The std::vector constructor used (count + allocator) is only available in C++14 (see: https://en.cppreference.com/w/cpp/container/vector/vector) and compiling with C++11 and `VMA_USE_STL_VECTOR` will result in compile errors. This adds a new constructor and switches to using that for compatibility.
2019-07-25 09:32:16 -07:00
Adam Sawicki
c7e5f2e44a Change VmaPoolAllocator to allow not-POD T type, explicitly call its constructor and destructor
See #71
2019-07-25 17:23:51 +02:00
Adam Sawicki
692ccba14d Initialize structure VmaAllocator_T::m_VulkanFunctions to zeros in constructor to avoid garbage pointers
Fixes #73
2019-07-25 17:14:02 +02:00
Adam Sawicki
195016b034 Improve the way sizes like "32 MiB" are printed in VmaDumpVis
Also bumped some version numbers and dates.
2019-07-02 15:49:12 +02:00
Adam Sawicki
2024cc570a Change default value of macro VMA_RECORDING_ENABLED to 0
...so that Windows.h is not included by default on Windows.
2019-07-02 15:19:05 +02:00
Adam Sawicki
4abe30c1ae Add functions vmaBindBufferMemory2, vmaBindImageMemory2, flag VMA_ALLOCATOR_CREATE_KHR_BIND_MEMORY2_BIT
This change adds usage of VK_KHR_bind_memory2 extension.
Also add structure members VmaVulkanFunctions::vkBindBufferMemory2KHR, vkBindImageMemory2KHR.
2019-07-02 14:37:21 +02:00
Adam Sawicki
1f84f62a85 Fix sample application to also pass VkAllocationCallbacks to Vulkan, not only to VMA
Also remove function TestResize, no longer working or needed.
2019-07-02 13:40:01 +02:00
Adam Sawicki
17c4aba057 vmaFindMemoryTypeIndex: Change VMA_MEMORY_USAGE_GPU_TO_CPU to only have HOST_CACHED among preferred flags, not HOST_COHERENT
Be careful now! It's still compliant to the documentation, but  selected memory type may become not HOST_COHERENT after this change. No difference is expected on PC. It's mostly for Mali GPU.
2019-07-02 13:03:55 +02:00
Adam Sawicki
4a4cfad2eb Make vmaResizeAllocation deprecated, always return failure unless newSize == current size
Bump CSV file format version to 1,6.
2019-07-02 12:54:35 +02:00
Adam Sawicki
543ba5baec Minor fix in documentation regarding CSV recording 2019-07-02 12:37:36 +02:00
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
87cea36670 Add "Common mistakes" documentation chapter 2019-07-02 12:24:48 +02:00
Adam Sawicki
938b19a8c1 Minor addition in documentation, "Configuration” section
See #67
2019-07-01 12:12:51 +02:00
Adam Sawicki
c238be5070 Additional fix as suggested in #69 2019-06-28 17:31:21 +02:00
Adam Sawicki
77fa9dc840
Merge pull request #69 from past-due/Wtautological_compare
Guard VmaWriteMagicValue / VmaValidateMagicValue on VMA_DEBUG_MARGIN > 0
2019-06-28 17:29:50 +02:00
Adam Sawicki
f8d10218ff Fix structure VmaBlockDefragmentationContext
Fixes #70
2019-06-28 17:12:36 +02:00
Adam Sawicki
9b1e702e0b Remove unused variable
Fixes #67
2019-06-28 17:01:50 +02:00