Module vk_mem_erupt::ffi[][src]

Structs

\brief Parameters of #VmaAllocation objects, that can be retrieved using function vmaGetAllocationInfo().

Description of a Allocator to be created.

\brief Information about existing #VmaAllocator object.

\brief Statistics of current memory usage and available budget, in bytes, for specific memory heap.

\brief Deprecated. Optional configuration parameters to be passed to function vmaDefragment().

\brief Parameters for defragmentation.

\brief Parameters for incremental defragmentation steps.

\brief Statistics returned by function vmaDefragment().

\brief Set of callbacks that the library will call for vkAllocateMemory and vkFreeMemory.

\brief Describes parameter of created #VmaPool.

\brief Describes parameter of existing #VmaPool.

Parameters for recording calls to VMA functions. To be used in VmaAllocatorCreateInfo::pRecordSettings.

\brief Calculated statistics of memory usage in entire allocator.

General statistics from current state of Allocator.

\brief Pointers to some Vulkan functions - a subset used by the library.

Constants

CPU memory - memory that is preferably not DEVICE_LOCAL, but also not guaranteed to be HOST_VISIBLE.

Memory will be mappable on host. It usually means CPU (system) memory. Guarantees to be HOST_VISIBLE and HOST_COHERENT. CPU access is typically uncached. Writes may be write-combined. Resources created in this pool may still be accessible to the device, but access to them can be slow. It is roughly equivalent of D3D12_HEAP_TYPE_UPLOAD.

Memory that is both mappable on host (guarantees to be HOST_VISIBLE) and preferably fast to access by GPU. CPU access is typically uncached. Writes may be write-combined.

Lazily allocated GPU memory having VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT. Exists mostly on mobile platforms. Using it on desktop PC or other GPUs with no such memory type present will fail the allocation.

Memory will be used on device only, so fast access from the device is preferred. It usually means device-local GPU (video) memory. No need to be mappable on host. It is roughly equivalent of D3D12_HEAP_TYPE_DEFAULT.

Memory mappable on host (guarantees to be HOST_VISIBLE) and cached. It is roughly equivalent of D3D12_HEAP_TYPE_READBACK.

Lazily allocated GPU memory having VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT. Exists mostly on mobile platforms. Using it on desktop PC or other GPUs with no such memory type present will fail the allocation.

No intended memory usage specified. Use other members of VmaAllocationCreateInfo to specify your requirements.

Functions

\brief General purpose memory allocation.

@param[out] pAllocation Handle to allocated memory. @param[out] pAllocationInfo Optional. Information about allocated memory. It can be later fetched using function vmaGetAllocationInfo().

Function similar to vmaAllocateMemoryForBuffer().

\brief General purpose memory allocation for multiple allocation objects at once.

\brief Binds buffer to allocation.

\brief Binds buffer to allocation with additional parameters.

\brief Binds image to allocation.

\brief Binds image to allocation with additional parameters.

Builds and returns statistics as string in JSON format. ** @param[out] ppStatsString Must be freed using vmaFreeStatsString() function. */

\brief Retrieves statistics from current state of the Allocator.

\brief Checks magic number in margins around all allocations in given memory types (in both default and custom pools) in search for corruptions.

\brief Checks magic number in margins around all allocations in given memory pool in search for corruptions.

Creates Allocator object.

@param[out] pBuffer Buffer that was created. @param[out] pAllocation Allocation that was created. @param[out] pAllocationInfo Optional. Information about allocated memory. It can be later fetched using function vmaGetAllocationInfo().

\brief Creates a buffer with additional minimum alignment.

Function similar to vmaCreateBuffer().

\brief Creates new allocation that is in lost state from the beginning.

\brief Allocates Vulkan device memory and creates #VmaPool object.

\brief Deprecated. Compacts memory by moving allocations.

\brief Begins defragmentation process.

\brief Ends defragmentation process.

Destroys allocator object.

\brief Destroys Vulkan buffer and frees allocated memory.

\brief Destroys Vulkan image and frees allocated memory.

\brief Destroys #VmaPool object and frees Vulkan device memory.

\brief Helps to find memoryTypeIndex, given memoryTypeBits and VmaAllocationCreateInfo.

\brief Helps to find memoryTypeIndex, given VkBufferCreateInfo and VmaAllocationCreateInfo.

\brief Helps to find memoryTypeIndex, given VkImageCreateInfo and VmaAllocationCreateInfo.

\brief Flushes memory of given allocation.

\brief Flushes memory of given set of allocations.

\brief Frees memory previously allocated using vmaAllocateMemory(), vmaAllocateMemoryForBuffer(), or vmaAllocateMemoryForImage().

\brief Frees memory and destroys multiple allocations.

\brief Returns current information about specified allocation and atomically marks it as used in current frame.

\brief Returns information about existing #VmaAllocator object - handle to Vulkan device etc.

\brief Retrieves information about current memory budget for all memory heaps.

PhysicalDeviceMemoryProperties are fetched from physicalDevice by the allocator. You can access it here, without fetching it again on your own.

\brief Given Memory Type Index, returns Property Flags of this memory type.

PhysicalDeviceProperties are fetched from physicalDevice by the allocator. You can access it here, without fetching it again on your own.

\brief Retrieves name of a custom pool.

\brief Retrieves statistics of existing #VmaPool object.

\brief Invalidates memory of given allocation.

\brief Invalidates memory of given set of allocations.

\brief Marks all allocations in given pool as lost if they are not used in current frame or VmaPoolCreateInfo::frameInUseCount back from now.

\brief Maps memory represented by given allocation and returns pointer to it.

\brief Sets pUserData in given allocation to new value.

\brief Sets index of the current frame.

\brief Sets name of a custom pool.

\brief Returns VK_TRUE if allocation is not lost and atomically marks it as used in current frame.

\brief Unmaps memory represented by given allocation, mapped previously using vmaMapMemory().

Type Definitions

Callback function called after successful vkAllocateMemory.

Callback function called before vkFreeMemory.

\struct VmaPool \brief Represents custom memory pool