Class VmaPoolCreateInfo
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
VmaPool
.
Layout
struct VmaPoolCreateInfo {
uint32_t memoryTypeIndex()
;
VmaPoolCreateFlags flags()
;
VkDeviceSize blockSize()
;
size_t minBlockCount()
;
size_t maxBlockCount()
;
float priority()
;
VkDeviceSize minAllocationAlignment()
;
void * pMemoryAllocateNext()
;
}
-
Nested Class Summary
Nested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionVmaPoolCreateInfo
(ByteBuffer container) Creates aVmaPoolCreateInfo
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionlong
size of a singleVkDeviceMemory
block to be allocated as part of this pool, in bytes.blockSize
(long value) Sets the specified value to theblockSize()
field.static VmaPoolCreateInfo
calloc()
Returns a newVmaPoolCreateInfo
instance allocated withmemCalloc
.static VmaPoolCreateInfo.Buffer
calloc
(int capacity) Returns a newVmaPoolCreateInfo.Buffer
instance allocated withmemCalloc
.static VmaPoolCreateInfo.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newVmaPoolCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VmaPoolCreateInfo
calloc
(MemoryStack stack) Returns a newVmaPoolCreateInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VmaPoolCreateInfo
Deprecated.static VmaPoolCreateInfo.Buffer
callocStack
(int capacity) Deprecated.static VmaPoolCreateInfo.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static VmaPoolCreateInfo
callocStack
(MemoryStack stack) Deprecated.static VmaPoolCreateInfo
create()
Returns a newVmaPoolCreateInfo
instance allocated withBufferUtils
.static VmaPoolCreateInfo.Buffer
create
(int capacity) Returns a newVmaPoolCreateInfo.Buffer
instance allocated withBufferUtils
.static VmaPoolCreateInfo
create
(long address) Returns a newVmaPoolCreateInfo
instance for the specified memory address.static VmaPoolCreateInfo.Buffer
create
(long address, int capacity) Create aVmaPoolCreateInfo.Buffer
instance at the specified memory.static VmaPoolCreateInfo
createSafe
(long address) static VmaPoolCreateInfo.Buffer
createSafe
(long address, int capacity) int
flags()
Use combination ofVmaPoolCreateFlagBits
.flags
(int value) Sets the specified value to theflags()
field.static VmaPoolCreateInfo
malloc()
Returns a newVmaPoolCreateInfo
instance allocated withmemAlloc
.static VmaPoolCreateInfo.Buffer
malloc
(int capacity) Returns a newVmaPoolCreateInfo.Buffer
instance allocated withmemAlloc
.static VmaPoolCreateInfo.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newVmaPoolCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
.static VmaPoolCreateInfo
malloc
(MemoryStack stack) Returns a newVmaPoolCreateInfo
instance allocated on the specifiedMemoryStack
.static VmaPoolCreateInfo
Deprecated.static VmaPoolCreateInfo.Buffer
mallocStack
(int capacity) Deprecated.static VmaPoolCreateInfo.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static VmaPoolCreateInfo
mallocStack
(MemoryStack stack) Deprecated.long
maximum number of blocks that can be allocated in this pool.maxBlockCount
(long value) Sets the specified value to themaxBlockCount()
field.int
Vulkan memory type index to allocate this pool frommemoryTypeIndex
(int value) Sets the specified value to thememoryTypeIndex()
field.long
Additional minimum alignment to be used for all allocations created from this pool.minAllocationAlignment
(long value) Sets the specified value to theminAllocationAlignment()
field.long
minimum number of blocks to be always allocated in this pool, even if they stay empty.minBlockCount
(long value) Sets the specified value to theminBlockCount()
field.static long
nblockSize
(long struct) Unsafe version ofblockSize()
.static void
nblockSize
(long struct, long value) Unsafe version ofblockSize
.static int
nflags
(long struct) Unsafe version offlags()
.static void
nflags
(long struct, int value) Unsafe version offlags
.static long
nmaxBlockCount
(long struct) Unsafe version ofmaxBlockCount()
.static void
nmaxBlockCount
(long struct, long value) Unsafe version ofmaxBlockCount
.static int
nmemoryTypeIndex
(long struct) Unsafe version ofmemoryTypeIndex()
.static void
nmemoryTypeIndex
(long struct, int value) Unsafe version ofmemoryTypeIndex
.static long
nminAllocationAlignment
(long struct) Unsafe version ofminAllocationAlignment()
.static void
nminAllocationAlignment
(long struct, long value) Unsafe version ofminAllocationAlignment
.static long
nminBlockCount
(long struct) Unsafe version ofminBlockCount()
.static void
nminBlockCount
(long struct, long value) Unsafe version ofminBlockCount
.static long
npMemoryAllocateNext
(long struct) Unsafe version ofpMemoryAllocateNext()
.static void
npMemoryAllocateNext
(long struct, long value) Unsafe version ofpMemoryAllocateNext
.static float
npriority
(long struct) Unsafe version ofpriority()
.static void
npriority
(long struct, float value) Unsafe version ofpriority
.long
AdditionalpNext
chain to be attached toVkMemoryAllocateInfo
used for every allocation made by this pool.pMemoryAllocateNext
(long value) Sets the specified value to thepMemoryAllocateNext()
field.Prepends the specifiedVkDedicatedAllocationMemoryAllocateInfoNV
value to thepMemoryAllocateNext
chain.Prepends the specifiedVkExportMemoryAllocateInfo
value to thepMemoryAllocateNext
chain.Prepends the specifiedVkExportMemoryAllocateInfoKHR
value to thepMemoryAllocateNext
chain.Prepends the specifiedVkExportMemoryAllocateInfoNV
value to thepMemoryAllocateNext
chain.Prepends the specifiedVkExportMemoryWin32HandleInfoKHR
value to thepMemoryAllocateNext
chain.Prepends the specifiedVkExportMemoryWin32HandleInfoNV
value to thepMemoryAllocateNext
chain.Prepends the specifiedVkExportMetalObjectCreateInfoEXT
value to thepMemoryAllocateNext
chain.Prepends the specifiedVkImportAndroidHardwareBufferInfoANDROID
value to thepMemoryAllocateNext
chain.Prepends the specifiedVkImportMemoryFdInfoKHR
value to thepMemoryAllocateNext
chain.Prepends the specifiedVkImportMemoryHostPointerInfoEXT
value to thepMemoryAllocateNext
chain.Prepends the specifiedVkImportMemoryWin32HandleInfoKHR
value to thepMemoryAllocateNext
chain.Prepends the specifiedVkImportMemoryWin32HandleInfoNV
value to thepMemoryAllocateNext
chain.Prepends the specifiedVkImportMetalBufferInfoEXT
value to thepMemoryAllocateNext
chain.Prepends the specifiedVkMemoryAllocateFlagsInfo
value to thepMemoryAllocateNext
chain.Prepends the specifiedVkMemoryAllocateFlagsInfoKHR
value to thepMemoryAllocateNext
chain.Prepends the specifiedVkMemoryDedicatedAllocateInfo
value to thepMemoryAllocateNext
chain.Prepends the specifiedVkMemoryDedicatedAllocateInfoKHR
value to thepMemoryAllocateNext
chain.Prepends the specifiedVkMemoryOpaqueCaptureAddressAllocateInfo
value to thepMemoryAllocateNext
chain.Prepends the specifiedVkMemoryOpaqueCaptureAddressAllocateInfoKHR
value to thepMemoryAllocateNext
chain.Prepends the specifiedVkMemoryPriorityAllocateInfoEXT
value to thepMemoryAllocateNext
chain.float
priority()
A floating-point value between 0 and 1, indicating the priority of the allocations in this pool relative to other memory allocations.priority
(float value) Sets the specified value to thepriority()
field.set
(int memoryTypeIndex, int flags, long blockSize, long minBlockCount, long maxBlockCount, float priority, long minAllocationAlignment, long pMemoryAllocateNext) Initializes this struct with the specified values.set
(VmaPoolCreateInfo src) Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
MEMORYTYPEINDEX
public static final int MEMORYTYPEINDEXThe struct member offsets. -
FLAGS
public static final int FLAGSThe struct member offsets. -
BLOCKSIZE
public static final int BLOCKSIZEThe struct member offsets. -
MINBLOCKCOUNT
public static final int MINBLOCKCOUNTThe struct member offsets. -
MAXBLOCKCOUNT
public static final int MAXBLOCKCOUNTThe struct member offsets. -
PRIORITY
public static final int PRIORITYThe struct member offsets. -
MINALLOCATIONALIGNMENT
public static final int MINALLOCATIONALIGNMENTThe struct member offsets. -
PMEMORYALLOCATENEXT
public static final int PMEMORYALLOCATENEXTThe struct member offsets.
-
-
Constructor Details
-
VmaPoolCreateInfo
Creates aVmaPoolCreateInfo
instance at the current position of the specifiedByteBuffer
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.
-
-
Method Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<VmaPoolCreateInfo>
-
memoryTypeIndex
public int memoryTypeIndex()Vulkan memory type index to allocate this pool from -
flags
public int flags()Use combination ofVmaPoolCreateFlagBits
. One or more of:POOL_CREATE_IGNORE_BUFFER_IMAGE_GRANULARITY_BIT
POOL_CREATE_LINEAR_ALGORITHM_BIT
POOL_CREATE_ALGORITHM_MASK
-
blockSize
public long blockSize()size of a singleVkDeviceMemory
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. In this case, the pool will also support dedicated allocations.
-
minBlockCount
public long 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
public long 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 asVmaPoolCreateInfo
::minBlockCount
to have fixed amount of memory allocated throughout whole lifetime of this pool. -
priority
public float priority()A floating-point value between 0 and 1, indicating the priority of the allocations in this pool relative to other memory allocations.It is used only when
ALLOCATOR_CREATE_EXT_MEMORY_PRIORITY_BIT
flag was used during creation of theVmaAllocator
object. Otherwise, this variable is ignored. -
minAllocationAlignment
public long minAllocationAlignment()Additional minimum alignment to be used for all allocations created from this pool. Can be 0.Leave 0 (default) not to impose any additional alignment. If not 0, it must be a power of two. It can be useful in cases where alignment returned by Vulkan by functions like
vkGetBufferMemoryRequirements
is not enough, e.g. when doing interop with OpenGL. -
pMemoryAllocateNext
public long pMemoryAllocateNext()AdditionalpNext
chain to be attached toVkMemoryAllocateInfo
used for every allocation made by this pool. Optional.Optional, can be null. If not null, it must point to a
pNext
chain of structures that can be attached toVkMemoryAllocateInfo
. It can be useful for special needs such as addingVkExportMemoryAllocateInfoKHR
. Structures pointed by this member must remain alive and unchanged for the whole lifetime of the custom pool.Please note that some structures, e.g.
VkMemoryPriorityAllocateInfoEXT
,VkMemoryDedicatedAllocateInfoKHR
, can be attached automatically by this library when using other, more convenient of its features. -
memoryTypeIndex
Sets the specified value to thememoryTypeIndex()
field. -
flags
Sets the specified value to theflags()
field. -
blockSize
Sets the specified value to theblockSize()
field. -
minBlockCount
Sets the specified value to theminBlockCount()
field. -
maxBlockCount
Sets the specified value to themaxBlockCount()
field. -
priority
Sets the specified value to thepriority()
field. -
minAllocationAlignment
Sets the specified value to theminAllocationAlignment()
field. -
pMemoryAllocateNext
Sets the specified value to thepMemoryAllocateNext()
field. -
pMemoryAllocateNext
Prepends the specifiedVkDedicatedAllocationMemoryAllocateInfoNV
value to thepMemoryAllocateNext
chain. -
pMemoryAllocateNext
Prepends the specifiedVkExportMemoryAllocateInfo
value to thepMemoryAllocateNext
chain. -
pMemoryAllocateNext
Prepends the specifiedVkExportMemoryAllocateInfoKHR
value to thepMemoryAllocateNext
chain. -
pMemoryAllocateNext
Prepends the specifiedVkExportMemoryAllocateInfoNV
value to thepMemoryAllocateNext
chain. -
pMemoryAllocateNext
Prepends the specifiedVkExportMemoryWin32HandleInfoKHR
value to thepMemoryAllocateNext
chain. -
pMemoryAllocateNext
Prepends the specifiedVkExportMemoryWin32HandleInfoNV
value to thepMemoryAllocateNext
chain. -
pMemoryAllocateNext
Prepends the specifiedVkExportMetalObjectCreateInfoEXT
value to thepMemoryAllocateNext
chain. -
pMemoryAllocateNext
Prepends the specifiedVkImportAndroidHardwareBufferInfoANDROID
value to thepMemoryAllocateNext
chain. -
pMemoryAllocateNext
Prepends the specifiedVkImportMemoryFdInfoKHR
value to thepMemoryAllocateNext
chain. -
pMemoryAllocateNext
Prepends the specifiedVkImportMemoryHostPointerInfoEXT
value to thepMemoryAllocateNext
chain. -
pMemoryAllocateNext
Prepends the specifiedVkImportMemoryWin32HandleInfoKHR
value to thepMemoryAllocateNext
chain. -
pMemoryAllocateNext
Prepends the specifiedVkImportMemoryWin32HandleInfoNV
value to thepMemoryAllocateNext
chain. -
pMemoryAllocateNext
Prepends the specifiedVkImportMetalBufferInfoEXT
value to thepMemoryAllocateNext
chain. -
pMemoryAllocateNext
Prepends the specifiedVkMemoryAllocateFlagsInfo
value to thepMemoryAllocateNext
chain. -
pMemoryAllocateNext
Prepends the specifiedVkMemoryAllocateFlagsInfoKHR
value to thepMemoryAllocateNext
chain. -
pMemoryAllocateNext
Prepends the specifiedVkMemoryDedicatedAllocateInfo
value to thepMemoryAllocateNext
chain. -
pMemoryAllocateNext
Prepends the specifiedVkMemoryDedicatedAllocateInfoKHR
value to thepMemoryAllocateNext
chain. -
pMemoryAllocateNext
Prepends the specifiedVkMemoryOpaqueCaptureAddressAllocateInfo
value to thepMemoryAllocateNext
chain. -
pMemoryAllocateNext
Prepends the specifiedVkMemoryOpaqueCaptureAddressAllocateInfoKHR
value to thepMemoryAllocateNext
chain. -
pMemoryAllocateNext
Prepends the specifiedVkMemoryPriorityAllocateInfoEXT
value to thepMemoryAllocateNext
chain. -
set
public VmaPoolCreateInfo set(int memoryTypeIndex, int flags, long blockSize, long minBlockCount, long maxBlockCount, float priority, long minAllocationAlignment, long pMemoryAllocateNext) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
Returns a newVmaPoolCreateInfo
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newVmaPoolCreateInfo
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newVmaPoolCreateInfo
instance allocated withBufferUtils
. -
create
Returns a newVmaPoolCreateInfo
instance for the specified memory address. -
createSafe
-
malloc
Returns a newVmaPoolCreateInfo.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newVmaPoolCreateInfo.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newVmaPoolCreateInfo.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aVmaPoolCreateInfo.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newVmaPoolCreateInfo
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newVmaPoolCreateInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newVmaPoolCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newVmaPoolCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
nmemoryTypeIndex
public static int nmemoryTypeIndex(long struct) Unsafe version ofmemoryTypeIndex()
. -
nflags
public static int nflags(long struct) Unsafe version offlags()
. -
nblockSize
public static long nblockSize(long struct) Unsafe version ofblockSize()
. -
nminBlockCount
public static long nminBlockCount(long struct) Unsafe version ofminBlockCount()
. -
nmaxBlockCount
public static long nmaxBlockCount(long struct) Unsafe version ofmaxBlockCount()
. -
npriority
public static float npriority(long struct) Unsafe version ofpriority()
. -
nminAllocationAlignment
public static long nminAllocationAlignment(long struct) Unsafe version ofminAllocationAlignment()
. -
npMemoryAllocateNext
public static long npMemoryAllocateNext(long struct) Unsafe version ofpMemoryAllocateNext()
. -
nmemoryTypeIndex
public static void nmemoryTypeIndex(long struct, int value) Unsafe version ofmemoryTypeIndex
. -
nflags
public static void nflags(long struct, int value) Unsafe version offlags
. -
nblockSize
public static void nblockSize(long struct, long value) Unsafe version ofblockSize
. -
nminBlockCount
public static void nminBlockCount(long struct, long value) Unsafe version ofminBlockCount
. -
nmaxBlockCount
public static void nmaxBlockCount(long struct, long value) Unsafe version ofmaxBlockCount
. -
npriority
public static void npriority(long struct, float value) Unsafe version ofpriority
. -
nminAllocationAlignment
public static void nminAllocationAlignment(long struct, long value) Unsafe version ofminAllocationAlignment
. -
npMemoryAllocateNext
public static void npMemoryAllocateNext(long struct, long value) Unsafe version ofpMemoryAllocateNext
.
-