public class VmaAllocatorCreateInfo
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
flags – flags for created allocator. Use VmaAllocatorCreateFlagBits enum. One of:ALLOCATOR_CREATE_EXTERNALLY_SYNCHRONIZED_BIT |
ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT |
ALLOCATOR_CREATE_KHR_BIND_MEMORY2_BIT |
ALLOCATOR_CREATE_EXT_MEMORY_BUDGET_BIT |
physicalDevice – Vulkan physical device. It must be valid throughout whole lifetime of created allocator.device – Vulkan device. It must be valid throughout whole lifetime of created allocator.preferredLargeHeapBlockSize –
preferred size of a single VkDeviceMemory block to be allocated from large heaps > 1 GiB. Set to 0 to use default, which is currently 256
MiB. Optional.pAllocationCallbacks – custom CPU memory allocation callbacks. Optional, can be null. When specified, will also be used for all CPU-side memory allocations. Optional.pDeviceMemoryCallbacks – informative callbacks for vkAllocateMemory, vkFreeMemory. Optional.frameInUseCount –
Maximum number of additional frames that are in use at the same time as current frame.
This value is used only when you make allocations with ALLOCATION_CREATE_CAN_BECOME_LOST_BIT flag. Such allocation cannot become lost if
allocation.lastUseFrameIndex >= allocator.currentFrameIndex - frameInUseCount.
For example, if you double-buffer your command buffers, so resources used for rendering in previous frame may still be in use by the GPU at the moment you allocate resources needed for the current frame, set this value to 1.
If you want to allow any allocations other than used in the current frame to become lost, set this value to 0.
pHeapSizeLimit –
Either NULL or a pointer to an array of limits on maximum number of bytes that can be allocated out of particular Vulkan memory heap.
If not NULL, it must be a pointer to an array of VkPhysicalDeviceMemoryProperties::memoryHeapCount elements, defining limit on maximum number
of bytes that can be allocated out of particular Vulkan memory heap.
Any of the elements may be equal to VK_WHOLE_SIZE, which means no limit on that heap. This is also the default in case of
pHeapSizeLimit = NULL.
If there is a limit defined for a heap:
VK_ERROR_OUT_OF_DEVICE_MEMORY.VkMemoryHeap::size, the value of this limit will be reported instead when using
GetMemoryProperties.Warning! Using this feature may not be equivalent to installing a GPU with smaller amount of memory, because graphics driver doesn't necessary fail new
allocations with VK_ERROR_OUT_OF_DEVICE_MEMORY result when memory capacity is exceeded. It may return success and just silently migrate some
device memory blocks to system RAM. This driver behavior can also be controlled using VK_AMD_memory_overallocation_behavior extension.
pVulkanFunctions – pointers to Vulkan functionspRecordSettings –
parameters for recording of VMA calls. Can be null.
If not null, it enables recording of calls to VMA functions to a file. If support for recording is not enabled using VMA_RECORDING_ENABLED
macro, creation of the allocator object fails with VK_ERROR_FEATURE_NOT_PRESENT.
instance –
Optional handle to Vulkan instance object.
Optional, can be null. Must be set if ALLOCATOR_CREATE_EXT_MEMORY_BUDGET_BIT flas is used or if vulkanApiVersion >= VK_MAKE_VERSION(1, 1, 0).
vulkanApiVersion –
Optional. The highest version of Vulkan that the application is designed to use.
It must be a value in the format as created by macro VK_MAKE_VERSION or a constant like: VK_API_VERSION_1_1,
VK_API_VERSION_1_0. The patch version number specified is ignored. Only the major and minor versions are considered. It must be less or equal
(preferably equal) to value as passed to vkCreateInstance as VkApplicationInfo::apiVersion. Only versions 1.0 and 1.1 are supported by
the current implementation.
Leaving it initialized to zero is equivalent to VK_API_VERSION_1_0.
struct VmaAllocatorCreateInfo {
VmaAllocatorCreateFlags flags;
VkPhysicalDevice physicalDevice;
VkDevice device;
VkDeviceSize preferredLargeHeapBlockSize;
VkAllocationCallbacks const * pAllocationCallbacks;
VmaDeviceMemoryCallbacks const * pDeviceMemoryCallbacks;
uint32_t frameInUseCount;
VkDeviceSize const * pHeapSizeLimit;
VmaVulkanFunctions const * pVulkanFunctions;
VmaRecordSettings const * pRecordSettings;
VkInstance instance;
uint32_t vulkanApiVersion;
}| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
DEVICE
The struct member offsets.
|
static int |
FLAGS
The struct member offsets.
|
static int |
FRAMEINUSECOUNT
The struct member offsets.
|
static int |
INSTANCE
The struct member offsets.
|
static int |
PALLOCATIONCALLBACKS
The struct member offsets.
|
static int |
PDEVICEMEMORYCALLBACKS
The struct member offsets.
|
static int |
PHEAPSIZELIMIT
The struct member offsets.
|
static int |
PHYSICALDEVICE
The struct member offsets.
|
static int |
PRECORDSETTINGS
The struct member offsets.
|
static int |
PREFERREDLARGEHEAPBLOCKSIZE
The struct member offsets.
|
static int |
PVULKANFUNCTIONS
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
VULKANAPIVERSION
The struct member offsets.
|
| Constructor and Description |
|---|
VmaAllocatorCreateInfo(java.nio.ByteBuffer container)
Creates a
VmaAllocatorCreateInfo instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static VmaAllocatorCreateInfo |
calloc()
Returns a new
VmaAllocatorCreateInfo instance allocated with memCalloc. |
static VmaAllocatorCreateInfo |
callocStack()
Returns a new
VmaAllocatorCreateInfo instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VmaAllocatorCreateInfo |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VmaAllocatorCreateInfo instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VmaAllocatorCreateInfo |
create()
Returns a new
VmaAllocatorCreateInfo instance allocated with BufferUtils. |
static VmaAllocatorCreateInfo |
create(long address)
Returns a new
VmaAllocatorCreateInfo instance for the specified memory address. |
static VmaAllocatorCreateInfo |
createSafe(long address)
|
long |
device()
Returns the value of the
device field. |
VmaAllocatorCreateInfo |
device(org.lwjgl.vulkan.VkDevice value)
Sets the specified value to the
device field. |
int |
flags()
Returns the value of the
flags field. |
VmaAllocatorCreateInfo |
flags(int value)
Sets the specified value to the
flags field. |
int |
frameInUseCount()
Returns the value of the
frameInUseCount field. |
VmaAllocatorCreateInfo |
frameInUseCount(int value)
Sets the specified value to the
frameInUseCount field. |
long |
instance()
Returns the value of the
instance field. |
VmaAllocatorCreateInfo |
instance(org.lwjgl.vulkan.VkInstance value)
Sets the specified value to the
instance field. |
static VmaAllocatorCreateInfo |
malloc()
Returns a new
VmaAllocatorCreateInfo instance allocated with memAlloc. |
static VmaAllocatorCreateInfo |
mallocStack()
Returns a new
VmaAllocatorCreateInfo instance allocated on the thread-local MemoryStack. |
static VmaAllocatorCreateInfo |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VmaAllocatorCreateInfo instance allocated on the specified MemoryStack. |
static long |
ndevice(long struct)
Unsafe version of
device(). |
static void |
ndevice(long struct,
org.lwjgl.vulkan.VkDevice value)
Unsafe version of
device. |
static int |
nflags(long struct)
Unsafe version of
flags(). |
static void |
nflags(long struct,
int value)
Unsafe version of
flags. |
static int |
nframeInUseCount(long struct)
Unsafe version of
frameInUseCount(). |
static void |
nframeInUseCount(long struct,
int value)
Unsafe version of
frameInUseCount. |
static long |
ninstance(long struct)
Unsafe version of
instance(). |
static void |
ninstance(long struct,
org.lwjgl.vulkan.VkInstance value)
Unsafe version of
instance. |
static org.lwjgl.vulkan.VkAllocationCallbacks |
npAllocationCallbacks(long struct)
Unsafe version of
pAllocationCallbacks(). |
static void |
npAllocationCallbacks(long struct,
org.lwjgl.vulkan.VkAllocationCallbacks value)
Unsafe version of
pAllocationCallbacks. |
static VmaDeviceMemoryCallbacks |
npDeviceMemoryCallbacks(long struct)
Unsafe version of
pDeviceMemoryCallbacks(). |
static void |
npDeviceMemoryCallbacks(long struct,
VmaDeviceMemoryCallbacks value)
Unsafe version of
pDeviceMemoryCallbacks. |
static java.nio.LongBuffer |
npHeapSizeLimit(long struct,
int capacity)
Unsafe version of
pHeapSizeLimit. |
static void |
npHeapSizeLimit(long struct,
java.nio.LongBuffer value)
Unsafe version of
pHeapSizeLimit. |
static long |
nphysicalDevice(long struct)
Unsafe version of
physicalDevice(). |
static void |
nphysicalDevice(long struct,
org.lwjgl.vulkan.VkPhysicalDevice value)
Unsafe version of
physicalDevice. |
static VmaRecordSettings |
npRecordSettings(long struct)
Unsafe version of
pRecordSettings(). |
static void |
npRecordSettings(long struct,
VmaRecordSettings value)
Unsafe version of
pRecordSettings. |
static long |
npreferredLargeHeapBlockSize(long struct)
Unsafe version of
preferredLargeHeapBlockSize(). |
static void |
npreferredLargeHeapBlockSize(long struct,
long value)
Unsafe version of
preferredLargeHeapBlockSize. |
static VmaVulkanFunctions |
npVulkanFunctions(long struct)
Unsafe version of
pVulkanFunctions(). |
static void |
npVulkanFunctions(long struct,
VmaVulkanFunctions value)
Unsafe version of
pVulkanFunctions. |
static int |
nvulkanApiVersion(long struct)
Unsafe version of
vulkanApiVersion(). |
static void |
nvulkanApiVersion(long struct,
int value)
Unsafe version of
vulkanApiVersion. |
org.lwjgl.vulkan.VkAllocationCallbacks |
pAllocationCallbacks()
Returns a
VkAllocationCallbacks view of the struct pointed to by the pAllocationCallbacks field. |
VmaAllocatorCreateInfo |
pAllocationCallbacks(org.lwjgl.vulkan.VkAllocationCallbacks value)
Sets the address of the specified
VkAllocationCallbacks to the pAllocationCallbacks field. |
VmaDeviceMemoryCallbacks |
pDeviceMemoryCallbacks()
Returns a
VmaDeviceMemoryCallbacks view of the struct pointed to by the pDeviceMemoryCallbacks field. |
VmaAllocatorCreateInfo |
pDeviceMemoryCallbacks(VmaDeviceMemoryCallbacks value)
Sets the address of the specified
VmaDeviceMemoryCallbacks to the pDeviceMemoryCallbacks field. |
java.nio.LongBuffer |
pHeapSizeLimit(int capacity)
Returns a
LongBuffer view of the data pointed to by the pHeapSizeLimit field. |
VmaAllocatorCreateInfo |
pHeapSizeLimit(java.nio.LongBuffer value)
Sets the address of the specified
LongBuffer to the pHeapSizeLimit field. |
long |
physicalDevice()
Returns the value of the
physicalDevice field. |
VmaAllocatorCreateInfo |
physicalDevice(org.lwjgl.vulkan.VkPhysicalDevice value)
Sets the specified value to the
physicalDevice field. |
VmaRecordSettings |
pRecordSettings()
Returns a
VmaRecordSettings view of the struct pointed to by the pRecordSettings field. |
VmaAllocatorCreateInfo |
pRecordSettings(VmaRecordSettings value)
Sets the address of the specified
VmaRecordSettings to the pRecordSettings field. |
long |
preferredLargeHeapBlockSize()
Returns the value of the
preferredLargeHeapBlockSize field. |
VmaAllocatorCreateInfo |
preferredLargeHeapBlockSize(long value)
Sets the specified value to the
preferredLargeHeapBlockSize field. |
VmaVulkanFunctions |
pVulkanFunctions()
Returns a
VmaVulkanFunctions view of the struct pointed to by the pVulkanFunctions field. |
VmaAllocatorCreateInfo |
pVulkanFunctions(VmaVulkanFunctions value)
Sets the address of the specified
VmaVulkanFunctions to the pVulkanFunctions field. |
VmaAllocatorCreateInfo |
set(int flags,
org.lwjgl.vulkan.VkPhysicalDevice physicalDevice,
org.lwjgl.vulkan.VkDevice device,
long preferredLargeHeapBlockSize,
org.lwjgl.vulkan.VkAllocationCallbacks pAllocationCallbacks,
VmaDeviceMemoryCallbacks pDeviceMemoryCallbacks,
int frameInUseCount,
java.nio.LongBuffer pHeapSizeLimit,
VmaVulkanFunctions pVulkanFunctions,
VmaRecordSettings pRecordSettings,
org.lwjgl.vulkan.VkInstance instance,
int vulkanApiVersion)
Initializes this struct with the specified values.
|
VmaAllocatorCreateInfo |
set(VmaAllocatorCreateInfo src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
static void |
validate(long struct)
Validates pointer members that should not be
NULL. |
static void |
validate(long array,
int count)
Calls
validate(long) for each struct contained in the specified struct array. |
int |
vulkanApiVersion()
Returns the value of the
vulkanApiVersion field. |
VmaAllocatorCreateInfo |
vulkanApiVersion(int value)
Sets the specified value to the
vulkanApiVersion field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int FLAGS
public static final int PHYSICALDEVICE
public static final int DEVICE
public static final int PREFERREDLARGEHEAPBLOCKSIZE
public static final int PALLOCATIONCALLBACKS
public static final int PDEVICEMEMORYCALLBACKS
public static final int FRAMEINUSECOUNT
public static final int PHEAPSIZELIMIT
public static final int PVULKANFUNCTIONS
public static final int PRECORDSETTINGS
public static final int INSTANCE
public static final int VULKANAPIVERSION
public VmaAllocatorCreateInfo(java.nio.ByteBuffer container)
VmaAllocatorCreateInfo instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be
visible to the struct instance and vice versa.
The created instance holds a strong reference to the container object.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic int flags()
flags field.public long physicalDevice()
physicalDevice field.public long device()
device field.public long preferredLargeHeapBlockSize()
preferredLargeHeapBlockSize field.@Nullable public org.lwjgl.vulkan.VkAllocationCallbacks pAllocationCallbacks()
VkAllocationCallbacks view of the struct pointed to by the pAllocationCallbacks field.@Nullable public VmaDeviceMemoryCallbacks pDeviceMemoryCallbacks()
VmaDeviceMemoryCallbacks view of the struct pointed to by the pDeviceMemoryCallbacks field.public int frameInUseCount()
frameInUseCount field.@Nullable public java.nio.LongBuffer pHeapSizeLimit(int capacity)
LongBuffer view of the data pointed to by the pHeapSizeLimit field.capacity - the number of elements in the returned bufferpublic VmaVulkanFunctions pVulkanFunctions()
VmaVulkanFunctions view of the struct pointed to by the pVulkanFunctions field.@Nullable public VmaRecordSettings pRecordSettings()
VmaRecordSettings view of the struct pointed to by the pRecordSettings field.@Nullable public long instance()
instance field.public int vulkanApiVersion()
vulkanApiVersion field.public VmaAllocatorCreateInfo flags(int value)
flags field.public VmaAllocatorCreateInfo physicalDevice(org.lwjgl.vulkan.VkPhysicalDevice value)
physicalDevice field.public VmaAllocatorCreateInfo device(org.lwjgl.vulkan.VkDevice value)
device field.public VmaAllocatorCreateInfo preferredLargeHeapBlockSize(long value)
preferredLargeHeapBlockSize field.public VmaAllocatorCreateInfo pAllocationCallbacks(@Nullable org.lwjgl.vulkan.VkAllocationCallbacks value)
VkAllocationCallbacks to the pAllocationCallbacks field.public VmaAllocatorCreateInfo pDeviceMemoryCallbacks(@Nullable VmaDeviceMemoryCallbacks value)
VmaDeviceMemoryCallbacks to the pDeviceMemoryCallbacks field.public VmaAllocatorCreateInfo frameInUseCount(int value)
frameInUseCount field.public VmaAllocatorCreateInfo pHeapSizeLimit(@Nullable java.nio.LongBuffer value)
LongBuffer to the pHeapSizeLimit field.public VmaAllocatorCreateInfo pVulkanFunctions(VmaVulkanFunctions value)
VmaVulkanFunctions to the pVulkanFunctions field.public VmaAllocatorCreateInfo pRecordSettings(@Nullable VmaRecordSettings value)
VmaRecordSettings to the pRecordSettings field.public VmaAllocatorCreateInfo instance(@Nullable org.lwjgl.vulkan.VkInstance value)
instance field.public VmaAllocatorCreateInfo vulkanApiVersion(int value)
vulkanApiVersion field.public VmaAllocatorCreateInfo set(int flags, org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, org.lwjgl.vulkan.VkDevice device, long preferredLargeHeapBlockSize, @Nullable org.lwjgl.vulkan.VkAllocationCallbacks pAllocationCallbacks, @Nullable VmaDeviceMemoryCallbacks pDeviceMemoryCallbacks, int frameInUseCount, @Nullable java.nio.LongBuffer pHeapSizeLimit, VmaVulkanFunctions pVulkanFunctions, @Nullable VmaRecordSettings pRecordSettings, @Nullable org.lwjgl.vulkan.VkInstance instance, int vulkanApiVersion)
public VmaAllocatorCreateInfo set(VmaAllocatorCreateInfo src)
src - the source structpublic static VmaAllocatorCreateInfo malloc()
VmaAllocatorCreateInfo instance allocated with memAlloc. The instance must be explicitly freed.public static VmaAllocatorCreateInfo calloc()
VmaAllocatorCreateInfo instance allocated with memCalloc. The instance must be explicitly freed.public static VmaAllocatorCreateInfo create()
VmaAllocatorCreateInfo instance allocated with BufferUtils.public static VmaAllocatorCreateInfo create(long address)
VmaAllocatorCreateInfo instance for the specified memory address.@Nullable public static VmaAllocatorCreateInfo createSafe(long address)
public static VmaAllocatorCreateInfo mallocStack()
VmaAllocatorCreateInfo instance allocated on the thread-local MemoryStack.public static VmaAllocatorCreateInfo callocStack()
VmaAllocatorCreateInfo instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static VmaAllocatorCreateInfo mallocStack(org.lwjgl.system.MemoryStack stack)
VmaAllocatorCreateInfo instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static VmaAllocatorCreateInfo callocStack(org.lwjgl.system.MemoryStack stack)
VmaAllocatorCreateInfo instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static int nflags(long struct)
flags().public static long nphysicalDevice(long struct)
physicalDevice().public static long ndevice(long struct)
device().public static long npreferredLargeHeapBlockSize(long struct)
preferredLargeHeapBlockSize().@Nullable public static org.lwjgl.vulkan.VkAllocationCallbacks npAllocationCallbacks(long struct)
pAllocationCallbacks().@Nullable public static VmaDeviceMemoryCallbacks npDeviceMemoryCallbacks(long struct)
pDeviceMemoryCallbacks().public static int nframeInUseCount(long struct)
frameInUseCount().@Nullable
public static java.nio.LongBuffer npHeapSizeLimit(long struct,
int capacity)
pHeapSizeLimit.public static VmaVulkanFunctions npVulkanFunctions(long struct)
pVulkanFunctions().@Nullable public static VmaRecordSettings npRecordSettings(long struct)
pRecordSettings().public static long ninstance(long struct)
instance().public static int nvulkanApiVersion(long struct)
vulkanApiVersion().public static void nflags(long struct,
int value)
flags.public static void nphysicalDevice(long struct,
org.lwjgl.vulkan.VkPhysicalDevice value)
physicalDevice.public static void ndevice(long struct,
org.lwjgl.vulkan.VkDevice value)
device.public static void npreferredLargeHeapBlockSize(long struct,
long value)
preferredLargeHeapBlockSize.public static void npAllocationCallbacks(long struct,
@Nullable
org.lwjgl.vulkan.VkAllocationCallbacks value)
pAllocationCallbacks.public static void npDeviceMemoryCallbacks(long struct,
@Nullable
VmaDeviceMemoryCallbacks value)
pDeviceMemoryCallbacks.public static void nframeInUseCount(long struct,
int value)
frameInUseCount.public static void npHeapSizeLimit(long struct,
@Nullable
java.nio.LongBuffer value)
pHeapSizeLimit.public static void npVulkanFunctions(long struct,
VmaVulkanFunctions value)
pVulkanFunctions.public static void npRecordSettings(long struct,
@Nullable
VmaRecordSettings value)
pRecordSettings.public static void ninstance(long struct,
@Nullable
org.lwjgl.vulkan.VkInstance value)
instance.public static void nvulkanApiVersion(long struct,
int value)
vulkanApiVersion.public static void validate(long struct)
NULL.struct - the struct to validatepublic static void validate(long array,
int count)
validate(long) for each struct contained in the specified struct array.array - the struct array to validatecount - the number of structs in arrayCopyright LWJGL. All Rights Reserved. License terms.