Class VmaDefragmentationInfo2
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.vma.VmaDefragmentationInfo2
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VmaDefragmentationInfo2 extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceParameters for defragmentation.To be used with function
DefragmentationBegin.Layout
struct VmaDefragmentationInfo2 { VmaDefragmentationFlagsflags(); uint32_tallocationCount(); VmaAllocation *pAllocations(); VkBool32 *pAllocationsChanged(); uint32_tpoolCount(); VmaPool const *pPools(); VkDeviceSizemaxCpuBytesToMove(); uint32_tmaxCpuAllocationsToMove(); VkDeviceSizemaxGpuBytesToMove(); uint32_tmaxGpuAllocationsToMove(); VkCommandBuffercommandBuffer(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVmaDefragmentationInfo2.BufferAn array ofVmaDefragmentationInfo2structs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intALLOCATIONCOUNT
COMMANDBUFFER
FLAGS
MAXCPUALLOCATIONSTOMOVE
MAXCPUBYTESTOMOVE
MAXGPUALLOCATIONSTOMOVE
MAXGPUBYTESTOMOVE
PALLOCATIONS
PALLOCATIONSCHANGED
POOLCOUNT
PPOOLSThe struct member offsets.static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor Description VmaDefragmentationInfo2(java.nio.ByteBuffer container)Creates aVmaDefragmentationInfo2instance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intallocationCount()number of allocations inpAllocationsarrayVmaDefragmentationInfo2allocationCount(int value)Sets the specified value to theallocationCount()field.static VmaDefragmentationInfo2calloc()Returns a newVmaDefragmentationInfo2instance allocated withmemCalloc.static VmaDefragmentationInfo2.Buffercalloc(int capacity)Returns a newVmaDefragmentationInfo2.Bufferinstance allocated withmemCalloc.static VmaDefragmentationInfo2.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVmaDefragmentationInfo2.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VmaDefragmentationInfo2calloc(org.lwjgl.system.MemoryStack stack)Returns a newVmaDefragmentationInfo2instance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VmaDefragmentationInfo2callocStack()Deprecated.static VmaDefragmentationInfo2.BuffercallocStack(int capacity)Deprecated.static VmaDefragmentationInfo2.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VmaDefragmentationInfo2callocStack(org.lwjgl.system.MemoryStack stack)Deprecated.longcommandBuffer()command buffer where GPU copy commands will be posted.VmaDefragmentationInfo2commandBuffer(org.lwjgl.vulkan.VkCommandBuffer value)Sets the specified value to thecommandBuffer()field.static VmaDefragmentationInfo2create()Returns a newVmaDefragmentationInfo2instance allocated withBufferUtils.static VmaDefragmentationInfo2.Buffercreate(int capacity)Returns a newVmaDefragmentationInfo2.Bufferinstance allocated withBufferUtils.static VmaDefragmentationInfo2create(long address)Returns a newVmaDefragmentationInfo2instance for the specified memory address.static VmaDefragmentationInfo2.Buffercreate(long address, int capacity)Create aVmaDefragmentationInfo2.Bufferinstance at the specified memory.static VmaDefragmentationInfo2createSafe(long address)static VmaDefragmentationInfo2.BuffercreateSafe(long address, int capacity)intflags()reserved for future use.VmaDefragmentationInfo2flags(int value)Sets the specified value to theflags()field.static VmaDefragmentationInfo2malloc()Returns a newVmaDefragmentationInfo2instance allocated withmemAlloc.static VmaDefragmentationInfo2.Buffermalloc(int capacity)Returns a newVmaDefragmentationInfo2.Bufferinstance allocated withmemAlloc.static VmaDefragmentationInfo2.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVmaDefragmentationInfo2.Bufferinstance allocated on the specifiedMemoryStack.static VmaDefragmentationInfo2malloc(org.lwjgl.system.MemoryStack stack)Returns a newVmaDefragmentationInfo2instance allocated on the specifiedMemoryStack.static VmaDefragmentationInfo2mallocStack()Deprecated.static VmaDefragmentationInfo2.BuffermallocStack(int capacity)Deprecated.static VmaDefragmentationInfo2.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VmaDefragmentationInfo2mallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.intmaxCpuAllocationsToMove()maximum number of allocations that can be moved to a different place using transfers on CPU side, likememcpy(),memmove().VmaDefragmentationInfo2maxCpuAllocationsToMove(int value)Sets the specified value to themaxCpuAllocationsToMove()field.longmaxCpuBytesToMove()maximum total numbers of bytes that can be copied while moving allocations to different places using transfers on CPU side, likememcpy(),memmove().VmaDefragmentationInfo2maxCpuBytesToMove(long value)Sets the specified value to themaxCpuBytesToMove()field.intmaxGpuAllocationsToMove()maximum number of allocations that can be moved to a different place using transfers on GPU side, posted tocommandBuffer.VmaDefragmentationInfo2maxGpuAllocationsToMove(int value)Sets the specified value to themaxGpuAllocationsToMove()field.longmaxGpuBytesToMove()maximum total numbers of bytes that can be copied while moving allocations to different places using transfers on GPU side, posted tocommandBuffer.VmaDefragmentationInfo2maxGpuBytesToMove(long value)Sets the specified value to themaxGpuBytesToMove()field.static intnallocationCount(long struct)Unsafe version ofallocationCount().static voidnallocationCount(long struct, int value)Sets the specified value to theallocationCountfield of the specifiedstruct.static longncommandBuffer(long struct)Unsafe version ofcommandBuffer().static voidncommandBuffer(long struct, org.lwjgl.vulkan.VkCommandBuffer value)Unsafe version ofcommandBuffer.static intnflags(long struct)Unsafe version offlags().static voidnflags(long struct, int value)Unsafe version offlags.static intnmaxCpuAllocationsToMove(long struct)Unsafe version ofmaxCpuAllocationsToMove().static voidnmaxCpuAllocationsToMove(long struct, int value)Unsafe version ofmaxCpuAllocationsToMove.static longnmaxCpuBytesToMove(long struct)Unsafe version ofmaxCpuBytesToMove().static voidnmaxCpuBytesToMove(long struct, long value)Unsafe version ofmaxCpuBytesToMove.static intnmaxGpuAllocationsToMove(long struct)Unsafe version ofmaxGpuAllocationsToMove().static voidnmaxGpuAllocationsToMove(long struct, int value)Unsafe version ofmaxGpuAllocationsToMove.static longnmaxGpuBytesToMove(long struct)Unsafe version ofmaxGpuBytesToMove().static voidnmaxGpuBytesToMove(long struct, long value)Unsafe version ofmaxGpuBytesToMove.static org.lwjgl.PointerBuffernpAllocations(long struct)Unsafe version ofpAllocations.static voidnpAllocations(long struct, org.lwjgl.PointerBuffer value)Unsafe version ofpAllocations.static java.nio.IntBuffernpAllocationsChanged(long struct)Unsafe version ofpAllocationsChanged.static voidnpAllocationsChanged(long struct, java.nio.IntBuffer value)Unsafe version ofpAllocationsChanged.static intnpoolCount(long struct)Unsafe version ofpoolCount().static voidnpoolCount(long struct, int value)Sets the specified value to thepoolCountfield of the specifiedstruct.static org.lwjgl.PointerBuffernpPools(long struct)Unsafe version ofpPools.static voidnpPools(long struct, org.lwjgl.PointerBuffer value)Unsafe version ofpPools.org.lwjgl.PointerBufferpAllocations()pointer to array of allocations that can be defragmented.VmaDefragmentationInfo2pAllocations(org.lwjgl.PointerBuffer value)Sets the address of the specifiedPointerBufferto thepAllocations()field.java.nio.IntBufferpAllocationsChanged()Optional, output.VmaDefragmentationInfo2pAllocationsChanged(java.nio.IntBuffer value)Sets the address of the specifiedIntBufferto thepAllocationsChanged()field.intpoolCount()number of pools inpPoolsarrayVmaDefragmentationInfo2poolCount(int value)Sets the specified value to thepoolCount()field.org.lwjgl.PointerBufferpPools()Either null or pointer to array of pools to be defragmented.VmaDefragmentationInfo2pPools(org.lwjgl.PointerBuffer value)Sets the address of the specifiedPointerBufferto thepPools()field.VmaDefragmentationInfo2set(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.VmaDefragmentationInfo2set(VmaDefragmentationInfo2 src)Copies the specified struct data to this struct.intsizeof()static voidvalidate(long struct)Validates pointer members that should not beNULL.
-
-
-
Constructor Detail
-
VmaDefragmentationInfo2
public VmaDefragmentationInfo2(java.nio.ByteBuffer container)
Creates aVmaDefragmentationInfo2instance at the current position of the specifiedByteBuffercontainer. 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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
flags
public int flags()
reserved for future use. Should be 0.
-
allocationCount
public int allocationCount()
number of allocations inpAllocationsarray
-
pAllocations
public org.lwjgl.PointerBuffer pAllocations()
pointer to array of allocations that can be defragmented.The array should have
allocationCountelements. The array should not contain nulls. Elements in the array should be unique - same allocation cannot occur twice. All allocations not present in this array are considered non-moveable during this defragmentation.
-
pAllocationsChanged
@Nullable public java.nio.IntBuffer 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
allocationCountelements. You can pass null if you are not interested in this information.
-
poolCount
public int poolCount()
number of pools inpPoolsarray
-
pPools
@Nullable public org.lwjgl.PointerBuffer pPools()
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 newVkDeviceMemoryand offset usingGetAllocationInfoif you might need to recreate buffers and images bound to them.The array should have
poolCountelements. 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
public long maxCpuBytesToMove()
maximum total numbers of bytes that can be copied while moving allocations to different places using transfers on CPU side, likememcpy(),memmove().VK_WHOLE_SIZEmeans no limit.
-
maxCpuAllocationsToMove
public int maxCpuAllocationsToMove()
maximum number of allocations that can be moved to a different place using transfers on CPU side, likememcpy(),memmove().UINT32_MAXmeans no limit.
-
maxGpuBytesToMove
public long maxGpuBytesToMove()
maximum total numbers of bytes that can be copied while moving allocations to different places using transfers on GPU side, posted tocommandBuffer.VK_WHOLE_SIZEmeans no limit.
-
maxGpuAllocationsToMove
public int maxGpuAllocationsToMove()
maximum number of allocations that can be moved to a different place using transfers on GPU side, posted tocommandBuffer.UINT32_MAXmeans no limit.
-
commandBuffer
@Nullable public long commandBuffer()
command buffer where GPU copy commands will be posted. Optional.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.
-
flags
public VmaDefragmentationInfo2 flags(int value)
Sets the specified value to theflags()field.
-
allocationCount
public VmaDefragmentationInfo2 allocationCount(int value)
Sets the specified value to theallocationCount()field.
-
pAllocations
public VmaDefragmentationInfo2 pAllocations(org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBufferto thepAllocations()field.
-
pAllocationsChanged
public VmaDefragmentationInfo2 pAllocationsChanged(@Nullable java.nio.IntBuffer value)
Sets the address of the specifiedIntBufferto thepAllocationsChanged()field.
-
poolCount
public VmaDefragmentationInfo2 poolCount(int value)
Sets the specified value to thepoolCount()field.
-
pPools
public VmaDefragmentationInfo2 pPools(@Nullable org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBufferto thepPools()field.
-
maxCpuBytesToMove
public VmaDefragmentationInfo2 maxCpuBytesToMove(long value)
Sets the specified value to themaxCpuBytesToMove()field.
-
maxCpuAllocationsToMove
public VmaDefragmentationInfo2 maxCpuAllocationsToMove(int value)
Sets the specified value to themaxCpuAllocationsToMove()field.
-
maxGpuBytesToMove
public VmaDefragmentationInfo2 maxGpuBytesToMove(long value)
Sets the specified value to themaxGpuBytesToMove()field.
-
maxGpuAllocationsToMove
public VmaDefragmentationInfo2 maxGpuAllocationsToMove(int value)
Sets the specified value to themaxGpuAllocationsToMove()field.
-
commandBuffer
public VmaDefragmentationInfo2 commandBuffer(@Nullable org.lwjgl.vulkan.VkCommandBuffer value)
Sets the specified value to thecommandBuffer()field.
-
set
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)
Initializes this struct with the specified values.
-
set
public VmaDefragmentationInfo2 set(VmaDefragmentationInfo2 src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VmaDefragmentationInfo2 malloc()
Returns a newVmaDefragmentationInfo2instance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VmaDefragmentationInfo2 calloc()
Returns a newVmaDefragmentationInfo2instance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VmaDefragmentationInfo2 create()
Returns a newVmaDefragmentationInfo2instance allocated withBufferUtils.
-
create
public static VmaDefragmentationInfo2 create(long address)
Returns a newVmaDefragmentationInfo2instance for the specified memory address.
-
createSafe
@Nullable public static VmaDefragmentationInfo2 createSafe(long address)
-
malloc
public static VmaDefragmentationInfo2.Buffer malloc(int capacity)
Returns a newVmaDefragmentationInfo2.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VmaDefragmentationInfo2.Buffer calloc(int capacity)
Returns a newVmaDefragmentationInfo2.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VmaDefragmentationInfo2.Buffer create(int capacity)
Returns a newVmaDefragmentationInfo2.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VmaDefragmentationInfo2.Buffer create(long address, int capacity)
Create aVmaDefragmentationInfo2.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VmaDefragmentationInfo2.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static VmaDefragmentationInfo2 mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VmaDefragmentationInfo2 callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VmaDefragmentationInfo2 mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VmaDefragmentationInfo2 callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VmaDefragmentationInfo2.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VmaDefragmentationInfo2.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static VmaDefragmentationInfo2.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VmaDefragmentationInfo2.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static VmaDefragmentationInfo2 malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVmaDefragmentationInfo2instance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VmaDefragmentationInfo2 calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVmaDefragmentationInfo2instance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VmaDefragmentationInfo2.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVmaDefragmentationInfo2.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static VmaDefragmentationInfo2.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVmaDefragmentationInfo2.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nflags
public static int nflags(long struct)
Unsafe version offlags().
-
nallocationCount
public static int nallocationCount(long struct)
Unsafe version ofallocationCount().
-
npAllocations
public static org.lwjgl.PointerBuffer npAllocations(long struct)
Unsafe version ofpAllocations.
-
npAllocationsChanged
@Nullable public static java.nio.IntBuffer npAllocationsChanged(long struct)
Unsafe version ofpAllocationsChanged.
-
npoolCount
public static int npoolCount(long struct)
Unsafe version ofpoolCount().
-
npPools
@Nullable public static org.lwjgl.PointerBuffer npPools(long struct)
Unsafe version ofpPools.
-
nmaxCpuBytesToMove
public static long nmaxCpuBytesToMove(long struct)
Unsafe version ofmaxCpuBytesToMove().
-
nmaxCpuAllocationsToMove
public static int nmaxCpuAllocationsToMove(long struct)
Unsafe version ofmaxCpuAllocationsToMove().
-
nmaxGpuBytesToMove
public static long nmaxGpuBytesToMove(long struct)
Unsafe version ofmaxGpuBytesToMove().
-
nmaxGpuAllocationsToMove
public static int nmaxGpuAllocationsToMove(long struct)
Unsafe version ofmaxGpuAllocationsToMove().
-
ncommandBuffer
public static long ncommandBuffer(long struct)
Unsafe version ofcommandBuffer().
-
nflags
public static void nflags(long struct, int value)Unsafe version offlags.
-
nallocationCount
public static void nallocationCount(long struct, int value)Sets the specified value to theallocationCountfield of the specifiedstruct.
-
npAllocations
public static void npAllocations(long struct, org.lwjgl.PointerBuffer value)Unsafe version ofpAllocations.
-
npAllocationsChanged
public static void npAllocationsChanged(long struct, @Nullable java.nio.IntBuffer value)Unsafe version ofpAllocationsChanged.
-
npoolCount
public static void npoolCount(long struct, int value)Sets the specified value to thepoolCountfield of the specifiedstruct.
-
npPools
public static void npPools(long struct, @Nullable org.lwjgl.PointerBuffer value)Unsafe version ofpPools.
-
nmaxCpuBytesToMove
public static void nmaxCpuBytesToMove(long struct, long value)Unsafe version ofmaxCpuBytesToMove.
-
nmaxCpuAllocationsToMove
public static void nmaxCpuAllocationsToMove(long struct, int value)Unsafe version ofmaxCpuAllocationsToMove.
-
nmaxGpuBytesToMove
public static void nmaxGpuBytesToMove(long struct, long value)Unsafe version ofmaxGpuBytesToMove.
-
nmaxGpuAllocationsToMove
public static void nmaxGpuAllocationsToMove(long struct, int value)Unsafe version ofmaxGpuAllocationsToMove.
-
ncommandBuffer
public static void ncommandBuffer(long struct, @Nullable org.lwjgl.vulkan.VkCommandBuffer value)Unsafe version ofcommandBuffer.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
-