Package org.lwjgl.vulkan
Class VkMemoryAllocateInfo
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkMemoryAllocateInfo
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class VkMemoryAllocateInfo extends Struct
Khronos Reference Page
Vulkan SpecificationDescribes parameters of a memory allocation.
Valid Usage
sTypemust beSTRUCTURE_TYPE_MEMORY_ALLOCATE_INFOpNextmust beNULLallocationSizemust be less than or equal to the amount of memory available to theVkMemoryHeapspecified bymemoryTypeIndexand the calling command'sVkDeviceallocationSizemust be greater than 0
Member documentation
sType– the type of this structure. Must be:STRUCTURE_TYPE_MEMORY_ALLOCATE_INFOpNext– reserved for use by extensionsallocationSize– the size of the allocation in bytesmemoryTypeIndex– the memory type index, which selects the properties of the memory to be allocated, as well as the heap the memory will come from
Layout
struct VkMemoryAllocateInfo { VkStructureType sType; const void * pNext; VkDeviceSize allocationSize; uint32_t memoryTypeIndex; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classVkMemoryAllocateInfo.BufferAn array ofVkMemoryAllocateInfostructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and Description VkMemoryAllocateInfo(java.nio.ByteBuffer container)Creates aVkMemoryAllocateInfoinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description longallocationSize()Returns the value of theallocationSizefield.VkMemoryAllocateInfoallocationSize(long value)Sets the specified value to theallocationSizefield.static VkMemoryAllocateInfocalloc()Returns a newVkMemoryAllocateInfoinstance allocated withmemCalloc.static VkMemoryAllocateInfo.Buffercalloc(int capacity)Returns a newVkMemoryAllocateInfo.Bufferinstance allocated withmemCalloc.static VkMemoryAllocateInfocallocStack()Returns a newVkMemoryAllocateInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkMemoryAllocateInfo.BuffercallocStack(int capacity)Returns a newVkMemoryAllocateInfo.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkMemoryAllocateInfo.BuffercallocStack(int capacity, MemoryStack stack)Returns a newVkMemoryAllocateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkMemoryAllocateInfocallocStack(MemoryStack stack)Returns a newVkMemoryAllocateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkMemoryAllocateInfocreate()Returns a newVkMemoryAllocateInfoinstance allocated withBufferUtils.static VkMemoryAllocateInfo.Buffercreate(int capacity)Returns a newVkMemoryAllocateInfo.Bufferinstance allocated withBufferUtils.static VkMemoryAllocateInfocreate(long address)Returns a newVkMemoryAllocateInfoinstance for the specified memory address ornullif the address isNULL.static VkMemoryAllocateInfo.Buffercreate(long address, int capacity)Create aVkMemoryAllocateInfo.Bufferinstance at the specified memory.static VkMemoryAllocateInfomalloc()Returns a newVkMemoryAllocateInfoinstance allocated withmemAlloc.static VkMemoryAllocateInfo.Buffermalloc(int capacity)Returns a newVkMemoryAllocateInfo.Bufferinstance allocated withmemAlloc.static VkMemoryAllocateInfomallocStack()Returns a newVkMemoryAllocateInfoinstance allocated on the thread-localMemoryStack.static VkMemoryAllocateInfo.BuffermallocStack(int capacity)Returns a newVkMemoryAllocateInfo.Bufferinstance allocated on the thread-localMemoryStack.static VkMemoryAllocateInfo.BuffermallocStack(int capacity, MemoryStack stack)Returns a newVkMemoryAllocateInfo.Bufferinstance allocated on the specifiedMemoryStack.static VkMemoryAllocateInfomallocStack(MemoryStack stack)Returns a newVkMemoryAllocateInfoinstance allocated on the specifiedMemoryStack.intmemoryTypeIndex()Returns the value of thememoryTypeIndexfield.VkMemoryAllocateInfomemoryTypeIndex(int value)Sets the specified value to thememoryTypeIndexfield.VkMemoryAllocateInfonset(long struct)Unsafe version ofset.longpNext()Returns the value of thepNextfield.VkMemoryAllocateInfopNext(long value)Sets the specified value to thepNextfield.VkMemoryAllocateInfoset(int sType, long pNext, long allocationSize, int memoryTypeIndex)Initializes this struct with the specified values.VkMemoryAllocateInfoset(VkMemoryAllocateInfo src)Copies the specified struct data to this struct.intsizeof()Returns thesizeof(struct).intsType()Returns the value of thesTypefield.VkMemoryAllocateInfosType(int value)Sets the specified value to thesTypefield.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
Constructor Detail
-
VkMemoryAllocateInfo
public VkMemoryAllocateInfo(java.nio.ByteBuffer container)
Creates aVkMemoryAllocateInfoinstance at the current position of the specifiedByteBuffercontainer. 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 Detail
-
sizeof
public int sizeof()
Description copied from class:StructReturns thesizeof(struct).
-
sType
public int sType()
Returns the value of thesTypefield.
-
pNext
public long pNext()
Returns the value of thepNextfield.
-
allocationSize
public long allocationSize()
Returns the value of theallocationSizefield.
-
memoryTypeIndex
public int memoryTypeIndex()
Returns the value of thememoryTypeIndexfield.
-
sType
public VkMemoryAllocateInfo sType(int value)
Sets the specified value to thesTypefield.
-
pNext
public VkMemoryAllocateInfo pNext(long value)
Sets the specified value to thepNextfield.
-
allocationSize
public VkMemoryAllocateInfo allocationSize(long value)
Sets the specified value to theallocationSizefield.
-
memoryTypeIndex
public VkMemoryAllocateInfo memoryTypeIndex(int value)
Sets the specified value to thememoryTypeIndexfield.
-
set
public VkMemoryAllocateInfo set(int sType, long pNext, long allocationSize, int memoryTypeIndex)
Initializes this struct with the specified values.
-
nset
public VkMemoryAllocateInfo nset(long struct)
Unsafe version ofset.
-
set
public VkMemoryAllocateInfo set(VkMemoryAllocateInfo src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkMemoryAllocateInfo malloc()
Returns a newVkMemoryAllocateInfoinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkMemoryAllocateInfo calloc()
Returns a newVkMemoryAllocateInfoinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkMemoryAllocateInfo create()
Returns a newVkMemoryAllocateInfoinstance allocated withBufferUtils.
-
create
public static VkMemoryAllocateInfo create(long address)
Returns a newVkMemoryAllocateInfoinstance for the specified memory address ornullif the address isNULL.
-
malloc
public static VkMemoryAllocateInfo.Buffer malloc(int capacity)
Returns a newVkMemoryAllocateInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkMemoryAllocateInfo.Buffer calloc(int capacity)
Returns a newVkMemoryAllocateInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkMemoryAllocateInfo.Buffer create(int capacity)
Returns a newVkMemoryAllocateInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkMemoryAllocateInfo.Buffer create(long address, int capacity)
Create aVkMemoryAllocateInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static VkMemoryAllocateInfo mallocStack()
Returns a newVkMemoryAllocateInfoinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkMemoryAllocateInfo callocStack()
Returns a newVkMemoryAllocateInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkMemoryAllocateInfo mallocStack(MemoryStack stack)
Returns a newVkMemoryAllocateInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkMemoryAllocateInfo callocStack(MemoryStack stack)
Returns a newVkMemoryAllocateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static VkMemoryAllocateInfo.Buffer mallocStack(int capacity)
Returns a newVkMemoryAllocateInfo.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkMemoryAllocateInfo.Buffer callocStack(int capacity)
Returns a newVkMemoryAllocateInfo.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkMemoryAllocateInfo.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkMemoryAllocateInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static VkMemoryAllocateInfo.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newVkMemoryAllocateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
-