Top Description Inners Fields Constructors Methods
org.lwjgl.util.vma

public Class VmaDefragmentationMove

extends Struct<VmaDefragmentationMove>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Single move of an allocation to be done for defragmentation.

Layout


struct VmaDefragmentationMove {
    VmaDefragmentationMoveOperation operation;
    VmaAllocation srcAllocation;
    VmaAllocation dstTmpAllocation;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
DSTTMPALLOCATION

The struct member offsets.

public static final int
OPERATION

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
SRCALLOCATION

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
VmaDefragmentationMove(long address, ByteBuffer container)

public
VmaDefragmentationMove(ByteBuffer container)

Creates a VmaDefragmentationMove instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public static VmaDefragmentationMove
calloc()

Returns a new VmaDefragmentationMove instance allocated with memCalloc.

public static VmaDefragmentationMove.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new VmaDefragmentationMove.Buffer instance allocated with memCalloc.

public static VmaDefragmentationMove
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new VmaDefragmentationMove instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static VmaDefragmentationMove.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new VmaDefragmentationMove.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

protected VmaDefragmentationMove
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static VmaDefragmentationMove
create()

Returns a new VmaDefragmentationMove instance allocated with BufferUtils.

public static VmaDefragmentationMove
create(long address)

Returns a new VmaDefragmentationMove instance for the specified memory address.

public static VmaDefragmentationMove.Buffer
create(int
the buffer capacity
capacity
)

Returns a new VmaDefragmentationMove.Buffer instance allocated with BufferUtils.

public static VmaDefragmentationMove.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a VmaDefragmentationMove.Buffer instance at the specified memory.

public static VmaDefragmentationMove
createSafe(long address)

Like create, but returns null if address is NULL.

public static VmaDefragmentationMove.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public long
dstTmpAllocation()

temporary allocation pointing to destination memory that will replace srcAllocation.

public VmaDefragmentationMove
dstTmpAllocation(long value)

Sets the specified value to the dstTmpAllocation field.

public static VmaDefragmentationMove
malloc()

Returns a new VmaDefragmentationMove instance allocated with memAlloc.

public static VmaDefragmentationMove.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new VmaDefragmentationMove.Buffer instance allocated with memAlloc.

public static VmaDefragmentationMove
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new VmaDefragmentationMove instance allocated on the specified MemoryStack.

public static VmaDefragmentationMove.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new VmaDefragmentationMove.Buffer instance allocated on the specified MemoryStack.

public static long
ndstTmpAllocation(long struct)

Unsafe version of dstTmpAllocation.

public static void
ndstTmpAllocation(long struct, long value)

Unsafe version of dstTmpAllocation.

public static int
noperation(long struct)

Unsafe version of operation.

public static void
noperation(long struct, int value)

Unsafe version of operation.

public static long
nsrcAllocation(long struct)

Unsafe version of srcAllocation.

public static void
nsrcAllocation(long struct, long value)

Unsafe version of srcAllocation.

public int
operation()

operation to be performed on the allocation by EndDefragmentationPass.

public VmaDefragmentationMove
operation(int value)

Sets the specified value to the operation field.

public VmaDefragmentationMove
set(int operation, long srcAllocation, long dstTmpAllocation)

Initializes this struct with the specified values.

public VmaDefragmentationMove

Returns:

this struct
set
(VmaDefragmentationMove
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public long
srcAllocation()

allocation that should be moved

public VmaDefragmentationMove
srcAllocation(long value)

Sets the specified value to the srcAllocation field.

public static void
validate(long
the struct to validate
struct
)

Validates pointer members that should not be NULL.

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

DSTTMPALLOCATIONback to summary
public static final int DSTTMPALLOCATION

The struct member offsets.

OPERATIONback to summary
public static final int OPERATION

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

SRCALLOCATIONback to summary
public static final int SRCALLOCATION

The struct member offsets.

Constructor Detail

VmaDefragmentationMoveback to summary
protected VmaDefragmentationMove(long address, ByteBuffer container)
VmaDefragmentationMoveback to summary
public VmaDefragmentationMove(ByteBuffer container)

Creates a VmaDefragmentationMove 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.

Method Detail

callocback to summary
public static VmaDefragmentationMove calloc()

Returns a new VmaDefragmentationMove instance allocated with memCalloc. The instance must be explicitly freed.

callocback to summary
public static VmaDefragmentationMove.Buffer calloc(int capacity)

Returns a new VmaDefragmentationMove.Buffer instance allocated with memCalloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

callocback to summary
public static VmaDefragmentationMove calloc(MemoryStack stack)

Returns a new VmaDefragmentationMove instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
stack:MemoryStack

the stack from which to allocate

callocback to summary
public static VmaDefragmentationMove.Buffer calloc(int capacity, MemoryStack stack)

Returns a new VmaDefragmentationMove.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

createback to summary
protected VmaDefragmentationMove create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static VmaDefragmentationMove create()

Returns a new VmaDefragmentationMove instance allocated with BufferUtils.

createback to summary
public static VmaDefragmentationMove create(long address)

Returns a new VmaDefragmentationMove instance for the specified memory address.

createback to summary
public static VmaDefragmentationMove.Buffer create(int capacity)

Returns a new VmaDefragmentationMove.Buffer instance allocated with BufferUtils.

Parameters
capacity:int

the buffer capacity

createback to summary
public static VmaDefragmentationMove.Buffer create(long address, int capacity)

Create a VmaDefragmentationMove.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static VmaDefragmentationMove createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
createSafeback to summary
public static VmaDefragmentationMove.Buffer createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

Annotations
@Nullable
dstTmpAllocationback to summary
public long dstTmpAllocation()

temporary allocation pointing to destination memory that will replace srcAllocation.

Warning

Do not store this allocation in your data structures! It exists only temporarily, for the duration of the defragmentation pass, to be used for binding new buffer/image to the destination memory using e.g. BindBufferMemory. EndDefragmentationPass will destroy it and make srcAllocation point to this memory.

Annotations
@NativeType:VmaAllocation
dstTmpAllocationback to summary
public VmaDefragmentationMove dstTmpAllocation(long value)

Sets the specified value to the dstTmpAllocation field.

mallocback to summary
public static VmaDefragmentationMove malloc()

Returns a new VmaDefragmentationMove instance allocated with memAlloc. The instance must be explicitly freed.

mallocback to summary
public static VmaDefragmentationMove.Buffer malloc(int capacity)

Returns a new VmaDefragmentationMove.Buffer instance allocated with memAlloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

mallocback to summary
public static VmaDefragmentationMove malloc(MemoryStack stack)

Returns a new VmaDefragmentationMove instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

mallocback to summary
public static VmaDefragmentationMove.Buffer malloc(int capacity, MemoryStack stack)

Returns a new VmaDefragmentationMove.Buffer instance allocated on the specified MemoryStack.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

ndstTmpAllocationback to summary
public static long ndstTmpAllocation(long struct)

Unsafe version of dstTmpAllocation.

ndstTmpAllocationback to summary
public static void ndstTmpAllocation(long struct, long value)

Unsafe version of dstTmpAllocation.

noperationback to summary
public static int noperation(long struct)

Unsafe version of operation.

noperationback to summary
public static void noperation(long struct, int value)

Unsafe version of operation.

nsrcAllocationback to summary
public static long nsrcAllocation(long struct)

Unsafe version of srcAllocation.

nsrcAllocationback to summary
public static void nsrcAllocation(long struct, long value)

Unsafe version of srcAllocation.

operationback to summary
public int operation()

operation to be performed on the allocation by EndDefragmentationPass.

Default value is DEFRAGMENTATION_MOVE_OPERATION_COPY. You can modify it.

Annotations
@NativeType:VmaDefragmentationMoveOperation
operationback to summary
public VmaDefragmentationMove operation(int value)

Sets the specified value to the operation field.

setback to summary
public VmaDefragmentationMove set(int operation, long srcAllocation, long dstTmpAllocation)

Initializes this struct with the specified values.

setback to summary
public VmaDefragmentationMove set(VmaDefragmentationMove src)

Copies the specified struct data to this struct.

Parameters
src:VmaDefragmentationMove

the source struct

Returns:VmaDefragmentationMove

this struct

sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
srcAllocationback to summary
public long srcAllocation()

allocation that should be moved

Annotations
@NativeType:VmaAllocation
srcAllocationback to summary
public VmaDefragmentationMove srcAllocation(long value)

Sets the specified value to the srcAllocation field.

validateback to summary
public static void validate(long struct)

Validates pointer members that should not be NULL.

Parameters
struct:long

the struct to validate

org.lwjgl.util.vma back to summary

public Class VmaDefragmentationMove.Buffer

extends StructBuffer<VmaDefragmentationMove, VmaDefragmentationMove.Buffer>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable

An array of VmaDefragmentationMove structs.

Field Summary

Modifier and TypeField and Description
private static final VmaDefragmentationMove

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new VmaDefragmentationMove.Buffer instance backed by the specified container.

public
Buffer(long address, int cap)

pack-priv
Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Summary

Modifier and TypeMethod and Description
public long
public VmaDefragmentationMove.Buffer
dstTmpAllocation(long value)

Sets the specified value to the VmaDefragmentationMove#dstTmpAllocation field.

protected VmaDefragmentationMove
public int

Returns:

the value of the VmaDefragmentationMove#operation field.
operation
()

public VmaDefragmentationMove.Buffer
operation(int value)

Sets the specified value to the VmaDefragmentationMove#operation field.

protected VmaDefragmentationMove.Buffer
public long

Returns:

the value of the VmaDefragmentationMove#srcAllocation field.
srcAllocation
()

public VmaDefragmentationMove.Buffer
srcAllocation(long value)

Sets the specified value to the VmaDefragmentationMove#srcAllocation field.

Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final VmaDefragmentationMove ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new VmaDefragmentationMove.Buffer instance backed by the specified container.

Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by VmaDefragmentationMove#SIZEOF, and its mark will be undefined.

The created buffer instance holds a strong reference to the container object.

Bufferback to summary
public Buffer(long address, int cap)
Bufferback to summary
pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Detail

dstTmpAllocationback to summary
public long dstTmpAllocation()
Returns:long

the value of the VmaDefragmentationMove#dstTmpAllocation field.

Annotations
@NativeType:VmaAllocation
dstTmpAllocationback to summary
public VmaDefragmentationMove.Buffer dstTmpAllocation(long value)

Sets the specified value to the VmaDefragmentationMove#dstTmpAllocation field.

getElementFactoryback to summary
protected VmaDefragmentationMove getElementFactory()

Implements abstract org.lwjgl.system.StructBuffer.getElementFactory.

Annotations
@Override
operationback to summary
public int operation()
Returns:int

the value of the VmaDefragmentationMove#operation field.

Annotations
@NativeType:VmaDefragmentationMoveOperation
operationback to summary
public VmaDefragmentationMove.Buffer operation(int value)

Sets the specified value to the VmaDefragmentationMove#operation field.

selfback to summary
protected VmaDefragmentationMove.Buffer self()

Implements abstract org.lwjgl.system.CustomBuffer.self.

Annotations
@Override
srcAllocationback to summary
public long srcAllocation()
Returns:long

the value of the VmaDefragmentationMove#srcAllocation field.

Annotations
@NativeType:VmaAllocation
srcAllocationback to summary
public VmaDefragmentationMove.Buffer srcAllocation(long value)

Sets the specified value to the VmaDefragmentationMove#srcAllocation field.