#ifndef VULKAN_MEMORY_ALLOCATOR_FUNCS_HPP #define VULKAN_MEMORY_ALLOCATOR_FUNCS_HPP namespace VMA_HPP_NAMESPACE { #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE void Allocator::destroy() const { vmaDestroyAllocator(m_allocator); } #else VULKAN_HPP_INLINE void Allocator::destroy() const { vmaDestroyAllocator(m_allocator); } #endif #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE AllocatorInfo Allocator::getAllocatorInfo() const { AllocatorInfo allocatorInfo; vmaGetAllocatorInfo(m_allocator, reinterpret_cast(&allocatorInfo)); return allocatorInfo; } #endif VULKAN_HPP_INLINE void Allocator::getAllocatorInfo(AllocatorInfo* allocatorInfo) const { vmaGetAllocatorInfo(m_allocator, reinterpret_cast(allocatorInfo)); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE const VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties* Allocator::getPhysicalDeviceProperties() const { const VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties* physicalDeviceProperties; vmaGetPhysicalDeviceProperties(m_allocator, reinterpret_cast(&physicalDeviceProperties)); return physicalDeviceProperties; } #endif VULKAN_HPP_INLINE void Allocator::getPhysicalDeviceProperties(const VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties** physicalDeviceProperties) const { vmaGetPhysicalDeviceProperties(m_allocator, reinterpret_cast(physicalDeviceProperties)); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE const VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties* Allocator::getMemoryProperties() const { const VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties* physicalDeviceMemoryProperties; vmaGetMemoryProperties(m_allocator, reinterpret_cast(&physicalDeviceMemoryProperties)); return physicalDeviceMemoryProperties; } #endif VULKAN_HPP_INLINE void Allocator::getMemoryProperties(const VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties** physicalDeviceMemoryProperties) const { vmaGetMemoryProperties(m_allocator, reinterpret_cast(physicalDeviceMemoryProperties)); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryPropertyFlags Allocator::getMemoryTypeProperties(uint32_t memoryTypeIndex) const { VULKAN_HPP_NAMESPACE::MemoryPropertyFlags flags; vmaGetMemoryTypeProperties(m_allocator, memoryTypeIndex, reinterpret_cast(&flags)); return flags; } #endif VULKAN_HPP_INLINE void Allocator::getMemoryTypeProperties(uint32_t memoryTypeIndex, VULKAN_HPP_NAMESPACE::MemoryPropertyFlags* flags) const { vmaGetMemoryTypeProperties(m_allocator, memoryTypeIndex, reinterpret_cast(flags)); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE void Allocator::setCurrentFrameIndex(uint32_t frameIndex) const { vmaSetCurrentFrameIndex(m_allocator, frameIndex); } #else VULKAN_HPP_INLINE void Allocator::setCurrentFrameIndex(uint32_t frameIndex) const { vmaSetCurrentFrameIndex(m_allocator, frameIndex); } #endif #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE TotalStatistics Allocator::calculateStatistics() const { TotalStatistics stats; vmaCalculateStatistics(m_allocator, reinterpret_cast(&stats)); return stats; } #endif VULKAN_HPP_INLINE void Allocator::calculateStatistics(TotalStatistics* stats) const { vmaCalculateStatistics(m_allocator, reinterpret_cast(stats)); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template::value, int>::type> VULKAN_HPP_INLINE std::vector Allocator::getHeapBudgets(VectorAllocator& vectorAllocator) const { std::vector budgets(getMemoryProperties()->memoryHeapCount, vectorAllocator); vmaGetHeapBudgets(m_allocator, reinterpret_cast(budgets.data())); return budgets; } template VULKAN_HPP_INLINE std::vector Allocator::getHeapBudgets() const { std::vector budgets(getMemoryProperties()->memoryHeapCount); vmaGetHeapBudgets(m_allocator, reinterpret_cast(budgets.data())); return budgets; } #endif VULKAN_HPP_INLINE void Allocator::getHeapBudgets(Budget* budgets) const { vmaGetHeapBudgets(m_allocator, reinterpret_cast(budgets)); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::findMemoryTypeIndex(uint32_t memoryTypeBits, const AllocationCreateInfo& allocationCreateInfo) const { uint32_t memoryTypeIndex; VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaFindMemoryTypeIndex(m_allocator, memoryTypeBits, reinterpret_cast(&allocationCreateInfo), &memoryTypeIndex) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::findMemoryTypeIndex"); return createResultValueType(result, memoryTypeIndex); } #endif VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::findMemoryTypeIndex(uint32_t memoryTypeBits, const AllocationCreateInfo* allocationCreateInfo, uint32_t* memoryTypeIndex) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaFindMemoryTypeIndex(m_allocator, memoryTypeBits, reinterpret_cast(allocationCreateInfo), memoryTypeIndex) ); return result; } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::findMemoryTypeIndexForBufferInfo(const VULKAN_HPP_NAMESPACE::BufferCreateInfo& bufferCreateInfo, const AllocationCreateInfo& allocationCreateInfo) const { uint32_t memoryTypeIndex; VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaFindMemoryTypeIndexForBufferInfo(m_allocator, reinterpret_cast(&bufferCreateInfo), reinterpret_cast(&allocationCreateInfo), &memoryTypeIndex) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::findMemoryTypeIndexForBufferInfo"); return createResultValueType(result, memoryTypeIndex); } #endif VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::findMemoryTypeIndexForBufferInfo(const VULKAN_HPP_NAMESPACE::BufferCreateInfo* bufferCreateInfo, const AllocationCreateInfo* allocationCreateInfo, uint32_t* memoryTypeIndex) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaFindMemoryTypeIndexForBufferInfo(m_allocator, reinterpret_cast(bufferCreateInfo), reinterpret_cast(allocationCreateInfo), memoryTypeIndex) ); return result; } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::findMemoryTypeIndexForImageInfo(const VULKAN_HPP_NAMESPACE::ImageCreateInfo& imageCreateInfo, const AllocationCreateInfo& allocationCreateInfo) const { uint32_t memoryTypeIndex; VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaFindMemoryTypeIndexForImageInfo(m_allocator, reinterpret_cast(&imageCreateInfo), reinterpret_cast(&allocationCreateInfo), &memoryTypeIndex) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::findMemoryTypeIndexForImageInfo"); return createResultValueType(result, memoryTypeIndex); } #endif VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::findMemoryTypeIndexForImageInfo(const VULKAN_HPP_NAMESPACE::ImageCreateInfo* imageCreateInfo, const AllocationCreateInfo* allocationCreateInfo, uint32_t* memoryTypeIndex) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaFindMemoryTypeIndexForImageInfo(m_allocator, reinterpret_cast(imageCreateInfo), reinterpret_cast(allocationCreateInfo), memoryTypeIndex) ); return result; } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::createPool(const PoolCreateInfo& createInfo) const { Pool pool; VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCreatePool(m_allocator, reinterpret_cast(&createInfo), reinterpret_cast(&pool)) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::createPool"); return createResultValueType(result, pool); } #ifndef VULKAN_HPP_NO_SMART_HANDLE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::createPoolUnique(const PoolCreateInfo& createInfo) const { Pool pool; VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCreatePool(m_allocator, reinterpret_cast(&createInfo), reinterpret_cast(&pool)) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::createPool"); return createResultValueType(result, createUniqueHandle(pool, this)); } #endif #endif VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::createPool(const PoolCreateInfo* createInfo, Pool* pool) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCreatePool(m_allocator, reinterpret_cast(createInfo), reinterpret_cast(pool)) ); return result; } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE void Allocator::destroyPool(Pool pool) const { vmaDestroyPool(m_allocator, static_cast(pool)); } #else VULKAN_HPP_INLINE void Allocator::destroyPool(Pool pool) const { vmaDestroyPool(m_allocator, static_cast(pool)); } #endif #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE Statistics Allocator::getPoolStatistics(Pool pool) const { Statistics poolStats; vmaGetPoolStatistics(m_allocator, static_cast(pool), reinterpret_cast(&poolStats)); return poolStats; } #endif VULKAN_HPP_INLINE void Allocator::getPoolStatistics(Pool pool, Statistics* poolStats) const { vmaGetPoolStatistics(m_allocator, static_cast(pool), reinterpret_cast(poolStats)); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE DetailedStatistics Allocator::calculatePoolStatistics(Pool pool) const { DetailedStatistics poolStats; vmaCalculatePoolStatistics(m_allocator, static_cast(pool), reinterpret_cast(&poolStats)); return poolStats; } #endif VULKAN_HPP_INLINE void Allocator::calculatePoolStatistics(Pool pool, DetailedStatistics* poolStats) const { vmaCalculatePoolStatistics(m_allocator, static_cast(pool), reinterpret_cast(poolStats)); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::checkPoolCorruption(Pool pool) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCheckPoolCorruption(m_allocator, static_cast(pool)) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::checkPoolCorruption"); return createResultValueType(result); } #else VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::checkPoolCorruption(Pool pool) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCheckPoolCorruption(m_allocator, static_cast(pool)) ); return result; } #endif #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE const char* Allocator::getPoolName(Pool pool) const { const char* name; vmaGetPoolName(m_allocator, static_cast(pool), &name); return name; } #endif VULKAN_HPP_INLINE void Allocator::getPoolName(Pool pool, const char** name) const { vmaGetPoolName(m_allocator, static_cast(pool), name); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE void Allocator::setPoolName(Pool pool, const char* name) const { vmaSetPoolName(m_allocator, static_cast(pool), name); } #else VULKAN_HPP_INLINE void Allocator::setPoolName(Pool pool, const char* name) const { vmaSetPoolName(m_allocator, static_cast(pool), name); } #endif #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::allocateMemory(const VULKAN_HPP_NAMESPACE::MemoryRequirements& vkMemoryRequirements, const AllocationCreateInfo& createInfo, VULKAN_HPP_NAMESPACE::Optional allocationInfo) const { Allocation allocation; VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaAllocateMemory(m_allocator, reinterpret_cast(&vkMemoryRequirements), reinterpret_cast(&createInfo), reinterpret_cast(&allocation), reinterpret_cast(static_cast(allocationInfo))) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::allocateMemory"); return createResultValueType(result, allocation); } #ifndef VULKAN_HPP_NO_SMART_HANDLE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::allocateMemoryUnique(const VULKAN_HPP_NAMESPACE::MemoryRequirements& vkMemoryRequirements, const AllocationCreateInfo& createInfo, VULKAN_HPP_NAMESPACE::Optional allocationInfo) const { Allocation allocation; VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaAllocateMemory(m_allocator, reinterpret_cast(&vkMemoryRequirements), reinterpret_cast(&createInfo), reinterpret_cast(&allocation), reinterpret_cast(static_cast(allocationInfo))) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::allocateMemory"); return createResultValueType(result, createUniqueHandle(allocation, this)); } #endif #endif VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::allocateMemory(const VULKAN_HPP_NAMESPACE::MemoryRequirements* vkMemoryRequirements, const AllocationCreateInfo* createInfo, Allocation* allocation, AllocationInfo* allocationInfo) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaAllocateMemory(m_allocator, reinterpret_cast(vkMemoryRequirements), reinterpret_cast(createInfo), reinterpret_cast(allocation), reinterpret_cast(allocationInfo)) ); return result; } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template::value, int>::type> VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType>::type Allocator::allocateMemoryPages(VULKAN_HPP_NAMESPACE::ArrayProxy vkMemoryRequirements, VULKAN_HPP_NAMESPACE::ArrayProxy createInfo, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries allocationInfo, VectorAllocator& vectorAllocator) const { size_t allocationCount = vkMemoryRequirements.size(); std::vector allocations(allocationCount, vectorAllocator); VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaAllocateMemoryPages(m_allocator, reinterpret_cast(vkMemoryRequirements.data()), reinterpret_cast(createInfo.data()), allocationCount, reinterpret_cast(allocations.data()), reinterpret_cast(allocationInfo.data())) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::allocateMemoryPages"); return createResultValueType(result, allocations); } template VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType>::type Allocator::allocateMemoryPages(VULKAN_HPP_NAMESPACE::ArrayProxy vkMemoryRequirements, VULKAN_HPP_NAMESPACE::ArrayProxy createInfo, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries allocationInfo) const { size_t allocationCount = vkMemoryRequirements.size(); std::vector allocations(allocationCount); VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaAllocateMemoryPages(m_allocator, reinterpret_cast(vkMemoryRequirements.data()), reinterpret_cast(createInfo.data()), allocationCount, reinterpret_cast(allocations.data()), reinterpret_cast(allocationInfo.data())) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::allocateMemoryPages"); return createResultValueType(result, allocations); } #ifndef VULKAN_HPP_NO_SMART_HANDLE template::value, int>::type> VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType>::type Allocator::allocateMemoryPagesUnique(VULKAN_HPP_NAMESPACE::ArrayProxy vkMemoryRequirements, VULKAN_HPP_NAMESPACE::ArrayProxy createInfo, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries allocationInfo, VectorAllocator& vectorAllocator) const { size_t allocationCount = vkMemoryRequirements.size(); std::vector allocations(allocationCount); VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaAllocateMemoryPages(m_allocator, reinterpret_cast(vkMemoryRequirements.data()), reinterpret_cast(createInfo.data()), allocationCount, reinterpret_cast(allocations.data()), reinterpret_cast(allocationInfo.data())) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::allocateMemoryPages"); return createResultValueType(result, createUniqueHandleVector(allocations, this, vectorAllocator)); } template VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType>::type Allocator::allocateMemoryPagesUnique(VULKAN_HPP_NAMESPACE::ArrayProxy vkMemoryRequirements, VULKAN_HPP_NAMESPACE::ArrayProxy createInfo, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries allocationInfo) const { size_t allocationCount = vkMemoryRequirements.size(); std::vector allocations(allocationCount); VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaAllocateMemoryPages(m_allocator, reinterpret_cast(vkMemoryRequirements.data()), reinterpret_cast(createInfo.data()), allocationCount, reinterpret_cast(allocations.data()), reinterpret_cast(allocationInfo.data())) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::allocateMemoryPages"); return createResultValueType(result, createUniqueHandleVector(allocations, this, VectorAllocator())); } #endif #endif VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::allocateMemoryPages(const VULKAN_HPP_NAMESPACE::MemoryRequirements* vkMemoryRequirements, const AllocationCreateInfo* createInfo, size_t allocationCount, Allocation* allocations, AllocationInfo* allocationInfo) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaAllocateMemoryPages(m_allocator, reinterpret_cast(vkMemoryRequirements), reinterpret_cast(createInfo), allocationCount, reinterpret_cast(allocations), reinterpret_cast(allocationInfo)) ); return result; } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::allocateMemoryForBuffer(VULKAN_HPP_NAMESPACE::Buffer buffer, const AllocationCreateInfo& createInfo, VULKAN_HPP_NAMESPACE::Optional allocationInfo) const { Allocation allocation; VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaAllocateMemoryForBuffer(m_allocator, static_cast(buffer), reinterpret_cast(&createInfo), reinterpret_cast(&allocation), reinterpret_cast(static_cast(allocationInfo))) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::allocateMemoryForBuffer"); return createResultValueType(result, allocation); } #ifndef VULKAN_HPP_NO_SMART_HANDLE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::allocateMemoryForBufferUnique(VULKAN_HPP_NAMESPACE::Buffer buffer, const AllocationCreateInfo& createInfo, VULKAN_HPP_NAMESPACE::Optional allocationInfo) const { Allocation allocation; VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaAllocateMemoryForBuffer(m_allocator, static_cast(buffer), reinterpret_cast(&createInfo), reinterpret_cast(&allocation), reinterpret_cast(static_cast(allocationInfo))) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::allocateMemoryForBuffer"); return createResultValueType(result, createUniqueHandle(allocation, this)); } #endif #endif VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::allocateMemoryForBuffer(VULKAN_HPP_NAMESPACE::Buffer buffer, const AllocationCreateInfo* createInfo, Allocation* allocation, AllocationInfo* allocationInfo) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaAllocateMemoryForBuffer(m_allocator, static_cast(buffer), reinterpret_cast(createInfo), reinterpret_cast(allocation), reinterpret_cast(allocationInfo)) ); return result; } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::allocateMemoryForImage(VULKAN_HPP_NAMESPACE::Image image, const AllocationCreateInfo& createInfo, VULKAN_HPP_NAMESPACE::Optional allocationInfo) const { Allocation allocation; VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaAllocateMemoryForImage(m_allocator, static_cast(image), reinterpret_cast(&createInfo), reinterpret_cast(&allocation), reinterpret_cast(static_cast(allocationInfo))) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::allocateMemoryForImage"); return createResultValueType(result, allocation); } #ifndef VULKAN_HPP_NO_SMART_HANDLE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::allocateMemoryForImageUnique(VULKAN_HPP_NAMESPACE::Image image, const AllocationCreateInfo& createInfo, VULKAN_HPP_NAMESPACE::Optional allocationInfo) const { Allocation allocation; VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaAllocateMemoryForImage(m_allocator, static_cast(image), reinterpret_cast(&createInfo), reinterpret_cast(&allocation), reinterpret_cast(static_cast(allocationInfo))) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::allocateMemoryForImage"); return createResultValueType(result, createUniqueHandle(allocation, this)); } #endif #endif VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::allocateMemoryForImage(VULKAN_HPP_NAMESPACE::Image image, const AllocationCreateInfo* createInfo, Allocation* allocation, AllocationInfo* allocationInfo) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaAllocateMemoryForImage(m_allocator, static_cast(image), reinterpret_cast(createInfo), reinterpret_cast(allocation), reinterpret_cast(allocationInfo)) ); return result; } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE void Allocator::freeMemory(const Allocation allocation) const { vmaFreeMemory(m_allocator, static_cast(allocation)); } #else VULKAN_HPP_INLINE void Allocator::freeMemory(const Allocation allocation) const { vmaFreeMemory(m_allocator, static_cast(allocation)); } #endif #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE void Allocator::freeMemoryPages(VULKAN_HPP_NAMESPACE::ArrayProxy allocations) const { size_t allocationCount = allocations.size(); vmaFreeMemoryPages(m_allocator, allocationCount, reinterpret_cast(allocations.data())); } #endif VULKAN_HPP_INLINE void Allocator::freeMemoryPages(size_t allocationCount, const Allocation* allocations) const { vmaFreeMemoryPages(m_allocator, allocationCount, reinterpret_cast(allocations)); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE AllocationInfo Allocator::getAllocationInfo(Allocation allocation) const { AllocationInfo allocationInfo; vmaGetAllocationInfo(m_allocator, static_cast(allocation), reinterpret_cast(&allocationInfo)); return allocationInfo; } #endif VULKAN_HPP_INLINE void Allocator::getAllocationInfo(Allocation allocation, AllocationInfo* allocationInfo) const { vmaGetAllocationInfo(m_allocator, static_cast(allocation), reinterpret_cast(allocationInfo)); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE void Allocator::setAllocationUserData(Allocation allocation, void* userData) const { vmaSetAllocationUserData(m_allocator, static_cast(allocation), userData); } #else VULKAN_HPP_INLINE void Allocator::setAllocationUserData(Allocation allocation, void* userData) const { vmaSetAllocationUserData(m_allocator, static_cast(allocation), userData); } #endif #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE void Allocator::setAllocationName(Allocation allocation, const char* name) const { vmaSetAllocationName(m_allocator, static_cast(allocation), name); } #else VULKAN_HPP_INLINE void Allocator::setAllocationName(Allocation allocation, const char* name) const { vmaSetAllocationName(m_allocator, static_cast(allocation), name); } #endif #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryPropertyFlags Allocator::getAllocationMemoryProperties(Allocation allocation) const { VULKAN_HPP_NAMESPACE::MemoryPropertyFlags flags; vmaGetAllocationMemoryProperties(m_allocator, static_cast(allocation), reinterpret_cast(&flags)); return flags; } #endif VULKAN_HPP_INLINE void Allocator::getAllocationMemoryProperties(Allocation allocation, VULKAN_HPP_NAMESPACE::MemoryPropertyFlags* flags) const { vmaGetAllocationMemoryProperties(m_allocator, static_cast(allocation), reinterpret_cast(flags)); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::mapMemory(Allocation allocation) const { void* data; VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaMapMemory(m_allocator, static_cast(allocation), &data) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::mapMemory"); return createResultValueType(result, data); } #endif VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::mapMemory(Allocation allocation, void** data) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaMapMemory(m_allocator, static_cast(allocation), data) ); return result; } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE void Allocator::unmapMemory(Allocation allocation) const { vmaUnmapMemory(m_allocator, static_cast(allocation)); } #else VULKAN_HPP_INLINE void Allocator::unmapMemory(Allocation allocation) const { vmaUnmapMemory(m_allocator, static_cast(allocation)); } #endif #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::flushAllocation(Allocation allocation, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::DeviceSize size) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaFlushAllocation(m_allocator, static_cast(allocation), static_cast(offset), static_cast(size)) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::flushAllocation"); return createResultValueType(result); } #else VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::flushAllocation(Allocation allocation, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::DeviceSize size) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaFlushAllocation(m_allocator, static_cast(allocation), static_cast(offset), static_cast(size)) ); return result; } #endif #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::invalidateAllocation(Allocation allocation, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::DeviceSize size) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaInvalidateAllocation(m_allocator, static_cast(allocation), static_cast(offset), static_cast(size)) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::invalidateAllocation"); return createResultValueType(result); } #else VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::invalidateAllocation(Allocation allocation, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::DeviceSize size) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaInvalidateAllocation(m_allocator, static_cast(allocation), static_cast(offset), static_cast(size)) ); return result; } #endif #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::flushAllocations(VULKAN_HPP_NAMESPACE::ArrayProxy allocations, VULKAN_HPP_NAMESPACE::ArrayProxy offsets, VULKAN_HPP_NAMESPACE::ArrayProxy sizes) const { uint32_t allocationCount = allocations.size(); VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaFlushAllocations(m_allocator, allocationCount, reinterpret_cast(allocations.data()), reinterpret_cast(offsets.data()), reinterpret_cast(sizes.data())) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::flushAllocations"); return createResultValueType(result); } #endif VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::flushAllocations(uint32_t allocationCount, const Allocation* allocations, const VULKAN_HPP_NAMESPACE::DeviceSize* offsets, const VULKAN_HPP_NAMESPACE::DeviceSize* sizes) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaFlushAllocations(m_allocator, allocationCount, reinterpret_cast(allocations), reinterpret_cast(offsets), reinterpret_cast(sizes)) ); return result; } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::invalidateAllocations(VULKAN_HPP_NAMESPACE::ArrayProxy allocations, VULKAN_HPP_NAMESPACE::ArrayProxy offsets, VULKAN_HPP_NAMESPACE::ArrayProxy sizes) const { uint32_t allocationCount = allocations.size(); VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaInvalidateAllocations(m_allocator, allocationCount, reinterpret_cast(allocations.data()), reinterpret_cast(offsets.data()), reinterpret_cast(sizes.data())) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::invalidateAllocations"); return createResultValueType(result); } #endif VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::invalidateAllocations(uint32_t allocationCount, const Allocation* allocations, const VULKAN_HPP_NAMESPACE::DeviceSize* offsets, const VULKAN_HPP_NAMESPACE::DeviceSize* sizes) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaInvalidateAllocations(m_allocator, allocationCount, reinterpret_cast(allocations), reinterpret_cast(offsets), reinterpret_cast(sizes)) ); return result; } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::checkCorruption(uint32_t memoryTypeBits) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCheckCorruption(m_allocator, memoryTypeBits) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::checkCorruption"); return createResultValueType(result); } #else VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::checkCorruption(uint32_t memoryTypeBits) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCheckCorruption(m_allocator, memoryTypeBits) ); return result; } #endif #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::beginDefragmentation(const DefragmentationInfo& info) const { DefragmentationContext context; VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaBeginDefragmentation(m_allocator, reinterpret_cast(&info), reinterpret_cast(&context)) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::beginDefragmentation"); return createResultValueType(result, context); } #endif VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::beginDefragmentation(const DefragmentationInfo* info, DefragmentationContext* context) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaBeginDefragmentation(m_allocator, reinterpret_cast(info), reinterpret_cast(context)) ); return result; } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE void Allocator::endDefragmentation(DefragmentationContext context, VULKAN_HPP_NAMESPACE::Optional stats) const { vmaEndDefragmentation(m_allocator, static_cast(context), reinterpret_cast(static_cast(stats))); } #endif VULKAN_HPP_INLINE void Allocator::endDefragmentation(DefragmentationContext context, DefragmentationStats* stats) const { vmaEndDefragmentation(m_allocator, static_cast(context), reinterpret_cast(stats)); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::beginDefragmentationPass(DefragmentationContext context) const { DefragmentationPassMoveInfo passInfo; VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaBeginDefragmentationPass(m_allocator, static_cast(context), reinterpret_cast(&passInfo)) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::beginDefragmentationPass"); return createResultValueType(result, passInfo); } #endif VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::beginDefragmentationPass(DefragmentationContext context, DefragmentationPassMoveInfo* passInfo) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaBeginDefragmentationPass(m_allocator, static_cast(context), reinterpret_cast(passInfo)) ); return result; } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::endDefragmentationPass(DefragmentationContext context) const { DefragmentationPassMoveInfo passInfo; VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaEndDefragmentationPass(m_allocator, static_cast(context), reinterpret_cast(&passInfo)) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::endDefragmentationPass"); return createResultValueType(result, passInfo); } #endif VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::endDefragmentationPass(DefragmentationContext context, DefragmentationPassMoveInfo* passInfo) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaEndDefragmentationPass(m_allocator, static_cast(context), reinterpret_cast(passInfo)) ); return result; } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::bindBufferMemory(Allocation allocation, VULKAN_HPP_NAMESPACE::Buffer buffer) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaBindBufferMemory(m_allocator, static_cast(allocation), static_cast(buffer)) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::bindBufferMemory"); return createResultValueType(result); } #else VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::bindBufferMemory(Allocation allocation, VULKAN_HPP_NAMESPACE::Buffer buffer) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaBindBufferMemory(m_allocator, static_cast(allocation), static_cast(buffer)) ); return result; } #endif #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::bindBufferMemory2(Allocation allocation, VULKAN_HPP_NAMESPACE::DeviceSize allocationLocalOffset, VULKAN_HPP_NAMESPACE::Buffer buffer, const void* next) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaBindBufferMemory2(m_allocator, static_cast(allocation), static_cast(allocationLocalOffset), static_cast(buffer), next) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::bindBufferMemory2"); return createResultValueType(result); } #else VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::bindBufferMemory2(Allocation allocation, VULKAN_HPP_NAMESPACE::DeviceSize allocationLocalOffset, VULKAN_HPP_NAMESPACE::Buffer buffer, const void* next) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaBindBufferMemory2(m_allocator, static_cast(allocation), static_cast(allocationLocalOffset), static_cast(buffer), next) ); return result; } #endif #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::bindImageMemory(Allocation allocation, VULKAN_HPP_NAMESPACE::Image image) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaBindImageMemory(m_allocator, static_cast(allocation), static_cast(image)) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::bindImageMemory"); return createResultValueType(result); } #else VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::bindImageMemory(Allocation allocation, VULKAN_HPP_NAMESPACE::Image image) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaBindImageMemory(m_allocator, static_cast(allocation), static_cast(image)) ); return result; } #endif #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::bindImageMemory2(Allocation allocation, VULKAN_HPP_NAMESPACE::DeviceSize allocationLocalOffset, VULKAN_HPP_NAMESPACE::Image image, const void* next) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaBindImageMemory2(m_allocator, static_cast(allocation), static_cast(allocationLocalOffset), static_cast(image), next) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::bindImageMemory2"); return createResultValueType(result); } #else VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::bindImageMemory2(Allocation allocation, VULKAN_HPP_NAMESPACE::DeviceSize allocationLocalOffset, VULKAN_HPP_NAMESPACE::Image image, const void* next) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaBindImageMemory2(m_allocator, static_cast(allocation), static_cast(allocationLocalOffset), static_cast(image), next) ); return result; } #endif #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType>::type Allocator::createBuffer(const VULKAN_HPP_NAMESPACE::BufferCreateInfo& bufferCreateInfo, const AllocationCreateInfo& allocationCreateInfo, VULKAN_HPP_NAMESPACE::Optional allocationInfo) const { std::pair pair; VULKAN_HPP_NAMESPACE::Buffer& buffer = pair.first; Allocation& allocation = pair.second; VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCreateBuffer(m_allocator, reinterpret_cast(&bufferCreateInfo), reinterpret_cast(&allocationCreateInfo), reinterpret_cast(&buffer), reinterpret_cast(&allocation), reinterpret_cast(static_cast(allocationInfo))) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::createBuffer"); return createResultValueType(result, pair); } #ifndef VULKAN_HPP_NO_SMART_HANDLE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType>::type Allocator::createBufferUnique(const VULKAN_HPP_NAMESPACE::BufferCreateInfo& bufferCreateInfo, const AllocationCreateInfo& allocationCreateInfo, VULKAN_HPP_NAMESPACE::Optional allocationInfo) const { std::pair pair; VULKAN_HPP_NAMESPACE::Buffer& buffer = pair.first; Allocation& allocation = pair.second; VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCreateBuffer(m_allocator, reinterpret_cast(&bufferCreateInfo), reinterpret_cast(&allocationCreateInfo), reinterpret_cast(&buffer), reinterpret_cast(&allocation), reinterpret_cast(static_cast(allocationInfo))) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::createBuffer"); return createResultValueType(result, createUniqueHandle(pair, this)); } #endif #endif VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::createBuffer(const VULKAN_HPP_NAMESPACE::BufferCreateInfo* bufferCreateInfo, const AllocationCreateInfo* allocationCreateInfo, VULKAN_HPP_NAMESPACE::Buffer* buffer, Allocation* allocation, AllocationInfo* allocationInfo) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCreateBuffer(m_allocator, reinterpret_cast(bufferCreateInfo), reinterpret_cast(allocationCreateInfo), reinterpret_cast(buffer), reinterpret_cast(allocation), reinterpret_cast(allocationInfo)) ); return result; } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType>::type Allocator::createBufferWithAlignment(const VULKAN_HPP_NAMESPACE::BufferCreateInfo& bufferCreateInfo, const AllocationCreateInfo& allocationCreateInfo, VULKAN_HPP_NAMESPACE::DeviceSize minAlignment, VULKAN_HPP_NAMESPACE::Optional allocationInfo) const { std::pair pair; VULKAN_HPP_NAMESPACE::Buffer& buffer = pair.first; Allocation& allocation = pair.second; VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCreateBufferWithAlignment(m_allocator, reinterpret_cast(&bufferCreateInfo), reinterpret_cast(&allocationCreateInfo), static_cast(minAlignment), reinterpret_cast(&buffer), reinterpret_cast(&allocation), reinterpret_cast(static_cast(allocationInfo))) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::createBufferWithAlignment"); return createResultValueType(result, pair); } #ifndef VULKAN_HPP_NO_SMART_HANDLE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType>::type Allocator::createBufferWithAlignmentUnique(const VULKAN_HPP_NAMESPACE::BufferCreateInfo& bufferCreateInfo, const AllocationCreateInfo& allocationCreateInfo, VULKAN_HPP_NAMESPACE::DeviceSize minAlignment, VULKAN_HPP_NAMESPACE::Optional allocationInfo) const { std::pair pair; VULKAN_HPP_NAMESPACE::Buffer& buffer = pair.first; Allocation& allocation = pair.second; VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCreateBufferWithAlignment(m_allocator, reinterpret_cast(&bufferCreateInfo), reinterpret_cast(&allocationCreateInfo), static_cast(minAlignment), reinterpret_cast(&buffer), reinterpret_cast(&allocation), reinterpret_cast(static_cast(allocationInfo))) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::createBufferWithAlignment"); return createResultValueType(result, createUniqueHandle(pair, this)); } #endif #endif VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::createBufferWithAlignment(const VULKAN_HPP_NAMESPACE::BufferCreateInfo* bufferCreateInfo, const AllocationCreateInfo* allocationCreateInfo, VULKAN_HPP_NAMESPACE::DeviceSize minAlignment, VULKAN_HPP_NAMESPACE::Buffer* buffer, Allocation* allocation, AllocationInfo* allocationInfo) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCreateBufferWithAlignment(m_allocator, reinterpret_cast(bufferCreateInfo), reinterpret_cast(allocationCreateInfo), static_cast(minAlignment), reinterpret_cast(buffer), reinterpret_cast(allocation), reinterpret_cast(allocationInfo)) ); return result; } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::createAliasingBuffer(Allocation allocation, const VULKAN_HPP_NAMESPACE::BufferCreateInfo& bufferCreateInfo) const { VULKAN_HPP_NAMESPACE::Buffer buffer; VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCreateAliasingBuffer(m_allocator, static_cast(allocation), reinterpret_cast(&bufferCreateInfo), reinterpret_cast(&buffer)) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::createAliasingBuffer"); return createResultValueType(result, buffer); } #endif VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::createAliasingBuffer(Allocation allocation, const VULKAN_HPP_NAMESPACE::BufferCreateInfo* bufferCreateInfo, VULKAN_HPP_NAMESPACE::Buffer* buffer) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCreateAliasingBuffer(m_allocator, static_cast(allocation), reinterpret_cast(bufferCreateInfo), reinterpret_cast(buffer)) ); return result; } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE void Allocator::destroyBuffer(VULKAN_HPP_NAMESPACE::Buffer buffer, Allocation allocation) const { vmaDestroyBuffer(m_allocator, static_cast(buffer), static_cast(allocation)); } #else VULKAN_HPP_INLINE void Allocator::destroyBuffer(VULKAN_HPP_NAMESPACE::Buffer buffer, Allocation allocation) const { vmaDestroyBuffer(m_allocator, static_cast(buffer), static_cast(allocation)); } #endif #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType>::type Allocator::createImage(const VULKAN_HPP_NAMESPACE::ImageCreateInfo& imageCreateInfo, const AllocationCreateInfo& allocationCreateInfo, VULKAN_HPP_NAMESPACE::Optional allocationInfo) const { std::pair pair; VULKAN_HPP_NAMESPACE::Image& image = pair.first; Allocation& allocation = pair.second; VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCreateImage(m_allocator, reinterpret_cast(&imageCreateInfo), reinterpret_cast(&allocationCreateInfo), reinterpret_cast(&image), reinterpret_cast(&allocation), reinterpret_cast(static_cast(allocationInfo))) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::createImage"); return createResultValueType(result, pair); } #ifndef VULKAN_HPP_NO_SMART_HANDLE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType>::type Allocator::createImageUnique(const VULKAN_HPP_NAMESPACE::ImageCreateInfo& imageCreateInfo, const AllocationCreateInfo& allocationCreateInfo, VULKAN_HPP_NAMESPACE::Optional allocationInfo) const { std::pair pair; VULKAN_HPP_NAMESPACE::Image& image = pair.first; Allocation& allocation = pair.second; VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCreateImage(m_allocator, reinterpret_cast(&imageCreateInfo), reinterpret_cast(&allocationCreateInfo), reinterpret_cast(&image), reinterpret_cast(&allocation), reinterpret_cast(static_cast(allocationInfo))) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::createImage"); return createResultValueType(result, createUniqueHandle(pair, this)); } #endif #endif VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::createImage(const VULKAN_HPP_NAMESPACE::ImageCreateInfo* imageCreateInfo, const AllocationCreateInfo* allocationCreateInfo, VULKAN_HPP_NAMESPACE::Image* image, Allocation* allocation, AllocationInfo* allocationInfo) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCreateImage(m_allocator, reinterpret_cast(imageCreateInfo), reinterpret_cast(allocationCreateInfo), reinterpret_cast(image), reinterpret_cast(allocation), reinterpret_cast(allocationInfo)) ); return result; } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type Allocator::createAliasingImage(Allocation allocation, const VULKAN_HPP_NAMESPACE::ImageCreateInfo& imageCreateInfo) const { VULKAN_HPP_NAMESPACE::Image image; VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCreateAliasingImage(m_allocator, static_cast(allocation), reinterpret_cast(&imageCreateInfo), reinterpret_cast(&image)) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::Allocator::createAliasingImage"); return createResultValueType(result, image); } #endif VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Allocator::createAliasingImage(Allocation allocation, const VULKAN_HPP_NAMESPACE::ImageCreateInfo* imageCreateInfo, VULKAN_HPP_NAMESPACE::Image* image) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCreateAliasingImage(m_allocator, static_cast(allocation), reinterpret_cast(imageCreateInfo), reinterpret_cast(image)) ); return result; } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE void Allocator::destroyImage(VULKAN_HPP_NAMESPACE::Image image, Allocation allocation) const { vmaDestroyImage(m_allocator, static_cast(image), static_cast(allocation)); } #else VULKAN_HPP_INLINE void Allocator::destroyImage(VULKAN_HPP_NAMESPACE::Image image, Allocation allocation) const { vmaDestroyImage(m_allocator, static_cast(image), static_cast(allocation)); } #endif #if VMA_STATS_STRING_ENABLED #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE char* Allocator::buildStatsString(VULKAN_HPP_NAMESPACE::Bool32 detailedMap) const { char* statsString; vmaBuildStatsString(m_allocator, &statsString, static_cast(detailedMap)); return statsString; } #endif VULKAN_HPP_INLINE void Allocator::buildStatsString(char** statsString, VULKAN_HPP_NAMESPACE::Bool32 detailedMap) const { vmaBuildStatsString(m_allocator, statsString, static_cast(detailedMap)); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE void Allocator::freeStatsString(char* statsString) const { vmaFreeStatsString(m_allocator, statsString); } #else VULKAN_HPP_INLINE void Allocator::freeStatsString(char* statsString) const { vmaFreeStatsString(m_allocator, statsString); } #endif #endif #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE void VirtualBlock::destroy() const { vmaDestroyVirtualBlock(m_virtualBlock); } #else VULKAN_HPP_INLINE void VirtualBlock::destroy() const { vmaDestroyVirtualBlock(m_virtualBlock); } #endif #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 VirtualBlock::isVirtualBlockEmpty() const { VULKAN_HPP_NAMESPACE::Bool32 result = static_cast( vmaIsVirtualBlockEmpty(m_virtualBlock) ); return result; } #else VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 VirtualBlock::isVirtualBlockEmpty() const { VULKAN_HPP_NAMESPACE::Bool32 result = static_cast( vmaIsVirtualBlockEmpty(m_virtualBlock) ); return result; } #endif #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE VirtualAllocationInfo VirtualBlock::getVirtualAllocationInfo(VirtualAllocation allocation) const { VirtualAllocationInfo virtualAllocInfo; vmaGetVirtualAllocationInfo(m_virtualBlock, static_cast(allocation), reinterpret_cast(&virtualAllocInfo)); return virtualAllocInfo; } #endif VULKAN_HPP_INLINE void VirtualBlock::getVirtualAllocationInfo(VirtualAllocation allocation, VirtualAllocationInfo* virtualAllocInfo) const { vmaGetVirtualAllocationInfo(m_virtualBlock, static_cast(allocation), reinterpret_cast(virtualAllocInfo)); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type VirtualBlock::virtualAllocate(const VirtualAllocationCreateInfo& createInfo, VULKAN_HPP_NAMESPACE::Optional offset) const { VirtualAllocation allocation; VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaVirtualAllocate(m_virtualBlock, reinterpret_cast(&createInfo), reinterpret_cast(&allocation), reinterpret_cast(static_cast(offset))) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::VirtualBlock::virtualAllocate"); return createResultValueType(result, allocation); } #ifndef VULKAN_HPP_NO_SMART_HANDLE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type VirtualBlock::virtualAllocateUnique(const VirtualAllocationCreateInfo& createInfo, VULKAN_HPP_NAMESPACE::Optional offset) const { VirtualAllocation allocation; VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaVirtualAllocate(m_virtualBlock, reinterpret_cast(&createInfo), reinterpret_cast(&allocation), reinterpret_cast(static_cast(offset))) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::VirtualBlock::virtualAllocate"); return createResultValueType(result, createUniqueHandle(allocation, this)); } #endif #endif VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result VirtualBlock::virtualAllocate(const VirtualAllocationCreateInfo* createInfo, VirtualAllocation* allocation, VULKAN_HPP_NAMESPACE::DeviceSize* offset) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaVirtualAllocate(m_virtualBlock, reinterpret_cast(createInfo), reinterpret_cast(allocation), reinterpret_cast(offset)) ); return result; } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE void VirtualBlock::virtualFree(VirtualAllocation allocation) const { vmaVirtualFree(m_virtualBlock, static_cast(allocation)); } #else VULKAN_HPP_INLINE void VirtualBlock::virtualFree(VirtualAllocation allocation) const { vmaVirtualFree(m_virtualBlock, static_cast(allocation)); } #endif #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE void VirtualBlock::clearVirtualBlock() const { vmaClearVirtualBlock(m_virtualBlock); } #else VULKAN_HPP_INLINE void VirtualBlock::clearVirtualBlock() const { vmaClearVirtualBlock(m_virtualBlock); } #endif #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE void VirtualBlock::setVirtualAllocationUserData(VirtualAllocation allocation, void* userData) const { vmaSetVirtualAllocationUserData(m_virtualBlock, static_cast(allocation), userData); } #else VULKAN_HPP_INLINE void VirtualBlock::setVirtualAllocationUserData(VirtualAllocation allocation, void* userData) const { vmaSetVirtualAllocationUserData(m_virtualBlock, static_cast(allocation), userData); } #endif #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE Statistics VirtualBlock::getVirtualBlockStatistics() const { Statistics stats; vmaGetVirtualBlockStatistics(m_virtualBlock, reinterpret_cast(&stats)); return stats; } #endif VULKAN_HPP_INLINE void VirtualBlock::getVirtualBlockStatistics(Statistics* stats) const { vmaGetVirtualBlockStatistics(m_virtualBlock, reinterpret_cast(stats)); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE DetailedStatistics VirtualBlock::calculateVirtualBlockStatistics() const { DetailedStatistics stats; vmaCalculateVirtualBlockStatistics(m_virtualBlock, reinterpret_cast(&stats)); return stats; } #endif VULKAN_HPP_INLINE void VirtualBlock::calculateVirtualBlockStatistics(DetailedStatistics* stats) const { vmaCalculateVirtualBlockStatistics(m_virtualBlock, reinterpret_cast(stats)); } #if VMA_STATS_STRING_ENABLED #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE char* VirtualBlock::buildVirtualBlockStatsString(VULKAN_HPP_NAMESPACE::Bool32 detailedMap) const { char* statsString; vmaBuildVirtualBlockStatsString(m_virtualBlock, &statsString, static_cast(detailedMap)); return statsString; } #endif VULKAN_HPP_INLINE void VirtualBlock::buildVirtualBlockStatsString(char** statsString, VULKAN_HPP_NAMESPACE::Bool32 detailedMap) const { vmaBuildVirtualBlockStatsString(m_virtualBlock, statsString, static_cast(detailedMap)); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE void VirtualBlock::freeVirtualBlockStatsString(char* statsString) const { vmaFreeVirtualBlockStatsString(m_virtualBlock, statsString); } #else VULKAN_HPP_INLINE void VirtualBlock::freeVirtualBlockStatsString(char* statsString) const { vmaFreeVirtualBlockStatsString(m_virtualBlock, statsString); } #endif #endif #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type createAllocator(const AllocatorCreateInfo& createInfo) { Allocator allocator; VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCreateAllocator(reinterpret_cast(&createInfo), reinterpret_cast(&allocator)) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::createAllocator"); return createResultValueType(result, allocator); } #ifndef VULKAN_HPP_NO_SMART_HANDLE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type createAllocatorUnique(const AllocatorCreateInfo& createInfo) { Allocator allocator; VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCreateAllocator(reinterpret_cast(&createInfo), reinterpret_cast(&allocator)) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::createAllocator"); return createResultValueType(result, createUniqueHandle(allocator)); } #endif #endif VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result createAllocator(const AllocatorCreateInfo* createInfo, Allocator* allocator) { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCreateAllocator(reinterpret_cast(createInfo), reinterpret_cast(allocator)) ); return result; } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type createVirtualBlock(const VirtualBlockCreateInfo& createInfo) { VirtualBlock virtualBlock; VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCreateVirtualBlock(reinterpret_cast(&createInfo), reinterpret_cast(&virtualBlock)) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::createVirtualBlock"); return createResultValueType(result, virtualBlock); } #ifndef VULKAN_HPP_NO_SMART_HANDLE VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type createVirtualBlockUnique(const VirtualBlockCreateInfo& createInfo) { VirtualBlock virtualBlock; VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCreateVirtualBlock(reinterpret_cast(&createInfo), reinterpret_cast(&virtualBlock)) ); resultCheck(result, VMA_HPP_NAMESPACE_STRING "::createVirtualBlock"); return createResultValueType(result, createUniqueHandle(virtualBlock)); } #endif #endif VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result createVirtualBlock(const VirtualBlockCreateInfo* createInfo, VirtualBlock* virtualBlock) { VULKAN_HPP_NAMESPACE::Result result = static_cast( vmaCreateVirtualBlock(reinterpret_cast(createInfo), reinterpret_cast(virtualBlock)) ); return result; } } #endif