[vulkan-memory-allocator] Update port to current ToT (#32513)

* [vulkan-memory-allocator] Update VMA port to current ToT

Contains fixes for gcc13 and adds streamlined CMake support.

See this PR for the recent CMake fixes:
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/pull/350

* Update version database

* Fix typo in usage, dedupe cmake.org link, move up 3.21+, remove extra newline.

---------

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
This commit is contained in:
Juan Ramos 2023-07-14 23:01:41 -06:00 committed by GitHub
parent 36577b338f
commit fba81a6a54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 44 additions and 35 deletions

View File

@ -1,15 +0,0 @@
diff --git a/include/vk_mem_alloc.h b/include/vk_mem_alloc.h
index 60f5720..31164bc 100644
--- a/include/vk_mem_alloc.h
+++ b/include/vk_mem_alloc.h
@@ -2578,6 +2578,10 @@ VMA_CALL_PRE void VMA_CALL_POST vmaFreeStatsString(
#include <bit> // For std::popcount
#endif
+#if VMA_STATS_STRING_ENABLED
+ #include <cstdio> // For snprintf
+#endif
+
/*******************************************************************************
CONFIGURATION SECTION

View File

@ -1,15 +1,13 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
REF a6bfc237255a6bac1513f7c1ebde6d8aed6b5191 #v3.0.1
SHA512 14361ff201fd660c22b60de54c648ff20a2e2a7f65105f66853a9a4dbffbeca2ae42098dcb1528bb4e524639b92fa4ff27ebd3940c42ccfaf7c99c08bdd0d8ce
REF 2a28bc4b39b9b80dad909036442f629f570d7ae1
SHA512 cd83efc357171a5fd1ac65a566d1bf828f7de2b4c97adec92aaaf9cdfedf5a5525de3bd6eb84c453d1cd952c10c3542e6502ad4307a55b61690ce92b80dc4e2f
HEAD_REF master
PATCHES
gcc13.patch # https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/commit/29d492b60c84ca784ea0943efc7d2e6e0f3bdaac
)
file(COPY "${SOURCE_PATH}/include/vk_mem_alloc.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/unofficial-vulkan-memory-allocator-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/unofficial-vulkan-memory-allocator")
configure_file("${SOURCE_PATH}/LICENSE.txt" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)
set(VCPKG_BUILD_TYPE release) # header-only port
vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}")
vcpkg_cmake_install()
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")

View File

@ -1,8 +0,0 @@
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
add_library(unofficial::vulkan-memory-allocator::vulkan-memory-allocator INTERFACE IMPORTED)
set_target_properties(unofficial::vulkan-memory-allocator::vulkan-memory-allocator PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include")
set(_IMPORT_PREFIX)

View File

@ -0,0 +1,19 @@
VulkanMemoryAllocator provides official find_package support. However, it requires the user to provide the include directory containing `vulkan/vulkan.h`. There are multiple ways to achieve this and VulkanMemoryAllocator is compatible with all of them.
find_package(Vulkan) # https://cmake.org/cmake/help/latest/module/FindVulkan.html, CMake 3.21+
find_package(VulkanMemoryAllocator CONFIG REQUIRED)
target_link_libraries(main PRIVATE Vulkan::Vulkan GPUOpen::VulkanMemoryAllocator)
or
find_package(Vulkan) # CMake 3.21+
find_package(VulkanMemoryAllocator CONFIG REQUIRED)
target_link_libraries(main PRIVATE Vulkan::Headers GPUOpen::VulkanMemoryAllocator)
or
find_package(VulkanHeaders CONFIG) # From the vulkan-headers port
find_package(VulkanMemoryAllocator CONFIG REQUIRED)
target_link_libraries(main PRIVATE Vulkan::Headers GPUOpen::VulkanMemoryAllocator)
See the documentation for more information on setting up your project: https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/index.html

View File

@ -1,9 +1,19 @@
{
"name": "vulkan-memory-allocator",
"version": "3.0.1",
"port-version": 2,
"port-version": 3,
"description": "Easy to integrate Vulkan memory allocation library from GPUOpen",
"homepage": "https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator",
"license": "MIT",
"supports": "!uwp & !xbox"
"supports": "!uwp & !xbox",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

View File

@ -8570,7 +8570,7 @@
},
"vulkan-memory-allocator": {
"baseline": "3.0.1",
"port-version": 2
"port-version": 3
},
"vulkan-memory-allocator-hpp": {
"baseline": "3.0.1.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d57ebd5ba820e5d8a5f55d797199abe4734d5af8",
"version": "3.0.1",
"port-version": 3
},
{
"git-tree": "0295d831ef2217a424c4739767ecde90e5bc7554",
"version": "3.0.1",