Adam Sawicki
acecd26121
Fixes and clarifications in documentation
2020-11-03 15:01:56 +01:00
Adam Sawicki
ebc1f75a6d
Merge pull request #154 from r-barnes/richard/whitespace
...
Drop trailing whitespace
2020-10-29 12:15:18 +01:00
Richard Barnes
270b24295d
Drop trailing whitespace.
...
The only change this commit makes is to drop trailing whitespace.
This makes contributions easier for folks whose editors are set up
to automatically remove such whitespace on save.
2020-10-28 12:33:53 -06:00
Richard Barnes
139741813a
Make binary search overflow safe.
...
Our internal static analysis flags potentially unsafe midpoint
calculations. The proposed fix ensures the binary search doesn't
overflow at the cost of a single additional operation.
2020-10-28 12:32:51 -06:00
Adam Sawicki
76411c95c0
Added VmaAllocatorCreateInfo::pTypeExternalMemoryHandleTypes
2020-10-23 16:10:49 +02:00
Adam Sawicki
3dadc82bce
Merge branch 'master' into PoolCustomPnext
2020-10-23 15:20:54 +02:00
Adam Sawicki
3528e2aed3
Minor formatting fix in documentation
...
Regenerated documentation using new Doxygen.
2020-10-15 15:04:12 +02:00
Adam Sawicki
4075d9ef40
Add VmaPoolCreateInfo::pMemoryAllocateNext
2020-10-05 19:04:02 +02:00
Adam Sawicki
0e2b4b2045
Fix std::min in VmaBlockVector::ProcessDefragmentations
...
Fixes #151 - thanks @rextimmy
2020-09-30 16:07:51 +02:00
Adam Sawicki
1420873213
Merge pull request #148 from res2k/vma_aligned_alloc-tweaks
...
Some tweaks to vma_aligned_alloc()
2020-08-31 12:41:41 +02:00
Adam Sawicki
6074de0c4a
Merge pull request #147 from res2k/move-some-preproc-defn
...
Move some preprocessor directives that may influence user code into "implementation" block
2020-08-31 12:38:43 +02:00
Frank Richter
4157367212
Let VMA_SYSTEM_ALIGNED_FREE fall back to VMA_SYSTEM_FREE, if defined
2020-08-24 00:40:19 +02:00
Frank Richter
59131844fe
Add vma_aligned_free() for symmetry
2020-08-24 00:05:50 +02:00
Frank Richter
2dc44c1d9d
Make vma_aligned_alloc() functions static
2020-08-24 00:02:35 +02:00
Frank Richter
449971111d
Move preprocessor directives that may influence user code into implementation block
2020-08-23 21:14:46 +02:00
Ashkan Aliabadi
bead9eadfa
Fix misspellings.
2020-08-21 11:51:19 -07:00
Adam Sawicki
21936114ff
Merge branch 'master' of https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
2020-08-18 16:43:58 +02:00
Adam Sawicki
0620c8e5e1
Add test and documentation for resource aliasing (overlap).
2020-08-18 16:43:44 +02:00
Adam Sawicki
b9ad5e79db
Merge pull request #145 from stricmp/master
...
Fix VMA_DYNAMIC_VULKAN_FUNCTIONS compilation errors when VK_NO_PROTOTYPES is defined
2020-08-18 14:44:55 +02:00
Adam Sawicki
0ef61c2fd5
Fix in documentation chapter "Finding out if memory is mappable"
...
Fixes #143
2020-08-18 14:20:37 +02:00
Tri S
416996cbff
Fix VMA_DYNAMIC_VULKAN_FUNCTIONS compilation errors when VK_NO_PROTOTYPES is defined
2020-08-10 19:13:28 +07:00
Doğukan Korkmaztürk
67bf13cd08
Fix a typo in the explanation of VMA_ALLOCATION_CREATE_MAPPED_BIT
2020-07-27 23:55:03 -04:00
Adam Sawicki
db4c1639bf
Fix compilation errors
2020-07-16 16:41:53 +02:00
Adam Sawicki
d594faafee
Replace usage of old VK_LAYER_LUNARG_standard_validation and extension VK_EXT_debug_report with new VK_LAYER_KHRONOS_validation and extension VK_EXT_debug_utils also in VmaReplay
2020-07-15 17:12:28 +02:00
Adam Sawicki
8caf0bd1c0
Replace usage of old layer VK_LAYER_LUNARG_standard_validation and extension VK_EXT_debug_report with new layer VK_LAYER_KHRONOS_validation and extension VK_EXT_debug_utils
2020-07-15 16:56:30 +02:00
Nico Weber
08bce5328b
mac: Only call system aligned_alloc() with the 11.0+ SDK.
...
The 10.15 SDK only declares it for C++17 and C11. In Chromium, we only
call this from .cc files, and these are C++14 still for now.
The 11.0 SDK declares it independent of language version (as long as
__DARWIN_C_LEVEL >= __DARWIN_C_FULL, which it is by default, at least
on macOS).
So this calls the system version in fewer scenarios than possible,
but it keeps the preprocessor checks fairly small.
Bug: chromium:1098741
Change-Id: I1e30f88bb040876bca2b59adee0a1cff33b9ff03
2020-07-06 13:31:56 -04:00
Nico Weber
c331971b30
Only use system aligned_alloc on mac/ios if the SDK has them.
...
Bug: chromium:1098741
Change-Id: I4df73f581c2a6895c7f136ff974db0371c48cc5e
2020-07-06 13:31:48 -04:00
Nico Weber
5ef3d923d5
Fix argument order for aligned_alloc on mac.
...
I pasted this from the _aligned_malloc() branch, and _aligned_malloc()
apparently has the argments swapped compared to aligned_alloc() :/
Bug: chromium:1098741
Change-Id: Iddd92a7beb9e75ddc63b96f757457ec4258fd1ca
2020-07-06 13:31:41 -04:00
Nico Weber
1268da7b97
Make vulkan_memory_allocator build with the MacOSX11.0 SDK.
...
The 11.0 SDK adds a declaration of aligned_malloc() that's available
on macOS 10.15 and later. vulkan_memory_allocator also defines a
symbol with the same name, which causes problems.
As fix, rename the vulkan_memory_allocator version to
vma_aligned_malloc(). Use this opportunity to use the same mechanism on
Windows (a no-op), and, while here, call the system aligned_malloc()
on macOS 10.15 from there too.
Bug: chromium:1098741
Change-Id: If738a1451a08c0813532fc4b778d9118a23210b7
2020-07-06 13:31:32 -04:00
Adam Sawicki
7cb859d3a0
Improvement in VmaAlignUp, VmaAlignDown
2020-07-06 17:39:20 +02:00
Kevin Trogant
67824c5b00
Correct if in mapping example
...
We want to know if the memory is mappable, which means that the memory properties should include the `VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT`.
2020-07-03 12:20:36 +02:00
Adam Sawicki
aaa1a56167
Clarify documentation of VmaAllocationInfo::size
...
Added test for it. Regenerated documentation.
2020-06-24 17:41:09 +02:00
Adam Sawicki
1ebda1eecc
Add assert to check success of a CPU memory allocation
2020-06-24 17:16:26 +02:00
Adam Sawicki
f9921aefdd
Fix VmaAllocator_T::ImportVulkanFunctions_Dynamic for cases when Vulkan 1.1 is used
...
#133
2020-06-04 13:31:31 +02:00
Adam Sawicki
650ebdf783
Remove invalid outdated assert in vmaBeginDefragmentationPass
...
Closes #132
2020-05-25 17:17:11 +02:00
Adam Sawicki
72983b0aa1
Clarified documentation in few places to mention textures need to use LINEAR layout when accessed from the host
...
Rebuilt HTML documentation. Used new Doxygen 1.8.18.
Closes #129
2020-05-08 18:43:25 +02:00
Hartmut Behrens
1e11595592
fix(docs): instance not optional in quick start
2020-05-03 13:06:27 +02:00
Adam Sawicki
755fd47121
Minor fix in comment
2020-04-24 17:05:07 +02:00
Adam Sawicki
72740d8d63
Fix indentation - always use 4 spaces instead of tabs
2020-04-24 17:02:50 +02:00
Adam Sawicki
74bc7c78fe
Port memory recording in VMA to C++11
...
Closes #126
2020-04-24 16:59:34 +02:00
Adam Sawicki
ff472352b9
Add .editorconfig file to configure supporting editors to use proper whitespaces for indentation
2020-04-24 12:42:06 +02:00
Adam Sawicki
25d9b2c0ec
Add function vmaFlushAllocations, vmaInvalidateAllocations for multiple allocations at once
...
Closes #119
Added internal class VmaSmallVector.
Refactored common code into a new function VmaAllocator_T::GetFlushOrInvalidateRange.
Regenerated docs.
2020-04-19 19:02:28 +02:00
Adam Sawicki
a8a5b1f81b
Merge pull request #122 from expipiplus1/joe-120
...
Return VkResult in vmaInvalidateAllocation and vmaFlushAllocation
2020-04-19 17:20:57 +02:00
Adam Sawicki
ba9d4b3323
Merge pull request #121 from expipiplus1/joe-len
...
Add missing length annotation in vmaAllocateMemoryPages
2020-04-19 17:18:47 +02:00
Joe Hermaszewski
b52c5a3e84
Return VkResult in vmaInvalidateAllocation and vmaFlushAllocation
...
Fixes #120
2020-04-10 21:39:27 +08:00
Joe Hermaszewski
fc931bd5ac
Add missing length annotation in vmaAllocateMemoryPages
2020-04-10 21:27:55 +08:00
Adam Sawicki
6be35971a2
Minor fixes for #115
2020-04-09 16:20:13 +02:00
Adam Sawicki
9b3a159515
Merge branch 'master' into joe-const
2020-04-08 17:15:53 +02:00
Adam Sawicki
facf05ee63
Some fixes after fb3a337
#115
2020-04-08 17:09:59 +02:00
Adam Sawicki
fb3a33777d
Merge pull request #115 from expipiplus1/joe-annotations
...
Add annotations for nullability and length
2020-04-08 16:31:39 +02:00
Adam Sawicki
b713c3435b
Add #if VMA_DYNAMIC_VULKAN_FUNCTIONS == 1 around VmaAllocator_T::ImportVulkanFunctions_Dynamic
...
Refers to #56
2020-04-07 20:51:18 +02:00
Adam Sawicki
d8bdd78e26
Minor fix after c0cf25d
2020-04-07 20:47:25 +02:00
Joe Hermaszewski
4810460894
Do not include nullability and length annotations in documentation
2020-04-07 22:41:03 +08:00
Joe Hermaszewski
f22cd7b3c6
Add const qualifier to handles where possible
...
This mirrors the Vulkan specification where handles are often passed with a const qualifier
2020-04-07 20:21:30 +08:00
Joe Hermaszewski
08bc59bee5
Add length annotation for VmaAllocatorCreateInfo::pHeapSizeLimit
2020-04-07 20:21:30 +08:00
Joe Hermaszewski
b9725fc203
Annotate types with lengths instead of parameters/members
2020-04-07 20:21:28 +08:00
Joe Hermaszewski
3a756282ab
Disable -Wnullability-completeness for the implementation
2020-04-07 20:20:48 +08:00
Joe Hermaszewski
35939a0fd1
Add VMA_NULLABLE to pointed to out values
2020-04-07 20:20:48 +08:00
Joe Hermaszewski
c6f8c86085
Add annotations for nullability and length
...
These are only present on the declarations in the C API.
New macros
- `VMA_NULLABLE`
- `VMA_NOT_NULL`
- `VMA_NULLABLE_NON_DISPATCHABLE`
- `VMA_NOT_NULL_NON_DISPATCHABLE`
- `VMA_LEN_IF_NOT_NULL`
On clang `VMA_NOT_NULL` and `VMA_NULLABLE` are defined as `_Nonnull` and
`_Nullable`. Clang will use these annotations to generate diagnostics
when these functions or structs are incorrectly used.
`VMA_NULLABLE_NON_DISPATCHABLE` and `VMA_NOT_NULL_NON_DISPATCHABLE` are
not defined on platforms where Vulkan's non-dispatchable handles are not
pointers; on platforms where they are, these macros are defined to be
`VMA_NULLABLE` and `VMA_NOT_NULL` respectively.
`LEN_IF_NOT_NULL` is not defined for any compiler. It is included to
mirror the `len` attribute in the Vulkan XML spec in order to aid in
development of other language bindings for this library.
It was tempting to use C's array syntax (`foo(int len, int arr[len])`)to
specify lengths, however this is not possible to use with optional
pointers, nor is it possible to use inside structs. For the sake of
consistency only `VMA_LEN_IF_NOT_NULL` is used (additionally neither
clang not gcc generate warnings for function misuse when the array
length specifier is anything but an integer literal).
- Also correct a couple of typos
- Also add assert on ppName in vmaGetPoolName
Closes #114
2020-04-07 20:20:47 +08:00
Joe Hermaszewski
c0cf25df3d
Add CPP #error if trying to use recording on a non-Windows platform
2020-04-07 19:59:33 +08:00
Joe Hermaszewski
0360182776
Add const qualifier to handles where possible
...
This mirrors the Vulkan specification where handles are often passed with a const qualifier
2020-04-07 17:40:40 +08:00
Adam Sawicki
f575c5070b
Further changes in importing pointers to Vulkan functions
...
Reverted change removing configuration macro VMA_STATIC_VULKAN_FUNCTIONS.
Added configuration macro VMA_DYNAMIC_VULKAN_FUNCTIONS.
Fixes for Android.
Closes #111 , also refers to #56 .
2020-03-31 19:11:41 +02:00
Sidney Just
bb7bdb99ec
Fixed a race condition with incremental defragmentation. The issue here is that VmaBlockVector::DefragmentationEnd() relied on the mutex being previously locked to safely mutate its data, but with incremental defrag this isn't guaranteed to be the case anymore.
2020-03-27 09:58:25 -07:00
Adam Sawicki
3d1ce4ebb8
Support VK_KHR_buffer_device_address but not VK_EXT_buffer_device_address
...
To avoid mess in the code. They are not identical! "EXT" version lacks flag VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT* flag.
Refers to #56
2020-03-25 10:34:05 +01:00
Adam Sawicki
204a810449
Fix documentation to state that VmaAllocatorCreateInfo::instance is now required
...
Compatibility breaking!
Closes #107
2020-03-24 15:58:45 +01:00
Adam Sawicki
297639774c
Remove outdated comment
2020-03-24 12:40:54 +01:00
Adam Sawicki
4405c51aab
Fix compilation of VmaReplay project
2020-03-23 18:58:04 +01:00
Adam Sawicki
451bf601d8
Bump version number to 3.0.0-development as we broken backward compatibility
...
Also rebuilt the docs.
2020-03-23 18:24:02 +01:00
Adam Sawicki
b58de2be50
Merge pull request #105 from Didgy74/master
...
Add pUserData to VmaDeviceMemoryCallbacks
2020-03-23 18:21:16 +01:00
Adam Sawicki
2952959820
Fix a comment broken accidentally
2020-03-23 18:19:35 +01:00
Adam Sawicki
954631ac2a
Improve internal fetching pointers to Vulkan functions to always use vkGetInstanceProcAddr/vkGetDeviceProcAddr
...
No longer refers to statically linked Vulkan functions.
Removed configuration macro VMA_STATIC_VULKAN_FUNCTIONS.
Hopefully will help for #56 .
2020-03-23 18:13:36 +01:00
Adam Sawicki
77b55b38f4
Fix VmaAllocator_T::AllocateDedicatedMemory to make it compiling with Vulkan SDK 1.1.130.0 (linux)
...
Closes #104
2020-03-23 15:42:55 +01:00
Adam Sawicki
e73e988daf
Add support for buffer device address, together with documentation and tests
...
Added VMA_ALLOCATOR_CREATE_BUFFER_DEVICE_ADDRESS_BIT.
2020-03-20 18:05:42 +01:00
Nils Petter Skålerud
d00c9b6ff8
Fixed bug where pUserData was not being assigned during initialization.
...
Signed-off-by: Nils Petter Skålerud <np_skalerud@hotmail.com>
2020-03-19 19:38:52 +01:00
Nils Petter Skålerud
eebf47cd1c
Added a member void* pUserData to VmaDeviceMemoryCallbacks
...
Updated PFN_vmaAllocateDeviceMemoryFunction to use new pUserData member
Updated PFN_vmaFreeDeviceMemoryFunction to use new pUserData member
Signed-off-by: Nils Petter Skålerud <np_skalerud@hotmail.com>
2020-03-19 19:20:19 +01:00
Adam Sawicki
39aeff7a43
Remove incorrect asserts from vmaCreateBuffer
...
Closes #102
2020-03-16 15:39:44 +01:00
Adam Sawicki
1b8bdb216e
Remove unused variable in VmaBlockVector::AllocatePage
...
Fixes #101
2020-03-11 17:08:42 +01:00
Adam Sawicki
fbaccff808
Minor tweak in TestHeapSizeLimit to pass on AMD integrated graphics which has only 200 MB of DEVICE_LOCAL memory
2020-03-09 17:09:23 +01:00
Adam Sawicki
6a93b8aa5f
Protection against incorrect (0 or very large) memory budget returned by some bugged drivers
...
2 other minor fixes.
2020-03-09 16:58:18 +01:00
Frank Richter
c534e61379
Typo fix
2020-03-08 13:24:06 +01:00
Adam Sawicki
e8a8544322
Sample application: Print physical device parameters like deviceID and deviceName
2020-03-06 14:48:30 +01:00
Adam Sawicki
a4f2eb9d45
Don't enable extensions that are promoted to core Vulkan 1.1
...
Add PrintEnabledFeatures to print which features and extensions are enabled on console.
2020-03-06 14:39:42 +01:00
Adam Sawicki
003451e52d
Fixes in VmaAllocator_T::ImportVulkanFunctions
...
Hopefully fix Android #56
2020-03-02 15:52:24 +01:00
Adam Sawicki
8ef0d201ef
Merge branch 'Vulkan1_2'
2020-03-02 15:43:47 +01:00
Adam Sawicki
74ef41e66b
Bump version number and date
2020-03-02 15:34:32 +01:00
Adam Sawicki
a1d992f5d1
Add function vmaGetAllocatorInfo, structure VmaAllocatorInfo
...
Closes #99
Also rebuilt Doxygen documentation.
2020-03-02 15:32:10 +01:00
Adam Sawicki
76004205fd
Add documentation chapter about VK_AMD_device_coherent_memory extension usage
...
Regenerated Doxygen documentation.
2020-02-07 17:18:35 +01:00
Adam Sawicki
508825012c
Add support for VK_AMD_device_coherent_memory extension
...
- Added VMA_ALLOCATOR_CREATE_AMD_DEVICE_COHERENT_MEMORY_BIT.
- Fixed bug generating validation layers error when the extension is not enabled.
- Updated date in copyright header comments to year 2020.
2020-02-07 16:51:31 +01:00
Adam Sawicki
82ec4439c7
Minor fix: Use std::forward with parameter pack
2020-01-31 11:32:51 +01:00
Adam Sawicki
aaba2109f9
Refactoring: Use constructor and destructor in VmaAllocation_T
...
VmaPoolAllocator supports that. Needed to only use parameter pack to pass arguments to constructor.
2020-01-31 11:19:32 +01:00
Adam Sawicki
cdd30bb46d
Prepare to support Vulkan 1.2
...
No way to test for now because no Vulkan SDK available.
2020-01-20 17:19:41 +01:00
Sidney Just
f91dd04a1e
Fixed incorrect for loop in ProcessDefragmetnations() that would lead to partial defragmentation passes being broken
2020-01-12 15:51:33 -08:00
Lava Block
361fcfcae4
Fix C++17 shared_mutex compile error
...
In C++17 the method is called: https://en.cppreference.com/w/cpp/thread/shared_mutex/try_lock_shared
2019-12-29 17:12:36 +01:00
Adam Sawicki
c467e28f2f
Renames in the library and fixes in tests for the new defragmentation
2019-12-23 16:38:31 +01:00
Adam Sawicki
a52012de37
Prototype of a defragmentation interface that supports tiling optimal images
...
Merged #90 thanks @JustSid !
2019-12-23 15:28:51 +01:00
Adam Sawicki
c8eec757fd
Minor addition to the documentation regarding allocation string names
2019-12-18 13:37:38 +01:00
Adam Sawicki
7f708dbd44
Use NDEBUG instead of _DEBUG macro to detect debug build
...
Closes #92 thanks @daemyung !
2019-12-18 10:54:28 +01:00
Adam Sawicki
e9bfb539d8
Publish version 2.3.0 final
...
Updated version number. Regenerated Release binaries and Doxygen documentation.
2019-12-04 14:26:59 +01:00
Adam Sawicki
7d6544dc73
Merge branch 'master' of https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
2019-12-02 13:42:35 +01:00
Adam Sawicki
cd7bc20429
Clarify documentation in regards to cache flush/invalidate in few places
...
See #91 , thanks @ROTARTSI82 !
2019-12-02 13:42:25 +01:00
Adam Sawicki
5f94eae63d
Fix bug in VmaAllocator_T::AllocateVulkanMemory for case when HeapSizeLimit is used
...
Closes #89 - thanks @JustSid !
2019-11-28 11:52:30 +01:00
Adam Sawicki
023976ad24
Minor fix: Add missing mutex lock to VmaBlockVector::IsEmpty
2019-11-26 11:48:06 +01:00
Adam Sawicki
4670506a22
Announce version 2.3.0-alpha.1
2019-11-25 12:46:57 +01:00
Adam Sawicki
1296e2db4d
VmaReplay: Switch to Vulkan 1.1
...
Recording file format version bumped to 1.8 to support "VulkanApiVersion".
VmaReplay now uses Vulkan 1.1 by default and so it removes parameter --VK_KHR_dedicated_allocation.
2019-11-25 11:13:53 +01:00
Adam Sawicki
10f68cb139
Vulkan 1.1 suport - prototype
2019-11-22 17:41:59 +01:00
Adam Sawicki
4d700c5e4e
Sample app: remove outdated comment
...
https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/579 is now fixed so RenderDoc works with the sample app also when it uses VK_KHR_dedicated_allocation when latest Vulkan SDK is used.
2019-11-22 15:35:27 +01:00
Adam Sawicki
7ba02ec56e
Minor improvement
2019-11-22 15:28:06 +01:00
Adam Sawicki
ddcbf8cdba
Fix management of m_HasEmptyBlock by adding VmaBlockVector::UpdateHasEmptyBlock().
...
Also added TestPool_MinBlockCount().
2019-11-22 15:22:42 +01:00
Adam Sawicki
69185555f4
Add VMA_MEMORY_USAGE_GPU_LAZILY_ALLOCATED
...
Closes #84
2019-11-18 17:03:34 +01:00
Adam Sawicki
efa88c4de0
Add VMA_MEMORY_USAGE_CPU_COPY for memory that is preferably not DEVICE_LOCAL but not guaranteed to be HOST_VISIBLE
...
Also added test for memory types and usages.
2019-11-18 16:33:56 +01:00
Adam Sawicki
a900b56aed
Merge pull request #87 from Nyufu/clang_cl_support
...
Added clang compile support on windows
2019-11-18 15:18:45 +01:00
Andras Nyiscsak
641a16cc9c
Added clang compile support on windows
2019-11-18 15:09:34 +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
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
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
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