Package org.lwjgl.vulkan
Class VkMemoryRequirements
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
Structure specifying memory requirements.
See Also
VkMemoryRequirements2
, VkVideoSessionMemoryRequirementsKHR
, GetBufferMemoryRequirements
, GetImageMemoryRequirements
Layout
struct VkMemoryRequirements {
VkDeviceSize size()
;
VkDeviceSize alignment()
;
uint32_t memoryTypeBits()
;
}
-
Nested Class Summary
Nested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The struct member offsets.static final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionVkMemoryRequirements
(ByteBuffer container) Creates aVkMemoryRequirements
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionlong
the alignment, in bytes, of the offset within the allocation required for the resource.alignment
(long value) Sets the specified value to thealignment()
field.static VkMemoryRequirements
calloc()
Returns a newVkMemoryRequirements
instance allocated withmemCalloc
.static VkMemoryRequirements.Buffer
calloc
(int capacity) Returns a newVkMemoryRequirements.Buffer
instance allocated withmemCalloc
.static VkMemoryRequirements.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newVkMemoryRequirements.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkMemoryRequirements
calloc
(MemoryStack stack) Returns a newVkMemoryRequirements
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkMemoryRequirements
Deprecated.static VkMemoryRequirements.Buffer
callocStack
(int capacity) Deprecated.static VkMemoryRequirements.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static VkMemoryRequirements
callocStack
(MemoryStack stack) Deprecated.static VkMemoryRequirements
create()
Returns a newVkMemoryRequirements
instance allocated withBufferUtils
.static VkMemoryRequirements.Buffer
create
(int capacity) Returns a newVkMemoryRequirements.Buffer
instance allocated withBufferUtils
.static VkMemoryRequirements
create
(long address) Returns a newVkMemoryRequirements
instance for the specified memory address.static VkMemoryRequirements.Buffer
create
(long address, int capacity) Create aVkMemoryRequirements.Buffer
instance at the specified memory.static VkMemoryRequirements
createSafe
(long address) static VkMemoryRequirements.Buffer
createSafe
(long address, int capacity) static VkMemoryRequirements
malloc()
Returns a newVkMemoryRequirements
instance allocated withmemAlloc
.static VkMemoryRequirements.Buffer
malloc
(int capacity) Returns a newVkMemoryRequirements.Buffer
instance allocated withmemAlloc
.static VkMemoryRequirements.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newVkMemoryRequirements.Buffer
instance allocated on the specifiedMemoryStack
.static VkMemoryRequirements
malloc
(MemoryStack stack) Returns a newVkMemoryRequirements
instance allocated on the specifiedMemoryStack
.static VkMemoryRequirements
Deprecated.static VkMemoryRequirements.Buffer
mallocStack
(int capacity) Deprecated.static VkMemoryRequirements.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static VkMemoryRequirements
mallocStack
(MemoryStack stack) Deprecated.int
a bitmask and contains one bit set for every supported memory type for the resource.memoryTypeBits
(int value) Sets the specified value to thememoryTypeBits()
field.static long
nalignment
(long struct) Unsafe version ofalignment()
.static void
nalignment
(long struct, long value) Unsafe version ofalignment
.static int
nmemoryTypeBits
(long struct) Unsafe version ofmemoryTypeBits()
.static void
nmemoryTypeBits
(long struct, int value) Unsafe version ofmemoryTypeBits
.static long
nsize
(long struct) Unsafe version ofsize()
.static void
nsize
(long struct, long value) Unsafe version ofsize
.set
(long size, long alignment, int memoryTypeBits) Initializes this struct with the specified values.set
(VkMemoryRequirements src) Copies the specified struct data to this struct.long
size()
the size, in bytes, of the memory allocation required for the resource.size
(long value) Sets the specified value to thesize()
field.int
sizeof()
Returnssizeof(struct)
.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
SIZE
public static final int SIZEThe struct member offsets. -
ALIGNMENT
public static final int ALIGNMENTThe struct member offsets. -
MEMORYTYPEBITS
public static final int MEMORYTYPEBITSThe struct member offsets.
-
-
Constructor Details
-
VkMemoryRequirements
Creates aVkMemoryRequirements
instance at the current position of the specifiedByteBuffer
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 Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<VkMemoryRequirements>
-
size
public long size()the size, in bytes, of the memory allocation required for the resource. -
alignment
public long alignment()the alignment, in bytes, of the offset within the allocation required for the resource. -
memoryTypeBits
public int memoryTypeBits()a bitmask and contains one bit set for every supported memory type for the resource. Biti
is set if and only if the memory typei
in theVkPhysicalDeviceMemoryProperties
structure for the physical device is supported for the resource. -
size
Sets the specified value to thesize()
field. -
alignment
Sets the specified value to thealignment()
field. -
memoryTypeBits
Sets the specified value to thememoryTypeBits()
field. -
set
Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
Returns a newVkMemoryRequirements
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newVkMemoryRequirements
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newVkMemoryRequirements
instance allocated withBufferUtils
. -
create
Returns a newVkMemoryRequirements
instance for the specified memory address. -
createSafe
-
malloc
Returns a newVkMemoryRequirements.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newVkMemoryRequirements.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newVkMemoryRequirements.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aVkMemoryRequirements.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newVkMemoryRequirements
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newVkMemoryRequirements
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newVkMemoryRequirements.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newVkMemoryRequirements.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
nsize
public static long nsize(long struct) Unsafe version ofsize()
. -
nalignment
public static long nalignment(long struct) Unsafe version ofalignment()
. -
nmemoryTypeBits
public static int nmemoryTypeBits(long struct) Unsafe version ofmemoryTypeBits()
. -
nsize
public static void nsize(long struct, long value) Unsafe version ofsize
. -
nalignment
public static void nalignment(long struct, long value) Unsafe version ofalignment
. -
nmemoryTypeBits
public static void nmemoryTypeBits(long struct, int value) Unsafe version ofmemoryTypeBits
.
-