diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d5498d..cd209f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/bin/VmaSample_Release_vs2019.exe b/bin/VmaSample_Release_vs2019.exe index c9a36e0..f986fc8 100644 Binary files a/bin/VmaSample_Release_vs2019.exe and b/bin/VmaSample_Release_vs2019.exe differ diff --git a/docs/html/index.html b/docs/html/index.html index 4f8502e..67bdb90 100644 --- a/docs/html/index.html +++ b/docs/html/index.html @@ -65,7 +65,7 @@ $(function() {
Vulkan Memory Allocator
-

Version 3.0.1-development (2022-03-28)

+

Version 3.0.1 (2022-05-26)

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

API documentation divided into groups: Modules

diff --git a/docs/html/struct_vma_vulkan_functions.html b/docs/html/struct_vma_vulkan_functions.html index dd38a3b..2f08bd9 100644 --- a/docs/html/struct_vma_vulkan_functions.html +++ b/docs/html/struct_vma_vulkan_functions.html @@ -118,7 +118,7 @@ Public Attributes  Fetch "vkGetBufferMemoryRequirements2" on Vulkan >= 1.1, fetch "vkGetBufferMemoryRequirements2KHR" when using VK_KHR_dedicated_allocation extension. More...
  PFN_vkGetImageMemoryRequirements2KHR vkGetImageMemoryRequirements2KHR - Fetch "vkGetImageMemoryRequirements 2" on Vulkan >= 1.1, fetch "vkGetImageMemoryRequirements2KHR" when using VK_KHR_dedicated_allocation extension. More...
+ Fetch "vkGetImageMemoryRequirements2" on Vulkan >= 1.1, fetch "vkGetImageMemoryRequirements2KHR" when using VK_KHR_dedicated_allocation extension. More...
  PFN_vkBindBufferMemory2KHR vkBindBufferMemory2KHR  Fetch "vkBindBufferMemory2" on Vulkan >= 1.1, fetch "vkBindBufferMemory2KHR" when using VK_KHR_bind_memory2 extension. More...
@@ -415,7 +415,7 @@ Public Attributes
-

Fetch "vkGetImageMemoryRequirements 2" on Vulkan >= 1.1, fetch "vkGetImageMemoryRequirements2KHR" when using VK_KHR_dedicated_allocation extension.

+

Fetch "vkGetImageMemoryRequirements2" on Vulkan >= 1.1, fetch "vkGetImageMemoryRequirements2KHR" when using VK_KHR_dedicated_allocation extension.

diff --git a/include/vk_mem_alloc.h b/include/vk_mem_alloc.h index 81b03b6..60f5720 100644 --- a/include/vk_mem_alloc.h +++ b/include/vk_mem_alloc.h @@ -25,7 +25,7 @@ /** \mainpage Vulkan Memory Allocator -Version 3.0.1-development (2022-03-28) +Version 3.0.1 (2022-05-26) Copyright (c) 2017-2022 Advanced Micro Devices, Inc. All rights reserved. \n License: MIT diff --git a/src/Tests.cpp b/src/Tests.cpp index dfa08d6..bb41774 100644 --- a/src/Tests.cpp +++ b/src/Tests.cpp @@ -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 }; @@ -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; } @@ -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; } @@ -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); } } @@ -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. diff --git a/src/VmaUsage.h b/src/VmaUsage.h index 47cc87d..b3b0eef 100644 --- a/src/VmaUsage.h +++ b/src/VmaUsage.h @@ -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 diff --git a/src/VulkanSample.cpp b/src/VulkanSample.cpp index d7b0db9..a399035 100644 --- a/src/VulkanSample.cpp +++ b/src/VulkanSample.cpp @@ -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; diff --git a/tools/GpuMemDumpVis/GpuMemDumpVis.py b/tools/GpuMemDumpVis/GpuMemDumpVis.py index 42800ea..c4ab206 100644 --- a/tools/GpuMemDumpVis/GpuMemDumpVis.py +++ b/tools/GpuMemDumpVis/GpuMemDumpVis.py @@ -25,7 +25,7 @@ import json 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