Skip to content

Commit

Permalink
Releasing version 3.0.1
Browse files Browse the repository at this point in the history
Some fixes in tests for Nvidia cards.
  • Loading branch information
adam-sawicki-a committed May 26, 2022
1 parent b77238c commit a6bfc23
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 26 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 3.0.1 (2022-05-26)

- Fixes in defragmentation algorithm.
- Fixes in GpuMemDumpVis.py regarding image height calculation.
- Other bug fixes, optimizations, and improvements in the code and documentation.

# 3.0.0 (2022-03-25)

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.
Expand Down
Binary file modified bin/VmaSample_Release_vs2019.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<div class="headertitle"><div class="title">Vulkan Memory Allocator </div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p ><b>Version 3.0.1-development (2022-03-28)</b></p>
<div class="textblock"><p ><b>Version 3.0.1 (2022-05-26)</b></p>
<p >Copyright (c) 2017-2022 Advanced Micro Devices, Inc. All rights reserved. <br />
License: MIT</p>
<p ><b>API documentation divided into groups:</b> <a href="modules.html">Modules</a></p>
Expand Down
4 changes: 2 additions & 2 deletions docs/html/struct_vma_vulkan_functions.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
<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>
<tr class="separator:a9d8d1b05d2b1e7e1d9b27f6f585acf9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<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>
<tr class="separator:a9cdcdc1e2b2ea7c571f7d27e30ba6875"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
Expand Down Expand Up @@ -415,7 +415,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#a9cdcdc1e2b2ea7c571f7d27e
</table>
</div><div class="memdoc">

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

</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion include/vk_mem_alloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

