Top Description Inners Fields Constructors Methods
org.lwjgl.vulkan

public Class VkDescriptorPoolCreateInfo

extends Struct<VkDescriptorPoolCreateInfo>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Structure specifying parameters of a newly created descriptor pool.
Description

If multiple VkDescriptorPoolSize structures containing the same descriptor type 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 bit set, descriptor pool creation may fail with the error ERROR_FRAGMENTATION 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.

If a pPoolSizes[i]::type is DESCRIPTOR_TYPE_MUTABLE_EXT, a VkMutableDescriptorTypeCreateInfoEXT struct in the pNext chain can be used to specify which mutable descriptor types can be allocated from the pool. If included in the pNext chain, VkMutableDescriptorTypeCreateInfoEXT::pMutableDescriptorTypeLists[i] specifies which kind of DESCRIPTOR_TYPE_MUTABLE_EXT descriptors can be allocated from this pool entry. If VkMutableDescriptorTypeCreateInfoEXT does not exist in the pNext chain, or VkMutableDescriptorTypeCreateInfoEXT::pMutableDescriptorTypeLists[i] is out of range, the descriptor pool allocates enough memory to be able to allocate a DESCRIPTOR_TYPE_MUTABLE_EXT descriptor with any supported VkDescriptorType as a mutable descriptor. A mutable descriptor can be allocated from a pool entry if the type list in VkDescriptorSetLayoutCreateInfo is a subset of the type list declared in the descriptor pool, or if the pool entry is created without a descriptor type list. Multiple pPoolSizes entries with DESCRIPTOR_TYPE_MUTABLE_EXT can be declared. When multiple such pool entries are present in pPoolSizes, they specify sets of supported descriptor types which either fully overlap, partially overlap, or are disjoint. Two sets fully overlap if the sets of supported descriptor types are equal. If the sets are not disjoint they partially overlap. A pool entry without a VkMutableDescriptorTypeListEXT assigned to it is considered to partially overlap any other pool entry which has a VkMutableDescriptorTypeListEXT assigned to it. The application must ensure that partial overlap does not exist in pPoolSizes.

Note

The requirement of no partial overlap is intended to resolve ambiguity for validation as there is no confusion which pPoolSizes entries will be allocated from. An implementation is not expected to depend on this requirement.

Valid Usage
Valid Usage (Implicit)
See Also

VkDescriptorPoolSize, CreateDescriptorPool

Layout


