Commit Graph

251 Commits

Author SHA1 Message Date
Adam Sawicki
38627f4e37 Added VMA_LEN_IF_NOT_NULL decoration to the new functions vmaCopyMemoryToAllocation, vmaCopyAllocationToMemory
Fixes #406 - thanks @qbojj
2024-02-06 13:13:24 +01:00
Adam Sawicki
a13c193d1e Merge branch 'master' of https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator 2024-01-30 14:39:52 +01:00
Adam Sawicki
5db4414d39 Fixed bug in VmaBlockMetadata_Linear::PrintDetailedMap
Fixes #405 - thanks @marrodriguez-EA
2024-01-30 14:39:38 +01:00
serboupal
6887c7700f
Remove semicolon outside function 2024-01-26 13:09:47 +01:00
Adam Sawicki
7924e27f81 Fixes in calls to VMA_DEBUG_LOG_FORMAT, using PRIu32 for compatibility
See #400, thanks @dneto0 and @alecazam
2024-01-24 14:13:44 +01:00
David Neto
927c0a8573 Use format specifier PRIu64 only with uint64_t types
Fixed: #399
2024-01-23 21:04:34 +00:00
Adam Sawicki
ddbd93dcd8 Minor fix in the documentation 2024-01-21 13:37:28 +01:00
Adam Sawicki
b5456bb4e5 Added functions vmaCopyMemoryToAllocation, vmaCopyAllocationToMemory
Few other minor fixes and improvements.
Regenerated documentation.
2024-01-21 13:30:23 +01:00
Adam Sawicki
484f40312f Multiple improvements in documentation 2024-01-21 11:41:10 +01:00
Adam Sawicki
498486b1e5 Added usage of std::countr_zero, std::countl_zero from C++20 when available 2024-01-20 23:49:24 +01:00
Adam Sawicki
037a9386cb Removed commented code 2024-01-20 23:27:50 +01:00
Adam Sawicki
68d510599e Fixed documentation of VmaAllocatorCreateInfo::vulkanApiVersion
Fixes #384 - thanks @qbojj
2024-01-20 23:01:16 +01:00
Adam Sawicki
a0a04a22e9 Added support for VK_KHR_maintenance4 extension
Added VMA_ALLOCATOR_CREATE_KHR_MAINTENANCE4_BIT..
See #397.
2024-01-20 22:48:20 +01:00
Adam Sawicki
14dfcd8fe3 Added documentation chapter "When not to use custom pools" 2024-01-14 22:20:03 +01:00
Adam Sawicki
0479c369d3 Minor improvements in documentation 2024-01-14 21:41:15 +01:00
Adam Sawicki
c23192cfc1 Added macro VMA_LEAK_LOG_FORMAT
Fixes #379 - thanks @alecazam
2024-01-14 21:22:25 +01:00
Adam Sawicki
51bac8e0ea Fixed VK_ERROR_UNKNOWN -> VK_ERROR_UNKNOWN_COPY
See #385 - thanks @alecazam
2024-01-14 21:14:35 +01:00
Adam Sawicki
145917616e Replaced "%llu" with "%" PRIu64
To improve compatibility with some compilers. See #385, #379. Thanks @alecazam
2024-01-14 21:13:21 +01:00
Adam Sawicki
596db32a8a Updated date in copyright headers 2024-01-14 20:18:45 +01:00
Adam Sawicki
a53702cbe2 More fixes based on #385
Thanks @alecazam
2023-11-13 13:59:23 +01:00
Adam Sawicki
b721922bce Added VMA_ASSERT_LEAK macro
See #385 Thanks @alecazam !
2023-11-08 18:14:46 +01:00
Adam Sawicki
b2e7801ff3 Added function vmaGetAllocationInfo2, structure VmaAllocationInfo2
See #383, #340 Thanks @debaetsd !
Rebuilt the docs.
2023-11-08 18:01:19 +01:00
Adam Sawicki
7bd97fa410 Fixed memory leak in VmaPool_T::~VmaPool_T
Fixes #378 Thanks @alecazam
2023-10-30 18:17:52 +01:00
Adam Sawicki
138ce7bda0 Fix in VmaJsonWriter::ContinueString
Fixes #376 Thanks @alecazam
2023-10-30 18:14:08 +01:00
Adam Sawicki
2f382df218 Fixed signed/unsigned mismatch in FindMemoryPreferences
For compatibility with UBSan. Fixes #368 - thanks @markridgewell
2023-09-11 17:58:15 +02:00
manaskulkarni
66bb67cf18 Make C++20 features optional
- Some compilers with C++20 dont have std::popcount
- Support to toggle C++20 features from user side using new VMA_CPP20 macro. If the macro is not defined, it will be set using default logic - #if __cplusplus >= 202002L || _MSVC_LANG >= 202002L
2023-09-01 14:10:40 +05:30
Adam Sawicki
e88fff957b Fixed main memory type selection algorithm for Raspberry Pi
In function FindMemoryPreferences, not requiring HOST_CACHED memory, as some platforms may not have it. See #362 - thanks @cos-public
2023-08-22 13:13:09 +02:00
Adam Sawicki
33067f6b4f Refactoring in FindMemoryPreferences
Without changing the logic. Fixes #354. Thanks @marc0246 !
2023-07-14 14:18:53 +02:00
Adam Sawicki
6ce692a385 Added callback VmaDefragmentationInfo::pfnBreakCallback that allows to break long execution of vmaBeginDefragmentation
Added also PFN_vmaCheckDefragmentationBreakFunction, VmaDefragmentationInfo::pBreakCallbackUserData.
2023-07-14 13:56:46 +02:00
Adam Sawicki
01fe410548 Fixes in Cmake scripts after merging #350 2023-07-11 18:00:37 +02:00
Robin Quint
1d0e8ba3b3 Added small documentation 2023-06-30 17:42:12 +02:00
Robin Quint
ca5ce7df23 Added VMA_EXTENDS_VK_STRUCT 2023-06-30 17:39:36 +02:00
Adam Sawicki
59734bbc63 A fix in VmaBlockMetadata_TLSF::CreateAllocationRequest
Code by @medranSolus. See #343
2023-06-12 13:30:02 +02:00
Adam Sawicki
ff37e92786 Fixed bug in VmaDefragmentationContext_T::ComputeDefragmentation_Extensive
Fixes #328. Code by @medranSolus.
2023-04-07 10:58:24 +02:00
Adam Sawicki
7e63caa879 Fix in VmaDefragmentationContext_T::CounterStatus
See #327. Code by @medranSolus.
2023-04-06 11:25:09 +02:00
Adam Sawicki
e2f5eed2e2 Revert "Merge pull request #325 from lawadr/use-alignof" 2023-04-03 17:49:00 +02:00
Stephan Hartmann
383f06b9fd IWYU: add cstdio for snprintf in vk_mem_alloc.h
Discoverd with upcoming GCC 13.
2023-04-02 21:19:16 +02:00
lawadr
d16730ce64 Change __alignof to alignof
Whereas __alignof is a non-standard compiler extension that seems to
come from Microsoft and is supported (yet undocumented) by Clang and
GCC, alignof is a standard language feature in C++11. Clang and GCC
both document __alignof__ as a compiler extension, but this isn't
supported by Microsoft.

