Top Description Interfaces Classes
module lwjgl.vma

Package org.lwjgl.util.vma

Annotations
@NonnullDefault

Contains bindings to VMA, an easy to integrate Vulkan memory allocation library.

Problem

Memory allocation and resource (buffer and image) creation in Vulkan is difficult (comparing to older graphics API-s, like D3D11 or OpenGL) for several reasons:

Features

This library can help game developers to manage memory allocations and resource creation by offering some higher-level functions. Features of the library are divided into several layers, low level to high level:

  1. Functions that help to choose correct and optimal memory type based on intended usage of the memory.

    - Required or preferred traits of the memory are expressed using higher-level description comparing to Vulkan flags.

  2. Functions that allocate memory blocks, reserve and return parts of them (`VkDeviceMemory` + offset + size) to the user.

    - Library keeps track of allocated memory blocks, used and unused ranges inside them, finds best matching unused ranges for new allocations, takes all the rules of alignment and buffer/image granularity into consideration.

  3. Functions that can create an image/buffer, allocate memory for it and bind them together - all in one call.

Additional features:

Interface Summary

Modifier and TypeInterface and Description
public interface
VmaAllocateDeviceMemoryFunctionI

Instances of this interface may be set to the VmaDeviceMemoryCallbacks struct.

public interface
VmaCheckDefragmentationBreakFunctionI

Instances of this interface may be set to the VmaDefragmentationInfo struct.

public interface
VmaFreeDeviceMemoryFunctionI

Instances of this interface may be set to the VmaDeviceMemoryCallbacks struct.

Class Summary

Modifier and TypeClass and Description
pack-priv class
LibVma

Initializes the vma shared library.

public class
Vma

The Vulkan Memory Allocator.

public abstract class
VmaAllocateDeviceMemoryFunction

Instances of this class may be set to the VmaDeviceMemoryCallbacks struct.

public class
VmaAllocationCreateInfo

Parameters of new VmaAllocation.

public class
VmaAllocationInfo

Parameters of VmaAllocation objects, that can be retrieved using function GetAllocationInfo.

public class
VmaAllocatorCreateInfo

Description of an Allocator to be created.

public class
VmaAllocatorInfo

Information about existing VmaAllocator object.

public class
VmaBudget

Statistics of current memory usage and available budget for a specific memory heap.

public abstract class
VmaCheckDefragmentationBreakFunction

Instances of this class may be set to the VmaDefragmentationInfo struct.

public class
VmaDefragmentationInfo

Parameters for defragmentation.

public class
VmaDefragmentationMove

Single move of an allocation to be done for defragmentation.

public class
VmaDefragmentationPassMoveInfo

Parameters for incremental defragmentation steps.

public class
VmaDefragmentationStats

Statistics returned for defragmentation process in function EndDefragmentation.

public class
VmaDetailedStatistics

More detailed statistics than VmaStatistics.

public class
VmaDeviceMemoryCallbacks

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

public abstract class
VmaFreeDeviceMemoryFunction

Instances of this class may be set to the VmaDeviceMemoryCallbacks struct.

public class
VmaPoolCreateInfo

Describes parameter of created VmaPool.

public class
VmaStatistics

Calculated statistics of memory usage e.g. in a specific memory type, heap, custom pool, or total.

public class
VmaTotalStatistics

General statistics from current state of the Allocator - total memory usage across all memory heaps and types.

public class
VmaVirtualAllocationCreateInfo

Parameters of created virtual allocation to be passed to VirtualAllocate.

public class
VmaVirtualAllocationInfo

Parameters of an existing virtual allocation, returned by GetVirtualAllocationInfo.

public class
VmaVirtualBlockCreateInfo

Parameters of created VmaVirtualBlock object to be passed to CreateVirtualBlock.

public class
VmaVulkanFunctions

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