Skip to content

Commit a6bfc23

Browse files
Releasing version 3.0.1
Some fixes in tests for Nvidia cards.
1 parent b77238c commit a6bfc23

File tree

9 files changed

+35
-26
lines changed

9 files changed

+35
-26
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# 3.0.1 (2022-05-26)
2+
3+
- Fixes in defragmentation algorithm.
4+
- Fixes in GpuMemDumpVis.py regarding image height calculation.
5+
- Other bug fixes, optimizations, and improvements in the code and documentation.
6+
17
# 3.0.0 (2022-03-25)
28

39
It has been a long time since the previous official release, so hopefully everyone has been using the latest code from "master" branch, which is always maintained in a good state, not the old version. For completeness, here is the list of changes since v2.3.0. The major version number has changed, so there are some compatibility-breaking changes, but the basic API stays the same and is mostly backward-compatible.

bin/VmaSample_Release_vs2019.exe

512 Bytes
Binary file not shown.

docs/html/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<div class="headertitle"><div class="title">Vulkan Memory Allocator </div></div>
6666
</div><!--header-->
6767
<div class="contents">
68-
<div class="textblock"><p ><b>Version 3.0.1-development (2022-03-28)</b></p>
68+
<div class="textblock"><p ><b>Version 3.0.1 (2022-05-26)</b></p>
6969
<p >Copyright (c) 2017-2022 Advanced Micro Devices, Inc. All rights reserved. <br />
7070
License: MIT</p>
7171
<p ><b>API documentation divided into groups:</b> <a href="modules.html">Modules</a></p>

docs/html/struct_vma_vulkan_functions.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
<tr class="memdesc:a9d8d1b05d2b1e7e1d9b27f6f585acf9c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fetch "vkGetBufferMemoryRequirements2" on Vulkan &gt;= 1.1, fetch "vkGetBufferMemoryRequirements2KHR" when using VK_KHR_dedicated_allocation extension. <a href="struct_vma_vulkan_functions.html#a9d8d1b05d2b1e7e1d9b27f6f585acf9c">More...</a><br /></td></tr>
119119
<tr class="separator:a9d8d1b05d2b1e7e1d9b27f6f585acf9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
120120
<tr class="memitem:a9cdcdc1e2b2ea7c571f7d27e30ba6875"><td class="memItemLeft" align="right" valign="top">PFN_vkGetImageMemoryRequirements2KHR&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_vulkan_functions.html#a9cdcdc1e2b2ea7c571f7d27e30ba6875">vkGetImageMemoryRequirements2KHR</a></td></tr>
121-
<tr class="memdesc:a9cdcdc1e2b2ea7c571f7d27e30ba6875"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fetch "vkGetImageMemoryRequirements 2" on Vulkan &gt;= 1.1, fetch "vkGetImageMemoryRequirements2KHR" when using VK_KHR_dedicated_allocation extension. <a href="struct_vma_vulkan_functions.html#a9cdcdc1e2b2ea7c571f7d27e30ba6875">More...</a><br /></td></tr>
121+
<tr class="memdesc:a9cdcdc1e2b2ea7c571f7d27e30ba6875"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fetch "vkGetImageMemoryRequirements2" on Vulkan &gt;= 1.1, fetch "vkGetImageMemoryRequirements2KHR" when using VK_KHR_dedicated_allocation extension. <a href="struct_vma_vulkan_functions.html#a9cdcdc1e2b2ea7c571f7d27e30ba6875">More...</a><br /></td></tr>
122122
<tr class="separator:a9cdcdc1e2b2ea7c571f7d27e30ba6875"><td class="memSeparator" colspan="2">&#160;</td></tr>
123123
<tr class="memitem:a0c4907235aab9df2767b79836afa2dc9"><td class="memItemLeft" align="right" valign="top">PFN_vkBindBufferMemory2KHR&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_vulkan_functions.html#a0c4907235aab9df2767b79836afa2dc9">vkBindBufferMemory2KHR</a></td></tr>
124124
<tr class="memdesc:a0c4907235aab9df2767b79836afa2dc9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fetch "vkBindBufferMemory2" on Vulkan &gt;= 1.1, fetch "vkBindBufferMemory2KHR" when using VK_KHR_bind_memory2 extension. <a href="struct_vma_vulkan_functions.html#a0c4907235aab9df2767b79836afa2dc9">More...</a><br /></td></tr>
@@ -415,7 +415,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#a9cdcdc1e2b2ea7c571f7d27e
415415
</table>
416416
</div><div class="memdoc">
417417

