Package org.lwjgl.vulkan
Class VkDescriptorPoolSize
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkDescriptorPoolSize
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class VkDescriptorPoolSize extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Structure specifying descriptor pool size.Description
Note
When creating a descriptor pool that will contain descriptors for combined image samplers of multi-planar formats, an application needs to account for non-trivial descriptor consumption when choosing the
descriptorCount
value, as indicated byVkSamplerYcbcrConversionImageFormatProperties
::combinedImageSamplerDescriptorCount
.Valid Usage
descriptorCount
must be greater than 0- If
type
isDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT
thendescriptorCount
must be a multiple of 4
Valid Usage (Implicit)
type
must be a validVkDescriptorType
value
See Also
Member documentation
type
– the type of descriptor.descriptorCount
– the number of descriptors of that type to allocate. Iftype
isDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT
thendescriptorCount
is the number of bytes to allocate for descriptors of this type.
Layout
struct VkDescriptorPoolSize { VkDescriptorType type; uint32_t descriptorCount; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkDescriptorPoolSize.Buffer
An array ofVkDescriptorPoolSize
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
DESCRIPTORCOUNT
The struct member offsets.static int
SIZEOF
The struct size in bytes.static int
TYPE
The struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkDescriptorPoolSize(java.nio.ByteBuffer container)
Creates aVkDescriptorPoolSize
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkDescriptorPoolSize
calloc()
Returns a newVkDescriptorPoolSize
instance allocated withmemCalloc
.static VkDescriptorPoolSize.Buffer
calloc(int capacity)
Returns a newVkDescriptorPoolSize.Buffer
instance allocated withmemCalloc
.static VkDescriptorPoolSize
callocStack()
Returns a newVkDescriptorPoolSize
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkDescriptorPoolSize.Buffer
callocStack(int capacity)
Returns a newVkDescriptorPoolSize.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkDescriptorPoolSize.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDescriptorPoolSize.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkDescriptorPoolSize
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDescriptorPoolSize
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkDescriptorPoolSize
create()
Returns a newVkDescriptorPoolSize
instance allocated withBufferUtils
.static VkDescriptorPoolSize.Buffer
create(int capacity)
Returns a newVkDescriptorPoolSize.Buffer
instance allocated withBufferUtils
.static VkDescriptorPoolSize
create(long address)
Returns a newVkDescriptorPoolSize
instance for the specified memory address.static VkDescriptorPoolSize.Buffer
create(long address, int capacity)
Create aVkDescriptorPoolSize.Buffer
instance at the specified memory.static VkDescriptorPoolSize
createSafe(long address)
static VkDescriptorPoolSize.Buffer
createSafe(long address, int capacity)
int
descriptorCount()
Returns the value of thedescriptorCount
field.VkDescriptorPoolSize
descriptorCount(int value)
Sets the specified value to thedescriptorCount
field.static VkDescriptorPoolSize
malloc()
Returns a newVkDescriptorPoolSize
instance allocated withmemAlloc
.static VkDescriptorPoolSize.Buffer
malloc(int capacity)
Returns a newVkDescriptorPoolSize.Buffer
instance allocated withmemAlloc
.static VkDescriptorPoolSize
mallocStack()
Returns a newVkDescriptorPoolSize
instance allocated on the thread-localMemoryStack
.static VkDescriptorPoolSize.Buffer
mallocStack(int capacity)
Returns a newVkDescriptorPoolSize.Buffer
instance allocated on the thread-localMemoryStack
.static VkDescriptorPoolSize.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDescriptorPoolSize.Buffer
instance allocated on the specifiedMemoryStack
.static VkDescriptorPoolSize
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDescriptorPoolSize
instance allocated on the specifiedMemoryStack
.static int
ndescriptorCount(long struct)
Unsafe version ofdescriptorCount()
.static void
ndescriptorCount(long struct, int value)
Unsafe version ofdescriptorCount
.static int
ntype(long struct)
Unsafe version oftype()
.static void
ntype(long struct, int value)
Unsafe version oftype
.VkDescriptorPoolSize
set(int type, int descriptorCount)
Initializes this struct with the specified values.VkDescriptorPoolSize
set(VkDescriptorPoolSize src)
Copies the specified struct data to this struct.int
sizeof()
int
type()
Returns the value of thetype
field.VkDescriptorPoolSize
type(int value)
Sets the specified value to thetype
field.
-
-
-
Constructor Detail
-
VkDescriptorPoolSize
public VkDescriptorPoolSize(java.nio.ByteBuffer container)
Creates aVkDescriptorPoolSize
instance at the current position of the specifiedByteBuffer
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.
-
-
Method Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
type
public int type()
Returns the value of thetype
field.
-
descriptorCount
public int descriptorCount()
Returns the value of thedescriptorCount
field.
-
type
public VkDescriptorPoolSize type(int value)
Sets the specified value to thetype
field.
-
descriptorCount
public VkDescriptorPoolSize descriptorCount(int value)
Sets the specified value to thedescriptorCount
field.
-
set
public VkDescriptorPoolSize set(int type, int descriptorCount)
Initializes this struct with the specified values.
-
set
public VkDescriptorPoolSize set(VkDescriptorPoolSize src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkDescriptorPoolSize malloc()
Returns a newVkDescriptorPoolSize
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkDescriptorPoolSize calloc()
Returns a newVkDescriptorPoolSize
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkDescriptorPoolSize create()
Returns a newVkDescriptorPoolSize
instance allocated withBufferUtils
.
-
create
public static VkDescriptorPoolSize create(long address)
Returns a newVkDescriptorPoolSize
instance for the specified memory address.
-
createSafe
@Nullable public static VkDescriptorPoolSize createSafe(long address)
-
malloc
public static VkDescriptorPoolSize.Buffer malloc(int capacity)
Returns a newVkDescriptorPoolSize.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkDescriptorPoolSize.Buffer calloc(int capacity)
Returns a newVkDescriptorPoolSize.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkDescriptorPoolSize.Buffer create(int capacity)
Returns a newVkDescriptorPoolSize.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkDescriptorPoolSize.Buffer create(long address, int capacity)
Create aVkDescriptorPoolSize.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VkDescriptorPoolSize.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkDescriptorPoolSize mallocStack()
Returns a newVkDescriptorPoolSize
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkDescriptorPoolSize callocStack()
Returns a newVkDescriptorPoolSize
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkDescriptorPoolSize mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDescriptorPoolSize
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkDescriptorPoolSize callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDescriptorPoolSize
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkDescriptorPoolSize.Buffer mallocStack(int capacity)
Returns a newVkDescriptorPoolSize.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkDescriptorPoolSize.Buffer callocStack(int capacity)
Returns a newVkDescriptorPoolSize.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkDescriptorPoolSize.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDescriptorPoolSize.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkDescriptorPoolSize.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDescriptorPoolSize.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
ntype
public static int ntype(long struct)
Unsafe version oftype()
.
-
ndescriptorCount
public static int ndescriptorCount(long struct)
Unsafe version ofdescriptorCount()
.
-
ntype
public static void ntype(long struct, int value)
Unsafe version oftype
.
-
ndescriptorCount
public static void ndescriptorCount(long struct, int value)
Unsafe version ofdescriptorCount
.
-
-