Commit Graph

66 Commits

Author SHA1 Message Date
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
Adam Sawicki
b0c363693f Added function vmaResizeAllocation.
Added tests: function TestResize. Bumped CSV recording file format version to 1.4.
2018-11-13 16:17:38 +01:00
Adam Sawicki
b8d34d5e6a Replaced assert() with new macro TEST() in all tests, to check conditions also in Release configuration.
# Conflicts:
#	src/SparseBindingTest.cpp
#	src/Tests.cpp
#	src/VulkanSample.cpp
2018-10-03 17:41:20 +02:00
Adam Sawicki
a7d7769959 Replaced assert() with new macro TEST() in all tests, to check conditions also in Release configuration. 2018-10-03 16:15:27 +02:00
Adam Sawicki
51fa96660e Wrote basic test for sparse binding. 2018-10-03 13:44:29 +02:00
Adam Sawicki
94e8206598 Added new validation layer message to ignores, and documented it.
"Mapping an image with layout VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL can result in undefined behavior if this memory is used by the device. Only GENERAL or PREINITIALIZED should be used."

Issue #34 thanks @victorbush !
2018-08-20 11:14:07 +02:00
Adam Sawicki
82c3f33547 Added custom, simple structures: vec3, vec4, mat4. Removed dependency on external library MathFu. 2018-06-11 15:27:33 +02:00
Adam Sawicki
a68c01c85e Added optional usage of VmaAllocatorCreateInfo::pAllocationCallbacks (disabled by default). 2018-03-13 16:40:45 +01:00
Adam Sawicki
6cc5e859ea Added usage of VK_KHR_dedicated_allocation extension. 2018-03-13 16:37:54 +01:00