Commit Graph

204 Commits

Author SHA1 Message Date
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
Adam Sawicki
14469a5eea Refactored some switch statements
Fixes #299
2022-11-29 16:42:14 +01:00
Adam Sawicki
85a2580529 Removed unused local variables unusedRangeSize
Fixes #298
2022-11-29 16:23:17 +01:00
Adam Sawicki
6d2fe13627 Split macros into separate VMA_DEBUG_LOG and VMA_DEBUG_LOG_FORMAT
To fix compiler errors with -Wpedantic -Werror - see #297
2022-11-29 16:16:12 +01:00
manaskulkarni
2ea07806af BindBufferMemory, BindImageMemory - Return VK_ERROR_UNKNOWN for unknown allocation type 2022-11-23 14:02:24 +05:30
Adam Sawicki
936bc4b57e Internal refactoring for compatibility with 32-bit
Removed VmaJsonWriter::WriteSize, ContinueString_Size.

See #293
2022-11-09 16:42:33 +01:00
Adam Sawicki
800acede8d Merge branch 'master' of https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator 2022-11-04 17:02:51 +01:00
Adam Sawicki
cb5bf6452c Minor fix in documentation
Regenerated the documentation using Doxygen 1.9.5.
2022-11-04 17:02:24 +01:00
Riku Palomäki
f741604e04 Remove extra semicolons, fixes build with -Wextra-semi 2022-11-01 10:08:23 +02:00
Russell Greene
198127a0ee Fix build for iOS 2022-10-27 14:46:35 -05:00
qbojj
19dbbe92c0
fix typo in specification of VmaAlignDown 2022-09-20 13:29:31 +02:00
Pavel Rojtberg
a4c1afb3c4 allow building against vulkan 1.2 headers
e.g. on ubuntu 20.04
2022-09-12 18:16:00 +02:00
Tiago Chaves
157a8173d1
Fix minor typos in documentation 2022-09-07 17:37:26 -03:00
Adam Sawicki
0aa8a44acf Reordered macro definitions in the file to fix compilation on Linux 2022-09-07 16:27:35 +02:00
Adam Sawicki
db0f9b481a Changed implementation of vma_aligned_alloc to only use aligned_alloc when C++17 is enabled, where the function is defined.
See #285

May break on some platforms! If it affects you, please enable C++17 or later in your compiler or provide custom implementation of macro VMA_SYSTEM_ALIGNED_MALLOC (and VMA_SYSTEM_ALIGNED_FREE if needed) using the API of your system.
2022-09-07 16:21:34 +02:00
Adam Sawicki
d6b705bf75 Added function vmaCreateAliasingBuffer2, vmaCreateAliasingImage2 with new parameter allocationLocalOffset
Thanks @sagaceilo for the idea!
2022-09-04 13:26:39 +02:00
rumblehhh
177862376c
Fix various typos 2022-08-05 09:20:11 +01:00
Max Rodriguez
b367bf3b87 docs: Fixed a typo under 'Selecting Vulkan version' section 2022-07-26 11:44:54 -07:00
Adam Sawicki
1022be64cf Added missing mutex when unmapping memory.
Hopefully fixes #267. Code by @medranSolus
2022-06-22 12:48:27 +02:00
Adam Sawicki
b51fea7a53 Improved documentation regarding selecting Vulkan version
See #256
Updated to Doxygen 1.9.4.
2022-06-14 16:43:27 +02:00
Rémi Verschelde
9eab57ea44 Strip trailing whitespace in code files 2022-06-14 13:41:15 +02:00
Rémi Verschelde
e20c24c4c8 Convert VMA line endings to Unix style (LF)
This makes it consistent with other files in the repository,
and is typically the norm for cross-platform Git repos.
2022-06-14 12:00:24 +02:00
Alex
825d3d850a fix typos 2022-06-10 09:36:31 +08:00
Adam Sawicki
a6bfc23725 Releasing version 3.0.1
Some fixes in tests for Nvidia cards.
2022-05-26 11:51:12 +02:00
Adam Sawicki
b77238c92c Refactored VmaBlockVector::SortByFreeSize to fix compilation on XCode 13.4
Fixes #269. Thanks @richard-lunarg !
2022-05-26 11:11:32 +02:00
Adam Sawicki
0bbde1750e Removed unused functions VmaQuickSort, VmaQuickSortPartition
Closes #262. Thanks @laurelkeys !
2022-05-11 12:37:14 +02:00
Artem Kharytoniuk
fe38c8f13e
Fix minor typo 2022-05-11 11:23:16 +02:00
Adam Sawicki
5ab8c1752a Fix assert when VMA_DEBUG_INITIALIZE_ALLOCATIONS is used with new memory usage flags
Only mappable allocations are filled with bit pattern.

