public class VmaDefragmentationInfo2
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
To be used with function DefragmentationBegin.
flags – reserved for future use. Should be 0.allocationCount – number of allocations in pAllocations arraypAllocations –
Pointer to array of allocations that can be defragmented.
The array should have allocationCount elements. The array should not contain nulls. Elements in the array should be unique - same allocation
cannot occur twice. It is safe to pass allocations that are in the lost state - they are ignored. All allocations not present in this array are
considered non-moveable during this defragmentation.
pAllocationsChanged –
Optional, output. Pointer to array that will be filled with information whether the allocation at certain index has been changed during defragmentation.
The array should have allocationCount elements. You can pass null if you are not interested in this information.
poolCount – number of pools in pPools arraypPools –
Either null or pointer to array of pools to be defragmented.
All the allocations in the specified pools can be moved during defragmentation and there is no way to check if they were really moved as in
pAllocationsChanged, so you must query all the allocations in all these pools for new VkDeviceMemory and offset using
GetAllocationInfo if you might need to recreate buffers and images bound to them.
The array should have poolCount elements. The array should not contain nulls. Elements in the array should be unique - same pool cannot occur
twice.
Using this array is equivalent to specifying all allocations from the pools in pAllocations. It might be more efficient.
maxCpuBytesToMove –
Maximum total numbers of bytes that can be copied while moving allocations to different places using transfers on CPU side, like memcpy(),
memmove().
VK_WHOLE_SIZE means no limit.
maxCpuAllocationsToMove –
Maximum number of allocations that can be moved to a different place using transfers on CPU side, like memcpy(), memmove().
UINT32_MAX means no limit.
maxGpuBytesToMove –
Maximum total numbers of bytes that can be copied while moving allocations to different places using transfers on GPU side, posted to
commandBuffer.
VK_WHOLE_SIZE means no limit.
maxGpuAllocationsToMove –
Maximum number of allocations that can be moved to a different place using transfers on GPU side, posted to commandBuffer.
UINT32_MAX means no limit.
commandBuffer –
Optional. Command buffer where GPU copy commands will be posted.
If not null, it must be a valid command buffer handle that supports Transfer queue type. It must be in the recording state and outside of a render pass
instance. You need to submit it and make sure it finished execution before calling DefragmentationEnd.
Passing null means that only CPU defragmentation will be performed.
struct VmaDefragmentationInfo2 {
VmaDefragmentationFlags flags;
uint32_t allocationCount;
VmaAllocation * pAllocations;
VkBool32 * pAllocationsChanged;
uint32_t poolCount;
VmaPool * pPools;
VkDeviceSize maxCpuBytesToMove;
uint32_t maxCpuAllocationsToMove;
VkDeviceSize maxGpuBytesToMove;
uint32_t maxGpuAllocationsToMove;
VkCommandBuffer commandBuffer;
}| Modifier and Type | Class and Description |
|---|---|
static class |
VmaDefragmentationInfo2.Buffer
An array of
VmaDefragmentationInfo2 structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
ALLOCATIONCOUNT
The struct member offsets.
|
static int |
COMMANDBUFFER
The struct member offsets.
|
static int |
FLAGS
The struct member offsets.
|
static int |
MAXCPUALLOCATIONSTOMOVE
The struct member offsets.
|
static int |
MAXCPUBYTESTOMOVE
The struct member offsets.
|
static int |
MAXGPUALLOCATIONSTOMOVE
The struct member offsets.
|
static int |
MAXGPUBYTESTOMOVE
The struct member offsets.
|
static int |
PALLOCATIONS
The struct member offsets.
|
static int |
PALLOCATIONSCHANGED
The struct member offsets.
|
static int |
POOLCOUNT
The struct member offsets.
|
static int |
PPOOLS
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
VmaDefragmentationInfo2(java.nio.ByteBuffer container)
Creates a
VmaDefragmentationInfo2 instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
int |
allocationCount()
Returns the value of the
allocationCount field. |
VmaDefragmentationInfo2 |
allocationCount(int value)
Sets the specified value to the
allocationCount field. |
static VmaDefragmentationInfo2 |
calloc()
Returns a new
VmaDefragmentationInfo2 instance allocated with memCalloc. |
static VmaDefragmentationInfo2.Buffer |
calloc(int capacity)
Returns a new
VmaDefragmentationInfo2.Buffer instance allocated with memCalloc. |
static VmaDefragmentationInfo2 |
callocStack()
Returns a new
VmaDefragmentationInfo2 instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VmaDefragmentationInfo2.Buffer |
callocStack(int capacity)
Returns a new
VmaDefragmentationInfo2.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VmaDefragmentationInfo2.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VmaDefragmentationInfo2.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VmaDefragmentationInfo2 |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VmaDefragmentationInfo2 instance allocated on the specified MemoryStack and initializes all its bits to zero. |
long |
commandBuffer()
Returns the value of the
commandBuffer field. |
VmaDefragmentationInfo2 |
commandBuffer(org.lwjgl.vulkan.VkCommandBuffer value)
Sets the specified value to the
commandBuffer field. |
static VmaDefragmentationInfo2 |
create()
Returns a new
VmaDefragmentationInfo2 instance allocated with BufferUtils. |
static VmaDefragmentationInfo2.Buffer |
create(int capacity)
Returns a new
VmaDefragmentationInfo2.Buffer instance allocated with BufferUtils. |
static VmaDefragmentationInfo2 |
create(long address)
Returns a new
VmaDefragmentationInfo2 instance for the specified memory address. |
static VmaDefragmentationInfo2.Buffer |
create(long address,
int capacity)
Create a
VmaDefragmentationInfo2.Buffer instance at the specified memory. |
static VmaDefragmentationInfo2 |
createSafe(long address)
|
static VmaDefragmentationInfo2.Buffer |
createSafe(long address,
int capacity)
|
int |
flags()
Returns the value of the
flags field. |
VmaDefragmentationInfo2 |
flags(int value)
Sets the specified value to the
flags field. |
static VmaDefragmentationInfo2 |
malloc()
Returns a new
VmaDefragmentationInfo2 instance allocated with memAlloc. |
static VmaDefragmentationInfo2.Buffer |
malloc(int capacity)
Returns a new
VmaDefragmentationInfo2.Buffer instance allocated with memAlloc. |
static VmaDefragmentationInfo2 |
mallocStack()
Returns a new
VmaDefragmentationInfo2 instance allocated on the thread-local MemoryStack. |
static VmaDefragmentationInfo2.Buffer |
mallocStack(int capacity)
Returns a new
VmaDefragmentationInfo2.Buffer instance allocated on the thread-local MemoryStack. |
static VmaDefragmentationInfo2.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VmaDefragmentationInfo2.Buffer instance allocated on the specified MemoryStack. |
static VmaDefragmentationInfo2 |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VmaDefragmentationInfo2 instance allocated on the specified MemoryStack. |
int |
maxCpuAllocationsToMove()
Returns the value of the
maxCpuAllocationsToMove field. |
VmaDefragmentationInfo2 |
maxCpuAllocationsToMove(int value)
Sets the specified value to the
maxCpuAllocationsToMove field. |
long |
maxCpuBytesToMove()
Returns the value of the
maxCpuBytesToMove field. |
VmaDefragmentationInfo2 |
maxCpuBytesToMove(long value)
Sets the specified value to the
maxCpuBytesToMove field. |
int |
maxGpuAllocationsToMove()
Returns the value of the
maxGpuAllocationsToMove field. |
VmaDefragmentationInfo2 |
maxGpuAllocationsToMove(int value)
Sets the specified value to the
maxGpuAllocationsToMove field. |
long |
maxGpuBytesToMove()
Returns the value of the
maxGpuBytesToMove field. |
VmaDefragmentationInfo2 |
maxGpuBytesToMove(long value)
Sets the specified value to the
maxGpuBytesToMove field. |
static int |
nallocationCount(long struct)
Unsafe version of
allocationCount(). |
static void |
nallocationCount(long struct,
int value)
Sets the specified value to the
allocationCount field of the specified struct. |
static long |
ncommandBuffer(long struct)
Unsafe version of
commandBuffer(). |
static void |
ncommandBuffer(long struct,
org.lwjgl.vulkan.VkCommandBuffer value)
Unsafe version of
commandBuffer. |
static int |
nflags(long struct)
Unsafe version of
flags(). |
static void |
nflags(long struct,
int value)
Unsafe version of
flags. |
static int |
nmaxCpuAllocationsToMove(long struct)
Unsafe version of
maxCpuAllocationsToMove(). |
static void |
nmaxCpuAllocationsToMove(long struct,
int value)
Unsafe version of
maxCpuAllocationsToMove. |
static long |
nmaxCpuBytesToMove(long struct)
Unsafe version of
maxCpuBytesToMove(). |
static void |
nmaxCpuBytesToMove(long struct,
long value)
Unsafe version of
maxCpuBytesToMove. |
static int |
nmaxGpuAllocationsToMove(long struct)
Unsafe version of
maxGpuAllocationsToMove(). |
static void |
nmaxGpuAllocationsToMove(long struct,
int value)
Unsafe version of
maxGpuAllocationsToMove. |
static long |
nmaxGpuBytesToMove(long struct)
Unsafe version of
maxGpuBytesToMove(). |
static void |
nmaxGpuBytesToMove(long struct,
long value)
Unsafe version of
maxGpuBytesToMove. |
static org.lwjgl.PointerBuffer |
npAllocations(long struct)
Unsafe version of
pAllocations. |
static void |
npAllocations(long struct,
org.lwjgl.PointerBuffer value)
Unsafe version of
pAllocations. |
static java.nio.IntBuffer |
npAllocationsChanged(long struct)
Unsafe version of
pAllocationsChanged. |
static void |
npAllocationsChanged(long struct,
java.nio.IntBuffer value)
Unsafe version of
pAllocationsChanged. |
static int |
npoolCount(long struct)
Unsafe version of
poolCount(). |
static void |
npoolCount(long struct,
int value)
Sets the specified value to the
poolCount field of the specified struct. |
static org.lwjgl.PointerBuffer |
npPools(long struct)
Unsafe version of
pPools. |
static void |
npPools(long struct,
org.lwjgl.PointerBuffer value)
Unsafe version of
pPools. |
org.lwjgl.PointerBuffer |
pAllocations()
Returns a
PointerBuffer view of the data pointed to by the pAllocations field. |
VmaDefragmentationInfo2 |
pAllocations(org.lwjgl.PointerBuffer value)
Sets the address of the specified
PointerBuffer to the pAllocations field. |
java.nio.IntBuffer |
pAllocationsChanged()
Returns a
IntBuffer view of the data pointed to by the pAllocationsChanged field. |
VmaDefragmentationInfo2 |
pAllocationsChanged(java.nio.IntBuffer value)
Sets the address of the specified
IntBuffer to the pAllocationsChanged field. |
int |
poolCount()
Returns the value of the
poolCount field. |
VmaDefragmentationInfo2 |
poolCount(int value)
Sets the specified value to the
poolCount field. |
org.lwjgl.PointerBuffer |
pPools()
Returns a
PointerBuffer view of the data pointed to by the pPools field. |
VmaDefragmentationInfo2 |
pPools(org.lwjgl.PointerBuffer value)
Sets the address of the specified
PointerBuffer to the pPools field. |
VmaDefragmentationInfo2 |
set(int flags,
int allocationCount,
org.lwjgl.PointerBuffer pAllocations,
java.nio.IntBuffer pAllocationsChanged,
int poolCount,
org.lwjgl.PointerBuffer pPools,
long maxCpuBytesToMove,
int maxCpuAllocationsToMove,
long maxGpuBytesToMove,
int maxGpuAllocationsToMove,
org.lwjgl.vulkan.VkCommandBuffer commandBuffer)
Initializes this struct with the specified values.
|
VmaDefragmentationInfo2 |
set(VmaDefragmentationInfo2 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. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int FLAGS
public static final int ALLOCATIONCOUNT
public static final int PALLOCATIONS
public static final int PALLOCATIONSCHANGED
public static final int POOLCOUNT
public static final int PPOOLS
public static final int MAXCPUBYTESTOMOVE
public static final int MAXCPUALLOCATIONSTOMOVE
public static final int MAXGPUBYTESTOMOVE
public static final int MAXGPUALLOCATIONSTOMOVE
public static final int COMMANDBUFFER
public VmaDefragmentationInfo2(java.nio.ByteBuffer container)
VmaDefragmentationInfo2 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 int allocationCount()
allocationCount field.public org.lwjgl.PointerBuffer pAllocations()
PointerBuffer view of the data pointed to by the pAllocations field.@Nullable public java.nio.IntBuffer pAllocationsChanged()
IntBuffer view of the data pointed to by the pAllocationsChanged field.public int poolCount()
poolCount field.@Nullable public org.lwjgl.PointerBuffer pPools()
PointerBuffer view of the data pointed to by the pPools field.public long maxCpuBytesToMove()
maxCpuBytesToMove field.public int maxCpuAllocationsToMove()
maxCpuAllocationsToMove field.public long maxGpuBytesToMove()
maxGpuBytesToMove field.public int maxGpuAllocationsToMove()
maxGpuAllocationsToMove field.@Nullable public long commandBuffer()
commandBuffer field.public VmaDefragmentationInfo2 flags(int value)
flags field.public VmaDefragmentationInfo2 allocationCount(int value)
allocationCount field.public VmaDefragmentationInfo2 pAllocations(org.lwjgl.PointerBuffer value)
PointerBuffer to the pAllocations field.public VmaDefragmentationInfo2 pAllocationsChanged(@Nullable java.nio.IntBuffer value)
IntBuffer to the pAllocationsChanged field.public VmaDefragmentationInfo2 poolCount(int value)
poolCount field.public VmaDefragmentationInfo2 pPools(@Nullable org.lwjgl.PointerBuffer value)
PointerBuffer to the pPools field.public VmaDefragmentationInfo2 maxCpuBytesToMove(long value)
maxCpuBytesToMove field.public VmaDefragmentationInfo2 maxCpuAllocationsToMove(int value)
maxCpuAllocationsToMove field.public VmaDefragmentationInfo2 maxGpuBytesToMove(long value)
maxGpuBytesToMove field.public VmaDefragmentationInfo2 maxGpuAllocationsToMove(int value)
maxGpuAllocationsToMove field.public VmaDefragmentationInfo2 commandBuffer(@Nullable org.lwjgl.vulkan.VkCommandBuffer value)
commandBuffer field.public VmaDefragmentationInfo2 set(int flags, int allocationCount, org.lwjgl.PointerBuffer pAllocations, @Nullable java.nio.IntBuffer pAllocationsChanged, int poolCount, @Nullable org.lwjgl.PointerBuffer pPools, long maxCpuBytesToMove, int maxCpuAllocationsToMove, long maxGpuBytesToMove, int maxGpuAllocationsToMove, @Nullable org.lwjgl.vulkan.VkCommandBuffer commandBuffer)
public VmaDefragmentationInfo2 set(VmaDefragmentationInfo2 src)
src - the source structpublic static VmaDefragmentationInfo2 malloc()
VmaDefragmentationInfo2 instance allocated with memAlloc. The instance must be explicitly freed.public static VmaDefragmentationInfo2 calloc()
VmaDefragmentationInfo2 instance allocated with memCalloc. The instance must be explicitly freed.public static VmaDefragmentationInfo2 create()
VmaDefragmentationInfo2 instance allocated with BufferUtils.public static VmaDefragmentationInfo2 create(long address)
VmaDefragmentationInfo2 instance for the specified memory address.@Nullable public static VmaDefragmentationInfo2 createSafe(long address)
public static VmaDefragmentationInfo2.Buffer malloc(int capacity)
VmaDefragmentationInfo2.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VmaDefragmentationInfo2.Buffer calloc(int capacity)
VmaDefragmentationInfo2.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VmaDefragmentationInfo2.Buffer create(int capacity)
VmaDefragmentationInfo2.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static VmaDefragmentationInfo2.Buffer create(long address, int capacity)
VmaDefragmentationInfo2.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static VmaDefragmentationInfo2.Buffer createSafe(long address, int capacity)
public static VmaDefragmentationInfo2 mallocStack()
VmaDefragmentationInfo2 instance allocated on the thread-local MemoryStack.public static VmaDefragmentationInfo2 callocStack()
VmaDefragmentationInfo2 instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static VmaDefragmentationInfo2 mallocStack(org.lwjgl.system.MemoryStack stack)
VmaDefragmentationInfo2 instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static VmaDefragmentationInfo2 callocStack(org.lwjgl.system.MemoryStack stack)
VmaDefragmentationInfo2 instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static VmaDefragmentationInfo2.Buffer mallocStack(int capacity)
VmaDefragmentationInfo2.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static VmaDefragmentationInfo2.Buffer callocStack(int capacity)
VmaDefragmentationInfo2.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static VmaDefragmentationInfo2.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VmaDefragmentationInfo2.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VmaDefragmentationInfo2.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VmaDefragmentationInfo2.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 nflags(long struct)
flags().public static int nallocationCount(long struct)
allocationCount().public static org.lwjgl.PointerBuffer npAllocations(long struct)
pAllocations.@Nullable public static java.nio.IntBuffer npAllocationsChanged(long struct)
pAllocationsChanged.public static int npoolCount(long struct)
poolCount().@Nullable public static org.lwjgl.PointerBuffer npPools(long struct)
pPools.public static long nmaxCpuBytesToMove(long struct)
maxCpuBytesToMove().public static int nmaxCpuAllocationsToMove(long struct)
maxCpuAllocationsToMove().public static long nmaxGpuBytesToMove(long struct)
maxGpuBytesToMove().public static int nmaxGpuAllocationsToMove(long struct)
maxGpuAllocationsToMove().public static long ncommandBuffer(long struct)
commandBuffer().public static void nflags(long struct,
int value)
flags.public static void nallocationCount(long struct,
int value)
allocationCount field of the specified struct.public static void npAllocations(long struct,
org.lwjgl.PointerBuffer value)
pAllocations.public static void npAllocationsChanged(long struct,
@Nullable
java.nio.IntBuffer value)
pAllocationsChanged.public static void npoolCount(long struct,
int value)
poolCount field of the specified struct.public static void npPools(long struct,
@Nullable
org.lwjgl.PointerBuffer value)
pPools.public static void nmaxCpuBytesToMove(long struct,
long value)
maxCpuBytesToMove.public static void nmaxCpuAllocationsToMove(long struct,
int value)
maxCpuAllocationsToMove.public static void nmaxGpuBytesToMove(long struct,
long value)
maxGpuBytesToMove.public static void nmaxGpuAllocationsToMove(long struct,
int value)
maxGpuAllocationsToMove.public static void ncommandBuffer(long struct,
@Nullable
org.lwjgl.vulkan.VkCommandBuffer value)
commandBuffer.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.