public class VkDescriptorPoolCreateInfo
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
If multiple VkDescriptorPoolSize structures appear in the pPoolSizes array then the pool will be created with enough storage for the total number of descriptors of each type.
Fragmentation of a descriptor pool is possible and may lead to descriptor set allocation failures. A failure due to fragmentation is defined as failing a descriptor set allocation despite the sum of all outstanding descriptor set allocations from the pool plus the requested allocation requiring no more than the total number of descriptors requested at pool creation. Implementations provide certain guarantees of when fragmentation must not cause allocation failure, as described below.
If a descriptor pool has not had any descriptor sets freed since it was created or most recently reset then fragmentation must not cause an allocation failure (note that this is always the case for a pool created without the DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT bit set). Additionally, if all sets allocated from the pool since it was created or most recently reset use the same number of descriptors (of each type) and the requested allocation also uses that same number of descriptors (of each type), then fragmentation must not cause an allocation failure.
If an allocation failure occurs due to fragmentation, an application can create an additional descriptor pool to perform further descriptor set allocations.
If flags has the DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT_EXT bit set, descriptor pool creation may fail with the error ERROR_FRAGMENTATION_EXT if the total number of descriptors across all pools (including this one) created with this bit set exceeds maxUpdateAfterBindDescriptorsInAllPools, or if fragmentation of the underlying hardware resources occurs.
maxSets must be greater than 0sType must be STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFOpNext must be NULL or a pointer to a valid instance of VkDescriptorPoolInlineUniformBlockCreateInfoEXTflags must be a valid combination of VkDescriptorPoolCreateFlagBits valuespPoolSizes must be a valid pointer to an array of poolSizeCount valid VkDescriptorPoolSize structurespoolSizeCount must be greater than 0VkDescriptorPoolSize, CreateDescriptorPool
sType – the type of this structure.pNext – NULL or a pointer to an extension-specific structure.flags – a bitmask of VkDescriptorPoolCreateFlagBits specifying certain supported operations on the pool.maxSets – the maximum number of descriptor sets that can be allocated from the pool.poolSizeCount – the number of elements in pPoolSizes.pPoolSizes – a pointer to an array of VkDescriptorPoolSize structures, each containing a descriptor type and number of descriptors of that type to be allocated in the pool.
struct VkDescriptorPoolCreateInfo {
VkStructureType sType;
void const * pNext;
VkDescriptorPoolCreateFlags flags;
uint32_t maxSets;
uint32_t poolSizeCount;
VkDescriptorPoolSize const * pPoolSizes;
}| Modifier and Type | Class and Description |
|---|---|
static class |
VkDescriptorPoolCreateInfo.Buffer
An array of
VkDescriptorPoolCreateInfo structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
FLAGS
The struct member offsets.
|
static int |
MAXSETS
The struct member offsets.
|
static int |
PNEXT
The struct member offsets.
|
static int |
POOLSIZECOUNT
The struct member offsets.
|
static int |
PPOOLSIZES
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
STYPE
The struct member offsets.
|
| Constructor and Description |
|---|
VkDescriptorPoolCreateInfo(java.nio.ByteBuffer container)
Creates a
VkDescriptorPoolCreateInfo instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static VkDescriptorPoolCreateInfo |
calloc()
Returns a new
VkDescriptorPoolCreateInfo instance allocated with memCalloc. |
static VkDescriptorPoolCreateInfo.Buffer |
calloc(int capacity)
Returns a new
VkDescriptorPoolCreateInfo.Buffer instance allocated with memCalloc. |
static VkDescriptorPoolCreateInfo |
callocStack()
Returns a new
VkDescriptorPoolCreateInfo instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkDescriptorPoolCreateInfo.Buffer |
callocStack(int capacity)
Returns a new
VkDescriptorPoolCreateInfo.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkDescriptorPoolCreateInfo.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkDescriptorPoolCreateInfo.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkDescriptorPoolCreateInfo |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkDescriptorPoolCreateInfo instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkDescriptorPoolCreateInfo |
create()
Returns a new
VkDescriptorPoolCreateInfo instance allocated with BufferUtils. |
static VkDescriptorPoolCreateInfo.Buffer |
create(int capacity)
Returns a new
VkDescriptorPoolCreateInfo.Buffer instance allocated with BufferUtils. |
static VkDescriptorPoolCreateInfo |
create(long address)
Returns a new
VkDescriptorPoolCreateInfo instance for the specified memory address. |
static VkDescriptorPoolCreateInfo.Buffer |
create(long address,
int capacity)
Create a
VkDescriptorPoolCreateInfo.Buffer instance at the specified memory. |
static VkDescriptorPoolCreateInfo |
createSafe(long address)
|
static VkDescriptorPoolCreateInfo.Buffer |
createSafe(long address,
int capacity)
|
int |
flags()
Returns the value of the
flags field. |
VkDescriptorPoolCreateInfo |
flags(int value)
Sets the specified value to the
flags field. |
static VkDescriptorPoolCreateInfo |
malloc()
Returns a new
VkDescriptorPoolCreateInfo instance allocated with memAlloc. |
static VkDescriptorPoolCreateInfo.Buffer |
malloc(int capacity)
Returns a new
VkDescriptorPoolCreateInfo.Buffer instance allocated with memAlloc. |
static VkDescriptorPoolCreateInfo |
mallocStack()
Returns a new
VkDescriptorPoolCreateInfo instance allocated on the thread-local MemoryStack. |
static VkDescriptorPoolCreateInfo.Buffer |
mallocStack(int capacity)
Returns a new
VkDescriptorPoolCreateInfo.Buffer instance allocated on the thread-local MemoryStack. |
static VkDescriptorPoolCreateInfo.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkDescriptorPoolCreateInfo.Buffer instance allocated on the specified MemoryStack. |
static VkDescriptorPoolCreateInfo |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkDescriptorPoolCreateInfo instance allocated on the specified MemoryStack. |
int |
maxSets()
Returns the value of the
maxSets field. |
VkDescriptorPoolCreateInfo |
maxSets(int value)
Sets the specified value to the
maxSets field. |
static int |
nflags(long struct)
Unsafe version of
flags(). |
static void |
nflags(long struct,
int value)
Unsafe version of
flags. |
static int |
nmaxSets(long struct)
Unsafe version of
maxSets(). |
static void |
nmaxSets(long struct,
int value)
Unsafe version of
maxSets. |
static long |
npNext(long struct)
Unsafe version of
pNext(). |
static void |
npNext(long struct,
long value)
Unsafe version of
pNext. |
static int |
npoolSizeCount(long struct)
Unsafe version of
poolSizeCount(). |
static void |
npoolSizeCount(long struct,
int value)
Sets the specified value to the
poolSizeCount field of the specified struct. |
static VkDescriptorPoolSize.Buffer |
npPoolSizes(long struct)
Unsafe version of
pPoolSizes(). |
static void |
npPoolSizes(long struct,
VkDescriptorPoolSize.Buffer value)
Unsafe version of
pPoolSizes. |
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. |
VkDescriptorPoolCreateInfo |
pNext(long value)
Sets the specified value to the
pNext field. |
int |
poolSizeCount()
Returns the value of the
poolSizeCount field. |
VkDescriptorPoolSize.Buffer |
pPoolSizes()
Returns a
VkDescriptorPoolSize.Buffer view of the struct array pointed to by the pPoolSizes field. |
VkDescriptorPoolCreateInfo |
pPoolSizes(VkDescriptorPoolSize.Buffer value)
Sets the address of the specified
VkDescriptorPoolSize.Buffer to the pPoolSizes field. |
VkDescriptorPoolCreateInfo |
set(int sType,
long pNext,
int flags,
int maxSets,
VkDescriptorPoolSize.Buffer pPoolSizes)
Initializes this struct with the specified values.
|
VkDescriptorPoolCreateInfo |
set(VkDescriptorPoolCreateInfo src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
int |
sType()
Returns the value of the
sType field. |
VkDescriptorPoolCreateInfo |
sType(int value)
Sets the specified value to the
sType field. |
static void |
validate(long struct)
Validates pointer members that should not be
NULL. |
static void |
validate(long array,
int count)
Calls
validate(long) for each struct contained in the specified struct array. |
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 MAXSETS
public static final int POOLSIZECOUNT
public static final int PPOOLSIZES
public VkDescriptorPoolCreateInfo(java.nio.ByteBuffer container)
VkDescriptorPoolCreateInfo 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 maxSets()
maxSets field.public int poolSizeCount()
poolSizeCount field.public VkDescriptorPoolSize.Buffer pPoolSizes()
VkDescriptorPoolSize.Buffer view of the struct array pointed to by the pPoolSizes field.public VkDescriptorPoolCreateInfo sType(int value)
sType field.public VkDescriptorPoolCreateInfo pNext(long value)
pNext field.public VkDescriptorPoolCreateInfo flags(int value)
flags field.public VkDescriptorPoolCreateInfo maxSets(int value)
maxSets field.public VkDescriptorPoolCreateInfo pPoolSizes(VkDescriptorPoolSize.Buffer value)
VkDescriptorPoolSize.Buffer to the pPoolSizes field.public VkDescriptorPoolCreateInfo set(int sType, long pNext, int flags, int maxSets, VkDescriptorPoolSize.Buffer pPoolSizes)
public VkDescriptorPoolCreateInfo set(VkDescriptorPoolCreateInfo src)
src - the source structpublic static VkDescriptorPoolCreateInfo malloc()
VkDescriptorPoolCreateInfo instance allocated with memAlloc. The instance must be explicitly freed.public static VkDescriptorPoolCreateInfo calloc()
VkDescriptorPoolCreateInfo instance allocated with memCalloc. The instance must be explicitly freed.public static VkDescriptorPoolCreateInfo create()
VkDescriptorPoolCreateInfo instance allocated with BufferUtils.public static VkDescriptorPoolCreateInfo create(long address)
VkDescriptorPoolCreateInfo instance for the specified memory address.@Nullable public static VkDescriptorPoolCreateInfo createSafe(long address)
public static VkDescriptorPoolCreateInfo.Buffer malloc(int capacity)
VkDescriptorPoolCreateInfo.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkDescriptorPoolCreateInfo.Buffer calloc(int capacity)
VkDescriptorPoolCreateInfo.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkDescriptorPoolCreateInfo.Buffer create(int capacity)
VkDescriptorPoolCreateInfo.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static VkDescriptorPoolCreateInfo.Buffer create(long address, int capacity)
VkDescriptorPoolCreateInfo.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static VkDescriptorPoolCreateInfo.Buffer createSafe(long address, int capacity)
public static VkDescriptorPoolCreateInfo mallocStack()
VkDescriptorPoolCreateInfo instance allocated on the thread-local MemoryStack.public static VkDescriptorPoolCreateInfo callocStack()
VkDescriptorPoolCreateInfo instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static VkDescriptorPoolCreateInfo mallocStack(org.lwjgl.system.MemoryStack stack)
VkDescriptorPoolCreateInfo instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static VkDescriptorPoolCreateInfo callocStack(org.lwjgl.system.MemoryStack stack)
VkDescriptorPoolCreateInfo instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static VkDescriptorPoolCreateInfo.Buffer mallocStack(int capacity)
VkDescriptorPoolCreateInfo.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static VkDescriptorPoolCreateInfo.Buffer callocStack(int capacity)
VkDescriptorPoolCreateInfo.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static VkDescriptorPoolCreateInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkDescriptorPoolCreateInfo.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VkDescriptorPoolCreateInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkDescriptorPoolCreateInfo.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 nmaxSets(long struct)
maxSets().public static int npoolSizeCount(long struct)
poolSizeCount().public static VkDescriptorPoolSize.Buffer npPoolSizes(long struct)
pPoolSizes().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 nmaxSets(long struct,
int value)
maxSets.public static void npoolSizeCount(long struct,
int value)
poolSizeCount field of the specified struct.public static void npPoolSizes(long struct,
VkDescriptorPoolSize.Buffer value)
pPoolSizes.public static void validate(long struct)
NULL.struct - the struct to validatepublic static void validate(long array,
int count)
validate(long) for each struct contained in the specified struct array.array - the struct array to validatecount - the number of structs in arrayCopyright LWJGL. All Rights Reserved. License terms.