418-
<p>Fetch "vkGetImageMemoryRequirements 2" on Vulkan &gt;= 1.1, fetch "vkGetImageMemoryRequirements2KHR" when using VK_KHR_dedicated_allocation extension. </p>
418+
<p>Fetch "vkGetImageMemoryRequirements2" on Vulkan &gt;= 1.1, fetch "vkGetImageMemoryRequirements2KHR" when using VK_KHR_dedicated_allocation extension. </p>
419419

420420
</div>
421421
</div>

include/vk_mem_alloc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
/** \mainpage Vulkan Memory Allocator
2727

28-
<b>Version 3.0.1-development (2022-03-28)</b>
28+
<b>Version 3.0.1 (2022-05-26)</b>
2929

3030
Copyright (c) 2017-2022 Advanced Micro Devices, Inc. All rights reserved. \n
3131
License: MIT

src/Tests.cpp

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ enum CONFIG_TYPE
5858
};
5959

6060
static constexpr CONFIG_TYPE ConfigType = CONFIG_TYPE_AVERAGE;
61-
//static constexpr CONFIG_TYPE ConfigType = CONFIG_TYPE_LARGE;
6261

6362
enum class FREE_ORDER { FORWARD, BACKWARD, RANDOM, COUNT };
6463

@@ -1755,13 +1754,13 @@ static void TestJson()
17551754
localCreateInfo.usage = VMA_MEMORY_USAGE_CPU_ONLY;
17561755
break;
17571756
}
1758-
TEST(vmaAllocateMemory(g_hAllocator, &memReq, &localCreateInfo, &alloc, nullptr) == VK_SUCCESS);
1757+
TEST(vmaAllocateMemory(g_hAllocator, &memReq, &localCreateInfo, &alloc, nullptr) == VK_SUCCESS || alloc == VK_NULL_HANDLE);
17591758
break;
17601759
}
17611760
case 1:
17621761
{
17631762
VkBuffer buffer;
1764-
TEST(vmaCreateBuffer(g_hAllocator, &buffCreateInfo, &allocCreateInfo, &buffer, &alloc, nullptr) == VK_SUCCESS);
1763+
TEST(vmaCreateBuffer(g_hAllocator, &buffCreateInfo, &allocCreateInfo, &buffer, &alloc, nullptr) == VK_SUCCESS || alloc == VK_NULL_HANDLE);
17651764
vkDestroyBuffer(g_hDevice, buffer, g_Allocs);
17661765
break;
17671766
}
@@ -1771,7 +1770,7 @@ static void TestJson()
17711770
imgCreateInfo.extent.width = 512;
17721771
imgCreateInfo.extent.height = 1;
17731772
VkImage image;
1774-
TEST(vmaCreateImage(g_hAllocator, &imgCreateInfo, &allocCreateInfo, &image, &alloc, nullptr) == VK_SUCCESS);
1773+
TEST(vmaCreateImage(g_hAllocator, &imgCreateInfo, &allocCreateInfo, &image, &alloc, nullptr) == VK_SUCCESS || alloc == VK_NULL_HANDLE);
17751774
vkDestroyImage(g_hDevice, image, g_Allocs);
17761775
break;
17771776
}
@@ -1781,26 +1780,29 @@ static void TestJson()
17811780
imgCreateInfo.extent.width = 1024;
17821781
imgCreateInfo.extent.height = 512;
17831782
VkImage image;
1784-
TEST(vmaCreateImage(g_hAllocator, &imgCreateInfo, &allocCreateInfo, &image, &alloc, nullptr) == VK_SUCCESS);
1783+
TEST(vmaCreateImage(g_hAllocator, &imgCreateInfo, &allocCreateInfo, &image, &alloc, nullptr) == VK_SUCCESS || alloc == VK_NULL_HANDLE);
17851784
vkDestroyImage(g_hDevice, image, g_Allocs);
17861785
break;
17871786
}
17881787
}
17891788

1790-
switch (data)
1789+
if(alloc)
17911790
{
1792-
case 1:
1793-
vmaSetAllocationUserData(g_hAllocator, alloc, (void*)16112007);
1794-
break;
1795-
case 2:
1796-
vmaSetAllocationName(g_hAllocator, alloc, "SHEPURD");
1797-
break;
1798-
case 3:
1799-
vmaSetAllocationUserData(g_hAllocator, alloc, (void*)26012010);
1800-
vmaSetAllocationName(g_hAllocator, alloc, "JOKER");
1801-
break;
1791+
switch (data)
1792+
{
1793+
case 1:
1794+
vmaSetAllocationUserData(g_hAllocator, alloc, (void*)16112007);
1795+
break;
1796+
case 2:
1797+
vmaSetAllocationName(g_hAllocator, alloc, "SHEPURD");
1798+
break;
1799+
case 3:
1800+
vmaSetAllocationUserData(g_hAllocator, alloc, (void*)26012010);
1801+
vmaSetAllocationName(g_hAllocator, alloc, "JOKER");
1802+
break;
1803+
}
1804+
allocs.emplace_back(alloc);
18021805
}
1803-
allocs.emplace_back(alloc);
18041806
}
18051807
}
18061808

@@ -4120,7 +4122,8 @@ static void TestLinearAllocator()
41204122
TEST(i == 0 || allocInfo.offset > prevOffset);
41214123
bufInfo.push_back(newBufInfo);
41224124
prevOffset = allocInfo.offset;
4123-
bufSumSize += bufCreateInfo.size;
4125+
TEST(allocInfo.size >= bufCreateInfo.size);
4126+
bufSumSize += allocInfo.size;
41244127
}
41254128

41264129
// Validate pool stats.

src/VmaUsage.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ include all public interface declarations. Example:
6060
//#define VMA_MAPPING_HYSTERESIS_ENABLED 0
6161

6262
//#define VMA_VULKAN_VERSION 1003000 // Vulkan 1.3
63-
#define VMA_VULKAN_VERSION 1002000 // Vulkan 1.2
63+
//#define VMA_VULKAN_VERSION 1002000 // Vulkan 1.2
6464
//#define VMA_VULKAN_VERSION 1001000 // Vulkan 1.1
6565
//#define VMA_VULKAN_VERSION 1000000 // Vulkan 1.0
6666

src/VulkanSample.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ static const char* const SHADER_PATH1 = "./";
3535
static const char* const SHADER_PATH2 = "../bin/";
3636
static const wchar_t* const WINDOW_CLASS_NAME = L"VULKAN_MEMORY_ALLOCATOR_SAMPLE";
3737
static const char* const VALIDATION_LAYER_NAME = "VK_LAYER_KHRONOS_validation";
38-
static const char* const APP_TITLE_A = "Vulkan Memory Allocator Sample 3.0.0";
39-
static const wchar_t* const APP_TITLE_W = L"Vulkan Memory Allocator Sample 3.0.0";
38+
static const char* const APP_TITLE_A = "Vulkan Memory Allocator Sample 3.0.1";
39+
static const wchar_t* const APP_TITLE_W = L"Vulkan Memory Allocator Sample 3.0.1";
4040

4141
static const bool VSYNC = true;
4242
static const uint32_t COMMAND_BUFFER_COUNT = 2;

tools/GpuMemDumpVis/GpuMemDumpVis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from PIL import Image, ImageDraw, ImageFont
2626

2727

28-
PROGRAM_VERSION = 'Vulkan/D3D12 Memory Allocator Dump Visualization 3.0.0'
28+
PROGRAM_VERSION = 'Vulkan/D3D12 Memory Allocator Dump Visualization 3.0.1'
2929
IMG_WIDTH = 1200
3030
IMG_MARGIN = 8
3131
TEXT_MARGIN = 4

0 commit comments

Comments
 (0)