public class VmaPoolCreateInfo
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
VmaPool.
memoryTypeIndex – Vulkan memory type index to allocate this pool fromflags – Use combination of VmaPoolCreateFlagBits. One or more of:POOL_CREATE_IGNORE_BUFFER_IMAGE_GRANULARITY_BIT | POOL_CREATE_LINEAR_ALGORITHM_BIT |
POOL_CREATE_BUDDY_ALGORITHM_BIT | POOL_CREATE_ALGORITHM_MASK |
blockSize –
size of a single VkDeviceMemory block to be allocated as part of this pool, in bytes. Optional.
Specify nonzero to set explicit, constant size of memory blocks used by this pool. Leave 0 to use default and let the library manage block sizes automatically. Sizes of particular blocks may vary.
minBlockCount –
minimum number of blocks to be always allocated in this pool, even if they stay empty.
Set to 0 to have no preallocated blocks and allow the pool be completely empty.
maxBlockCount –
maximum number of blocks that can be allocated in this pool. Optional.
Set to 0 to use default, which is SIZE_MAX, which means no limit. Set to same value as VmaPoolCreateInfo::minBlockCount to have fixed
amount of memory allocated throughout whole lifetime of this pool.
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.
struct VmaPoolCreateInfo {
uint32_t memoryTypeIndex;
VmaPoolCreateFlags flags;
VkDeviceSize blockSize;
size_t minBlockCount;
size_t maxBlockCount;
uint32_t frameInUseCount;
}| Modifier and Type | Class and Description |
|---|---|
static class |
VmaPoolCreateInfo.Buffer
An array of
VmaPoolCreateInfo structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
BLOCKSIZE
The struct member offsets.
|
static int |
FLAGS
The struct member offsets.
|
static int |
FRAMEINUSECOUNT
The struct member offsets.
|
static int |
MAXBLOCKCOUNT
The struct member offsets.
|
static int |
MEMORYTYPEINDEX
The struct member offsets.
|
static int |
MINBLOCKCOUNT
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
VmaPoolCreateInfo(java.nio.ByteBuffer container)
Creates a
VmaPoolCreateInfo instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
long |
blockSize()
Returns the value of the
blockSize field. |
VmaPoolCreateInfo |
blockSize(long value)
Sets the specified value to the
blockSize field. |
static VmaPoolCreateInfo |
calloc()
Returns a new
VmaPoolCreateInfo instance allocated with memCalloc. |
static VmaPoolCreateInfo.Buffer |
calloc(int capacity)
Returns a new
VmaPoolCreateInfo.Buffer instance allocated with memCalloc. |
static VmaPoolCreateInfo |
callocStack()
Returns a new
VmaPoolCreateInfo instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VmaPoolCreateInfo.Buffer |
callocStack(int capacity)
Returns a new
VmaPoolCreateInfo.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VmaPoolCreateInfo.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VmaPoolCreateInfo.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VmaPoolCreateInfo |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VmaPoolCreateInfo instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VmaPoolCreateInfo |
create()
Returns a new
VmaPoolCreateInfo instance allocated with BufferUtils. |
static VmaPoolCreateInfo.Buffer |
create(int capacity)
Returns a new
VmaPoolCreateInfo.Buffer instance allocated with BufferUtils. |
static VmaPoolCreateInfo |
create(long address)
Returns a new
VmaPoolCreateInfo instance for the specified memory address. |
static VmaPoolCreateInfo.Buffer |
create(long address,
int capacity)
Create a
VmaPoolCreateInfo.Buffer instance at the specified memory. |
static VmaPoolCreateInfo |
createSafe(long address)
|
static VmaPoolCreateInfo.Buffer |
createSafe(long address,
int capacity)
|
int |
flags()
Returns the value of the
flags field. |
VmaPoolCreateInfo |
flags(int value)
Sets the specified value to the
flags field. |
int |
frameInUseCount()
Returns the value of the
frameInUseCount field. |
VmaPoolCreateInfo |
frameInUseCount(int value)
Sets the specified value to the
frameInUseCount field. |
static VmaPoolCreateInfo |
malloc()
Returns a new
VmaPoolCreateInfo instance allocated with memAlloc. |
static VmaPoolCreateInfo.Buffer |
malloc(int capacity)
Returns a new
VmaPoolCreateInfo.Buffer instance allocated with memAlloc. |
static VmaPoolCreateInfo |
mallocStack()
Returns a new
VmaPoolCreateInfo instance allocated on the thread-local MemoryStack. |
static VmaPoolCreateInfo.Buffer |
mallocStack(int capacity)
Returns a new
VmaPoolCreateInfo.Buffer instance allocated on the thread-local MemoryStack. |
static VmaPoolCreateInfo.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VmaPoolCreateInfo.Buffer instance allocated on the specified MemoryStack. |
static VmaPoolCreateInfo |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VmaPoolCreateInfo instance allocated on the specified MemoryStack. |
long |
maxBlockCount()
Returns the value of the
maxBlockCount field. |
VmaPoolCreateInfo |
maxBlockCount(long value)
Sets the specified value to the
maxBlockCount field. |
int |
memoryTypeIndex()
Returns the value of the
memoryTypeIndex field. |
VmaPoolCreateInfo |
memoryTypeIndex(int value)
Sets the specified value to the
memoryTypeIndex field. |
long |
minBlockCount()
Returns the value of the
minBlockCount field. |
VmaPoolCreateInfo |
minBlockCount(long value)
Sets the specified value to the
minBlockCount field. |
static long |
nblockSize(long struct)
Unsafe version of
blockSize(). |
static void |
nblockSize(long struct,
long value)
Unsafe version of
blockSize. |
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 |
nmaxBlockCount(long struct)
Unsafe version of
maxBlockCount(). |
static void |
nmaxBlockCount(long struct,
long value)
Unsafe version of
maxBlockCount. |
static int |
nmemoryTypeIndex(long struct)
Unsafe version of
memoryTypeIndex(). |
static void |
nmemoryTypeIndex(long struct,
int value)
Unsafe version of
memoryTypeIndex. |
static long |
nminBlockCount(long struct)
Unsafe version of
minBlockCount(). |
static void |
nminBlockCount(long struct,
long value)
Unsafe version of
minBlockCount. |
VmaPoolCreateInfo |
set(int memoryTypeIndex,
int flags,
long blockSize,
long minBlockCount,
long maxBlockCount,
int frameInUseCount)
Initializes this struct with the specified values.
|
VmaPoolCreateInfo |
set(VmaPoolCreateInfo src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
public static final int SIZEOF
public static final int ALIGNOF
public static final int MEMORYTYPEINDEX
public static final int FLAGS
public static final int BLOCKSIZE
public static final int MINBLOCKCOUNT
public static final int MAXBLOCKCOUNT
public static final int FRAMEINUSECOUNT
public VmaPoolCreateInfo(java.nio.ByteBuffer container)
VmaPoolCreateInfo 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 memoryTypeIndex()
memoryTypeIndex field.public int flags()
flags field.public long blockSize()
blockSize field.public long minBlockCount()
minBlockCount field.public long maxBlockCount()
maxBlockCount field.public int frameInUseCount()
frameInUseCount field.public VmaPoolCreateInfo memoryTypeIndex(int value)
memoryTypeIndex field.public VmaPoolCreateInfo flags(int value)
flags field.public VmaPoolCreateInfo blockSize(long value)
blockSize field.public VmaPoolCreateInfo minBlockCount(long value)
minBlockCount field.public VmaPoolCreateInfo maxBlockCount(long value)
maxBlockCount field.public VmaPoolCreateInfo frameInUseCount(int value)
frameInUseCount field.public VmaPoolCreateInfo set(int memoryTypeIndex, int flags, long blockSize, long minBlockCount, long maxBlockCount, int frameInUseCount)
public VmaPoolCreateInfo set(VmaPoolCreateInfo src)
src - the source structpublic static VmaPoolCreateInfo malloc()
VmaPoolCreateInfo instance allocated with memAlloc. The instance must be explicitly freed.public static VmaPoolCreateInfo calloc()
VmaPoolCreateInfo instance allocated with memCalloc. The instance must be explicitly freed.public static VmaPoolCreateInfo create()
VmaPoolCreateInfo instance allocated with BufferUtils.public static VmaPoolCreateInfo create(long address)
VmaPoolCreateInfo instance for the specified memory address.@Nullable public static VmaPoolCreateInfo createSafe(long address)
public static VmaPoolCreateInfo.Buffer malloc(int capacity)
VmaPoolCreateInfo.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VmaPoolCreateInfo.Buffer calloc(int capacity)
VmaPoolCreateInfo.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VmaPoolCreateInfo.Buffer create(int capacity)
VmaPoolCreateInfo.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static VmaPoolCreateInfo.Buffer create(long address, int capacity)
VmaPoolCreateInfo.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static VmaPoolCreateInfo.Buffer createSafe(long address, int capacity)
public static VmaPoolCreateInfo mallocStack()
VmaPoolCreateInfo instance allocated on the thread-local MemoryStack.public static VmaPoolCreateInfo callocStack()
VmaPoolCreateInfo instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static VmaPoolCreateInfo mallocStack(org.lwjgl.system.MemoryStack stack)
VmaPoolCreateInfo instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static VmaPoolCreateInfo callocStack(org.lwjgl.system.MemoryStack stack)
VmaPoolCreateInfo instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static VmaPoolCreateInfo.Buffer mallocStack(int capacity)
VmaPoolCreateInfo.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static VmaPoolCreateInfo.Buffer callocStack(int capacity)
VmaPoolCreateInfo.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static VmaPoolCreateInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VmaPoolCreateInfo.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VmaPoolCreateInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VmaPoolCreateInfo.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static int nmemoryTypeIndex(long struct)
memoryTypeIndex().public static int nflags(long struct)
flags().public static long nblockSize(long struct)
blockSize().public static long nminBlockCount(long struct)
minBlockCount().public static long nmaxBlockCount(long struct)
maxBlockCount().public static int nframeInUseCount(long struct)
frameInUseCount().public static void nmemoryTypeIndex(long struct,
int value)
memoryTypeIndex.public static void nflags(long struct,
int value)
flags.public static void nblockSize(long struct,
long value)
blockSize.public static void nminBlockCount(long struct,
long value)
minBlockCount.public static void nmaxBlockCount(long struct,
long value)
maxBlockCount.public static void nframeInUseCount(long struct,
int value)
frameInUseCount.Copyright LWJGL. All Rights Reserved. License terms.