Update VulkanMemoryAllocator-Hpp.

This commit is contained in:
BearOso 2024-04-06 16:28:03 -05:00
parent 3ebc239034
commit 7cf9f59923
6 changed files with 761 additions and 1720 deletions

File diff suppressed because it is too large Load Diff

View File

@ -23,12 +23,12 @@ namespace VMA_HPP_NAMESPACE {
return VULKAN_HPP_NAMESPACE::UniqueHandle<T, Dispatcher>(t);
}
template<class T, class O>
VULKAN_HPP_NAMESPACE::UniqueHandle<T, Dispatcher> createUniqueHandle(const T& t, const O* o) VULKAN_HPP_NOEXCEPT {
VULKAN_HPP_NAMESPACE::UniqueHandle<T, Dispatcher> createUniqueHandle(const T& t, O o) VULKAN_HPP_NOEXCEPT {
return VULKAN_HPP_NAMESPACE::UniqueHandle<T, Dispatcher>(t, o);
}
template<class F, class S, class O>
std::pair<VULKAN_HPP_NAMESPACE::UniqueHandle<F, Dispatcher>, VULKAN_HPP_NAMESPACE::UniqueHandle<S, Dispatcher>>
createUniqueHandle(const std::pair<F, S>& t, const O* o) VULKAN_HPP_NOEXCEPT {
createUniqueHandle(const std::pair<F, S>& t, O o) VULKAN_HPP_NOEXCEPT {
return {
VULKAN_HPP_NAMESPACE::UniqueHandle<F, Dispatcher>(t.first, o),
VULKAN_HPP_NAMESPACE::UniqueHandle<S, Dispatcher>(t.second, o)
@ -37,7 +37,7 @@ namespace VMA_HPP_NAMESPACE {
template<class T, class UniqueVectorAllocator, class VectorAllocator, class O>
std::vector<VULKAN_HPP_NAMESPACE::UniqueHandle<T, Dispatcher>, UniqueVectorAllocator>
createUniqueHandleVector(const std::vector<T, VectorAllocator>& vector, const O* o,
createUniqueHandleVector(const std::vector<T, VectorAllocator>& vector, O o,
const UniqueVectorAllocator& vectorAllocator) VULKAN_HPP_NOEXCEPT {
std::vector<VULKAN_HPP_NAMESPACE::UniqueHandle<T, Dispatcher>, UniqueVectorAllocator> result(vectorAllocator);
result.reserve(vector.size());
@ -46,10 +46,10 @@ namespace VMA_HPP_NAMESPACE {
}
template<class T, class Owner> class Deleter {
const Owner* owner;
Owner owner;
public:
Deleter() = default;
Deleter(const Owner* owner) VULKAN_HPP_NOEXCEPT : owner(owner) {}
Deleter(Owner owner) VULKAN_HPP_NOEXCEPT : owner(owner) {}
protected:
void destroy(const T& t) VULKAN_HPP_NOEXCEPT; // Implemented manually for each handle type
};
@ -85,11 +85,11 @@ namespace VMA_HPP_NAMESPACE {
# define VMA_HPP_DESTROY_IMPL(NAME) \
template<> VULKAN_HPP_INLINE void VULKAN_HPP_NAMESPACE::UniqueHandleTraits<NAME, Dispatcher>::deleter::destroy(const NAME& t) VULKAN_HPP_NOEXCEPT
VMA_HPP_DESTROY_IMPL(VULKAN_HPP_NAMESPACE::Buffer) { owner->destroyBuffer(t, nullptr); }
VMA_HPP_DESTROY_IMPL(VULKAN_HPP_NAMESPACE::Image) { owner->destroyImage(t, nullptr); }
VMA_HPP_DESTROY_IMPL(Pool) { owner->destroyPool(t); }
VMA_HPP_DESTROY_IMPL(Allocation) { owner->freeMemory(t); }
VMA_HPP_DESTROY_IMPL(VirtualAllocation) { owner->virtualFree(t); }
VMA_HPP_DESTROY_IMPL(VULKAN_HPP_NAMESPACE::Buffer) { owner.destroyBuffer(t, nullptr); }
VMA_HPP_DESTROY_IMPL(VULKAN_HPP_NAMESPACE::Image) { owner.destroyImage(t, nullptr); }
VMA_HPP_DESTROY_IMPL(Pool) { owner.destroyPool(t); }
VMA_HPP_DESTROY_IMPL(Allocation) { owner.freeMemory(t); }
VMA_HPP_DESTROY_IMPL(VirtualAllocation) { owner.virtualFree(t); }
# undef VMA_HPP_DESTROY_IMPL
#endif

View File

@ -10,7 +10,8 @@ namespace VMA_HPP_NAMESPACE {
eExtMemoryBudget = VMA_ALLOCATOR_CREATE_EXT_MEMORY_BUDGET_BIT,
eAmdDeviceCoherentMemory = VMA_ALLOCATOR_CREATE_AMD_DEVICE_COHERENT_MEMORY_BIT,
eBufferDeviceAddress = VMA_ALLOCATOR_CREATE_BUFFER_DEVICE_ADDRESS_BIT,
eExtMemoryPriority = VMA_ALLOCATOR_CREATE_EXT_MEMORY_PRIORITY_BIT
eExtMemoryPriority = VMA_ALLOCATOR_CREATE_EXT_MEMORY_PRIORITY_BIT,
eKhrMaintenance4 = VMA_ALLOCATOR_CREATE_KHR_MAINTENANCE4_BIT
};
# if !defined( VULKAN_HPP_NO_TO_STRING )
@ -22,6 +23,7 @@ namespace VMA_HPP_NAMESPACE {
if (value == AllocatorCreateFlagBits::eAmdDeviceCoherentMemory) return "AmdDeviceCoherentMemory";
if (value == AllocatorCreateFlagBits::eBufferDeviceAddress) return "BufferDeviceAddress";
if (value == AllocatorCreateFlagBits::eExtMemoryPriority) return "ExtMemoryPriority";
if (value == AllocatorCreateFlagBits::eKhrMaintenance4) return "KhrMaintenance4";
return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString(static_cast<uint32_t>(value)) + " )";
}
# endif
@ -37,7 +39,8 @@ namespace VULKAN_HPP_NAMESPACE {
| VMA_HPP_NAMESPACE::AllocatorCreateFlagBits::eExtMemoryBudget
| VMA_HPP_NAMESPACE::AllocatorCreateFlagBits::eAmdDeviceCoherentMemory
| VMA_HPP_NAMESPACE::AllocatorCreateFlagBits::eBufferDeviceAddress
| VMA_HPP_NAMESPACE::AllocatorCreateFlagBits::eExtMemoryPriority;
| VMA_HPP_NAMESPACE::AllocatorCreateFlagBits::eExtMemoryPriority
| VMA_HPP_NAMESPACE::AllocatorCreateFlagBits::eKhrMaintenance4;
};
}
@ -72,6 +75,7 @@ namespace VMA_HPP_NAMESPACE {
if (value & AllocatorCreateFlagBits::eAmdDeviceCoherentMemory) result += "AmdDeviceCoherentMemory | ";
if (value & AllocatorCreateFlagBits::eBufferDeviceAddress) result += "BufferDeviceAddress | ";
if (value & AllocatorCreateFlagBits::eExtMemoryPriority) result += "ExtMemoryPriority | ";
if (value & AllocatorCreateFlagBits::eKhrMaintenance4) result += "KhrMaintenance4 | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
# endif

View File

@ -160,7 +160,7 @@ namespace VMA_HPP_NAMESPACE {
Pool pool;
VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( vmaCreatePool(m_allocator, reinterpret_cast<const VmaPoolCreateInfo*>(&createInfo), reinterpret_cast<VmaPool*>(&pool)) );
resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::createPool");
return createResultValueType(result, createUniqueHandle(pool, this));
return createResultValueType(result, createUniqueHandle(pool, *this));
}
#endif
#endif
@ -257,7 +257,7 @@ namespace VMA_HPP_NAMESPACE {
Allocation allocation;
VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( vmaAllocateMemory(m_allocator, reinterpret_cast<const VkMemoryRequirements*>(&vkMemoryRequirements), reinterpret_cast<const VmaAllocationCreateInfo*>(&createInfo), reinterpret_cast<VmaAllocation*>(&allocation), reinterpret_cast<VmaAllocationInfo*>(static_cast<AllocationInfo*>(allocationInfo))) );
resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::allocateMemory");
return createResultValueType(result, createUniqueHandle(allocation, this));
return createResultValueType(result, createUniqueHandle(allocation, *this));
}
#endif
#endif
@ -306,7 +306,7 @@ namespace VMA_HPP_NAMESPACE {
std::vector<Allocation> allocations(allocationCount);
VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( vmaAllocateMemoryPages(m_allocator, reinterpret_cast<const VkMemoryRequirements*>(vkMemoryRequirements.data()), reinterpret_cast<const VmaAllocationCreateInfo*>(createInfo.data()), allocationCount, reinterpret_cast<VmaAllocation*>(allocations.data()), reinterpret_cast<VmaAllocationInfo*>(allocationInfo.data())) );
resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::allocateMemoryPages");
return createResultValueType(result, createUniqueHandleVector(allocations, this, vectorAllocator));
return createResultValueType(result, createUniqueHandleVector(allocations, *this, vectorAllocator));
}
template<typename VectorAllocator>
@ -317,7 +317,7 @@ namespace VMA_HPP_NAMESPACE {
std::vector<Allocation> allocations(allocationCount);
VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( vmaAllocateMemoryPages(m_allocator, reinterpret_cast<const VkMemoryRequirements*>(vkMemoryRequirements.data()), reinterpret_cast<const VmaAllocationCreateInfo*>(createInfo.data()), allocationCount, reinterpret_cast<VmaAllocation*>(allocations.data()), reinterpret_cast<VmaAllocationInfo*>(allocationInfo.data())) );
resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::allocateMemoryPages");
return createResultValueType(result, createUniqueHandleVector(allocations, this, VectorAllocator()));
return createResultValueType(result, createUniqueHandleVector(allocations, *this, VectorAllocator()));
}
#endif
#endif
@ -346,7 +346,7 @@ namespace VMA_HPP_NAMESPACE {
Allocation allocation;
VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( vmaAllocateMemoryForBuffer(m_allocator, static_cast<VkBuffer>(buffer), reinterpret_cast<const VmaAllocationCreateInfo*>(&createInfo), reinterpret_cast<VmaAllocation*>(&allocation), reinterpret_cast<VmaAllocationInfo*>(static_cast<AllocationInfo*>(allocationInfo))) );
resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::allocateMemoryForBuffer");
return createResultValueType(result, createUniqueHandle(allocation, this));
return createResultValueType(result, createUniqueHandle(allocation, *this));
}
#endif
#endif
@ -374,7 +374,7 @@ namespace VMA_HPP_NAMESPACE {
Allocation allocation;
VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( vmaAllocateMemoryForImage(m_allocator, static_cast<VkImage>(image), reinterpret_cast<const VmaAllocationCreateInfo*>(&createInfo), reinterpret_cast<VmaAllocation*>(&allocation), reinterpret_cast<VmaAllocationInfo*>(static_cast<AllocationInfo*>(allocationInfo))) );
resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::allocateMemoryForImage");
return createResultValueType(result, createUniqueHandle(allocation, this));
return createResultValueType(result, createUniqueHandle(allocation, *this));
}
#endif
#endif
@ -419,6 +419,18 @@ namespace VMA_HPP_NAMESPACE {
vmaGetAllocationInfo(m_allocator, static_cast<VmaAllocation>(allocation), reinterpret_cast<VmaAllocationInfo*>(allocationInfo));
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
VULKAN_HPP_INLINE AllocationInfo2 Allocator::getAllocationInfo2(Allocation allocation) const {
AllocationInfo2 allocationInfo;
vmaGetAllocationInfo2(m_allocator, static_cast<VmaAllocation>(allocation), reinterpret_cast<VmaAllocationInfo2*>(&allocationInfo));
return allocationInfo;
}
#endif
VULKAN_HPP_INLINE void Allocator::getAllocationInfo2(Allocation allocation,
AllocationInfo2* allocationInfo) const {
vmaGetAllocationInfo2(m_allocator, static_cast<VmaAllocation>(allocation), reinterpret_cast<VmaAllocationInfo2*>(allocationInfo));
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
VULKAN_HPP_INLINE void Allocator::setAllocationUserData(Allocation allocation,
void* userData) const {
@ -549,6 +561,57 @@ namespace VMA_HPP_NAMESPACE {
return result;
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType<void>::type Allocator::copyMemoryToAllocation(const void* srcHostPointer,
Allocation dstAllocation,
VULKAN_HPP_NAMESPACE::DeviceSize dstAllocationLocalOffset,
VULKAN_HPP_NAMESPACE::DeviceSize size) const {
VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( vmaCopyMemoryToAllocation(m_allocator, srcHostPointer, static_cast<VmaAllocation>(dstAllocation), static_cast<VkDeviceSize>(dstAllocationLocalOffset), static_cast<VkDeviceSize>(size)) );
resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::copyMemoryToAllocation");
return createResultValueType(result);
}
#else
VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::copyMemoryToAllocation(const void* srcHostPointer,
Allocation dstAllocation,
VULKAN_HPP_NAMESPACE::DeviceSize dstAllocationLocalOffset,
VULKAN_HPP_NAMESPACE::DeviceSize size) const {
VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( vmaCopyMemoryToAllocation(m_allocator, srcHostPointer, static_cast<VmaAllocation>(dstAllocation), static_cast<VkDeviceSize>(dstAllocationLocalOffset), static_cast<VkDeviceSize>(size)) );
return result;
}
#endif
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename VectorAllocator,
typename B,
typename std::enable_if<std::is_same<typename B::value_type, void>::value, int>::type>
VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType<std::vector<void, VectorAllocator>>::type Allocator::copyAllocationToMemory(Allocation srcAllocation,
VULKAN_HPP_NAMESPACE::DeviceSize srcAllocationLocalOffset,
VULKAN_HPP_NAMESPACE::DeviceSize size,
VectorAllocator& vectorAllocator) const {
std::vector<void, VectorAllocator> dstHostPointer(size, vectorAllocator);
VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( vmaCopyAllocationToMemory(m_allocator, static_cast<VmaAllocation>(srcAllocation), static_cast<VkDeviceSize>(srcAllocationLocalOffset), &dstHostPointer, static_cast<VkDeviceSize>(size)) );
resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::copyAllocationToMemory");
return createResultValueType(result, dstHostPointer);
}
template<typename VectorAllocator>
VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType<std::vector<void, VectorAllocator>>::type Allocator::copyAllocationToMemory(Allocation srcAllocation,
VULKAN_HPP_NAMESPACE::DeviceSize srcAllocationLocalOffset,
VULKAN_HPP_NAMESPACE::DeviceSize size) const {
std::vector<void, VectorAllocator> dstHostPointer(size);
VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( vmaCopyAllocationToMemory(m_allocator, static_cast<VmaAllocation>(srcAllocation), static_cast<VkDeviceSize>(srcAllocationLocalOffset), &dstHostPointer, static_cast<VkDeviceSize>(size)) );
resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::copyAllocationToMemory");
return createResultValueType(result, dstHostPointer);
}
#endif
VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::copyAllocationToMemory(Allocation srcAllocation,
VULKAN_HPP_NAMESPACE::DeviceSize srcAllocationLocalOffset,
void* dstHostPointer,
VULKAN_HPP_NAMESPACE::DeviceSize size) const {
VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( vmaCopyAllocationToMemory(m_allocator, static_cast<VmaAllocation>(srcAllocation), static_cast<VkDeviceSize>(srcAllocationLocalOffset), dstHostPointer, static_cast<VkDeviceSize>(size)) );
return result;
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType<void>::type Allocator::checkCorruption(uint32_t memoryTypeBits) const {
VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( vmaCheckCorruption(m_allocator, memoryTypeBits) );
@ -703,7 +766,7 @@ namespace VMA_HPP_NAMESPACE {
Allocation& allocation = pair.second;
VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( vmaCreateBuffer(m_allocator, reinterpret_cast<const VkBufferCreateInfo*>(&bufferCreateInfo), reinterpret_cast<const VmaAllocationCreateInfo*>(&allocationCreateInfo), reinterpret_cast<VkBuffer*>(&buffer), reinterpret_cast<VmaAllocation*>(&allocation), reinterpret_cast<VmaAllocationInfo*>(static_cast<AllocationInfo*>(allocationInfo))) );
resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::createBuffer");
return createResultValueType(result, createUniqueHandle(pair, this));
return createResultValueType(result, createUniqueHandle(pair, *this));
}
#endif
#endif
@ -738,7 +801,7 @@ namespace VMA_HPP_NAMESPACE {
Allocation& allocation = pair.second;
VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( vmaCreateBufferWithAlignment(m_allocator, reinterpret_cast<const VkBufferCreateInfo*>(&bufferCreateInfo), reinterpret_cast<const VmaAllocationCreateInfo*>(&allocationCreateInfo), static_cast<VkDeviceSize>(minAlignment), reinterpret_cast<VkBuffer*>(&buffer), reinterpret_cast<VmaAllocation*>(&allocation), reinterpret_cast<VmaAllocationInfo*>(static_cast<AllocationInfo*>(allocationInfo))) );
resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::createBufferWithAlignment");
return createResultValueType(result, createUniqueHandle(pair, this));
return createResultValueType(result, createUniqueHandle(pair, *this));
}
#endif
#endif
@ -818,7 +881,7 @@ namespace VMA_HPP_NAMESPACE {
Allocation& allocation = pair.second;
VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( vmaCreateImage(m_allocator, reinterpret_cast<const VkImageCreateInfo*>(&imageCreateInfo), reinterpret_cast<const VmaAllocationCreateInfo*>(&allocationCreateInfo), reinterpret_cast<VkImage*>(&image), reinterpret_cast<VmaAllocation*>(&allocation), reinterpret_cast<VmaAllocationInfo*>(static_cast<AllocationInfo*>(allocationInfo))) );
resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::createImage");
return createResultValueType(result, createUniqueHandle(pair, this));
return createResultValueType(result, createUniqueHandle(pair, *this));
}
#endif
#endif
@ -949,7 +1012,7 @@ namespace VMA_HPP_NAMESPACE {
VirtualAllocation allocation;
VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( vmaVirtualAllocate(m_virtualBlock, reinterpret_cast<const VmaVirtualAllocationCreateInfo*>(&createInfo), reinterpret_cast<VmaVirtualAllocation*>(&allocation), reinterpret_cast<VkDeviceSize*>(static_cast<VULKAN_HPP_NAMESPACE::DeviceSize*>(offset))) );
resultCheck(result, VMA_HPP_NAMESPACE_STRING "::VirtualBlock::virtualAllocate");
return createResultValueType(result, createUniqueHandle(allocation, this));
return createResultValueType(result, createUniqueHandle(allocation, *this));
}
#endif
#endif

View File

@ -14,6 +14,7 @@ namespace VMA_HPP_NAMESPACE {
struct AllocationCreateInfo;
struct PoolCreateInfo;
struct AllocationInfo;
struct AllocationInfo2;
struct DefragmentationInfo;
struct DefragmentationMove;
struct DefragmentationPassMoveInfo;
@ -455,6 +456,12 @@ namespace VMA_HPP_NAMESPACE {
void getAllocationInfo(Allocation allocation,
AllocationInfo* allocationInfo) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS AllocationInfo2 getAllocationInfo2(Allocation allocation) const;
#endif
void getAllocationInfo2(Allocation allocation,
AllocationInfo2* allocationInfo) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
void setAllocationUserData(Allocation allocation,
void* userData) const;
@ -529,6 +536,37 @@ namespace VMA_HPP_NAMESPACE {
const VULKAN_HPP_NAMESPACE::DeviceSize* offsets,
const VULKAN_HPP_NAMESPACE::DeviceSize* sizes) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
typename VULKAN_HPP_NAMESPACE::ResultValueType<void>::type copyMemoryToAllocation(const void* srcHostPointer,
Allocation dstAllocation,
VULKAN_HPP_NAMESPACE::DeviceSize dstAllocationLocalOffset,
VULKAN_HPP_NAMESPACE::DeviceSize size) const;
#else
VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result copyMemoryToAllocation(const void* srcHostPointer,
Allocation dstAllocation,
VULKAN_HPP_NAMESPACE::DeviceSize dstAllocationLocalOffset,
VULKAN_HPP_NAMESPACE::DeviceSize size) const;
#endif
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename VectorAllocator = std::allocator<void>,
typename B = VectorAllocator,
typename std::enable_if<std::is_same<typename B::value_type, void>::value, int>::type = 0>
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename VULKAN_HPP_NAMESPACE::ResultValueType<std::vector<void, VectorAllocator>>::type copyAllocationToMemory(Allocation srcAllocation,
VULKAN_HPP_NAMESPACE::DeviceSize srcAllocationLocalOffset,
VULKAN_HPP_NAMESPACE::DeviceSize size,
VectorAllocator& vectorAllocator) const;
template<typename VectorAllocator = std::allocator<void>>
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename VULKAN_HPP_NAMESPACE::ResultValueType<std::vector<void, VectorAllocator>>::type copyAllocationToMemory(Allocation srcAllocation,
VULKAN_HPP_NAMESPACE::DeviceSize srcAllocationLocalOffset,
VULKAN_HPP_NAMESPACE::DeviceSize size) const;
#endif
VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result copyAllocationToMemory(Allocation srcAllocation,
VULKAN_HPP_NAMESPACE::DeviceSize srcAllocationLocalOffset,
void* dstHostPointer,
VULKAN_HPP_NAMESPACE::DeviceSize size) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
typename VULKAN_HPP_NAMESPACE::ResultValueType<void>::type checkCorruption(uint32_t memoryTypeBits) const;
#else

View File

@ -111,9 +111,9 @@ namespace VMA_HPP_NAMESPACE {
#if VMA_MEMORY_BUDGET || VMA_VULKAN_VERSION >= 1001000
, PFN_vkGetPhysicalDeviceMemoryProperties2KHR vkGetPhysicalDeviceMemoryProperties2KHR_ = {}
#endif
#if VMA_VULKAN_VERSION >= 1003000
, PFN_vkGetDeviceBufferMemoryRequirements vkGetDeviceBufferMemoryRequirements_ = {}
, PFN_vkGetDeviceImageMemoryRequirements vkGetDeviceImageMemoryRequirements_ = {}
#if VMA_KHR_MAINTENANCE4 || VMA_VULKAN_VERSION >= 1003000
, PFN_vkGetDeviceBufferMemoryRequirementsKHR vkGetDeviceBufferMemoryRequirements_ = {}
, PFN_vkGetDeviceImageMemoryRequirementsKHR vkGetDeviceImageMemoryRequirements_ = {}
#endif
) VULKAN_HPP_NOEXCEPT
: vkGetInstanceProcAddr(vkGetInstanceProcAddr_)
@ -146,7 +146,7 @@ namespace VMA_HPP_NAMESPACE {
#if VMA_MEMORY_BUDGET || VMA_VULKAN_VERSION >= 1001000
, vkGetPhysicalDeviceMemoryProperties2KHR(vkGetPhysicalDeviceMemoryProperties2KHR_)
#endif
#if VMA_VULKAN_VERSION >= 1003000
#if VMA_KHR_MAINTENANCE4 || VMA_VULKAN_VERSION >= 1003000
, vkGetDeviceBufferMemoryRequirements(vkGetDeviceBufferMemoryRequirements_)
, vkGetDeviceImageMemoryRequirements(vkGetDeviceImageMemoryRequirements_)
#endif
@ -204,7 +204,7 @@ namespace VMA_HPP_NAMESPACE {
#if VMA_MEMORY_BUDGET || VMA_VULKAN_VERSION >= 1001000
&& vkGetPhysicalDeviceMemoryProperties2KHR == rhs.vkGetPhysicalDeviceMemoryProperties2KHR
#endif
#if VMA_VULKAN_VERSION >= 1003000
#if VMA_KHR_MAINTENANCE4 || VMA_VULKAN_VERSION >= 1003000
&& vkGetDeviceBufferMemoryRequirements == rhs.vkGetDeviceBufferMemoryRequirements
&& vkGetDeviceImageMemoryRequirements == rhs.vkGetDeviceImageMemoryRequirements
#endif
@ -339,14 +339,14 @@ namespace VMA_HPP_NAMESPACE {
return *this;
}
#endif
#if VMA_VULKAN_VERSION >= 1003000
#if VMA_KHR_MAINTENANCE4 || VMA_VULKAN_VERSION >= 1003000
VULKAN_HPP_CONSTEXPR_14 VulkanFunctions& setVkGetDeviceBufferMemoryRequirements(PFN_vkGetDeviceBufferMemoryRequirements vkGetDeviceBufferMemoryRequirements_) VULKAN_HPP_NOEXCEPT {
VULKAN_HPP_CONSTEXPR_14 VulkanFunctions& setVkGetDeviceBufferMemoryRequirements(PFN_vkGetDeviceBufferMemoryRequirementsKHR vkGetDeviceBufferMemoryRequirements_) VULKAN_HPP_NOEXCEPT {
vkGetDeviceBufferMemoryRequirements = vkGetDeviceBufferMemoryRequirements_;
return *this;
}
VULKAN_HPP_CONSTEXPR_14 VulkanFunctions& setVkGetDeviceImageMemoryRequirements(PFN_vkGetDeviceImageMemoryRequirements vkGetDeviceImageMemoryRequirements_) VULKAN_HPP_NOEXCEPT {
VULKAN_HPP_CONSTEXPR_14 VulkanFunctions& setVkGetDeviceImageMemoryRequirements(PFN_vkGetDeviceImageMemoryRequirementsKHR vkGetDeviceImageMemoryRequirements_) VULKAN_HPP_NOEXCEPT {
vkGetDeviceImageMemoryRequirements = vkGetDeviceImageMemoryRequirements_;
return *this;
}
@ -384,9 +384,9 @@ namespace VMA_HPP_NAMESPACE {
#if VMA_MEMORY_BUDGET || VMA_VULKAN_VERSION >= 1001000
PFN_vkGetPhysicalDeviceMemoryProperties2KHR vkGetPhysicalDeviceMemoryProperties2KHR = {};
#endif
#if VMA_VULKAN_VERSION >= 1003000
PFN_vkGetDeviceBufferMemoryRequirements vkGetDeviceBufferMemoryRequirements = {};
PFN_vkGetDeviceImageMemoryRequirements vkGetDeviceImageMemoryRequirements = {};
#if VMA_KHR_MAINTENANCE4 || VMA_VULKAN_VERSION >= 1003000
PFN_vkGetDeviceBufferMemoryRequirementsKHR vkGetDeviceBufferMemoryRequirements = {};
PFN_vkGetDeviceImageMemoryRequirementsKHR vkGetDeviceImageMemoryRequirements = {};
#endif
};
VULKAN_HPP_STATIC_ASSERT(sizeof(VulkanFunctions) == sizeof(VmaVulkanFunctions),
@ -1297,6 +1297,79 @@ namespace VMA_HPP_NAMESPACE {
VULKAN_HPP_STATIC_ASSERT(std::is_nothrow_move_constructible<AllocationInfo>::value,
"AllocationInfo is not nothrow_move_constructible!");
struct AllocationInfo2 {
using NativeType = VmaAllocationInfo2;
#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS )
VULKAN_HPP_CONSTEXPR AllocationInfo2(
AllocationInfo allocationInfo_ = {}
, VULKAN_HPP_NAMESPACE::DeviceSize blockSize_ = {}
, VULKAN_HPP_NAMESPACE::Bool32 dedicatedMemory_ = {}
) VULKAN_HPP_NOEXCEPT
: allocationInfo(allocationInfo_)
, blockSize(blockSize_)
, dedicatedMemory(dedicatedMemory_)
{}
VULKAN_HPP_CONSTEXPR AllocationInfo2(AllocationInfo2 const &) VULKAN_HPP_NOEXCEPT = default;
AllocationInfo2(VmaAllocationInfo2 const & rhs) VULKAN_HPP_NOEXCEPT : AllocationInfo2(*reinterpret_cast<AllocationInfo2 const *>(&rhs)) {}
#endif
AllocationInfo2& operator=(AllocationInfo2 const &) VULKAN_HPP_NOEXCEPT = default;
AllocationInfo2& operator=(VmaAllocationInfo2 const & rhs) VULKAN_HPP_NOEXCEPT {
*this = *reinterpret_cast<VMA_HPP_NAMESPACE::AllocationInfo2 const *>(&rhs);
return *this;
}
explicit operator VmaAllocationInfo2 const &() const VULKAN_HPP_NOEXCEPT {
return *reinterpret_cast<const VmaAllocationInfo2 *>(this);
}
explicit operator VmaAllocationInfo2&() VULKAN_HPP_NOEXCEPT {
return *reinterpret_cast<VmaAllocationInfo2 *>(this);
}
#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR )
bool operator==(AllocationInfo2 const &) const = default;
#else
bool operator==(AllocationInfo2 const & rhs) const VULKAN_HPP_NOEXCEPT {
return allocationInfo == rhs.allocationInfo
&& blockSize == rhs.blockSize
&& dedicatedMemory == rhs.dedicatedMemory
;
}
#endif
#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VULKAN_HPP_CONSTEXPR_14 AllocationInfo2& setAllocationInfo(AllocationInfo allocationInfo_) VULKAN_HPP_NOEXCEPT {
allocationInfo = allocationInfo_;
return *this;
}
VULKAN_HPP_CONSTEXPR_14 AllocationInfo2& setBlockSize(VULKAN_HPP_NAMESPACE::DeviceSize blockSize_) VULKAN_HPP_NOEXCEPT {
blockSize = blockSize_;
return *this;
}
VULKAN_HPP_CONSTEXPR_14 AllocationInfo2& setDedicatedMemory(VULKAN_HPP_NAMESPACE::Bool32 dedicatedMemory_) VULKAN_HPP_NOEXCEPT {
dedicatedMemory = dedicatedMemory_;
return *this;
}
#endif
public:
AllocationInfo allocationInfo = {};
VULKAN_HPP_NAMESPACE::DeviceSize blockSize = {};
VULKAN_HPP_NAMESPACE::Bool32 dedicatedMemory = {};
};
VULKAN_HPP_STATIC_ASSERT(sizeof(AllocationInfo2) == sizeof(VmaAllocationInfo2),
"struct and wrapper have different size!");
VULKAN_HPP_STATIC_ASSERT(std::is_standard_layout<AllocationInfo2>::value,
"struct wrapper is not a standard layout!");
VULKAN_HPP_STATIC_ASSERT(std::is_nothrow_move_constructible<AllocationInfo2>::value,
"AllocationInfo2 is not nothrow_move_constructible!");
struct DefragmentationInfo {
using NativeType = VmaDefragmentationInfo;