public class VkMemoryDedicatedRequirements
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
When the implementation sets requiresDedicatedAllocation to TRUE, it must also set prefersDedicatedAllocation to TRUE.
If the VkMemoryDedicatedRequirements structure is included in the pNext chain of the VkMemoryRequirements2 structure passed as the pMemoryRequirements parameter of a vkGetBufferMemoryRequirements2 call, requiresDedicatedAllocation may be TRUE under one of the following conditions:
pNext chain of VkBufferCreateInfo for the call to vkCreateBuffer used to create the buffer being queried included a VkExternalMemoryBufferCreateInfo structure, and any of the handle types specified in VkExternalMemoryBufferCreateInfo::handleTypes requires dedicated allocation, as reported by GetPhysicalDeviceExternalBufferProperties in VkExternalBufferProperties::externalMemoryProperties.externalMemoryFeatures, the requiresDedicatedAllocation field will be set to TRUE.In all other cases, requiresDedicatedAllocation must be set to FALSE by the implementation whenever a VkMemoryDedicatedRequirements structure is included in the pNext chain of the VkMemoryRequirements2 structure passed to a call to vkGetBufferMemoryRequirements2.
If the VkMemoryDedicatedRequirements structure is included in the pNext chain of the VkMemoryRequirements2 structure passed as the pMemoryRequirements parameter of a vkGetBufferMemoryRequirements2 call and BUFFER_CREATE_SPARSE_BINDING_BIT was set in VkBufferCreateInfo::flags when buffer was created then the implementation must set both prefersDedicatedAllocation and requiresDedicatedAllocation to FALSE.
If the VkMemoryDedicatedRequirements structure is included in the pNext chain of the VkMemoryRequirements2 structure passed as the pMemoryRequirements parameter of a vkGetImageMemoryRequirements2 call, requiresDedicatedAllocation may be TRUE under one of the following conditions:
pNext chain of VkImageCreateInfo for the call to vkCreateImage used to create the image being queried included a VkExternalMemoryImageCreateInfo structure, and any of the handle types specified in VkExternalMemoryImageCreateInfo::handleTypes requires dedicated allocation, as reported by GetPhysicalDeviceImageFormatProperties2 in VkExternalImageFormatProperties::externalMemoryProperties.externalMemoryFeatures, the requiresDedicatedAllocation field will be set to TRUE.In all other cases, requiresDedicatedAllocation must be set to FALSE by the implementation whenever a VkMemoryDedicatedRequirements structure is included in the pNext chain of the VkMemoryRequirements2 structure passed to a call to vkGetImageMemoryRequirements2.
If the VkMemoryDedicatedRequirements structure is included in the pNext chain of the VkMemoryRequirements2 structure passed as the pMemoryRequirements parameter of a vkGetImageMemoryRequirements2 call and IMAGE_CREATE_SPARSE_BINDING_BIT was set in VkImageCreateInfo::flags when image was created then the implementation must set both prefersDedicatedAllocation and requiresDedicatedAllocation to FALSE.
sType must be STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTSsType – the type of this structure.pNext – NULL or a pointer to an extension-specific structure.prefersDedicatedAllocation – specifies that the implementation would prefer a dedicated allocation for this resource. The application is still free to suballocate the resource but it may get better performance if a dedicated allocation is used.requiresDedicatedAllocation – specifies that a dedicated allocation is required for this resource.
struct VkMemoryDedicatedRequirements {
VkStructureType sType;
void * pNext;
VkBool32 prefersDedicatedAllocation;
VkBool32 requiresDedicatedAllocation;
}| Modifier and Type | Class and Description |
|---|---|
static class |
VkMemoryDedicatedRequirements.Buffer
An array of
VkMemoryDedicatedRequirements structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
PNEXT
The struct member offsets.
|
static int |
PREFERSDEDICATEDALLOCATION
The struct member offsets.
|
static int |
REQUIRESDEDICATEDALLOCATION
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
STYPE
The struct member offsets.
|
| Constructor and Description |
|---|
VkMemoryDedicatedRequirements(java.nio.ByteBuffer container)
Creates a
VkMemoryDedicatedRequirements instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static VkMemoryDedicatedRequirements |
calloc()
Returns a new
VkMemoryDedicatedRequirements instance allocated with memCalloc. |
static VkMemoryDedicatedRequirements.Buffer |
calloc(int capacity)
Returns a new
VkMemoryDedicatedRequirements.Buffer instance allocated with memCalloc. |
static VkMemoryDedicatedRequirements |
callocStack()
Returns a new
VkMemoryDedicatedRequirements instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkMemoryDedicatedRequirements.Buffer |
callocStack(int capacity)
Returns a new
VkMemoryDedicatedRequirements.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkMemoryDedicatedRequirements.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkMemoryDedicatedRequirements.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkMemoryDedicatedRequirements |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkMemoryDedicatedRequirements instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkMemoryDedicatedRequirements |
create()
Returns a new
VkMemoryDedicatedRequirements instance allocated with BufferUtils. |
static VkMemoryDedicatedRequirements.Buffer |
create(int capacity)
Returns a new
VkMemoryDedicatedRequirements.Buffer instance allocated with BufferUtils. |
static VkMemoryDedicatedRequirements |
create(long address)
Returns a new
VkMemoryDedicatedRequirements instance for the specified memory address. |
static VkMemoryDedicatedRequirements.Buffer |
create(long address,
int capacity)
Create a
VkMemoryDedicatedRequirements.Buffer instance at the specified memory. |
static VkMemoryDedicatedRequirements |
createSafe(long address)
|
static VkMemoryDedicatedRequirements.Buffer |
createSafe(long address,
int capacity)
|
static VkMemoryDedicatedRequirements |
malloc()
Returns a new
VkMemoryDedicatedRequirements instance allocated with memAlloc. |
static VkMemoryDedicatedRequirements.Buffer |
malloc(int capacity)
Returns a new
VkMemoryDedicatedRequirements.Buffer instance allocated with memAlloc. |
static VkMemoryDedicatedRequirements |
mallocStack()
Returns a new
VkMemoryDedicatedRequirements instance allocated on the thread-local MemoryStack. |
static VkMemoryDedicatedRequirements.Buffer |
mallocStack(int capacity)
Returns a new
VkMemoryDedicatedRequirements.Buffer instance allocated on the thread-local MemoryStack. |
static VkMemoryDedicatedRequirements.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkMemoryDedicatedRequirements.Buffer instance allocated on the specified MemoryStack. |
static VkMemoryDedicatedRequirements |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkMemoryDedicatedRequirements instance allocated on the specified MemoryStack. |
static long |
npNext(long struct)
Unsafe version of
pNext(). |
static void |
npNext(long struct,
long value)
Unsafe version of
pNext. |
static int |
nprefersDedicatedAllocation(long struct)
Unsafe version of
prefersDedicatedAllocation(). |
static int |
nrequiresDedicatedAllocation(long struct)
Unsafe version of
requiresDedicatedAllocation(). |
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. |
VkMemoryDedicatedRequirements |
pNext(long value)
Sets the specified value to the
pNext field. |
boolean |
prefersDedicatedAllocation()
Returns the value of the
prefersDedicatedAllocation field. |
boolean |
requiresDedicatedAllocation()
Returns the value of the
requiresDedicatedAllocation field. |
VkMemoryDedicatedRequirements |
set(int sType,
long pNext)
Initializes this struct with the specified values.
|
VkMemoryDedicatedRequirements |
set(VkMemoryDedicatedRequirements src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
int |
sType()
Returns the value of the
sType field. |
VkMemoryDedicatedRequirements |
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 PREFERSDEDICATEDALLOCATION
public static final int REQUIRESDEDICATEDALLOCATION
public VkMemoryDedicatedRequirements(java.nio.ByteBuffer container)
VkMemoryDedicatedRequirements 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 boolean prefersDedicatedAllocation()
prefersDedicatedAllocation field.public boolean requiresDedicatedAllocation()
requiresDedicatedAllocation field.public VkMemoryDedicatedRequirements sType(int value)
sType field.public VkMemoryDedicatedRequirements pNext(long value)
pNext field.public VkMemoryDedicatedRequirements set(int sType, long pNext)
public VkMemoryDedicatedRequirements set(VkMemoryDedicatedRequirements src)
src - the source structpublic static VkMemoryDedicatedRequirements malloc()
VkMemoryDedicatedRequirements instance allocated with memAlloc. The instance must be explicitly freed.public static VkMemoryDedicatedRequirements calloc()
VkMemoryDedicatedRequirements instance allocated with memCalloc. The instance must be explicitly freed.public static VkMemoryDedicatedRequirements create()
VkMemoryDedicatedRequirements instance allocated with BufferUtils.public static VkMemoryDedicatedRequirements create(long address)
VkMemoryDedicatedRequirements instance for the specified memory address.@Nullable public static VkMemoryDedicatedRequirements createSafe(long address)
public static VkMemoryDedicatedRequirements.Buffer malloc(int capacity)
VkMemoryDedicatedRequirements.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkMemoryDedicatedRequirements.Buffer calloc(int capacity)
VkMemoryDedicatedRequirements.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkMemoryDedicatedRequirements.Buffer create(int capacity)
VkMemoryDedicatedRequirements.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static VkMemoryDedicatedRequirements.Buffer create(long address, int capacity)
VkMemoryDedicatedRequirements.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static VkMemoryDedicatedRequirements.Buffer createSafe(long address, int capacity)
public static VkMemoryDedicatedRequirements mallocStack()
VkMemoryDedicatedRequirements instance allocated on the thread-local MemoryStack.public static VkMemoryDedicatedRequirements callocStack()
VkMemoryDedicatedRequirements instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static VkMemoryDedicatedRequirements mallocStack(org.lwjgl.system.MemoryStack stack)
VkMemoryDedicatedRequirements instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static VkMemoryDedicatedRequirements callocStack(org.lwjgl.system.MemoryStack stack)
VkMemoryDedicatedRequirements instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static VkMemoryDedicatedRequirements.Buffer mallocStack(int capacity)
VkMemoryDedicatedRequirements.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static VkMemoryDedicatedRequirements.Buffer callocStack(int capacity)
VkMemoryDedicatedRequirements.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static VkMemoryDedicatedRequirements.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkMemoryDedicatedRequirements.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VkMemoryDedicatedRequirements.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkMemoryDedicatedRequirements.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 nprefersDedicatedAllocation(long struct)
prefersDedicatedAllocation().public static int nrequiresDedicatedAllocation(long struct)
requiresDedicatedAllocation().public static void nsType(long struct,
int value)
sType.public static void npNext(long struct,
long value)
pNext.Copyright LWJGL. All Rights Reserved. License terms.