/** \mainpage Vulkan Memory Allocator

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

Copyright (c) 2017-2022 Advanced Micro Devices, Inc. All rights reserved. \n
License: MIT
Expand Down
39 changes: 21 additions & 18 deletions src/Tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ enum CONFIG_TYPE
};

static constexpr CONFIG_TYPE ConfigType = CONFIG_TYPE_AVERAGE;
//static constexpr CONFIG_TYPE ConfigType = CONFIG_TYPE_LARGE;

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

Expand Down Expand Up @@ -1755,13 +1754,13 @@ static void TestJson()
localCreateInfo.usage = VMA_MEMORY_USAGE_CPU_ONLY;
break;
}
TEST(vmaAllocateMemory(g_hAllocator, &memReq, &localCreateInfo, &alloc, nullptr) == VK_SUCCESS);
TEST(vmaAllocateMemory(g_hAllocator, &memReq, &localCreateInfo, &alloc, nullptr) == VK_SUCCESS || alloc == VK_NULL_HANDLE);
break;
}
case 1:
{
VkBuffer buffer;
TEST(vmaCreateBuffer(g_hAllocator, &buffCreateInfo, &allocCreateInfo, &buffer, &alloc, nullptr) == VK_SUCCESS);
TEST(vmaCreateBuffer(g_hAllocator, &buffCreateInfo, &allocCreateInfo, &buffer, &alloc, nullptr) == VK_SUCCESS || alloc == VK_NULL_HANDLE);
vkDestroyBuffer(g_hDevice, buffer, g_Allocs);
break;
}
Expand All @@ -1771,7 +1770,7 @@ static void TestJson()
imgCreateInfo.extent.width = 512;
imgCreateInfo.extent.height = 1;
VkImage image;
TEST(vmaCreateImage(g_hAllocator, &imgCreateInfo, &allocCreateInfo, &image, &alloc, nullptr) == VK_SUCCESS);
TEST(vmaCreateImage(g_hAllocator, &imgCreateInfo, &allocCreateInfo, &image, &alloc, nullptr) == VK_SUCCESS || alloc == VK_NULL_HANDLE);
vkDestroyImage(g_hDevice, image, g_Allocs);
break;
}
Expand All @@ -1781,26 +1780,29 @@ static void TestJson()
imgCreateInfo.extent.width = 1024;
imgCreateInfo.extent.height = 512;
VkImage image;
TEST(vmaCreateImage(g_hAllocator, &imgCreateInfo, &allocCreateInfo, &image, &alloc, nullptr) == VK_SUCCESS);
TEST(vmaCreateImage(g_hAllocator, &imgCreateInfo, &allocCreateInfo, &image, &alloc, nullptr) == VK_SUCCESS || alloc == VK_NULL_HANDLE);
vkDestroyImage(g_hDevice, image, g_Allocs);
break;
}
}

switch (data)
if(alloc)
{
case 1:
vmaSetAllocationUserData(g_hAllocator, alloc, (void*)16112007);
break;
case 2:
vmaSetAllocationName(g_hAllocator, alloc, "SHEPURD");
break;
case 3:
vmaSetAllocationUserData(g_hAllocator, alloc, (void*)26012010);
vmaSetAllocationName(g_hAllocator, alloc, "JOKER");
break;
switch (data)
{
case 1:
vmaSetAllocationUserData(g_hAllocator, alloc, (void*)16112007);
break;
case 2:
vmaSetAllocationName(g_hAllocator, alloc, "SHEPURD");
break;
case 3:
vmaSetAllocationUserData(g_hAllocator, alloc, (void*)26012010);
vmaSetAllocationName(g_hAllocator, alloc, "JOKER");
break;
}
allocs.emplace_back(alloc);
}
allocs.emplace_back(alloc);
}
}

Expand Down Expand Up @@ -4120,7 +4122,8 @@ static void TestLinearAllocator()
TEST(i == 0 || allocInfo.offset > prevOffset);
bufInfo.push_back(newBufInfo);
prevOffset = allocInfo.offset;
bufSumSize += bufCreateInfo.size;
TEST(allocInfo.size >= bufCreateInfo.size);
bufSumSize += allocInfo.size;
}

// Validate pool stats.
Expand Down
2 changes: 1 addition & 1 deletion src/VmaUsage.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ include all public interface declarations. Example:
//#define VMA_MAPPING_HYSTERESIS_ENABLED 0

//#define VMA_VULKAN_VERSION 1003000 // Vulkan 1.3
#define VMA_VULKAN_VERSION 1002000 // Vulkan 1.2
//#define VMA_VULKAN_VERSION 1002000 // Vulkan 1.2
//#define VMA_VULKAN_VERSION 1001000 // Vulkan 1.1
//#define VMA_VULKAN_VERSION 1000000 // Vulkan 1.0

Expand Down
4 changes: 2 additions & 2 deletions src/VulkanSample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ static const char* const SHADER_PATH1 = "./";
static const char* const SHADER_PATH2 = "../bin/";
static const wchar_t* const WINDOW_CLASS_NAME = L"VULKAN_MEMORY_ALLOCATOR_SAMPLE";
static const char* const VALIDATION_LAYER_NAME = "VK_LAYER_KHRONOS_validation";
static const char* const APP_TITLE_A = "Vulkan Memory Allocator Sample 3.0.0";
static const wchar_t* const APP_TITLE_W = L"Vulkan Memory Allocator Sample 3.0.0";
static const char* const APP_TITLE_A = "Vulkan Memory Allocator Sample 3.0.1";
static const wchar_t* const APP_TITLE_W = L"Vulkan Memory Allocator Sample 3.0.1";

static const bool VSYNC = true;
static const uint32_t COMMAND_BUFFER_COUNT = 2;
Expand Down
2 changes: 1 addition & 1 deletion tools/GpuMemDumpVis/GpuMemDumpVis.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from PIL import Image, ImageDraw, ImageFont


PROGRAM_VERSION = 'Vulkan/D3D12 Memory Allocator Dump Visualization 3.0.0'
PROGRAM_VERSION = 'Vulkan/D3D12 Memory Allocator Dump Visualization 3.0.1'
IMG_WIDTH = 1200
IMG_MARGIN = 8
TEXT_MARGIN = 4
Expand Down

0 comments on commit a6bfc23

Please sign in to comment.