public class VkMemoryAllocateFlagsInfo
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
If MEMORY_ALLOCATE_DEVICE_MASK_BIT is not set, the number of instances allocated depends on whether MEMORY_HEAP_MULTI_INSTANCE_BIT is set in the memory heap. If MEMORY_HEAP_MULTI_INSTANCE_BIT is set, then memory is allocated for every physical device in the logical device (as if deviceMask has bits set for all device indices). If MEMORY_HEAP_MULTI_INSTANCE_BIT is not set, then a single instance of memory is allocated (as if deviceMask is set to one).
On some implementations, allocations from a multi-instance heap may consume memory on all physical devices even if the deviceMask excludes some devices. If VkPhysicalDeviceGroupProperties::subsetAllocation is TRUE, then memory is only consumed for the devices in the device mask.
In practice, most allocations on a multi-instance heap will be allocated across all physical devices. Unicast allocation support is an optional optimization for a minority of allocations.
MEMORY_ALLOCATE_DEVICE_MASK_BIT is set, deviceMask must be a valid device mask.MEMORY_ALLOCATE_DEVICE_MASK_BIT is set, deviceMask must not be zerosType must be STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFOflags must be a valid combination of VkMemoryAllocateFlagBits valuessType – the type of this structure.pNext – NULL or a pointer to an extension-specific structure.flags – a bitmask of VkMemoryAllocateFlagBits controlling the allocation.deviceMask – a mask of physical devices in the logical device, indicating that memory must be allocated on each device in the mask, if MEMORY_ALLOCATE_DEVICE_MASK_BIT is set in flags.
struct VkMemoryAllocateFlagsInfo {
VkStructureType sType;
void const * pNext;
VkMemoryAllocateFlags flags;
uint32_t deviceMask;
}| Modifier and Type | Class and Description |
|---|---|
static class |
VkMemoryAllocateFlagsInfo.Buffer
An array of
VkMemoryAllocateFlagsInfo structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
DEVICEMASK
The struct member offsets.
|
static int |
FLAGS
The struct member offsets.
|
static int |
PNEXT
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
STYPE
The struct member offsets.
|
| Constructor and Description |
|---|
VkMemoryAllocateFlagsInfo(java.nio.ByteBuffer container)
Creates a
VkMemoryAllocateFlagsInfo instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static VkMemoryAllocateFlagsInfo |
calloc()
Returns a new
VkMemoryAllocateFlagsInfo instance allocated with memCalloc. |
static VkMemoryAllocateFlagsInfo.Buffer |
calloc(int capacity)
Returns a new
VkMemoryAllocateFlagsInfo.Buffer instance allocated with memCalloc. |
static VkMemoryAllocateFlagsInfo |
callocStack()
Returns a new
VkMemoryAllocateFlagsInfo instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkMemoryAllocateFlagsInfo.Buffer |
callocStack(int capacity)
Returns a new
VkMemoryAllocateFlagsInfo.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkMemoryAllocateFlagsInfo.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkMemoryAllocateFlagsInfo.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkMemoryAllocateFlagsInfo |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkMemoryAllocateFlagsInfo instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkMemoryAllocateFlagsInfo |
create()
Returns a new
VkMemoryAllocateFlagsInfo instance allocated with BufferUtils. |
static VkMemoryAllocateFlagsInfo.Buffer |
create(int capacity)
Returns a new
VkMemoryAllocateFlagsInfo.Buffer instance allocated with BufferUtils. |
static VkMemoryAllocateFlagsInfo |
create(long address)
Returns a new
VkMemoryAllocateFlagsInfo instance for the specified memory address. |
static VkMemoryAllocateFlagsInfo.Buffer |
create(long address,
int capacity)
Create a
VkMemoryAllocateFlagsInfo.Buffer instance at the specified memory. |
static VkMemoryAllocateFlagsInfo |
createSafe(long address)
|
static VkMemoryAllocateFlagsInfo.Buffer |
createSafe(long address,
int capacity)
|
int |
deviceMask()
Returns the value of the
deviceMask field. |
VkMemoryAllocateFlagsInfo |
deviceMask(int value)
Sets the specified value to the
deviceMask field. |
int |
flags()
Returns the value of the
flags field. |
VkMemoryAllocateFlagsInfo |
flags(int value)
Sets the specified value to the
flags field. |
static VkMemoryAllocateFlagsInfo |
malloc()
Returns a new
VkMemoryAllocateFlagsInfo instance allocated with memAlloc. |
static VkMemoryAllocateFlagsInfo.Buffer |
malloc(int capacity)
Returns a new
VkMemoryAllocateFlagsInfo.Buffer instance allocated with memAlloc. |
static VkMemoryAllocateFlagsInfo |
mallocStack()
Returns a new
VkMemoryAllocateFlagsInfo instance allocated on the thread-local MemoryStack. |
static VkMemoryAllocateFlagsInfo.Buffer |
mallocStack(int capacity)
Returns a new
VkMemoryAllocateFlagsInfo.Buffer instance allocated on the thread-local MemoryStack. |
static VkMemoryAllocateFlagsInfo.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkMemoryAllocateFlagsInfo.Buffer instance allocated on the specified MemoryStack. |
static VkMemoryAllocateFlagsInfo |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkMemoryAllocateFlagsInfo instance allocated on the specified MemoryStack. |
static int |
ndeviceMask(long struct)
Unsafe version of
deviceMask(). |
static void |
ndeviceMask(long struct,
int value)
Unsafe version of
deviceMask. |
static int |
nflags(long struct)
Unsafe version of
flags(). |
static void |
nflags(long struct,
int value)
Unsafe version of
flags. |
static long |
npNext(long struct)
Unsafe version of
pNext(). |
static void |
npNext(long struct,
long value)
Unsafe version of
pNext. |
static int |
nsType(long struct)
Unsafe version of
sType(). |
static void |
nsType(long struct,
int value)
Unsafe version of
sType. |
long |
pNext()
Returns the value of the
pNext field. |
VkMemoryAllocateFlagsInfo |
pNext(long value)
Sets the specified value to the
pNext field. |
VkMemoryAllocateFlagsInfo |
set(int sType,
long pNext,
int flags,
int deviceMask)
Initializes this struct with the specified values.
|
VkMemoryAllocateFlagsInfo |
set(VkMemoryAllocateFlagsInfo src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
int |
sType()
Returns the value of the
sType field. |
VkMemoryAllocateFlagsInfo |
sType(int value)
Sets the specified value to the
sType field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int STYPE
public static final int PNEXT
public static final int FLAGS
public static final int DEVICEMASK
public VkMemoryAllocateFlagsInfo(java.nio.ByteBuffer container)
VkMemoryAllocateFlagsInfo instance at the current position of the specified ByteBuffer 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic int sType()
sType field.public long pNext()
pNext field.public int flags()
flags field.public int deviceMask()
deviceMask field.public VkMemoryAllocateFlagsInfo sType(int value)
sType field.public VkMemoryAllocateFlagsInfo pNext(long value)
pNext field.public VkMemoryAllocateFlagsInfo flags(int value)
flags field.public VkMemoryAllocateFlagsInfo deviceMask(int value)
deviceMask field.public VkMemoryAllocateFlagsInfo set(int sType, long pNext, int flags, int deviceMask)
public VkMemoryAllocateFlagsInfo set(VkMemoryAllocateFlagsInfo src)
src - the source structpublic static VkMemoryAllocateFlagsInfo malloc()
VkMemoryAllocateFlagsInfo instance allocated with memAlloc. The instance must be explicitly freed.public static VkMemoryAllocateFlagsInfo calloc()
VkMemoryAllocateFlagsInfo instance allocated with memCalloc. The instance must be explicitly freed.public static VkMemoryAllocateFlagsInfo create()
VkMemoryAllocateFlagsInfo instance allocated with BufferUtils.public static VkMemoryAllocateFlagsInfo create(long address)
VkMemoryAllocateFlagsInfo instance for the specified memory address.@Nullable public static VkMemoryAllocateFlagsInfo createSafe(long address)
public static VkMemoryAllocateFlagsInfo.Buffer malloc(int capacity)
VkMemoryAllocateFlagsInfo.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkMemoryAllocateFlagsInfo.Buffer calloc(int capacity)
VkMemoryAllocateFlagsInfo.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkMemoryAllocateFlagsInfo.Buffer create(int capacity)
VkMemoryAllocateFlagsInfo.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static VkMemoryAllocateFlagsInfo.Buffer create(long address, int capacity)
VkMemoryAllocateFlagsInfo.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static VkMemoryAllocateFlagsInfo.Buffer createSafe(long address, int capacity)
public static VkMemoryAllocateFlagsInfo mallocStack()
VkMemoryAllocateFlagsInfo instance allocated on the thread-local MemoryStack.public static VkMemoryAllocateFlagsInfo callocStack()
VkMemoryAllocateFlagsInfo instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static VkMemoryAllocateFlagsInfo mallocStack(org.lwjgl.system.MemoryStack stack)
VkMemoryAllocateFlagsInfo instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static VkMemoryAllocateFlagsInfo callocStack(org.lwjgl.system.MemoryStack stack)
VkMemoryAllocateFlagsInfo instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static VkMemoryAllocateFlagsInfo.Buffer mallocStack(int capacity)
VkMemoryAllocateFlagsInfo.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static VkMemoryAllocateFlagsInfo.Buffer callocStack(int capacity)
VkMemoryAllocateFlagsInfo.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static VkMemoryAllocateFlagsInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkMemoryAllocateFlagsInfo.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VkMemoryAllocateFlagsInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkMemoryAllocateFlagsInfo.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static int nsType(long struct)
sType().public static long npNext(long struct)
pNext().public static int nflags(long struct)
flags().public static int ndeviceMask(long struct)
deviceMask().public static void nsType(long struct,
int value)
sType.public static void npNext(long struct,
long value)
pNext.public static void nflags(long struct,
int value)
flags.public static void ndeviceMask(long struct,
int value)
deviceMask.Copyright LWJGL. All Rights Reserved. License terms.