Class VmaAllocationInfo2
java.lang.Object
overrungl.struct.GroupType
overrungl.vma.VmaAllocationInfo2
- All Implemented Interfaces:
Addressable
Represents VmaAllocationInfo2.
Layout
struct VmaAllocationInfo2 {
(struct VmaAllocationInfo) VmaAllocationInfo allocationInfo;
(uint64_t) VkDeviceSize blockSize;
(uint32_t) VkBool32 dedicatedMemory;
};
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StructLayoutThe struct layout ofVmaAllocationInfo2.static final MemoryLayoutThe memory layout ofallocationInfo.static final MemoryLayoutThe memory layout ofblockSize.static final MemoryLayoutThe memory layout ofdedicatedMemory.static final longThe byte offset ofallocationInfo.static final longThe byte offset ofblockSize.static final longThe byte offset ofdedicatedMemory.static final VarHandlestatic final VarHandleTheVarHandleofdedicatedMemoryof type(MemorySegment base, long baseOffset, long index)MemorySegment. -
Constructor Summary
ConstructorsConstructorDescriptionVmaAllocationInfo2(MemorySegment segment, long elementCount) CreatesVmaAllocationInfo2with the given segment. -
Method Summary
Modifier and TypeMethodDescriptionstatic VmaAllocationInfo2alloc(SegmentAllocator allocator) Allocates aVmaAllocationInfo2with the given segment allocator.static VmaAllocationInfo2alloc(SegmentAllocator allocator, long count) Allocates aVmaAllocationInfo2with the given segment allocator and count.ReturnsallocationInfo.allocationInfo(MemorySegment value) SetsallocationInfowith the given value.static MemorySegmentallocationInfo(MemorySegment segment, long index) ReturnsallocationInfoat the given index.static voidallocationInfo(MemorySegment segment, long index, MemorySegment value) SetsallocationInfowith the given value at the given index.AcceptsallocationInfowith the given function.allocationInfoAt(long index) ReturnsallocationInfoat the given index.allocationInfoAt(long index, MemorySegment value) SetsallocationInfowith the given value at the given index.allocationInfoAt(long index, Consumer<VmaAllocationInfo> func) AcceptsallocationInfowith the given function.asSlice(long index) Creates a slice ofVmaAllocationInfo2.asSlice(long index, long count) Creates a slice ofVmaAllocationInfo2.at(long index, Consumer<VmaAllocationInfo2> func) VisitsVmaAllocationInfo2buffer at the given index.longReturnsblockSize.blockSize(long value) SetsblockSizewith the given value.static longblockSize(MemorySegment segment, long index) ReturnsblockSizeat the given index.static voidblockSize(MemorySegment segment, long index, long value) SetsblockSizewith the given value at the given index.longblockSizeAt(long index) ReturnsblockSizeat the given index.blockSizeAt(long index, long value) SetsblockSizewith the given value at the given index.Copies from the given source.intReturnsdedicatedMemory.dedicatedMemory(int value) SetsdedicatedMemorywith the given value.static intdedicatedMemory(MemorySegment segment, long index) ReturnsdedicatedMemoryat the given index.static voiddedicatedMemory(MemorySegment segment, long index, int value) SetsdedicatedMemorywith the given value at the given index.intdedicatedMemoryAt(long index) ReturnsdedicatedMemoryat the given index.dedicatedMemoryAt(long index, int value) SetsdedicatedMemorywith the given value at the given index.static VmaAllocationInfo2of(MemorySegment segment) CreatesVmaAllocationInfo2with the given segment.static VmaAllocationInfo2ofNative(MemorySegment segment) CreatesVmaAllocationInfo2with the given segment.static VmaAllocationInfo2ofNative(MemorySegment segment, long count) CreatesVmaAllocationInfo2with the given segment.reinterpret(long count) Reinterprets this buffer with the given count.Methods inherited from class GroupType
estimateCount, estimateCount, groupLayout, segment
-
Field Details
-
LAYOUT
The struct layout ofVmaAllocationInfo2. -
OFFSET_allocationInfo
public static final long OFFSET_allocationInfoThe byte offset ofallocationInfo. -
LAYOUT_allocationInfo
The memory layout ofallocationInfo. -
OFFSET_blockSize
public static final long OFFSET_blockSizeThe byte offset ofblockSize. -
LAYOUT_blockSize
The memory layout ofblockSize. -
VH_blockSize
-
OFFSET_dedicatedMemory
public static final long OFFSET_dedicatedMemoryThe byte offset ofdedicatedMemory. -
LAYOUT_dedicatedMemory
The memory layout ofdedicatedMemory. -
VH_dedicatedMemory
-
-
Constructor Details
-
VmaAllocationInfo2
CreatesVmaAllocationInfo2with the given segment.- Parameters:
segment- the memory segmentelementCount- the element count of this struct buffer
-
-
Method Details
-
of
CreatesVmaAllocationInfo2with the given segment.- Parameters:
segment- the memory segment- Returns:
- the created instance or
nullif the segment isNULL
-
ofNative
Creates
VmaAllocationInfo2with the given segment.Reinterprets the segment if zero-length.
- Parameters:
segment- the memory segment- Returns:
- the created instance or
nullif the segment isNULL
-
ofNative
Creates
VmaAllocationInfo2with the given segment.Reinterprets the segment if zero-length.
- Parameters:
segment- the memory segmentcount- the count of the buffer- Returns:
- the created instance or
nullif the segment isNULL
-
alloc
Allocates aVmaAllocationInfo2with the given segment allocator.- Parameters:
allocator- the segment allocator- Returns:
- the allocated
VmaAllocationInfo2
-
alloc
Allocates aVmaAllocationInfo2with the given segment allocator and count.- Parameters:
allocator- the segment allocatorcount- the count- Returns:
- the allocated
VmaAllocationInfo2
-
copyFrom
Copies from the given source.- Parameters:
src- the source- Returns:
this
-
reinterpret
Reinterprets this buffer with the given count.- Parameters:
count- the new count- Returns:
- the reinterpreted buffer
-
allocationInfo
ReturnsallocationInfoat the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffer- Returns:
allocationInfoat the given index
-
allocationInfo
-
allocationInfo
SetsallocationInfowith the given value at the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffervalue- the value
-
allocationInfo
SetsallocationInfowith the given value.- Parameters:
value- the value- Returns:
this
-
allocationInfo
AcceptsallocationInfowith the given function.- Parameters:
func- the function- Returns:
this
-
blockSize
ReturnsblockSizeat the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffer- Returns:
blockSizeat the given index
-
blockSize
public long blockSize()ReturnsblockSize.- Returns:
blockSize
-
blockSize
SetsblockSizewith the given value at the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffervalue- the value
-
blockSize
SetsblockSizewith the given value.- Parameters:
value- the value- Returns:
this
-
dedicatedMemory
ReturnsdedicatedMemoryat the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffer- Returns:
dedicatedMemoryat the given index
-
dedicatedMemory
public int dedicatedMemory()ReturnsdedicatedMemory.- Returns:
dedicatedMemory
-
dedicatedMemory
SetsdedicatedMemorywith the given value at the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffervalue- the value
-
dedicatedMemory
SetsdedicatedMemorywith the given value.- Parameters:
value- the value- Returns:
this
-
asSlice
Creates a slice ofVmaAllocationInfo2.- Parameters:
index- the index of the struct buffer- Returns:
- the slice of
VmaAllocationInfo2
-
asSlice
Creates a slice ofVmaAllocationInfo2.- Parameters:
index- the index of the struct buffercount- the count- Returns:
- the slice of
VmaAllocationInfo2
-
at
VisitsVmaAllocationInfo2buffer at the given index.- Parameters:
index- the index of this bufferfunc- the function to run with the slice of this buffer- Returns:
this
-
allocationInfoAt
ReturnsallocationInfoat the given index.- Parameters:
index- the index of the struct buffer- Returns:
allocationInfoat the given index
-
allocationInfoAt
SetsallocationInfowith the given value at the given index.- Parameters:
index- the index of the struct buffervalue- the value- Returns:
this
-
allocationInfoAt
AcceptsallocationInfowith the given function.- Parameters:
index- the index of the struct bufferfunc- the function- Returns:
this
-
blockSizeAt
public long blockSizeAt(long index) ReturnsblockSizeat the given index.- Parameters:
index- the index of the struct buffer- Returns:
blockSizeat the given index
-
blockSizeAt
SetsblockSizewith the given value at the given index.- Parameters:
index- the index of the struct buffervalue- the value- Returns:
this
-
dedicatedMemoryAt
public int dedicatedMemoryAt(long index) ReturnsdedicatedMemoryat the given index.- Parameters:
index- the index of the struct buffer- Returns:
dedicatedMemoryat the given index
-
dedicatedMemoryAt
SetsdedicatedMemorywith the given value at the given index.- Parameters:
index- the index of the struct buffervalue- the value- Returns:
this
-