Class VkMemoryRequirements
java.lang.Object
overrungl.struct.GroupType
overrungl.vulkan.struct.VkMemoryRequirements
- All Implemented Interfaces:
Addressable
Represents VkMemoryRequirements.
Layout
struct VkMemoryRequirements {
(uint64_t) VkDeviceSize size;
(uint64_t) VkDeviceSize alignment;
uint32_t memoryTypeBits;
};
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StructLayoutThe struct layout ofVkMemoryRequirements.static final MemoryLayoutThe memory layout ofalignment.static final MemoryLayoutThe memory layout ofmemoryTypeBits.static final MemoryLayoutThe memory layout ofsize.static final longThe byte offset ofalignment.static final longThe byte offset ofmemoryTypeBits.static final longThe byte offset ofsize.static final VarHandlestatic final VarHandleTheVarHandleofmemoryTypeBitsof type(MemorySegment base, long baseOffset, long index)MemorySegment.static final VarHandle -
Constructor Summary
ConstructorsConstructorDescriptionVkMemoryRequirements(MemorySegment segment, long elementCount) CreatesVkMemoryRequirementswith the given segment. -
Method Summary
Modifier and TypeMethodDescriptionlongReturnsalignment.alignment(long value) Setsalignmentwith the given value.static longalignment(MemorySegment segment, long index) Returnsalignmentat the given index.static voidalignment(MemorySegment segment, long index, long value) Setsalignmentwith the given value at the given index.longalignmentAt(long index) Returnsalignmentat the given index.alignmentAt(long index, long value) Setsalignmentwith the given value at the given index.static VkMemoryRequirementsalloc(SegmentAllocator allocator) Allocates aVkMemoryRequirementswith the given segment allocator.static VkMemoryRequirementsalloc(SegmentAllocator allocator, long count) Allocates aVkMemoryRequirementswith the given segment allocator and count.asSlice(long index) Creates a slice ofVkMemoryRequirements.asSlice(long index, long count) Creates a slice ofVkMemoryRequirements.at(long index, Consumer<VkMemoryRequirements> func) VisitsVkMemoryRequirementsbuffer at the given index.Copies from the given source.intReturnsmemoryTypeBits.memoryTypeBits(int value) SetsmemoryTypeBitswith the given value.static intmemoryTypeBits(MemorySegment segment, long index) ReturnsmemoryTypeBitsat the given index.static voidmemoryTypeBits(MemorySegment segment, long index, int value) SetsmemoryTypeBitswith the given value at the given index.intmemoryTypeBitsAt(long index) ReturnsmemoryTypeBitsat the given index.memoryTypeBitsAt(long index, int value) SetsmemoryTypeBitswith the given value at the given index.static VkMemoryRequirementsof(MemorySegment segment) CreatesVkMemoryRequirementswith the given segment.static VkMemoryRequirementsofNative(MemorySegment segment) CreatesVkMemoryRequirementswith the given segment.static VkMemoryRequirementsofNative(MemorySegment segment, long count) CreatesVkMemoryRequirementswith the given segment.reinterpret(long count) Reinterprets this buffer with the given count.longsize()Returnssize.size(long value) Setssizewith the given value.static longsize(MemorySegment segment, long index) Returnssizeat the given index.static voidsize(MemorySegment segment, long index, long value) Setssizewith the given value at the given index.longsizeAt(long index) Returnssizeat the given index.sizeAt(long index, long value) Setssizewith the given value at the given index.Methods inherited from class GroupType
estimateCount, estimateCount, groupLayout, segment
-
Field Details
-
LAYOUT
The struct layout ofVkMemoryRequirements. -
OFFSET_size
public static final long OFFSET_sizeThe byte offset ofsize. -
LAYOUT_size
The memory layout ofsize. -
VH_size
-
OFFSET_alignment
public static final long OFFSET_alignmentThe byte offset ofalignment. -
LAYOUT_alignment
The memory layout ofalignment. -
VH_alignment
-
OFFSET_memoryTypeBits
public static final long OFFSET_memoryTypeBitsThe byte offset ofmemoryTypeBits. -
LAYOUT_memoryTypeBits
The memory layout ofmemoryTypeBits. -
VH_memoryTypeBits
-
-
Constructor Details
-
VkMemoryRequirements
CreatesVkMemoryRequirementswith the given segment.- Parameters:
segment- the memory segmentelementCount- the element count of this struct buffer
-
-
Method Details
-
of
CreatesVkMemoryRequirementswith the given segment.- Parameters:
segment- the memory segment- Returns:
- the created instance or
nullif the segment isNULL
-
ofNative
Creates
VkMemoryRequirementswith 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
VkMemoryRequirementswith 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 aVkMemoryRequirementswith the given segment allocator.- Parameters:
allocator- the segment allocator- Returns:
- the allocated
VkMemoryRequirements
-
alloc
Allocates aVkMemoryRequirementswith the given segment allocator and count.- Parameters:
allocator- the segment allocatorcount- the count- Returns:
- the allocated
VkMemoryRequirements
-
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
-
size
Returnssizeat the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffer- Returns:
sizeat the given index
-
size
public long size()Returnssize.- Returns:
size
-
size
Setssizewith the given value at the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffervalue- the value
-
size
Setssizewith the given value.- Parameters:
value- the value- Returns:
this
-
alignment
Returnsalignmentat the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffer- Returns:
alignmentat the given index
-
alignment
public long alignment()Returnsalignment.- Returns:
alignment
-
alignment
Setsalignmentwith the given value at the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffervalue- the value
-
alignment
Setsalignmentwith the given value.- Parameters:
value- the value- Returns:
this
-
memoryTypeBits
ReturnsmemoryTypeBitsat the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffer- Returns:
memoryTypeBitsat the given index
-
memoryTypeBits
public int memoryTypeBits()ReturnsmemoryTypeBits.- Returns:
memoryTypeBits
-
memoryTypeBits
SetsmemoryTypeBitswith the given value at the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffervalue- the value
-
memoryTypeBits
SetsmemoryTypeBitswith the given value.- Parameters:
value- the value- Returns:
this
-
asSlice
Creates a slice ofVkMemoryRequirements.- Parameters:
index- the index of the struct buffer- Returns:
- the slice of
VkMemoryRequirements
-
asSlice
Creates a slice ofVkMemoryRequirements.- Parameters:
index- the index of the struct buffercount- the count- Returns:
- the slice of
VkMemoryRequirements
-
at
VisitsVkMemoryRequirementsbuffer at the given index.- Parameters:
index- the index of this bufferfunc- the function to run with the slice of this buffer- Returns:
this
-
sizeAt
public long sizeAt(long index) Returnssizeat the given index.- Parameters:
index- the index of the struct buffer- Returns:
sizeat the given index
-
sizeAt
Setssizewith the given value at the given index.- Parameters:
index- the index of the struct buffervalue- the value- Returns:
this
-
alignmentAt
public long alignmentAt(long index) Returnsalignmentat the given index.- Parameters:
index- the index of the struct buffer- Returns:
alignmentat the given index
-
alignmentAt
Setsalignmentwith the given value at the given index.- Parameters:
index- the index of the struct buffervalue- the value- Returns:
this
-
memoryTypeBitsAt
public int memoryTypeBitsAt(long index) ReturnsmemoryTypeBitsat the given index.- Parameters:
index- the index of the struct buffer- Returns:
memoryTypeBitsat the given index
-
memoryTypeBitsAt
SetsmemoryTypeBitswith the given value at the given index.- Parameters:
index- the index of the struct buffervalue- the value- Returns:
this
-