Commit Graph

74 Commits

Author SHA1 Message Date
Adam Sawicki
596db32a8a Updated date in copyright headers 2024-01-14 20:18:45 +01:00
Tim Lobner
3cb5470faa fixed copy paste error in vulkan sample 2023-07-10 14:28:30 +02:00
Rémi Verschelde
9eab57ea44 Strip trailing whitespace in code files 2022-06-14 13:41:15 +02: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
3f9f66740a Fix for compilation on AppleClang 13.1
Fixes #253
2022-03-28 13:21:46 +02:00
Adam Sawicki
caf27e0428 Made allocation Name and UserData separate. COMPATIBILITY BREAKING!
Added function vmaSetAllocationName. Added member VmaAllocationInfo::pName.
VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT is now deprecated but still works.

Code mostly by @medranSolus
2022-03-03 11:23:14 +01:00
Adam Sawicki
e0fcd7344e Fixed VulkanUsage::Init for Vulkan SDK not supporting new Vulkan 1.3, to fix CI builds 2022-02-17 14:48:54 +01:00
Adam Sawicki
aee61b1d25 Added new API for selecting preferred memory type: VMA_MEMORY_USAGE_AUTO, VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE, VMA_MEMORY_USAGE_AUTO_PREFER_HOST, VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT, VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT, VMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BIT
Old values like VMA_MEMORY_USAGE_GPU_ONLY still work as before, for backward compatibility.
Updated documentation accordingly.

Introduced a concept of mappable and non-mappable allocations - with VMA_MEMORY_USAGE_AUTO* an intent to map has to be specified using VMA_ALLOCATION_CREATE_HOST_ACCESS*.

Added mapping hysteresis logic (internal class VmaMappingHysteresis, config macro VMA_MAPPING_HYSTERESIS_ENABLED) that prevents too many calls vkMapMemory/vkUnmapMemory back and forth.

Internal improvement in VmaBlockVector::AllocatePage to try to keep mappable and non-mappable allocations separate.
2022-02-17 14:44:06 +01:00
Adam Sawicki
f451b94158 Fixed vmaBuildVirtualBlockStatsString, vmaFreeVirtualBlockStatsString to also be inside #if VMA_STATS_STRING_ENABLED
Updated copyright headers for to year 2022.

Change by @medranSolus
2022-01-21 12:56:18 +01:00
Adam Sawicki
4e4e1c085d Added parameters -t --Test and -s -TestSparseBinding to the test app, to execute tests and exit. 2021-12-03 12:13:44 +01:00
Adam Sawicki
f529a86ab5 Added VmaVulkanFunctions::vkGetInstanceProcAddr, vkGetDeviceProcAddr
These are now required when using VMA_DYNAMIC_VULKAN_FUNCTIONS. Compatibility breaking!

Closes #211
2021-11-29 17:52:30 +01:00
Adam Sawicki
1b0bd18053 Standardized line endings to LF
See also #195
2021-09-30 12:03:35 +02:00
Adam Sawicki
82731feeb9 Fixes. Left only new member VmaPoolCreateInfo::pMemoryAllocateNext. 2021-06-21 14:47:37 +02:00
Adam Sawicki
d780fe0263 Merge branch 'master' into PoolCustomPnext
# Conflicts:
#	include/vk_mem_alloc.h
2021-06-21 14:08:45 +02:00
Adam Sawicki
a75a61bfd7 Added parsing of command line parameters and GPU selection
Command line syntax:
-h, --Help   Print this information
-l, --List   Print list of GPUs
-g S, --GPU S   Select GPU with name containing S
-i N, --GPUIndex N   Select GPU index N

Also improved error handling.
2021-03-11 15:15:38 +01:00
Adam Sawicki
0a3c6b57ec Fixed usage of VK_KHR_buffer_device_address extension
It was confused with VK_EXT_buffer_device_address which is not officially supported by VMA and has different VK_STRUCTURE_TYPE...
Also a fix in PrintMemoryConclusions.
2021-03-02 16:48:32 +01:00
Adam Sawicki
41b411124e Fixed synchronization issue in TestPool_Benchmark
Variable res was incorrectly shared between threads.
2021-03-02 15:11:18 +01:00
Adam Sawicki
afd50562cb Sample app: Added printing information about available memory heaps nad types 2021-02-26 11:59:58 +01:00
Adam Sawicki
aa18374368 Updated copyright header to year 2021.
Rebuilt binaries, regenerated documentation.
2021-02-16 17:28:49 +01:00
Adam Sawicki
f2012055cc Added support for VK_EXT_memory_priority
Added VMA_ALLOCATOR_CREATE_EXT_MEMORY_PRIORITY_BIT, VmaAllocationCreateInfo::priority, VmaPoolCreateInfo::priority.

See #160
2021-01-11 18:04:42 +01:00
Adam Sawicki
76411c95c0 Added VmaAllocatorCreateInfo::pTypeExternalMemoryHandleTypes 2020-10-23 16:10:49 +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
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
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
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
8ef0d201ef Merge branch 'Vulkan1_2' 2020-03-02 15:43:47 +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
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
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
4670506a22 Announce version 2.3.0-alpha.1 2019-11-25 12:46:57 +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
4ac8ff89c2 Multiple fixes in budget management
Including correct handling of lost allocation.
2019-11-18 14:47:33 +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
353e3675d3 Further development of budget management 2019-11-02 14:12:05 +01:00
Adam Sawicki
5f573f588a Minor addition 2019-10-11 15:59:58 +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
4fb254e362 Clarify comment about compatibility with RenderDoc 2019-04-23 11:29:57 +02:00
Adam Sawicki
f48896d164 add a comment explaining how to make the sample app not crashing with RenderDoc 2019-04-16 12:55:35 +02:00
Adam Sawicki
6c8b7a2c3e Added flag VMA_ALLOCATION_CREATE_DONT_BIND_BIT. 2019-03-05 13:40:29 +01:00
Adam Sawicki
f43e9cd270 VulkanSample, CreateTexture function: switched from staging image with VK_IMAGE_TILING_LINEAR to staging buffer and vkCmdCopyBufferToImage. 2019-02-20 14:55:31 +01:00
Adam Sawicki
ae5c4661ec Updated copyright headers after New Year. 2019-01-02 10:23:35 +01:00
Adam Sawicki
1a8424f41a Preparations for v2.0.0 release. Updated version numbers. Rebuilt binaries and documentation. 2018-12-13 11:01:16 +01:00
Adam Sawicki
da6c19423d Wrote test for sparse image binding with testing actual content - function BaseImage::TestContent. It uses vkCopyBufferToImage and then a compute shader to read back pixels of the image. 2018-12-05 17:34:34 +01:00
Adam Sawicki
978fcf54ab Testing environment: Added class StagingBufferCollection, functions UploadGpuData, ValidateGpuData, TestGpuData, in preparation for testing defragmentation of GPU memory.
# Conflicts:
#	src/Tests.cpp
#	src/VulkanSample.cpp
2018-12-05 14:38:48 +01:00
Adam Sawicki
6a6d8c6ea2 Merge branch 'master' into sparse_binding_example
# Conflicts:
#	docs/html/vk__mem__alloc_8h.html
#	docs/html/vk__mem__alloc_8h_source.html
#	src/Tests.cpp
#	src/VulkanSample.cpp
#	src/vk_mem_alloc.h
2018-12-05 13:20:32 +01:00