This fixes builds on compilers that don't support __alignof.
2023-03-22 15:33:11 +00:00
Adam Sawicki
66afe099f1 Improved documentation chapter "Resource aliasing (overlap)" 2023-03-06 11:43:13 +01:00
Adam Sawicki
dd09767ff6 Fixed usage of VMA_FALLTHROUGH 2023-02-24 14:17:44 +01:00
Adam Sawicki
4c58c1fefe Defined VMA_FALLTHROUGH to fix more compiler warnings
See #321
2023-02-24 14:15:41 +01:00
Adam Sawicki
729b7c1408 Fixes for some compiler warnings
Found by Visual Studio 2019
2023-02-24 14:04:59 +01:00
Adam Sawicki
c51730a857 Further fixes to importing function vkGetPhysicalDeviceMemoryProperties2 / vkGetPhysicalDeviceMemoryProperties2KHR
See #322
2023-02-21 11:31:21 +01:00
Vladislav Belov
3e6b3847e3 Fixes uninitialized vkGetPhysicalDeviceMemoryProperties2KHR during ImportVulkanFunctions_Custom. 2023-02-19 11:31:42 +03:00
Jeroen Bakker
c265047b29
Fix compilation warning.
GPU/Linux
2023-02-02 08:09:05 +01:00
Adam Sawicki
7c35d6299b Added missing vmaFlushAllocation in documentation
Fixes #316
2023-01-30 14:18:09 +01:00
Adam Sawicki
29d492b60c Added missing #include <cstdio>
For snprintf, for compatibility with GCC 13.
Fixes #312 - thanks @marxin !
2023-01-19 13:19:55 +01:00
Denis Orlov
3e3877ac83 Fix builds on Linux CI
This fixes compilation on older Linux compilers (gcc 7.5.0, clang 7.0.0)
that do not seem to implement P0558R1 defect report, thus not allowing
the usage of value_type member typedef from std::atomic.
2023-01-05 00:05:16 +03:00
Denis Orlov
3459fd780a Fix atomic type used in AtomicTransactionalIncrement
This partially reverts changes from 4dfa169ffc
2023-01-04 21:34:16 +03:00
Adam Sawicki
2606c0039f Fixed potential integer overflow in VmaAllocator_T::AllocateMemoryOfType when maxMemoryAllocationCount Vulkan limit has high value
Fixes #300
2022-11-29 16:53:36 +01:00