Class VkMemoryRequirements
java.lang.Object
overrungl.struct.GroupType
overrungl.vulkan.struct.VkMemoryRequirements
- All Implemented Interfaces:
Addressable
- Direct Known Subclasses:
VkMemoryRequirements.Buffer
Layout
struct VkMemoryRequirements {
(uint64_t) VkDeviceSize size;
(uint64_t) VkDeviceSize alignment;
uint32_t memoryTypeBits;
};
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final GroupLayout
The struct layout ofVkMemoryRequirements
.static final MemoryLayout
The memory layout ofalignment
.static final MemoryLayout
The memory layout ofmemoryTypeBits
.static final MemoryLayout
The memory layout ofsize
.static final long
The byte offset ofalignment
.static final long
The byte offset ofmemoryTypeBits
.static final long
The byte offset ofsize
.static final VarHandle
static final VarHandle
TheVarHandle
ofmemoryTypeBits
of type(MemorySegment base, long baseOffset, long index)MemorySegment
.static final VarHandle
-
Constructor Summary
ConstructorsConstructorDescriptionVkMemoryRequirements
(MemorySegment segment) CreatesVkMemoryRequirements
with the given segment. -
Method Summary
Modifier and TypeMethodDescriptionlong
Returnsalignment
.alignment
(long value) Setsalignment
with the given value.static long
alignment
(MemorySegment segment, long index) Returnsalignment
at the given index.static void
alignment
(MemorySegment segment, long index, long value) Setsalignment
with the given value at the given index.static VkMemoryRequirements
alloc
(SegmentAllocator allocator) Allocates aVkMemoryRequirements
with the given segment allocator.static VkMemoryRequirements.Buffer
alloc
(SegmentAllocator allocator, long count) Allocates aVkMemoryRequirements
with the given segment allocator and count.asBuffer()
Converts this instance to a buffer.Copies from the given source.int
ReturnsmemoryTypeBits
.memoryTypeBits
(int value) SetsmemoryTypeBits
with the given value.static int
memoryTypeBits
(MemorySegment segment, long index) ReturnsmemoryTypeBits
at the given index.static void
memoryTypeBits
(MemorySegment segment, long index, int value) SetsmemoryTypeBits
with the given value at the given index.static VkMemoryRequirements.Buffer
of
(MemorySegment segment) CreatesVkMemoryRequirements
with the given segment.static VkMemoryRequirements
ofNative
(MemorySegment segment) CreatesVkMemoryRequirements
with the given segment.static VkMemoryRequirements.Buffer
ofNative
(MemorySegment segment, long count) CreatesVkMemoryRequirements
with the given segment.long
size()
Returnssize
.size
(long value) Setssize
with the given value.static long
size
(MemorySegment segment, long index) Returnssize
at the given index.static void
size
(MemorySegment segment, long index, long value) Setssize
with the given value at the given index.Methods inherited from class overrungl.struct.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
CreatesVkMemoryRequirements
with the given segment.- Parameters:
segment
- the memory segment
-
-
Method Details
-
of
CreatesVkMemoryRequirements
with the given segment.- Parameters:
segment
- the memory segment- Returns:
- the created instance or
null
if the segment isNULL
-
ofNative
Creates
VkMemoryRequirements
with the given segment.Reinterprets the segment if zero-length.
- Parameters:
segment
- the memory segment- Returns:
- the created instance or
null
if the segment isNULL
-
ofNative
Creates
VkMemoryRequirements
with the given segment.Reinterprets the segment if zero-length.
- Parameters:
segment
- the memory segmentcount
- the count of the buffer- Returns:
- the created instance or
null
if the segment isNULL
-
alloc
Allocates aVkMemoryRequirements
with the given segment allocator.- Parameters:
allocator
- the segment allocator- Returns:
- the allocated
VkMemoryRequirements
-
alloc
Allocates aVkMemoryRequirements
with 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
-
asBuffer
Converts this instance to a buffer.- Returns:
- the buffer
-
size
Returnssize
at the given index.- Parameters:
segment
- the segment of the structindex
- the index of the struct buffer- Returns:
size
at the given index
-
size
public long size()Returnssize
.- Returns:
size
-
size
Setssize
with the given value at the given index.- Parameters:
segment
- the segment of the structindex
- the index of the struct buffervalue
- the value
-
size
Setssize
with the given value.- Parameters:
value
- the value- Returns:
this
-
alignment
Returnsalignment
at the given index.- Parameters:
segment
- the segment of the structindex
- the index of the struct buffer- Returns:
alignment
at the given index
-
alignment
public long alignment()Returnsalignment
.- Returns:
alignment
-
alignment
Setsalignment
with the given value at the given index.- Parameters:
segment
- the segment of the structindex
- the index of the struct buffervalue
- the value
-
alignment
Setsalignment
with the given value.- Parameters:
value
- the value- Returns:
this
-
memoryTypeBits
ReturnsmemoryTypeBits
at the given index.- Parameters:
segment
- the segment of the structindex
- the index of the struct buffer- Returns:
memoryTypeBits
at the given index
-
memoryTypeBits
public int memoryTypeBits()ReturnsmemoryTypeBits
.- Returns:
memoryTypeBits
-
memoryTypeBits
SetsmemoryTypeBits
with the given value at the given index.- Parameters:
segment
- the segment of the structindex
- the index of the struct buffervalue
- the value
-
memoryTypeBits
SetsmemoryTypeBits
with the given value.- Parameters:
value
- the value- Returns:
this
-