Skip to content

Commit c5ac52b

Browse files
Merge branch 'master' into Linux-CI-build
2 parents 86bacfd + be826d1 commit c5ac52b

File tree

113 files changed

+20165
-19624
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+20165
-19624
lines changed

.github/workflows/build.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Build Code
2+
3+
on:
4+
push:
5+
pull_request:
6+
types: [opened]
7+
8+
env:
9+
VMA_VULKAN_VERSION: "1.3.283.0"
10+
VMA_VULKAN_SDK_PATH: "$GITHUB_WORKSPACE/../vulkan_sdk/"
11+
12+
jobs:
13+
windows:
14+
name: ${{ matrix.config.name }}
15+
runs-on: windows-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
config:
20+
- {
21+
name: "Windows MSVC (Debug)",
22+
compiler: "msvc",
23+
cc: "cl", cxx: "cl",
24+
cmake_configure_options: '-G "Visual Studio 17 2022" -A x64',
25+
build_type: "Debug",
26+
}
27+
- {
28+
name: "Windows MSVC (Release)",
29+
compiler: "msvc",
30+
cc: "cl", cxx: "cl",
31+
cmake_configure_options: '-G "Visual Studio 17 2022" -A x64',
32+
build_type: "Release",
33+
}
34+
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v4
38+
39+
- name: Install Vulkan SDK
40+
shell: pwsh
41+
run: |
42+
curl -LS -o vulkansdk.exe https://sdk.lunarg.com/sdk/download/${{ env.VMA_VULKAN_VERSION }}/windows/VulkanSDK-${{ env.VMA_VULKAN_VERSION }}-Installer.exe
43+
7z x vulkansdk.exe -o"${{ env.VMA_VULKAN_SDK_PATH }}"
44+
45+
- name: Configure CMake
46+
shell: pwsh
47+
run: |
48+
$env:CC="${{ matrix.config.cc }}"
49+
$env:CXX="${{ matrix.config.cxx }}"
50+
$env:Path += ";${{ env.VMA_VULKAN_SDK_PATH }}\;${{ env.VMA_VULKAN_SDK_PATH }}\Bin\"
51+
$env:VULKAN_SDK="${{ env.VMA_VULKAN_SDK_PATH }}"
52+
cmake . `
53+
-Bbuild `
54+
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} `
55+
-DVMA_BUILD_SAMPLES=ON `
56+
${{ matrix.config.cmake_configure_options }}
57+
58+
- name: Build
59+
shell: pwsh
60+
run: |
61+
cmake --build build --config ${{ matrix.config.build_type }}

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
# 3.2.1 (2025-02-05)
2+
3+
Changes:
4+
5+
- Fixed an assert in `vmaCreateAllocator` function incorrectly failing when Vulkan version 1.4 is used (#457).
6+
- Fix for importing function `vkGetPhysicalDeviceMemoryProperties2` / `vkGetPhysicalDeviceMemoryProperties2KHR` when `VMA_DYNAMIC_VULKAN_FUNCTIONS` macro is enabled (#410).
7+
- Other minor fixes and improvements...
8+
9+
# 3.2.0 (2024-12-30)
10+
11+
Additions to the library API:
12+
13+
- Added support for Vulkan 1.4.
14+
- Added support for VK_KHR_external_memory_win32 extension - `VMA_ALLOCATOR_CREATE_KHR_EXTERNAL_MEMORY_WIN32_BIT` flag, `vmaGetMemoryWin32Handle` function, and a whole new documentation chapter about it (#442).
15+
16+
Other changes:
17+
18+
- Fixed thread safety issue (#451).
19+
- Many other bug fixes and improvements in the library code, documentation, sample app, Cmake script, mostly to improve compatibility with various compilers and GPUs.
20+
121
# 3.1.0 (2024-05-27)
222

323
This release gathers fixes and improvements made during many months of continuous development on the main branch, mostly based on issues and pull requests on GitHub.

CMakeLists.txt

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,28 @@
1+
#
2+
# Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All rights reserved.
3+
#
4+
# Permission is hereby granted, free of charge, to any person obtaining a copy
5+
# of this software and associated documentation files (the "Software"), to deal
6+
# in the Software without restriction, including without limitation the rights
7+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
# copies of the Software, and to permit persons to whom the Software is
9+
# furnished to do so, subject to the following conditions:
10+
#
11+
# The above copyright notice and this permission notice shall be included in
12+
# all copies or substantial portions of the Software.
13+
#
14+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20+
# THE SOFTWARE.
21+
#
22+
123
cmake_minimum_required(VERSION 3.15...3.26)
224

3-
project(VMA VERSION 3.1.0 LANGUAGES CXX)
25+
project(VMA VERSION 3.2.1 LANGUAGES CXX)
426

527
add_library(VulkanMemoryAllocator INTERFACE)
628
add_library(GPUOpen::VulkanMemoryAllocator ALIAS VulkanMemoryAllocator)

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All rights reserved.
1+
Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All rights reserved.
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Additional features:
4848
- Support for sparse binding and sparse residency: Convenience functions that allocate or free multiple memory pages at once.
4949
- Custom memory pools: Create a pool with desired parameters (e.g. fixed or limited maximum size) and allocate memory out of it.
5050
- Linear allocator: Create a pool with linear algorithm and use it for much faster allocations and deallocations in free-at-once, stack, double stack, or ring buffer fashion.
51-
- Support for Vulkan 1.0, 1.1, 1.2, 1.3.
51+
- Support for Vulkan 1.0...1.4.
5252
- Support for extensions (and equivalent functionality included in new Vulkan versions):
5353
- VK_KHR_dedicated_allocation: Just enable it and it will be used automatically by the library.
5454
- VK_KHR_bind_memory2.
@@ -156,6 +156,7 @@ See **[Documentation](https://gpuopen-librariesandsdks.github.io/VulkanMemoryAll
156156
# Software using this library
157157

158158
- **[Blender](https://www.blender.org)**
159+
- **[Qt Project](https://github.com/qt)**
159160
- **[Baldur's Gate III](https://www.mobygames.com/game/150689/baldurs-gate-iii/credits/windows/?autoplatform=true)**
160161
- **[Cyberpunk 2077](https://www.mobygames.com/game/128136/cyberpunk-2077/credits/windows/?autoplatform=true)**
161162
- **[X-Plane](https://x-plane.com/)**

bin/Shader.frag.spv

0 Bytes
Binary file not shown.

bin/Shader.vert.spv

0 Bytes
Binary file not shown.

bin/VmaSample_Release_vs2022.exe

307 KB
Binary file not shown.

docs/html/allocation_annotation.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
55
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
6-
<meta name="generator" content="Doxygen 1.11.0"/>
6+
<meta name="generator" content="Doxygen 1.13.0"/>
77
<meta name="viewport" content="width=device-width, initial-scale=1"/>
88
<title>Vulkan Memory Allocator: Allocation names and user data</title>
99
<link href="tabs.css" rel="stylesheet" type="text/css"/>
@@ -33,7 +33,7 @@
3333
</table>
3434
</div>
3535
<!-- end header part -->
36-
<!-- Generated by Doxygen 1.11.0 -->
36+
<!-- Generated by Doxygen 1.13.0 -->
3737
<script type="text/javascript">
3838
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
3939
var searchBox = new SearchBox("searchBox", "search/",'.html');
@@ -106,18 +106,18 @@
106106
<div class="line"><a class="code hl_struct" href="struct_vma_allocation.html">VmaAllocation</a> allocation;</div>
107107
<div class="line"><a class="code hl_function" href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufCreateInfo, &amp;allocCreateInfo, &amp;buffer, &amp;allocation, <span class="keyword">nullptr</span>);</div>
108108
<div class="ttc" id="agroup__group__alloc_html_gac72ee55598617e8eecca384e746bab51"><div class="ttname"><a href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a></div><div class="ttdeci">VkResult vmaCreateBuffer(VmaAllocator allocator, const VkBufferCreateInfo *pBufferCreateInfo, const VmaAllocationCreateInfo *pAllocationCreateInfo, VkBuffer *pBuffer, VmaAllocation *pAllocation, VmaAllocationInfo *pAllocationInfo)</div><div class="ttdoc">Creates a new VkBuffer, allocates and binds memory for it.</div></div>
109-
<div class="ttc" id="agroup__group__alloc_html_ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e"><div class="ttname"><a href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e">VMA_MEMORY_USAGE_AUTO</a></div><div class="ttdeci">@ VMA_MEMORY_USAGE_AUTO</div><div class="ttdef"><b>Definition</b> vk_mem_alloc.h:548</div></div>
110-
<div class="ttc" id="astruct_vma_allocation_create_info_html"><div class="ttname"><a href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a></div><div class="ttdoc">Parameters of new VmaAllocation.</div><div class="ttdef"><b>Definition</b> vk_mem_alloc.h:1289</div></div>
111-
<div class="ttc" id="astruct_vma_allocation_create_info_html_a8259e85c272683434f4abb4ddddffe19"><div class="ttname"><a href="struct_vma_allocation_create_info.html#a8259e85c272683434f4abb4ddddffe19">VmaAllocationCreateInfo::pUserData</a></div><div class="ttdeci">void * pUserData</div><div class="ttdoc">Custom general-purpose pointer that will be stored in VmaAllocation, can be read as VmaAllocationInfo...</div><div class="ttdef"><b>Definition</b> vk_mem_alloc.h:1328</div></div>
112-
<div class="ttc" id="astruct_vma_allocation_create_info_html_accb8b06b1f677d858cb9af20705fa910"><div class="ttname"><a href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">VmaAllocationCreateInfo::usage</a></div><div class="ttdeci">VmaMemoryUsage usage</div><div class="ttdoc">Intended usage of memory.</div><div class="ttdef"><b>Definition</b> vk_mem_alloc.h:1297</div></div>
109+
<div class="ttc" id="agroup__group__alloc_html_ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e"><div class="ttname"><a href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e">VMA_MEMORY_USAGE_AUTO</a></div><div class="ttdeci">@ VMA_MEMORY_USAGE_AUTO</div><div class="ttdef"><b>Definition</b> vk_mem_alloc.h:550</div></div>
110+
<div class="ttc" id="astruct_vma_allocation_create_info_html"><div class="ttname"><a href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a></div><div class="ttdoc">Parameters of new VmaAllocation.</div><div class="ttdef"><b>Definition</b> vk_mem_alloc.h:1291</div></div>
111+
<div class="ttc" id="astruct_vma_allocation_create_info_html_a8259e85c272683434f4abb4ddddffe19"><div class="ttname"><a href="struct_vma_allocation_create_info.html#a8259e85c272683434f4abb4ddddffe19">VmaAllocationCreateInfo::pUserData</a></div><div class="ttdeci">void * pUserData</div><div class="ttdoc">Custom general-purpose pointer that will be stored in VmaAllocation, can be read as VmaAllocationInfo...</div><div class="ttdef"><b>Definition</b> vk_mem_alloc.h:1330</div></div>
112+
<div class="ttc" id="astruct_vma_allocation_create_info_html_accb8b06b1f677d858cb9af20705fa910"><div class="ttname"><a href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">VmaAllocationCreateInfo::usage</a></div><div class="ttdeci">VmaMemoryUsage usage</div><div class="ttdoc">Intended usage of memory.</div><div class="ttdef"><b>Definition</b> vk_mem_alloc.h:1299</div></div>
113113
<div class="ttc" id="astruct_vma_allocation_html"><div class="ttname"><a href="struct_vma_allocation.html">VmaAllocation</a></div><div class="ttdoc">Represents single memory allocation.</div></div>
114114
</div><!-- fragment --><p>The pointer may be later retrieved as <a class="el" href="struct_vma_allocation_info.html#adc507656149c04de7ed95d0042ba2a13" title="Custom general-purpose pointer that was passed as VmaAllocationCreateInfo::pUserData or set using vma...">VmaAllocationInfo::pUserData</a>:</p>
115115
<div class="fragment"><div class="line"><a class="code hl_struct" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> allocInfo;</div>
116116
<div class="line"><a class="code hl_function" href="group__group__alloc.html#ga86dd08aba8633bfa4ad0df2e76481d8b">vmaGetAllocationInfo</a>(allocator, allocation, &amp;allocInfo);</div>
117117
<div class="line">MyBufferMetadata* pMetadata = (MyBufferMetadata*)allocInfo.<a class="code hl_variable" href="struct_vma_allocation_info.html#adc507656149c04de7ed95d0042ba2a13">pUserData</a>;</div>
118118
<div class="ttc" id="agroup__group__alloc_html_ga86dd08aba8633bfa4ad0df2e76481d8b"><div class="ttname"><a href="group__group__alloc.html#ga86dd08aba8633bfa4ad0df2e76481d8b">vmaGetAllocationInfo</a></div><div class="ttdeci">void vmaGetAllocationInfo(VmaAllocator allocator, VmaAllocation allocation, VmaAllocationInfo *pAllocationInfo)</div><div class="ttdoc">Returns current information about specified allocation.</div></div>
119-
<div class="ttc" id="astruct_vma_allocation_info_html"><div class="ttname"><a href="struct_vma_allocation_info.html">VmaAllocationInfo</a></div><div class="ttdef"><b>Definition</b> vk_mem_alloc.h:1408</div></div>
120-
<div class="ttc" id="astruct_vma_allocation_info_html_adc507656149c04de7ed95d0042ba2a13"><div class="ttname"><a href="struct_vma_allocation_info.html#adc507656149c04de7ed95d0042ba2a13">VmaAllocationInfo::pUserData</a></div><div class="ttdeci">void * pUserData</div><div class="ttdoc">Custom general-purpose pointer that was passed as VmaAllocationCreateInfo::pUserData or set using vma...</div><div class="ttdef"><b>Definition</b> vk_mem_alloc.h:1455</div></div>
119+
<div class="ttc" id="astruct_vma_allocation_info_html"><div class="ttname"><a href="struct_vma_allocation_info.html">VmaAllocationInfo</a></div><div class="ttdef"><b>Definition</b> vk_mem_alloc.h:1410</div></div>
120+
<div class="ttc" id="astruct_vma_allocation_info_html_adc507656149c04de7ed95d0042ba2a13"><div class="ttname"><a href="struct_vma_allocation_info.html#adc507656149c04de7ed95d0042ba2a13">VmaAllocationInfo::pUserData</a></div><div class="ttdeci">void * pUserData</div><div class="ttdoc">Custom general-purpose pointer that was passed as VmaAllocationCreateInfo::pUserData or set using vma...</div><div class="ttdef"><b>Definition</b> vk_mem_alloc.h:1457</div></div>
121121
</div><!-- fragment --><p>It can also be changed using function <a class="el" href="group__group__alloc.html#gaf9147d31ffc11d62fc187bde283ed14f" title="Sets pUserData in given allocation to new value.">vmaSetAllocationUserData()</a>.</p>
122122
<p>Values of (non-zero) allocations' <code>pUserData</code> are printed in JSON report created by <a class="el" href="group__group__stats.html#gaa4fee7eb5253377599ef4fd38c93c2a0" title="Builds and returns statistics as a null-terminated string in JSON format.">vmaBuildStatsString()</a> in hexadecimal form.</p>
123123
<h1><a class="anchor" id="allocation_names"></a>
@@ -133,7 +133,7 @@ <h1><a class="anchor" id="allocation_names"></a>
133133
</div><!-- PageDoc -->
134134
<!-- start footer part -->
135135
<hr class="footer"/><address class="footer"><small>
136-
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0
136+
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.0
137137
</small></address>
138138
</div><!-- doc-content -->
139139
</body>

docs/html/annotated.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
55
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
6-
<meta name="generator" content="Doxygen 1.11.0"/>
6+
<meta name="generator" content="Doxygen 1.13.0"/>
77
<meta name="viewport" content="width=device-width, initial-scale=1"/>
88
<title>Vulkan Memory Allocator: Class List</title>
99
<link href="tabs.css" rel="stylesheet" type="text/css"/>
@@ -33,7 +33,7 @@
3333
</table>
3434
</div>
3535
<!-- end header part -->
36-
<!-- Generated by Doxygen 1.11.0 -->
36+
<!-- Generated by Doxygen 1.13.0 -->
3737
<script type="text/javascript">
3838
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
3939
var searchBox = new SearchBox("searchBox", "search/",'.html');
@@ -119,7 +119,7 @@
119119
</div><!-- contents -->
120120
<!-- start footer part -->
121121
<hr class="footer"/><address class="footer"><small>
122-
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0
122+
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.0
123123
</small></address>
124124
</div><!-- doc-content -->
125125
</body>

0 commit comments

Comments
 (0)