Package org.lwjgl.vulkan
Class VkDescriptorUpdateTemplateEntry
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkDescriptorUpdateTemplateEntry
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
- Direct Known Subclasses:
VkDescriptorUpdateTemplateEntryKHR
public class VkDescriptorUpdateTemplateEntry extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Describes a single descriptor update of the descriptor update template.Valid Usage
dstBinding
must be a valid binding in the descriptor set layout implicitly specified when using a descriptor update template to update descriptors.dstArrayElement
anddescriptorCount
must be less than or equal to the number of array elements in the descriptor set binding implicitly specified when using a descriptor update template to update descriptors, and all applicable consecutive bindings, as described by consecutive binding updates- If
descriptor
type isDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT
,dstArrayElement
must be an integer multiple of 4 - If
descriptor
type isDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT
,descriptorCount
must be an integer multiple of 4
Valid Usage (Implicit)
descriptorType
must be a validVkDescriptorType
value
See Also
VkDescriptorUpdateTemplateCreateInfo
Member documentation
dstBinding
– the descriptor binding to update when using this descriptor update template.dstArrayElement
– the starting element in the array belonging todstBinding
. If the descriptor binding identified bysrcBinding
has a descriptor type ofDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT
thendstArrayElement
specifies the starting byte offset to update.descriptorCount
– the number of descriptors to update. IfdescriptorCount
is greater than the number of remaining array elements in the destination binding, those affect consecutive bindings in a manner similar toVkWriteDescriptorSet
above. If the descriptor binding identified bydstBinding
has a descriptor type ofDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT
thendescriptorCount
specifies the number of bytes to update and the remaining array elements in the destination binding refer to the remaining number of bytes in it.descriptorType
– aVkDescriptorType
specifying the type of the descriptor.offset
– the offset in bytes of the first binding in the raw data structure.stride
– the stride in bytes between two consecutive array elements of the descriptor update informations in the raw data structure. The actual pointer ptr for each array element j of update entry i is computed using the following formula:const char *ptr = (const char *)pData + pDescriptorUpdateEntries[i].offset + j * pDescriptorUpdateEntries[i].stride
The stride is useful in case the bindings are stored in structs along with other data. If
descriptorType
isDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT
then the value ofstride
is ignored and the stride is assumed to be 1, i.e. the descriptor update information for them is always specified as a contiguous range.
Layout
struct VkDescriptorUpdateTemplateEntry { uint32_t dstBinding; uint32_t dstArrayElement; uint32_t descriptorCount; VkDescriptorType descriptorType; size_t offset; size_t stride; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkDescriptorUpdateTemplateEntry.Buffer
An array ofVkDescriptorUpdateTemplateEntry
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
DESCRIPTORCOUNT
DESCRIPTORTYPE
DSTARRAYELEMENT
DSTBINDING
OFFSETThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
STRIDE
The struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkDescriptorUpdateTemplateEntry(java.nio.ByteBuffer container)
Creates aVkDescriptorUpdateTemplateEntry
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 VkDescriptorUpdateTemplateEntry
calloc()
Returns a newVkDescriptorUpdateTemplateEntry
instance allocated withmemCalloc
.static VkDescriptorUpdateTemplateEntry.Buffer
calloc(int capacity)
Returns a newVkDescriptorUpdateTemplateEntry.Buffer
instance allocated withmemCalloc
.static VkDescriptorUpdateTemplateEntry
callocStack()
Returns a newVkDescriptorUpdateTemplateEntry
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkDescriptorUpdateTemplateEntry.Buffer
callocStack(int capacity)
Returns a newVkDescriptorUpdateTemplateEntry.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkDescriptorUpdateTemplateEntry.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDescriptorUpdateTemplateEntry.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkDescriptorUpdateTemplateEntry
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDescriptorUpdateTemplateEntry
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkDescriptorUpdateTemplateEntry
create()
Returns a newVkDescriptorUpdateTemplateEntry
instance allocated withBufferUtils
.static VkDescriptorUpdateTemplateEntry.Buffer
create(int capacity)
Returns a newVkDescriptorUpdateTemplateEntry.Buffer
instance allocated withBufferUtils
.static VkDescriptorUpdateTemplateEntry
create(long address)
Returns a newVkDescriptorUpdateTemplateEntry
instance for the specified memory address.static VkDescriptorUpdateTemplateEntry.Buffer
create(long address, int capacity)
Create aVkDescriptorUpdateTemplateEntry.Buffer
instance at the specified memory.static VkDescriptorUpdateTemplateEntry
createSafe(long address)
static VkDescriptorUpdateTemplateEntry.Buffer
createSafe(long address, int capacity)
int
descriptorCount()
Returns the value of thedescriptorCount
field.VkDescriptorUpdateTemplateEntry
descriptorCount(int value)
Sets the specified value to thedescriptorCount
field.int
descriptorType()
Returns the value of thedescriptorType
field.VkDescriptorUpdateTemplateEntry
descriptorType(int value)
Sets the specified value to thedescriptorType
field.int
dstArrayElement()
Returns the value of thedstArrayElement
field.VkDescriptorUpdateTemplateEntry
dstArrayElement(int value)
Sets the specified value to thedstArrayElement
field.int
dstBinding()
Returns the value of thedstBinding
field.VkDescriptorUpdateTemplateEntry
dstBinding(int value)
Sets the specified value to thedstBinding
field.static VkDescriptorUpdateTemplateEntry
malloc()
Returns a newVkDescriptorUpdateTemplateEntry
instance allocated withmemAlloc
.static VkDescriptorUpdateTemplateEntry.Buffer
malloc(int capacity)
Returns a newVkDescriptorUpdateTemplateEntry.Buffer
instance allocated withmemAlloc
.static VkDescriptorUpdateTemplateEntry
mallocStack()
Returns a newVkDescriptorUpdateTemplateEntry
instance allocated on the thread-localMemoryStack
.static VkDescriptorUpdateTemplateEntry.Buffer
mallocStack(int capacity)
Returns a newVkDescriptorUpdateTemplateEntry.Buffer
instance allocated on the thread-localMemoryStack
.static VkDescriptorUpdateTemplateEntry.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDescriptorUpdateTemplateEntry.Buffer
instance allocated on the specifiedMemoryStack
.static VkDescriptorUpdateTemplateEntry
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDescriptorUpdateTemplateEntry
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
ndescriptorType(long struct)
Unsafe version ofdescriptorType()
.static void
ndescriptorType(long struct, int value)
Unsafe version ofdescriptorType
.static int
ndstArrayElement(long struct)
Unsafe version ofdstArrayElement()
.static void
ndstArrayElement(long struct, int value)
Unsafe version ofdstArrayElement
.static int
ndstBinding(long struct)
Unsafe version ofdstBinding()
.static void
ndstBinding(long struct, int value)
Unsafe version ofdstBinding
.static long
noffset(long struct)
Unsafe version ofoffset()
.static void
noffset(long struct, long value)
Unsafe version ofoffset
.static long
nstride(long struct)
Unsafe version ofstride()
.static void
nstride(long struct, long value)
Unsafe version ofstride
.long
offset()
Returns the value of theoffset
field.VkDescriptorUpdateTemplateEntry
offset(long value)
Sets the specified value to theoffset
field.VkDescriptorUpdateTemplateEntry
set(int dstBinding, int dstArrayElement, int descriptorCount, int descriptorType, long offset, long stride)
Initializes this struct with the specified values.VkDescriptorUpdateTemplateEntry
set(VkDescriptorUpdateTemplateEntry src)
Copies the specified struct data to this struct.int
sizeof()
long
stride()
Returns the value of thestride
field.VkDescriptorUpdateTemplateEntry
stride(long value)
Sets the specified value to thestride
field.
-
-
-
Constructor Detail
-
VkDescriptorUpdateTemplateEntry
public VkDescriptorUpdateTemplateEntry(java.nio.ByteBuffer container)
Creates aVkDescriptorUpdateTemplateEntry
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
-
dstBinding
public int dstBinding()
Returns the value of thedstBinding
field.
-
dstArrayElement
public int dstArrayElement()
Returns the value of thedstArrayElement
field.
-
descriptorCount
public int descriptorCount()
Returns the value of thedescriptorCount
field.
-
descriptorType
public int descriptorType()
Returns the value of thedescriptorType
field.
-
offset
public long offset()
Returns the value of theoffset
field.
-
stride
public long stride()
Returns the value of thestride
field.
-
dstBinding
public VkDescriptorUpdateTemplateEntry dstBinding(int value)
Sets the specified value to thedstBinding
field.
-
dstArrayElement
public VkDescriptorUpdateTemplateEntry dstArrayElement(int value)
Sets the specified value to thedstArrayElement
field.
-
descriptorCount
public VkDescriptorUpdateTemplateEntry descriptorCount(int value)
Sets the specified value to thedescriptorCount
field.
-
descriptorType
public VkDescriptorUpdateTemplateEntry descriptorType(int value)
Sets the specified value to thedescriptorType
field.
-
offset
public VkDescriptorUpdateTemplateEntry offset(long value)
Sets the specified value to theoffset
field.
-
stride
public VkDescriptorUpdateTemplateEntry stride(long value)
Sets the specified value to thestride
field.
-
set
public VkDescriptorUpdateTemplateEntry set(int dstBinding, int dstArrayElement, int descriptorCount, int descriptorType, long offset, long stride)
Initializes this struct with the specified values.
-
set
public VkDescriptorUpdateTemplateEntry set(VkDescriptorUpdateTemplateEntry src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkDescriptorUpdateTemplateEntry malloc()
Returns a newVkDescriptorUpdateTemplateEntry
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkDescriptorUpdateTemplateEntry calloc()
Returns a newVkDescriptorUpdateTemplateEntry
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkDescriptorUpdateTemplateEntry create()
Returns a newVkDescriptorUpdateTemplateEntry
instance allocated withBufferUtils
.
-
create
public static VkDescriptorUpdateTemplateEntry create(long address)
Returns a newVkDescriptorUpdateTemplateEntry
instance for the specified memory address.
-
createSafe
@Nullable public static VkDescriptorUpdateTemplateEntry createSafe(long address)
-
malloc
public static VkDescriptorUpdateTemplateEntry.Buffer malloc(int capacity)
Returns a newVkDescriptorUpdateTemplateEntry.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkDescriptorUpdateTemplateEntry.Buffer calloc(int capacity)
Returns a newVkDescriptorUpdateTemplateEntry.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkDescriptorUpdateTemplateEntry.Buffer create(int capacity)
Returns a newVkDescriptorUpdateTemplateEntry.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkDescriptorUpdateTemplateEntry.Buffer create(long address, int capacity)
Create aVkDescriptorUpdateTemplateEntry.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VkDescriptorUpdateTemplateEntry.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkDescriptorUpdateTemplateEntry mallocStack()
Returns a newVkDescriptorUpdateTemplateEntry
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkDescriptorUpdateTemplateEntry callocStack()
Returns a newVkDescriptorUpdateTemplateEntry
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkDescriptorUpdateTemplateEntry mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDescriptorUpdateTemplateEntry
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkDescriptorUpdateTemplateEntry callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDescriptorUpdateTemplateEntry
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkDescriptorUpdateTemplateEntry.Buffer mallocStack(int capacity)
Returns a newVkDescriptorUpdateTemplateEntry.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkDescriptorUpdateTemplateEntry.Buffer callocStack(int capacity)
Returns a newVkDescriptorUpdateTemplateEntry.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkDescriptorUpdateTemplateEntry.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDescriptorUpdateTemplateEntry.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkDescriptorUpdateTemplateEntry.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDescriptorUpdateTemplateEntry.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
ndstBinding
public static int ndstBinding(long struct)
Unsafe version ofdstBinding()
.
-
ndstArrayElement
public static int ndstArrayElement(long struct)
Unsafe version ofdstArrayElement()
.
-
ndescriptorCount
public static int ndescriptorCount(long struct)
Unsafe version ofdescriptorCount()
.
-
ndescriptorType
public static int ndescriptorType(long struct)
Unsafe version ofdescriptorType()
.
-
noffset
public static long noffset(long struct)
Unsafe version ofoffset()
.
-
nstride
public static long nstride(long struct)
Unsafe version ofstride()
.
-
ndstBinding
public static void ndstBinding(long struct, int value)
Unsafe version ofdstBinding
.
-
ndstArrayElement
public static void ndstArrayElement(long struct, int value)
Unsafe version ofdstArrayElement
.
-
ndescriptorCount
public static void ndescriptorCount(long struct, int value)
Unsafe version ofdescriptorCount
.
-
ndescriptorType
public static void ndescriptorType(long struct, int value)
Unsafe version ofdescriptorType
.
-
noffset
public static void noffset(long struct, long value)
Unsafe version ofoffset
.
-
nstride
public static void nstride(long struct, long value)
Unsafe version ofstride
.
-
-