From 16a37458f8645f852c3af3334d7314f61d767e5a Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 27 Jul 2026 16:04:46 +0300 Subject: [PATCH] Update to 3.4.0 --- CMakeLists.txt | 2 +- README.md | 2 +- VulkanMemoryAllocator | 2 +- include/CMakeLists.txt | 2 +- include/vk_mem_alloc_funcs.hpp | 141 +++++++++++++++++++++++++++++++ include/vk_mem_alloc_handles.hpp | 77 +++++++++++++++++ include/vk_mem_alloc_raii.hpp | 100 ++++++++++++++++++++++ include/vk_mem_alloc_structs.hpp | 79 +++++++++++++---- 8 files changed, 386 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 773a666..2b9ef01 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.8...3.30 FATAL_ERROR) -project(VulkanMemoryAllocator-Hpp-Generator VERSION 3.3.0 LANGUAGES CXX) +project(VulkanMemoryAllocator-Hpp-Generator VERSION 3.4.0 LANGUAGES CXX) if (CMAKE_VERSION VERSION_LESS "3.21") # https://cmake.org/cmake/help/latest/variable/PROJECT_IS_TOP_LEVEL.html diff --git a/README.md b/README.md index 1c525b5..8590d3e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# VulkanMemoryAllocator-Hpp 3.3.0 +# VulkanMemoryAllocator-Hpp 3.4.0 VMA-Hpp provides C++ bindings for [VulkanMemoryAllocator](https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator), consistent and compatible with Vulkan C++ bindings ([Vulkan-Hpp](https://github.com/KhronosGroup/Vulkan-Hpp)). diff --git a/VulkanMemoryAllocator b/VulkanMemoryAllocator index 1d8f600..3aa9212 160000 --- a/VulkanMemoryAllocator +++ b/VulkanMemoryAllocator @@ -1 +1 @@ -Subproject commit 1d8f600fd424278486eade7ed3e877c99f0846b1 +Subproject commit 3aa921224c154a0d2c43912bc88e1c42ce1f7607 diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 4355dad..34ccd3a 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.8...3.30 FATAL_ERROR) project( VulkanMemoryAllocator-Hpp - VERSION 3.3.0 + VERSION 3.4.0 DESCRIPTION "C++ bindings for the VulkanMemoryAllocator library." LANGUAGES CXX) set(VMA_HPP_PROJECT_VERSION ${PROJECT_VERSION} CACHE INTERNAL "VulkanMemoryAllocator Version") diff --git a/include/vk_mem_alloc_funcs.hpp b/include/vk_mem_alloc_funcs.hpp index c538810..0472072 100644 --- a/include/vk_mem_alloc_funcs.hpp +++ b/include/vk_mem_alloc_funcs.hpp @@ -326,6 +326,41 @@ namespace VMA_HPP_NAMESPACE { return result; } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + // wrapper function for command vmaAllocateDedicatedMemory, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::allocateDedicatedMemory(const VULKAN_HPP_NAMESPACE::MemoryRequirements& vkMemoryRequirements, + const AllocationCreateInfo& createInfo, + void* memoryAllocateNext, + VULKAN_HPP_NAMESPACE::Optional const & allocationInfo) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS { + Allocation allocation; + VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaAllocateDedicatedMemory(m_allocator, reinterpret_cast(&vkMemoryRequirements), reinterpret_cast(&createInfo), memoryAllocateNext, reinterpret_cast(&allocation), reinterpret_cast(static_cast(allocationInfo))) ); + VULKAN_HPP_NAMESPACE::detail::resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::allocateDedicatedMemory"); + return VULKAN_HPP_NAMESPACE::detail::createResultValueType(result, allocation); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + // wrapper function for command vmaAllocateDedicatedMemory, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::allocateDedicatedMemoryUnique(const VULKAN_HPP_NAMESPACE::MemoryRequirements& vkMemoryRequirements, + const AllocationCreateInfo& createInfo, + void* memoryAllocateNext, + VULKAN_HPP_NAMESPACE::Optional const & allocationInfo) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS { + Allocation allocation; + VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaAllocateDedicatedMemory(m_allocator, reinterpret_cast(&vkMemoryRequirements), reinterpret_cast(&createInfo), memoryAllocateNext, reinterpret_cast(&allocation), reinterpret_cast(static_cast(allocationInfo))) ); + VULKAN_HPP_NAMESPACE::detail::resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::allocateDedicatedMemoryUnique"); + UniqueAllocation allocationUnique { allocation, *this }; + return VULKAN_HPP_NAMESPACE::detail::createResultValueType(result, std::move(allocationUnique)); + } +#endif +#endif + // wrapper function for command vmaAllocateDedicatedMemory, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::allocateDedicatedMemory(const VULKAN_HPP_NAMESPACE::MemoryRequirements* pVkMemoryRequirements, + const AllocationCreateInfo* pCreateInfo, + void* pMemoryAllocateNext, + Allocation* pAllocation, + AllocationInfo* pAllocationInfo) const VULKAN_HPP_NOEXCEPT { + VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaAllocateDedicatedMemory(m_allocator, reinterpret_cast(pVkMemoryRequirements), reinterpret_cast(pCreateInfo), pMemoryAllocateNext, reinterpret_cast(pAllocation), reinterpret_cast(pAllocationInfo)) ); + return result; + } + #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE // wrapper function for command vmaAllocateMemoryPages, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html template @@ -633,6 +668,26 @@ namespace VMA_HPP_NAMESPACE { return result; } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + // wrapper function for command vmaGetMemoryWin32Handle2, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::getMemoryWin32Handle2(Allocation allocation, + VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, + HANDLE hTargetProcess) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS { + HANDLE handle; + VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaGetMemoryWin32Handle2(m_allocator, static_cast(allocation), static_cast(handleType), hTargetProcess, &handle) ); + VULKAN_HPP_NAMESPACE::detail::resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::getMemoryWin32Handle2"); + return VULKAN_HPP_NAMESPACE::detail::createResultValueType(result, handle); + } +#endif + // wrapper function for command vmaGetMemoryWin32Handle2, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::getMemoryWin32Handle2(Allocation allocation, + VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, + HANDLE hTargetProcess, + HANDLE* pHandle) const VULKAN_HPP_NOEXCEPT { + VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaGetMemoryWin32Handle2(m_allocator, static_cast(allocation), static_cast(handleType), hTargetProcess, pHandle) ); + return result; + } + #endif #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE // wrapper function for command vmaMapMemory, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html @@ -1035,6 +1090,49 @@ namespace VMA_HPP_NAMESPACE { return result; } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + // wrapper function for command vmaCreateDedicatedBuffer, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType>::type Allocator::createDedicatedBuffer(const VULKAN_HPP_NAMESPACE::BufferCreateInfo& bufferCreateInfo, + const AllocationCreateInfo& allocationCreateInfo, + void* memoryAllocateNext, + VULKAN_HPP_NAMESPACE::Optional const & allocationInfo) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS { + std::pair pair; + VULKAN_HPP_NAMESPACE::Buffer& buffer = pair.second; + Allocation& allocation = pair.first; + VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCreateDedicatedBuffer(m_allocator, reinterpret_cast(&bufferCreateInfo), reinterpret_cast(&allocationCreateInfo), memoryAllocateNext, reinterpret_cast(&buffer), reinterpret_cast(&allocation), reinterpret_cast(static_cast(allocationInfo))) ); + VULKAN_HPP_NAMESPACE::detail::resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::createDedicatedBuffer"); + return VULKAN_HPP_NAMESPACE::detail::createResultValueType(result, pair); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + // wrapper function for command vmaCreateDedicatedBuffer, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType>::type Allocator::createDedicatedBufferUnique(const VULKAN_HPP_NAMESPACE::BufferCreateInfo& bufferCreateInfo, + const AllocationCreateInfo& allocationCreateInfo, + void* memoryAllocateNext, + VULKAN_HPP_NAMESPACE::Optional const & allocationInfo) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS { + std::pair pair; + VULKAN_HPP_NAMESPACE::Buffer& buffer = pair.second; + Allocation& allocation = pair.first; + VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCreateDedicatedBuffer(m_allocator, reinterpret_cast(&bufferCreateInfo), reinterpret_cast(&allocationCreateInfo), memoryAllocateNext, reinterpret_cast(&buffer), reinterpret_cast(&allocation), reinterpret_cast(static_cast(allocationInfo))) ); + VULKAN_HPP_NAMESPACE::detail::resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::createDedicatedBufferUnique"); + std::pair pairUnique { + UniqueAllocation(allocation, *this), + UniqueBuffer(buffer, *this) + }; + return VULKAN_HPP_NAMESPACE::detail::createResultValueType(result, std::move(pairUnique)); + } +#endif +#endif + // wrapper function for command vmaCreateDedicatedBuffer, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::createDedicatedBuffer(const VULKAN_HPP_NAMESPACE::BufferCreateInfo* pBufferCreateInfo, + const AllocationCreateInfo* pAllocationCreateInfo, + void* pMemoryAllocateNext, + VULKAN_HPP_NAMESPACE::Buffer* pBuffer, + Allocation* pAllocation, + AllocationInfo* pAllocationInfo) const VULKAN_HPP_NOEXCEPT { + VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCreateDedicatedBuffer(m_allocator, reinterpret_cast(pBufferCreateInfo), reinterpret_cast(pAllocationCreateInfo), pMemoryAllocateNext, reinterpret_cast(pBuffer), reinterpret_cast(pAllocation), reinterpret_cast(pAllocationInfo)) ); + return result; + } + #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE // wrapper function for command vmaCreateAliasingBuffer, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::createAliasingBuffer(Allocation allocation, @@ -1164,6 +1262,49 @@ namespace VMA_HPP_NAMESPACE { return result; } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + // wrapper function for command vmaCreateDedicatedImage, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType>::type Allocator::createDedicatedImage(const VULKAN_HPP_NAMESPACE::ImageCreateInfo& imageCreateInfo, + const AllocationCreateInfo& allocationCreateInfo, + void* memoryAllocateNext, + VULKAN_HPP_NAMESPACE::Optional const & allocationInfo) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS { + std::pair pair; + VULKAN_HPP_NAMESPACE::Image& image = pair.second; + Allocation& allocation = pair.first; + VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCreateDedicatedImage(m_allocator, reinterpret_cast(&imageCreateInfo), reinterpret_cast(&allocationCreateInfo), memoryAllocateNext, reinterpret_cast(&image), reinterpret_cast(&allocation), reinterpret_cast(static_cast(allocationInfo))) ); + VULKAN_HPP_NAMESPACE::detail::resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::createDedicatedImage"); + return VULKAN_HPP_NAMESPACE::detail::createResultValueType(result, pair); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + // wrapper function for command vmaCreateDedicatedImage, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType>::type Allocator::createDedicatedImageUnique(const VULKAN_HPP_NAMESPACE::ImageCreateInfo& imageCreateInfo, + const AllocationCreateInfo& allocationCreateInfo, + void* memoryAllocateNext, + VULKAN_HPP_NAMESPACE::Optional const & allocationInfo) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS { + std::pair pair; + VULKAN_HPP_NAMESPACE::Image& image = pair.second; + Allocation& allocation = pair.first; + VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCreateDedicatedImage(m_allocator, reinterpret_cast(&imageCreateInfo), reinterpret_cast(&allocationCreateInfo), memoryAllocateNext, reinterpret_cast(&image), reinterpret_cast(&allocation), reinterpret_cast(static_cast(allocationInfo))) ); + VULKAN_HPP_NAMESPACE::detail::resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::createDedicatedImageUnique"); + std::pair pairUnique { + UniqueAllocation(allocation, *this), + UniqueImage(image, *this) + }; + return VULKAN_HPP_NAMESPACE::detail::createResultValueType(result, std::move(pairUnique)); + } +#endif +#endif + // wrapper function for command vmaCreateDedicatedImage, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::createDedicatedImage(const VULKAN_HPP_NAMESPACE::ImageCreateInfo* pImageCreateInfo, + const AllocationCreateInfo* pAllocationCreateInfo, + void* pMemoryAllocateNext, + VULKAN_HPP_NAMESPACE::Image* pImage, + Allocation* pAllocation, + AllocationInfo* pAllocationInfo) const VULKAN_HPP_NOEXCEPT { + VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCreateDedicatedImage(m_allocator, reinterpret_cast(pImageCreateInfo), reinterpret_cast(pAllocationCreateInfo), pMemoryAllocateNext, reinterpret_cast(pImage), reinterpret_cast(pAllocation), reinterpret_cast(pAllocationInfo)) ); + return result; + } + #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE // wrapper function for command vmaCreateAliasingImage, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::createAliasingImage(Allocation allocation, diff --git a/include/vk_mem_alloc_handles.hpp b/include/vk_mem_alloc_handles.hpp index 814b141..94148ed 100644 --- a/include/vk_mem_alloc_handles.hpp +++ b/include/vk_mem_alloc_handles.hpp @@ -273,6 +273,27 @@ namespace VMA_HPP_NAMESPACE { Allocation* pAllocation, AllocationInfo* pAllocationInfo) const VULKAN_HPP_NOEXCEPT; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + // wrapper function for command vmaAllocateDedicatedMemory, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_NODISCARD typename VULKAN_HPP_NAMESPACE::ResultValueType::type allocateDedicatedMemory(const VULKAN_HPP_NAMESPACE::MemoryRequirements& vkMemoryRequirements, + const AllocationCreateInfo& createInfo, + void* memoryAllocateNext, + VULKAN_HPP_NAMESPACE::Optional const & allocationInfo = nullptr) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + // wrapper function for command vmaAllocateDedicatedMemory, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_NODISCARD typename VULKAN_HPP_NAMESPACE::ResultValueType::type allocateDedicatedMemoryUnique(const VULKAN_HPP_NAMESPACE::MemoryRequirements& vkMemoryRequirements, + const AllocationCreateInfo& createInfo, + void* memoryAllocateNext, + VULKAN_HPP_NAMESPACE::Optional const & allocationInfo = nullptr) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; +#endif +#endif + // wrapper function for command vmaAllocateDedicatedMemory, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result allocateDedicatedMemory(const VULKAN_HPP_NAMESPACE::MemoryRequirements* pVkMemoryRequirements, + const AllocationCreateInfo* pCreateInfo, + void* pMemoryAllocateNext, + Allocation* pAllocation, + AllocationInfo* pAllocationInfo) const VULKAN_HPP_NOEXCEPT; + #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE // wrapper function for command vmaAllocateMemoryPages, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html template > @@ -431,6 +452,18 @@ namespace VMA_HPP_NAMESPACE { HANDLE hTargetProcess, HANDLE* pHandle) const VULKAN_HPP_NOEXCEPT; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + // wrapper function for command vmaGetMemoryWin32Handle2, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_NODISCARD typename VULKAN_HPP_NAMESPACE::ResultValueType::type getMemoryWin32Handle2(Allocation allocation, + VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, + HANDLE hTargetProcess) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; +#endif + // wrapper function for command vmaGetMemoryWin32Handle2, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result getMemoryWin32Handle2(Allocation allocation, + VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, + HANDLE hTargetProcess, + HANDLE* pHandle) const VULKAN_HPP_NOEXCEPT; + #endif #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE // wrapper function for command vmaMapMemory, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html @@ -654,6 +687,28 @@ namespace VMA_HPP_NAMESPACE { Allocation* pAllocation, AllocationInfo* pAllocationInfo) const VULKAN_HPP_NOEXCEPT; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + // wrapper function for command vmaCreateDedicatedBuffer, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_NODISCARD typename VULKAN_HPP_NAMESPACE::ResultValueType>::type createDedicatedBuffer(const VULKAN_HPP_NAMESPACE::BufferCreateInfo& bufferCreateInfo, + const AllocationCreateInfo& allocationCreateInfo, + void* memoryAllocateNext, + VULKAN_HPP_NAMESPACE::Optional const & allocationInfo = nullptr) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + // wrapper function for command vmaCreateDedicatedBuffer, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_NODISCARD typename VULKAN_HPP_NAMESPACE::ResultValueType>::type createDedicatedBufferUnique(const VULKAN_HPP_NAMESPACE::BufferCreateInfo& bufferCreateInfo, + const AllocationCreateInfo& allocationCreateInfo, + void* memoryAllocateNext, + VULKAN_HPP_NAMESPACE::Optional const & allocationInfo = nullptr) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; +#endif +#endif + // wrapper function for command vmaCreateDedicatedBuffer, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result createDedicatedBuffer(const VULKAN_HPP_NAMESPACE::BufferCreateInfo* pBufferCreateInfo, + const AllocationCreateInfo* pAllocationCreateInfo, + void* pMemoryAllocateNext, + VULKAN_HPP_NAMESPACE::Buffer* pBuffer, + Allocation* pAllocation, + AllocationInfo* pAllocationInfo) const VULKAN_HPP_NOEXCEPT; + #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE // wrapper function for command vmaCreateAliasingBuffer, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html VULKAN_HPP_NODISCARD typename VULKAN_HPP_NAMESPACE::ResultValueType::type createAliasingBuffer(Allocation allocation, @@ -726,6 +781,28 @@ namespace VMA_HPP_NAMESPACE { Allocation* pAllocation, AllocationInfo* pAllocationInfo) const VULKAN_HPP_NOEXCEPT; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + // wrapper function for command vmaCreateDedicatedImage, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_NODISCARD typename VULKAN_HPP_NAMESPACE::ResultValueType>::type createDedicatedImage(const VULKAN_HPP_NAMESPACE::ImageCreateInfo& imageCreateInfo, + const AllocationCreateInfo& allocationCreateInfo, + void* memoryAllocateNext, + VULKAN_HPP_NAMESPACE::Optional const & allocationInfo = nullptr) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + // wrapper function for command vmaCreateDedicatedImage, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_NODISCARD typename VULKAN_HPP_NAMESPACE::ResultValueType>::type createDedicatedImageUnique(const VULKAN_HPP_NAMESPACE::ImageCreateInfo& imageCreateInfo, + const AllocationCreateInfo& allocationCreateInfo, + void* memoryAllocateNext, + VULKAN_HPP_NAMESPACE::Optional const & allocationInfo = nullptr) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; +#endif +#endif + // wrapper function for command vmaCreateDedicatedImage, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result createDedicatedImage(const VULKAN_HPP_NAMESPACE::ImageCreateInfo* pImageCreateInfo, + const AllocationCreateInfo* pAllocationCreateInfo, + void* pMemoryAllocateNext, + VULKAN_HPP_NAMESPACE::Image* pImage, + Allocation* pAllocation, + AllocationInfo* pAllocationInfo) const VULKAN_HPP_NOEXCEPT; + #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE // wrapper function for command vmaCreateAliasingImage, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html VULKAN_HPP_NODISCARD typename VULKAN_HPP_NAMESPACE::ResultValueType::type createAliasingImage(Allocation allocation, diff --git a/include/vk_mem_alloc_raii.hpp b/include/vk_mem_alloc_raii.hpp index 2a48d20..fb6c25f 100644 --- a/include/vk_mem_alloc_raii.hpp +++ b/include/vk_mem_alloc_raii.hpp @@ -245,6 +245,12 @@ namespace VMA_HPP_NAMESPACE { const AllocationCreateInfo& createInfo, VULKAN_HPP_NAMESPACE::Optional const & allocationInfo = nullptr) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; + // wrapper function for command vmaAllocateDedicatedMemory, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_NODISCARD typename VULKAN_HPP_NAMESPACE::ResultValueType::type allocateDedicatedMemory(const VULKAN_HPP_NAMESPACE::MemoryRequirements& vkMemoryRequirements, + const AllocationCreateInfo& createInfo, + void* memoryAllocateNext, + VULKAN_HPP_NAMESPACE::Optional const & allocationInfo = nullptr) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; + // wrapper function for command vmaAllocateMemoryPages, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html VULKAN_HPP_NODISCARD typename VULKAN_HPP_NAMESPACE::ResultValueType>::type allocateMemoryPages(VULKAN_HPP_NAMESPACE::ArrayProxy const & vkMemoryRequirements, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfo, @@ -300,6 +306,12 @@ namespace VMA_HPP_NAMESPACE { VULKAN_HPP_NAMESPACE::DeviceSize minAlignment, VULKAN_HPP_NAMESPACE::Optional const & allocationInfo = nullptr) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; + // wrapper function for command vmaCreateDedicatedBuffer, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_NODISCARD typename VULKAN_HPP_NAMESPACE::ResultValueType::type createDedicatedBuffer(const VULKAN_HPP_NAMESPACE::BufferCreateInfo& bufferCreateInfo, + const AllocationCreateInfo& allocationCreateInfo, + void* memoryAllocateNext, + VULKAN_HPP_NAMESPACE::Optional const & allocationInfo = nullptr) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; + // wrapper function for command vmaCreateAliasingBuffer, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html VULKAN_HPP_NODISCARD typename VULKAN_HPP_NAMESPACE::ResultValueType::type createAliasingBuffer(VMA_HPP_NAMESPACE::Allocation allocation, const VULKAN_HPP_NAMESPACE::BufferCreateInfo& bufferCreateInfo) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; @@ -323,6 +335,12 @@ namespace VMA_HPP_NAMESPACE { const AllocationCreateInfo& allocationCreateInfo, VULKAN_HPP_NAMESPACE::Optional const & allocationInfo = nullptr) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; + // wrapper function for command vmaCreateDedicatedImage, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_NODISCARD typename VULKAN_HPP_NAMESPACE::ResultValueType::type createDedicatedImage(const VULKAN_HPP_NAMESPACE::ImageCreateInfo& imageCreateInfo, + const AllocationCreateInfo& allocationCreateInfo, + void* memoryAllocateNext, + VULKAN_HPP_NAMESPACE::Optional const & allocationInfo = nullptr) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; + // wrapper function for command vmaCreateAliasingImage, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html VULKAN_HPP_NODISCARD typename VULKAN_HPP_NAMESPACE::ResultValueType::type createAliasingImage(VMA_HPP_NAMESPACE::Allocation allocation, const VULKAN_HPP_NAMESPACE::ImageCreateInfo& imageCreateInfo) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; @@ -449,6 +467,13 @@ namespace VMA_HPP_NAMESPACE { const AllocationCreateInfo& createInfo, VULKAN_HPP_NAMESPACE::Optional const & allocationInfo = nullptr); + // wrapper constructor for command vmaAllocateDedicatedMemory, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + explicit Allocation(Allocator const & allocator, + const VULKAN_HPP_NAMESPACE::MemoryRequirements& vkMemoryRequirements, + const AllocationCreateInfo& createInfo, + void* memoryAllocateNext, + VULKAN_HPP_NAMESPACE::Optional const & allocationInfo = nullptr); + // wrapper constructor for command vmaAllocateMemoryForBuffer, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html explicit Allocation(Allocator const & allocator, VULKAN_HPP_NAMESPACE::Buffer buffer, @@ -522,6 +547,10 @@ namespace VMA_HPP_NAMESPACE { // wrapper function for command vmaGetMemoryWin32Handle, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html VULKAN_HPP_NODISCARD typename VULKAN_HPP_NAMESPACE::ResultValueType::type getWin32Handle(HANDLE hTargetProcess) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; + // wrapper function for command vmaGetMemoryWin32Handle2, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_NODISCARD typename VULKAN_HPP_NAMESPACE::ResultValueType::type getWin32Handle2(VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, + HANDLE hTargetProcess) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; + #endif // wrapper function for command vmaMapMemory, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html VULKAN_HPP_NODISCARD typename VULKAN_HPP_NAMESPACE::ResultValueType::type map() const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; @@ -834,6 +863,13 @@ namespace VMA_HPP_NAMESPACE { VULKAN_HPP_NAMESPACE::DeviceSize minAlignment, VULKAN_HPP_NAMESPACE::Optional const & allocationInfo = nullptr); + // wrapper constructor for command vmaCreateDedicatedBuffer, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + explicit Buffer(Allocator const & allocator, + const VULKAN_HPP_NAMESPACE::BufferCreateInfo& bufferCreateInfo, + const AllocationCreateInfo& allocationCreateInfo, + void* memoryAllocateNext, + VULKAN_HPP_NAMESPACE::Optional const & allocationInfo = nullptr); + // wrapper constructor for command vmaCreateAliasingBuffer, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html explicit Buffer(Allocator const & allocator, Allocation&& allocation, @@ -926,6 +962,13 @@ namespace VMA_HPP_NAMESPACE { const AllocationCreateInfo& allocationCreateInfo, VULKAN_HPP_NAMESPACE::Optional const & allocationInfo = nullptr); + // wrapper constructor for command vmaCreateDedicatedImage, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + explicit Image(Allocator const & allocator, + const VULKAN_HPP_NAMESPACE::ImageCreateInfo& imageCreateInfo, + const AllocationCreateInfo& allocationCreateInfo, + void* memoryAllocateNext, + VULKAN_HPP_NAMESPACE::Optional const & allocationInfo = nullptr); + // wrapper constructor for command vmaCreateAliasingImage, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html explicit Image(Allocator const & allocator, Allocation&& allocation, @@ -1168,6 +1211,15 @@ namespace VMA_HPP_NAMESPACE { detail::wrap::type>(*this, detail::placeholder); } + // wrapper function for command vmaAllocateDedicatedMemory, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::allocateDedicatedMemory(const VULKAN_HPP_NAMESPACE::MemoryRequirements& vkMemoryRequirements, + const AllocationCreateInfo& createInfo, + void* memoryAllocateNext, + VULKAN_HPP_NAMESPACE::Optional const & allocationInfo) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS { + return m_allocator.allocateDedicatedMemory(vkMemoryRequirements, createInfo, memoryAllocateNext, allocationInfo), + detail::wrap::type>(*this, detail::placeholder); + } + // wrapper function for command vmaAllocateMemoryPages, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType>::type Allocator::allocateMemoryPages(VULKAN_HPP_NAMESPACE::ArrayProxy const & vkMemoryRequirements, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfo, @@ -1255,6 +1307,15 @@ namespace VMA_HPP_NAMESPACE { detail::wrap::type>(*this, detail::placeholder); } + // wrapper function for command vmaCreateDedicatedBuffer, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::createDedicatedBuffer(const VULKAN_HPP_NAMESPACE::BufferCreateInfo& bufferCreateInfo, + const AllocationCreateInfo& allocationCreateInfo, + void* memoryAllocateNext, + VULKAN_HPP_NAMESPACE::Optional const & allocationInfo) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS { + return m_allocator.createDedicatedBuffer(bufferCreateInfo, allocationCreateInfo, memoryAllocateNext, allocationInfo), + detail::wrap::type>(*this, detail::placeholder); + } + // wrapper function for command vmaCreateAliasingBuffer, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::createAliasingBuffer(VMA_HPP_NAMESPACE::Allocation allocation, const VULKAN_HPP_NAMESPACE::BufferCreateInfo& bufferCreateInfo) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS { @@ -1293,6 +1354,15 @@ namespace VMA_HPP_NAMESPACE { detail::wrap::type>(*this, detail::placeholder); } + // wrapper function for command vmaCreateDedicatedImage, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::createDedicatedImage(const VULKAN_HPP_NAMESPACE::ImageCreateInfo& imageCreateInfo, + const AllocationCreateInfo& allocationCreateInfo, + void* memoryAllocateNext, + VULKAN_HPP_NAMESPACE::Optional const & allocationInfo) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS { + return m_allocator.createDedicatedImage(imageCreateInfo, allocationCreateInfo, memoryAllocateNext, allocationInfo), + detail::wrap::type>(*this, detail::placeholder); + } + // wrapper function for command vmaCreateAliasingImage, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::createAliasingImage(VMA_HPP_NAMESPACE::Allocation allocation, const VULKAN_HPP_NAMESPACE::ImageCreateInfo& imageCreateInfo) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS { @@ -1387,6 +1457,12 @@ namespace VMA_HPP_NAMESPACE { return m_allocator.getMemoryWin32Handle(m_allocation, hTargetProcess); } + // wrapper function for command vmaGetMemoryWin32Handle2, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocation::getWin32Handle2(VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, + HANDLE hTargetProcess) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS { + return m_allocator.getMemoryWin32Handle2(m_allocation, handleType, hTargetProcess); + } + #endif // wrapper function for command vmaMapMemory, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocation::map() const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS { @@ -1556,6 +1632,14 @@ namespace VMA_HPP_NAMESPACE { VULKAN_HPP_NAMESPACE::Optional const & allocationInfo) : Allocation(allocator.allocateMemory(vkMemoryRequirements, createInfo, allocationInfo)) {} + // wrapper constructor for command vmaAllocateDedicatedMemory, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_INLINE Allocation::Allocation(Allocator const & allocator, + const VULKAN_HPP_NAMESPACE::MemoryRequirements& vkMemoryRequirements, + const AllocationCreateInfo& createInfo, + void* memoryAllocateNext, + VULKAN_HPP_NAMESPACE::Optional const & allocationInfo) : + Allocation(allocator.allocateDedicatedMemory(vkMemoryRequirements, createInfo, memoryAllocateNext, allocationInfo)) {} + // wrapper constructor for command vmaAllocateMemoryForBuffer, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html VULKAN_HPP_INLINE Allocation::Allocation(Allocator const & allocator, VULKAN_HPP_NAMESPACE::Buffer buffer, @@ -1607,6 +1691,14 @@ namespace VMA_HPP_NAMESPACE { VULKAN_HPP_NAMESPACE::Optional const & allocationInfo) : Buffer(allocator.createBufferWithAlignment(bufferCreateInfo, allocationCreateInfo, minAlignment, allocationInfo)) {} + // wrapper constructor for command vmaCreateDedicatedBuffer, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_INLINE Buffer::Buffer(Allocator const & allocator, + const VULKAN_HPP_NAMESPACE::BufferCreateInfo& bufferCreateInfo, + const AllocationCreateInfo& allocationCreateInfo, + void* memoryAllocateNext, + VULKAN_HPP_NAMESPACE::Optional const & allocationInfo) : + Buffer(allocator.createDedicatedBuffer(bufferCreateInfo, allocationCreateInfo, memoryAllocateNext, allocationInfo)) {} + // wrapper constructor for command vmaCreateAliasingBuffer, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html VULKAN_HPP_INLINE Buffer::Buffer(Allocator const & allocator, Allocation&& allocation, @@ -1634,6 +1726,14 @@ namespace VMA_HPP_NAMESPACE { VULKAN_HPP_NAMESPACE::Optional const & allocationInfo) : Image(allocator.createImage(imageCreateInfo, allocationCreateInfo, allocationInfo)) {} + // wrapper constructor for command vmaCreateDedicatedImage, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html + VULKAN_HPP_INLINE Image::Image(Allocator const & allocator, + const VULKAN_HPP_NAMESPACE::ImageCreateInfo& imageCreateInfo, + const AllocationCreateInfo& allocationCreateInfo, + void* memoryAllocateNext, + VULKAN_HPP_NAMESPACE::Optional const & allocationInfo) : + Image(allocator.createDedicatedImage(imageCreateInfo, allocationCreateInfo, memoryAllocateNext, allocationInfo)) {} + // wrapper constructor for command vmaCreateAliasingImage, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/globals_func.html VULKAN_HPP_INLINE Image::Image(Allocator const & allocator, Allocation&& allocation, diff --git a/include/vk_mem_alloc_structs.hpp b/include/vk_mem_alloc_structs.hpp index 1098534..583de1a 100644 --- a/include/vk_mem_alloc_structs.hpp +++ b/include/vk_mem_alloc_structs.hpp @@ -125,7 +125,7 @@ namespace VMA_HPP_NAMESPACE { , PFN_vkBindBufferMemory2KHR vkBindBufferMemory2KHR_ = {} , PFN_vkBindImageMemory2KHR vkBindImageMemory2KHR_ = {} #endif -#if VMA_MEMORY_BUDGET || VMA_VULKAN_VERSION >= 1001000 +#if VMA_GET_PHYSICAL_DEVICE_PROPERTIES2 , PFN_vkGetPhysicalDeviceMemoryProperties2KHR vkGetPhysicalDeviceMemoryProperties2KHR_ = {} #endif #if VMA_KHR_MAINTENANCE4 || VMA_VULKAN_VERSION >= 1003000 @@ -136,6 +136,9 @@ namespace VMA_HPP_NAMESPACE { , PFN_vkGetMemoryWin32HandleKHR vkGetMemoryWin32HandleKHR_ = {} #else , void* vkGetMemoryWin32HandleKHR_ = {} +#endif +#if VMA_GET_PHYSICAL_DEVICE_PROPERTIES2 + , PFN_vkGetPhysicalDeviceProperties2KHR vkGetPhysicalDeviceProperties2KHR_ = {} #endif ) VULKAN_HPP_NOEXCEPT : vkGetInstanceProcAddr { vkGetInstanceProcAddr_ } @@ -165,7 +168,7 @@ namespace VMA_HPP_NAMESPACE { , vkBindBufferMemory2KHR { vkBindBufferMemory2KHR_ } , vkBindImageMemory2KHR { vkBindImageMemory2KHR_ } #endif -#if VMA_MEMORY_BUDGET || VMA_VULKAN_VERSION >= 1001000 +#if VMA_GET_PHYSICAL_DEVICE_PROPERTIES2 , vkGetPhysicalDeviceMemoryProperties2KHR { vkGetPhysicalDeviceMemoryProperties2KHR_ } #endif #if VMA_KHR_MAINTENANCE4 || VMA_VULKAN_VERSION >= 1003000 @@ -176,6 +179,9 @@ namespace VMA_HPP_NAMESPACE { , vkGetMemoryWin32HandleKHR { vkGetMemoryWin32HandleKHR_ } #else , vkGetMemoryWin32HandleKHR { vkGetMemoryWin32HandleKHR_ } +#endif +#if VMA_GET_PHYSICAL_DEVICE_PROPERTIES2 + , vkGetPhysicalDeviceProperties2KHR { vkGetPhysicalDeviceProperties2KHR_ } #endif {} @@ -310,7 +316,7 @@ namespace VMA_HPP_NAMESPACE { } #endif -#if VMA_MEMORY_BUDGET || VMA_VULKAN_VERSION >= 1001000 +#if VMA_GET_PHYSICAL_DEVICE_PROPERTIES2 VULKAN_HPP_CONSTEXPR_14 VulkanFunctions& setVkGetPhysicalDeviceMemoryProperties2KHR(PFN_vkGetPhysicalDeviceMemoryProperties2KHR vkGetPhysicalDeviceMemoryProperties2KHR_) VULKAN_HPP_NOEXCEPT { vkGetPhysicalDeviceMemoryProperties2KHR = vkGetPhysicalDeviceMemoryProperties2KHR_; return *this; @@ -340,6 +346,13 @@ namespace VMA_HPP_NAMESPACE { vkGetMemoryWin32HandleKHR = vkGetMemoryWin32HandleKHR_; return *this; } + +#endif +#if VMA_GET_PHYSICAL_DEVICE_PROPERTIES2 + VULKAN_HPP_CONSTEXPR_14 VulkanFunctions& setVkGetPhysicalDeviceProperties2KHR(PFN_vkGetPhysicalDeviceProperties2KHR vkGetPhysicalDeviceProperties2KHR_) VULKAN_HPP_NOEXCEPT { + vkGetPhysicalDeviceProperties2KHR = vkGetPhysicalDeviceProperties2KHR_; + return *this; + } #endif #endif @@ -387,7 +400,7 @@ namespace VMA_HPP_NAMESPACE { , PFN_vkBindBufferMemory2KHR const & , PFN_vkBindImageMemory2KHR const & #endif -#if VMA_MEMORY_BUDGET || VMA_VULKAN_VERSION >= 1001000 +#if VMA_GET_PHYSICAL_DEVICE_PROPERTIES2 , PFN_vkGetPhysicalDeviceMemoryProperties2KHR const & #endif #if VMA_KHR_MAINTENANCE4 || VMA_VULKAN_VERSION >= 1003000 @@ -398,6 +411,9 @@ namespace VMA_HPP_NAMESPACE { , PFN_vkGetMemoryWin32HandleKHR const & #else , void* const & +#endif +#if VMA_GET_PHYSICAL_DEVICE_PROPERTIES2 + , PFN_vkGetPhysicalDeviceProperties2KHR const & #endif > reflect() const VULKAN_HPP_NOEXCEPT { @@ -428,7 +444,7 @@ namespace VMA_HPP_NAMESPACE { , vkBindBufferMemory2KHR , vkBindImageMemory2KHR #endif -#if VMA_MEMORY_BUDGET || VMA_VULKAN_VERSION >= 1001000 +#if VMA_GET_PHYSICAL_DEVICE_PROPERTIES2 , vkGetPhysicalDeviceMemoryProperties2KHR #endif #if VMA_KHR_MAINTENANCE4 || VMA_VULKAN_VERSION >= 1003000 @@ -439,6 +455,9 @@ namespace VMA_HPP_NAMESPACE { , vkGetMemoryWin32HandleKHR #else , vkGetMemoryWin32HandleKHR +#endif +#if VMA_GET_PHYSICAL_DEVICE_PROPERTIES2 + , vkGetPhysicalDeviceProperties2KHR #endif ); } @@ -475,7 +494,7 @@ namespace VMA_HPP_NAMESPACE { && vkBindBufferMemory2KHR == rhs.vkBindBufferMemory2KHR && vkBindImageMemory2KHR == rhs.vkBindImageMemory2KHR #endif -#if VMA_MEMORY_BUDGET || VMA_VULKAN_VERSION >= 1001000 +#if VMA_GET_PHYSICAL_DEVICE_PROPERTIES2 && vkGetPhysicalDeviceMemoryProperties2KHR == rhs.vkGetPhysicalDeviceMemoryProperties2KHR #endif #if VMA_KHR_MAINTENANCE4 || VMA_VULKAN_VERSION >= 1003000 @@ -486,6 +505,9 @@ namespace VMA_HPP_NAMESPACE { && vkGetMemoryWin32HandleKHR == rhs.vkGetMemoryWin32HandleKHR #else && vkGetMemoryWin32HandleKHR == rhs.vkGetMemoryWin32HandleKHR +#endif +#if VMA_GET_PHYSICAL_DEVICE_PROPERTIES2 + && vkGetPhysicalDeviceProperties2KHR == rhs.vkGetPhysicalDeviceProperties2KHR #endif ; #endif @@ -522,7 +544,7 @@ namespace VMA_HPP_NAMESPACE { PFN_vkBindBufferMemory2KHR vkBindBufferMemory2KHR = {}; PFN_vkBindImageMemory2KHR vkBindImageMemory2KHR = {}; #endif -#if VMA_MEMORY_BUDGET || VMA_VULKAN_VERSION >= 1001000 +#if VMA_GET_PHYSICAL_DEVICE_PROPERTIES2 PFN_vkGetPhysicalDeviceMemoryProperties2KHR vkGetPhysicalDeviceMemoryProperties2KHR = {}; #endif #if VMA_KHR_MAINTENANCE4 || VMA_VULKAN_VERSION >= 1003000 @@ -533,6 +555,9 @@ namespace VMA_HPP_NAMESPACE { PFN_vkGetMemoryWin32HandleKHR vkGetMemoryWin32HandleKHR = {}; #else void* vkGetMemoryWin32HandleKHR = {}; +#endif +#if VMA_GET_PHYSICAL_DEVICE_PROPERTIES2 + PFN_vkGetPhysicalDeviceProperties2KHR vkGetPhysicalDeviceProperties2KHR = {}; #endif }; @@ -565,7 +590,7 @@ namespace VMA_HPP_NAMESPACE { struct vkBindBufferMemory2 { using type = PFN_vkBindBufferMemory2; }; struct vkBindImageMemory2 { using type = PFN_vkBindImageMemory2; }; #endif -#if VMA_MEMORY_BUDGET || VMA_VULKAN_VERSION >= 1001000 +#if VMA_GET_PHYSICAL_DEVICE_PROPERTIES2 struct vkGetPhysicalDeviceMemoryProperties2 { using type = PFN_vkGetPhysicalDeviceMemoryProperties2; }; #endif #if VMA_KHR_MAINTENANCE4 || VMA_VULKAN_VERSION >= 1003000 @@ -575,6 +600,9 @@ namespace VMA_HPP_NAMESPACE { #if VMA_EXTERNAL_MEMORY_WIN32 struct vkGetMemoryWin32HandleKHR { using type = PFN_vkGetMemoryWin32HandleKHR; }; #else +#endif +#if VMA_GET_PHYSICAL_DEVICE_PROPERTIES2 + struct vkGetPhysicalDeviceProperties2 { using type = PFN_vkGetPhysicalDeviceProperties2; }; #endif template struct FromDispatchers { static PFN get(const T&, const Ts&... ts) VULKAN_HPP_NOEXCEPT { @@ -635,7 +663,7 @@ namespace VMA_HPP_NAMESPACE { template struct VulkanPFN::FromDispatchers { static PFN_vkBindImageMemory2 get(const T& t, const Ts&...) VULKAN_HPP_NOEXCEPT { return t.vkBindImageMemory2; } }; #endif -#if VMA_MEMORY_BUDGET || VMA_VULKAN_VERSION >= 1001000 +#if VMA_GET_PHYSICAL_DEVICE_PROPERTIES2 template struct VulkanPFN::FromDispatchers { static PFN_vkGetPhysicalDeviceMemoryProperties2 get(const T& t, const Ts&...) VULKAN_HPP_NOEXCEPT { return t.vkGetPhysicalDeviceMemoryProperties2; } }; #endif @@ -649,6 +677,10 @@ namespace VMA_HPP_NAMESPACE { template struct VulkanPFN::FromDispatchers { static PFN_vkGetMemoryWin32HandleKHR get(const T& t, const Ts&...) VULKAN_HPP_NOEXCEPT { return t.vkGetMemoryWin32HandleKHR; } }; #else +#endif +#if VMA_GET_PHYSICAL_DEVICE_PROPERTIES2 + template struct VulkanPFN::FromDispatchers + { static PFN_vkGetPhysicalDeviceProperties2 get(const T& t, const Ts&...) VULKAN_HPP_NOEXCEPT { return t.vkGetPhysicalDeviceProperties2; } }; #endif } @@ -683,7 +715,7 @@ namespace VMA_HPP_NAMESPACE { , detail::VulkanPFN::get(dispatch...) , detail::VulkanPFN::get(dispatch...) #endif -#if VMA_MEMORY_BUDGET || VMA_VULKAN_VERSION >= 1001000 +#if VMA_GET_PHYSICAL_DEVICE_PROPERTIES2 , detail::VulkanPFN::get(dispatch...) #endif #if VMA_KHR_MAINTENANCE4 || VMA_VULKAN_VERSION >= 1003000 @@ -694,6 +726,9 @@ namespace VMA_HPP_NAMESPACE { , detail::VulkanPFN::get(dispatch...) #else , nullptr +#endif +#if VMA_GET_PHYSICAL_DEVICE_PROPERTIES2 + , detail::VulkanPFN::get(dispatch...) #endif }; } @@ -732,7 +767,7 @@ namespace VMA_HPP_NAMESPACE { , &vkBindBufferMemory2 , &vkBindImageMemory2 #endif -#if VMA_MEMORY_BUDGET || VMA_VULKAN_VERSION >= 1001000 +#if VMA_GET_PHYSICAL_DEVICE_PROPERTIES2 , &vkGetPhysicalDeviceMemoryProperties2 #endif #if VMA_KHR_MAINTENANCE4 || VMA_VULKAN_VERSION >= 1003000 @@ -743,6 +778,9 @@ namespace VMA_HPP_NAMESPACE { , &vkGetMemoryWin32HandleKHR #else , nullptr +#endif +#if VMA_GET_PHYSICAL_DEVICE_PROPERTIES2 + , &vkGetPhysicalDeviceProperties2 #endif }; } @@ -1464,6 +1502,7 @@ namespace VMA_HPP_NAMESPACE { , Pool pool_ = {} , void* pUserData_ = {} , float priority_ = {} + , VULKAN_HPP_NAMESPACE::DeviceSize minAlignment_ = {} ) VULKAN_HPP_NOEXCEPT : flags { flags_ } , usage { usage_ } @@ -1472,7 +1511,8 @@ namespace VMA_HPP_NAMESPACE { , memoryTypeBits { memoryTypeBits_ } , pool { pool_ } , pUserData { pUserData_ } - , priority { priority_ } {} + , priority { priority_ } + , minAlignment { minAlignment_ } {} VULKAN_HPP_CONSTEXPR AllocationCreateInfo(AllocationCreateInfo const &) VULKAN_HPP_NOEXCEPT = default; AllocationCreateInfo(VmaAllocationCreateInfo const & rhs) VULKAN_HPP_NOEXCEPT : AllocationCreateInfo(*reinterpret_cast(&rhs)) {} @@ -1525,6 +1565,11 @@ namespace VMA_HPP_NAMESPACE { priority = priority_; return *this; } + + VULKAN_HPP_CONSTEXPR_14 AllocationCreateInfo& setMinAlignment(VULKAN_HPP_NAMESPACE::DeviceSize minAlignment_) VULKAN_HPP_NOEXCEPT { + minAlignment = minAlignment_; + return *this; + } #endif operator VmaAllocationCreateInfo const &() const VULKAN_HPP_NOEXCEPT { @@ -1551,7 +1596,8 @@ namespace VMA_HPP_NAMESPACE { , uint32_t const & , Pool const & , void* const & - , float const &> + , float const & + , VULKAN_HPP_NAMESPACE::DeviceSize const &> reflect() const VULKAN_HPP_NOEXCEPT { return std::tie(flags , usage @@ -1560,7 +1606,8 @@ namespace VMA_HPP_NAMESPACE { , memoryTypeBits , pool , pUserData - , priority); + , priority + , minAlignment); } #endif @@ -1578,7 +1625,8 @@ namespace VMA_HPP_NAMESPACE { && memoryTypeBits == rhs.memoryTypeBits && pool == rhs.pool && pUserData == rhs.pUserData - && priority == rhs.priority; + && priority == rhs.priority + && minAlignment == rhs.minAlignment; #endif } bool operator!=(AllocationCreateInfo const & rhs) const VULKAN_HPP_NOEXCEPT { @@ -1595,6 +1643,7 @@ namespace VMA_HPP_NAMESPACE { Pool pool = {}; void* pUserData = {}; float priority = {}; + VULKAN_HPP_NAMESPACE::DeviceSize minAlignment = {}; }; // wrapper struct for struct VmaPoolCreateInfo, see https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/struct_vma_pool_create_info.html