See #260
2022-04-27 16:58:56 +02:00
Brian Osman
8a7f80743a
Fix return type of GetAllocationNextPtr
Returning `void* const` doesn't mean anything (produces a warning with -Wignored-qualifiers). Based on usage, it looks like the returned pointer is expected to point at const data, so I've fixed the declaration to reflect that.
2022-04-19 10:55:48 -04:00
Tiago Chaves
ebefe58623
Remove unused VmaAlgorithmToStr function 2022-04-09 21:23:17 -03:00
Adam Sawicki
0c7ad4e859 Optimized VmaCountBitsSets to use std::popcount when C++20 is enabled
Closes #251
2022-03-29 18:07:09 +02:00
Adam Sawicki
2d2a9e3df3 Fixed bug with assert failure when JSON dump is created while a custom pool exist with specified string name 2022-03-29 17:24:48 +02:00
Adam Sawicki
5b598e0a35 Clarified documentation about required C++14 version
Fixes #252
2022-03-28 16:36:24 +02:00
Adam Sawicki
3ed40d8321 Updated version number 2022-03-28 13:22:36 +02:00
Adam Sawicki
3f9f66740a Fix for compilation on AppleClang 13.1
Fixes #253
2022-03-28 13:21:46 +02:00
Adam Sawicki
35e1539161 Fix for out-of-bound accessing last free block in EXTENSIVE defragmentation algorithm.
Code by @medranSolus
See #232
2022-03-28 13:19:34 +02:00
Menno Vink
11cbcfcfc5 Simplify the code to keep xcode happy 2022-03-27 18:34:29 +02:00
Menno Vink
54d356e2f3 C4062 fix 2022-03-27 17:48:07 +02:00
Adam Sawicki
67fda02b4b Updated version number and CHANGELOG.md
Regenerated documentation and executable.
2022-03-25 12:39:55 +01:00
Adam Sawicki
3c6470cf45 New JSON dump format
Unified across VMA and D3D12MA.
Updated Python script for visualization - now called GpuMemDumpVis.py.

Also a fix for bug in EXTENSIVE defragmentation algorithm - see #232

Code by @medranSolus
2022-03-24 11:50:34 +01:00
Adam Sawicki
6b098e457e Small but important fix in the documentation 2022-03-14 18:05:55 +01:00
Adam Sawicki
fadfc3fd13 Added convenience functions vmaCreateAliasingBuffer, vmaCreateAliasingImage
Code by @medranSolus
2022-03-14 16:56:30 +01:00
Adam Sawicki
c317c7b3e8 Internal improvement: moved setting of incremental sort in block vector to separate variable.
Code by @medranSolus
2022-03-10 15:17:22 +01:00
Adam Sawicki
31910c8b08 Fix in defragmentation versus mapping
by @medranSolus

Added TestDefragmentationVsMapping.
2022-03-09 13:24:06 +01:00
Adam Sawicki
e4dd120c2f Fixed line endings to LF again
See #195
2022-03-08 13:50:37 +01:00
Adam Sawicki
85a49729c3 Improvements in documentation regarding defragmentation 2022-03-08 13:46:58 +01:00
Adam Sawicki
e1879e9f10 Removed VMA_ALLOCATION_CREATE_RESERVED_1_BIT, VMA_ALLOCATION_CREATE_RESERVED_2_BIT
Improvements in documentation.
2022-03-08 12:25:24 +01:00
Adam Sawicki
b644e72765 Renamed VMA_VIRTUAL_ALLOCATION_CREATE_STRATEGY_PACKED_BIT to VMA_VIRTUAL_ALLOCATION_CREATE_STRATEGY_MIN_OFFSET_BIT for consistency. Compatibility breaking. 2022-03-07 17:16:49 +01:00