Record Class VmaDefragmentationMove
- All Implemented Interfaces:
IPointer
,IVmaDefragmentationMove
Single move of an allocation to be done for defragmentation.
Structure
typedef struct VmaDefragmentationMove {
VmaDefragmentationMoveOperation
operation
;
VmaAllocation
srcAllocation
;
VmaAllocation
dstTmpAllocation
;
} VmaDefragmentationMove;
Contracts
The property segment()
should always be not-null
(segment != NULL && !segment.equals(MemorySegment.NULL)
), and properly aligned to
LAYOUT.byteAlignment()
bytes. To represent null pointer, you may use a Java
null
instead. See the documentation of IPointer.segment()
for more details.
The constructor of this class is marked as UnsafeConstructor
, because it does not
perform any runtime check. The constructor can be useful for automatic code generators.
Member documentation
operation()
Operation to be performed on the allocation by vmaEndDefragmentationPass(). Default value isVMA_DEFRAGMENTATION_MOVE_OPERATION_COPY
. You can modify it.srcAllocation()
Allocation that should be moved.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. vmaBindBufferMemory(). vmaEndDefragmentationPass() will destroy it and make
srcAllocation
point to this memory.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
Represents a pointer to / an array of null structure(s) in native memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
static final StructLayout
static final AddressLayout
static final ValueLayout.OfInt
static final AddressLayout
static final long
static final long
static final long
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final long
static final long
static final long
-
Constructor Summary
ConstructorsConstructorDescriptionVmaDefragmentationMove
(@NotNull MemorySegment segment) Creates an instance of aVmaDefragmentationMove
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic VmaDefragmentationMove
static VmaDefragmentationMove.Ptr
static VmaDefragmentationMove
clone
(Arena arena, VmaDefragmentationMove src) @Nullable VmaAllocation
dstTmpAllocation
(@Nullable VmaAllocation value) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
operation
(int value) @NotNull MemorySegment
segment()
Returns the value of thesegment
record component.@Nullable VmaAllocation
srcAllocation
(@Nullable VmaAllocation value) final String
toString()
Returns a string representation of this record class.
-
Field Details
-
LAYOUT
-
BYTES
public static final long BYTES -
PATH$operation
-
PATH$srcAllocation
-
PATH$dstTmpAllocation
-
LAYOUT$operation
-
LAYOUT$srcAllocation
-
LAYOUT$dstTmpAllocation
-
SIZE$operation
public static final long SIZE$operation -
SIZE$srcAllocation
public static final long SIZE$srcAllocation -
SIZE$dstTmpAllocation
public static final long SIZE$dstTmpAllocation -
OFFSET$operation
public static final long OFFSET$operation -
OFFSET$srcAllocation
public static final long OFFSET$srcAllocation -
OFFSET$dstTmpAllocation
public static final long OFFSET$dstTmpAllocation
-
-
Constructor Details
-
VmaDefragmentationMove
Creates an instance of aVmaDefragmentationMove
record class.- Parameters:
segment
- the value for thesegment
record component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
operation
-
operation
-
srcAllocation
-
srcAllocation
-
dstTmpAllocation
-
dstTmpAllocation
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
segment
Returns the value of thesegment
record component.
-