struct VkDescriptorPoolCreateInfo {
    VkStructureType sType;
    void const * pNext;
    VkDescriptorPoolCreateFlags flags;
    uint32_t maxSets;
    uint32_t poolSizeCount;
    VkDescriptorPoolSize const * pPoolSizes;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
FLAGS

The struct member offsets.

public static final int
MAXSETS

The struct member offsets.

public static final int
PNEXT

The struct member offsets.

public static final int
POOLSIZECOUNT

The struct member offsets.

public static final int
PPOOLSIZES

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
STYPE

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
VkDescriptorPoolCreateInfo(long address, ByteBuffer container)

public
VkDescriptorPoolCreateInfo(ByteBuffer container)

Creates a VkDescriptorPoolCreateInfo instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public static VkDescriptorPoolCreateInfo
calloc()

Returns a new VkDescriptorPoolCreateInfo instance allocated with memCalloc.

public static VkDescriptorPoolCreateInfo.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new VkDescriptorPoolCreateInfo.Buffer instance allocated with memCalloc.

public static VkDescriptorPoolCreateInfo
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new VkDescriptorPoolCreateInfo instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static VkDescriptorPoolCreateInfo.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new VkDescriptorPoolCreateInfo.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static VkDescriptorPoolCreateInfo
callocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static VkDescriptorPoolCreateInfo
callocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static VkDescriptorPoolCreateInfo.Buffer
callocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static VkDescriptorPoolCreateInfo.Buffer
callocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
protected VkDescriptorPoolCreateInfo
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static VkDescriptorPoolCreateInfo
create()

Returns a new VkDescriptorPoolCreateInfo instance allocated with BufferUtils.

public static VkDescriptorPoolCreateInfo
create(long address)

Returns a new VkDescriptorPoolCreateInfo instance for the specified memory address.

public static VkDescriptorPoolCreateInfo.Buffer
create(int
the buffer capacity
capacity
)

Returns a new VkDescriptorPoolCreateInfo.Buffer instance allocated with BufferUtils.

public static VkDescriptorPoolCreateInfo.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a VkDescriptorPoolCreateInfo.Buffer instance at the specified memory.

public static VkDescriptorPoolCreateInfo
createSafe(long address)

Like create, but returns null if address is NULL.

public static VkDescriptorPoolCreateInfo.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public int
flags()

a bitmask of VkDescriptorPoolCreateFlagBits specifying certain supported operations on the pool.

public VkDescriptorPoolCreateInfo
flags(int value)

Sets the specified value to the flags field.

public static VkDescriptorPoolCreateInfo
malloc()

Returns a new VkDescriptorPoolCreateInfo instance allocated with memAlloc.

public static VkDescriptorPoolCreateInfo.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new VkDescriptorPoolCreateInfo.Buffer instance allocated with memAlloc.

public static VkDescriptorPoolCreateInfo
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new VkDescriptorPoolCreateInfo instance allocated on the specified MemoryStack.

public static VkDescriptorPoolCreateInfo.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new VkDescriptorPoolCreateInfo.Buffer instance allocated on the specified MemoryStack.

public static VkDescriptorPoolCreateInfo
mallocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static VkDescriptorPoolCreateInfo
mallocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static VkDescriptorPoolCreateInfo.Buffer
mallocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static VkDescriptorPoolCreateInfo.Buffer
mallocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public int
maxSets()

the maximum number of descriptor sets that can be allocated from the pool.

public VkDescriptorPoolCreateInfo
maxSets(int value)

Sets the specified value to the maxSets field.

public static int
nflags(long struct)

Unsafe version of flags.

public static void
nflags(long struct, int value)

Unsafe version of flags.

public static int
nmaxSets(long struct)

Unsafe version of maxSets.

public static void
nmaxSets(long struct, int value)

Unsafe version of maxSets.

public static long
npNext(long struct)

Unsafe version of pNext.

public static void
npNext(long struct, long value)

Unsafe version of pNext.

public static int
npoolSizeCount(long struct)

Unsafe version of poolSizeCount.

public static void
npoolSizeCount(long struct, int value)

Sets the specified value to the poolSizeCount field of the specified struct.

public static VkDescriptorPoolSize.Buffer
npPoolSizes(long struct)

Unsafe version of pPoolSizes.

public static void
npPoolSizes(long struct, VkDescriptorPoolSize.Buffer value)

Unsafe version of pPoolSizes.

public static int
nsType(long struct)

Unsafe version of sType.

public static void
nsType(long struct, int value)

Unsafe version of sType.

public long
pNext()

NULL or a pointer to a structure extending this structure.

public VkDescriptorPoolCreateInfo
pNext(long value)

Sets the specified value to the pNext field.

public VkDescriptorPoolCreateInfo
public VkDescriptorPoolCreateInfo
public VkDescriptorPoolCreateInfo
pNext(VkMutableDescriptorTypeCreateInfoEXT value)

Prepends the specified VkMutableDescriptorTypeCreateInfoEXT value to the pNext chain.

public VkDescriptorPoolCreateInfo
pNext(VkMutableDescriptorTypeCreateInfoVALVE value)

Prepends the specified VkMutableDescriptorTypeCreateInfoVALVE value to the pNext chain.

public int
poolSizeCount()

the number of elements in pPoolSizes.

public VkDescriptorPoolSize.Buffer
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.

public VkDescriptorPoolCreateInfo
pPoolSizes(VkDescriptorPoolSize.Buffer value)

Sets the address of the specified VkDescriptorPoolSize.Buffer to the pPoolSizes field.

public VkDescriptorPoolCreateInfo
set(int sType, long pNext, int flags, int maxSets, VkDescriptorPoolSize.Buffer pPoolSizes)

Initializes this struct with the specified values.

public VkDescriptorPoolCreateInfo

Returns:

this struct
set
(VkDescriptorPoolCreateInfo
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public int
sType()

a VkStructureType value identifying this structure.

public VkDescriptorPoolCreateInfo
sType(int value)

Sets the specified value to the sType field.

public VkDescriptorPoolCreateInfo
public static void
validate(long
the struct to validate
struct
)

Validates pointer members that should not be NULL.

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate