Class VkCopyDescriptorSet
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
Description
If the VkDescriptorSetLayoutBinding
for dstBinding
is DESCRIPTOR_TYPE_MUTABLE_EXT
and srcBinding
is not DESCRIPTOR_TYPE_MUTABLE_EXT
, the new active descriptor type becomes the descriptor type of srcBinding
. If both VkDescriptorSetLayoutBinding
for srcBinding
and dstBinding
are DESCRIPTOR_TYPE_MUTABLE_EXT
, the active descriptor type in each source descriptor is copied into the corresponding destination descriptor. The active descriptor type can be different for each source descriptor.
Note
The intention is that copies to and from mutable descriptors is a simple memcpy. Copies between non-mutable and mutable descriptors are expected to require one memcpy per descriptor to handle the difference in size, but this use case with more than one descriptorCount
is considered rare.
Valid Usage
srcBinding
must be a valid binding withinsrcSet
- The sum of
srcArrayElement
anddescriptorCount
must be less than or equal to the number of array elements in the descriptor set binding specified bysrcBinding
, and all applicable consecutive bindings, as described by consecutive binding updates dstBinding
must be a valid binding withindstSet
- The sum of
dstArrayElement
anddescriptorCount
must be less than or equal to the number of array elements in the descriptor set binding specified bydstBinding
, and all applicable consecutive bindings, as described by consecutive binding updates - The type of
dstBinding
withindstSet
must be equal to the type ofsrcBinding
withinsrcSet
- If
srcSet
is equal todstSet
, then the source and destination ranges of descriptors must not overlap, where the ranges may include array elements from consecutive bindings as described by consecutive binding updates - If the descriptor type of the descriptor set binding specified by
srcBinding
isDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK
,srcArrayElement
must be an integer multiple of 4 - If the descriptor type of the descriptor set binding specified by
dstBinding
isDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK
,dstArrayElement
must be an integer multiple of 4 - If the descriptor type of the descriptor set binding specified by either
srcBinding
ordstBinding
isDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK
,descriptorCount
must be an integer multiple of 4 - If
srcSet
’s layout was created with theDESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT
flag set, thendstSet
’s layout must also have been created with theDESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT
flag set - If
srcSet
’s layout was created without either theDESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXT
flag or theDESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT
flag set, thendstSet
’s layout must have been created without theDESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT
flag set - If the descriptor pool from which
srcSet
was allocated was created with theDESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT
flag set, then the descriptor pool from whichdstSet
was allocated must also have been created with theDESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT
flag set - If the descriptor pool from which
srcSet
was allocated was created without either theDESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT
flag or theDESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT
flag set, then the descriptor pool from whichdstSet
was allocated must have been created without theDESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT
flag set - If the descriptor type of the descriptor set binding specified by
dstBinding
isDESCRIPTOR_TYPE_SAMPLER
, thendstSet
must not have been allocated with a layout that included immutable samplers fordstBinding
- If
VkDescriptorSetLayoutBinding
fordstSet
atdstBinding
isDESCRIPTOR_TYPE_MUTABLE_EXT
, the new active descriptor type must exist in the correspondingpMutableDescriptorTypeLists
list fordstBinding
if the new active descriptor type is notDESCRIPTOR_TYPE_MUTABLE_EXT
- If
VkDescriptorSetLayoutBinding
forsrcSet
atsrcBinding
isDESCRIPTOR_TYPE_MUTABLE_EXT
and theVkDescriptorSetLayoutBinding
fordstSet
atdstBinding
is notDESCRIPTOR_TYPE_MUTABLE_EXT
, the active descriptor type for the source descriptor must match the descriptor type ofdstBinding
- If
VkDescriptorSetLayoutBinding
fordstSet
atdstBinding
isDESCRIPTOR_TYPE_MUTABLE_EXT
, and the new active descriptor type isDESCRIPTOR_TYPE_MUTABLE_EXT
, thepMutableDescriptorTypeLists
forsrcBinding
anddstBinding
must match exactly
Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_COPY_DESCRIPTOR_SET
pNext
must beNULL
srcSet
must be a validVkDescriptorSet
handledstSet
must be a validVkDescriptorSet
handle- Both of
dstSet
, andsrcSet
must have been created, allocated, or retrieved from the sameVkDevice
See Also
Layout
struct VkCopyDescriptorSet {
VkStructureType sType()
;
void const * pNext()
;
VkDescriptorSet srcSet()
;
uint32_t srcBinding()
;
uint32_t srcArrayElement()
;
VkDescriptorSet dstSet()
;
uint32_t dstBinding()
;
uint32_t dstArrayElement()
;
uint32_t descriptorCount()
;
}
-
Nested Class Summary
Nested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionVkCopyDescriptorSet
(ByteBuffer container) Creates aVkCopyDescriptorSet
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic VkCopyDescriptorSet
calloc()
Returns a newVkCopyDescriptorSet
instance allocated withmemCalloc
.static VkCopyDescriptorSet.Buffer
calloc
(int capacity) Returns a newVkCopyDescriptorSet.Buffer
instance allocated withmemCalloc
.static VkCopyDescriptorSet.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newVkCopyDescriptorSet.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkCopyDescriptorSet
calloc
(MemoryStack stack) Returns a newVkCopyDescriptorSet
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkCopyDescriptorSet
Deprecated.static VkCopyDescriptorSet.Buffer
callocStack
(int capacity) Deprecated.static VkCopyDescriptorSet.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static VkCopyDescriptorSet
callocStack
(MemoryStack stack) Deprecated.static VkCopyDescriptorSet
create()
Returns a newVkCopyDescriptorSet
instance allocated withBufferUtils
.static VkCopyDescriptorSet.Buffer
create
(int capacity) Returns a newVkCopyDescriptorSet.Buffer
instance allocated withBufferUtils
.static VkCopyDescriptorSet
create
(long address) Returns a newVkCopyDescriptorSet
instance for the specified memory address.static VkCopyDescriptorSet.Buffer
create
(long address, int capacity) Create aVkCopyDescriptorSet.Buffer
instance at the specified memory.static VkCopyDescriptorSet
createSafe
(long address) static VkCopyDescriptorSet.Buffer
createSafe
(long address, int capacity) int
the number of descriptors to copy from the source to destination.descriptorCount
(int value) Sets the specified value to thedescriptorCount()
field.int
seedstSet
dstArrayElement
(int value) Sets the specified value to thedstArrayElement()
field.int
seedstSet
dstBinding
(int value) Sets the specified value to thedstBinding()
field.long
dstSet()
dstSet
,dstBinding
, anddstArrayElement
are the destination set, binding, and array element, respectively.dstSet
(long value) Sets the specified value to thedstSet()
field.static VkCopyDescriptorSet
malloc()
Returns a newVkCopyDescriptorSet
instance allocated withmemAlloc
.static VkCopyDescriptorSet.Buffer
malloc
(int capacity) Returns a newVkCopyDescriptorSet.Buffer
instance allocated withmemAlloc
.static VkCopyDescriptorSet.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newVkCopyDescriptorSet.Buffer
instance allocated on the specifiedMemoryStack
.static VkCopyDescriptorSet
malloc
(MemoryStack stack) Returns a newVkCopyDescriptorSet
instance allocated on the specifiedMemoryStack
.static VkCopyDescriptorSet
Deprecated.static VkCopyDescriptorSet.Buffer
mallocStack
(int capacity) Deprecated.static VkCopyDescriptorSet.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static VkCopyDescriptorSet
mallocStack
(MemoryStack stack) Deprecated.static int
ndescriptorCount
(long struct) Unsafe version ofdescriptorCount()
.static void
ndescriptorCount
(long struct, int value) Unsafe version ofdescriptorCount
.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
ndstSet
(long struct) Unsafe version ofdstSet()
.static void
ndstSet
(long struct, long value) Unsafe version ofdstSet
.static long
npNext
(long struct) Unsafe version ofpNext()
.static void
npNext
(long struct, long value) Unsafe version ofpNext
.static int
nsrcArrayElement
(long struct) Unsafe version ofsrcArrayElement()
.static void
nsrcArrayElement
(long struct, int value) Unsafe version ofsrcArrayElement
.static int
nsrcBinding
(long struct) Unsafe version ofsrcBinding()
.static void
nsrcBinding
(long struct, int value) Unsafe version ofsrcBinding
.static long
nsrcSet
(long struct) Unsafe version ofsrcSet()
.static void
nsrcSet
(long struct, long value) Unsafe version ofsrcSet
.static int
nsType
(long struct) Unsafe version ofsType()
.static void
nsType
(long struct, int value) Unsafe version ofsType
.long
pNext()
NULL
or a pointer to a structure extending this structure.pNext
(long value) Sets the specified value to thepNext()
field.set
(int sType, long pNext, long srcSet, int srcBinding, int srcArrayElement, long dstSet, int dstBinding, int dstArrayElement, int descriptorCount) Initializes this struct with the specified values.set
(VkCopyDescriptorSet src) Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.int
seesrcSet
srcArrayElement
(int value) Sets the specified value to thesrcArrayElement()
field.int
seesrcSet
srcBinding
(int value) Sets the specified value to thesrcBinding()
field.long
srcSet()
srcSet
,srcBinding
, andsrcArrayElement
are the source set, binding, and array element, respectively.srcSet
(long value) Sets the specified value to thesrcSet()
field.int
sType()
aVkStructureType
value identifying this structure.sType
(int value) Sets the specified value to thesType()
field.Sets theSTRUCTURE_TYPE_COPY_DESCRIPTOR_SET
value to thesType()
field.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
STYPE
public static final int STYPEThe struct member offsets. -
PNEXT
public static final int PNEXTThe struct member offsets. -
SRCSET
public static final int SRCSETThe struct member offsets. -
SRCBINDING
public static final int SRCBINDINGThe struct member offsets. -
SRCARRAYELEMENT
public static final int SRCARRAYELEMENTThe struct member offsets. -
DSTSET
public static final int DSTSETThe struct member offsets. -
DSTBINDING
public static final int DSTBINDINGThe struct member offsets. -
DSTARRAYELEMENT
public static final int DSTARRAYELEMENTThe struct member offsets. -
DESCRIPTORCOUNT
public static final int DESCRIPTORCOUNTThe struct member offsets.
-
-
Constructor Details
-
VkCopyDescriptorSet
Creates aVkCopyDescriptorSet
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 Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<VkCopyDescriptorSet>
-
sType
public int sType()aVkStructureType
value identifying this structure. -
pNext
public long pNext()NULL
or a pointer to a structure extending this structure. -
srcSet
public long srcSet()srcSet
,srcBinding
, andsrcArrayElement
are the source set, binding, and array element, respectively. If the descriptor binding identified bysrcSet
andsrcBinding
has a descriptor type ofDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK
thensrcArrayElement
specifies the starting byte offset within the binding to copy from. -
srcBinding
public int srcBinding()seesrcSet
-
srcArrayElement
public int srcArrayElement()seesrcSet
-
dstSet
public long dstSet()dstSet
,dstBinding
, anddstArrayElement
are the destination set, binding, and array element, respectively. If the descriptor binding identified bydstSet
anddstBinding
has a descriptor type ofDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK
thendstArrayElement
specifies the starting byte offset within the binding to copy to. -
dstBinding
public int dstBinding()seedstSet
-
dstArrayElement
public int dstArrayElement()seedstSet
-
descriptorCount
public int descriptorCount()the number of descriptors to copy from the source to destination. IfdescriptorCount
is greater than the number of remaining array elements in the source or destination binding, those affect consecutive bindings in a manner similar toVkWriteDescriptorSet
above. If the descriptor binding identified bysrcSet
andsrcBinding
has a descriptor type ofDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK
thendescriptorCount
specifies the number of bytes to copy and the remaining array elements in the source or destination binding refer to the remaining number of bytes in those. -
sType
Sets the specified value to thesType()
field. -
sType$Default
Sets theSTRUCTURE_TYPE_COPY_DESCRIPTOR_SET
value to thesType()
field. -
pNext
Sets the specified value to thepNext()
field. -
srcSet
Sets the specified value to thesrcSet()
field. -
srcBinding
Sets the specified value to thesrcBinding()
field. -
srcArrayElement
Sets the specified value to thesrcArrayElement()
field. -
dstSet
Sets the specified value to thedstSet()
field. -
dstBinding
Sets the specified value to thedstBinding()
field. -
dstArrayElement
Sets the specified value to thedstArrayElement()
field. -
descriptorCount
Sets the specified value to thedescriptorCount()
field. -
set
public VkCopyDescriptorSet set(int sType, long pNext, long srcSet, int srcBinding, int srcArrayElement, long dstSet, int dstBinding, int dstArrayElement, int descriptorCount) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
Returns a newVkCopyDescriptorSet
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newVkCopyDescriptorSet
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newVkCopyDescriptorSet
instance allocated withBufferUtils
. -
create
Returns a newVkCopyDescriptorSet
instance for the specified memory address. -
createSafe
-
malloc
Returns a newVkCopyDescriptorSet.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newVkCopyDescriptorSet.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newVkCopyDescriptorSet.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aVkCopyDescriptorSet.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newVkCopyDescriptorSet
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newVkCopyDescriptorSet
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newVkCopyDescriptorSet.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newVkCopyDescriptorSet.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
nsType
public static int nsType(long struct) Unsafe version ofsType()
. -
npNext
public static long npNext(long struct) Unsafe version ofpNext()
. -
nsrcSet
public static long nsrcSet(long struct) Unsafe version ofsrcSet()
. -
nsrcBinding
public static int nsrcBinding(long struct) Unsafe version ofsrcBinding()
. -
nsrcArrayElement
public static int nsrcArrayElement(long struct) Unsafe version ofsrcArrayElement()
. -
ndstSet
public static long ndstSet(long struct) Unsafe version ofdstSet()
. -
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()
. -
nsType
public static void nsType(long struct, int value) Unsafe version ofsType
. -
npNext
public static void npNext(long struct, long value) Unsafe version ofpNext
. -
nsrcSet
public static void nsrcSet(long struct, long value) Unsafe version ofsrcSet
. -
nsrcBinding
public static void nsrcBinding(long struct, int value) Unsafe version ofsrcBinding
. -
nsrcArrayElement
public static void nsrcArrayElement(long struct, int value) Unsafe version ofsrcArrayElement
. -
ndstSet
public static void ndstSet(long struct, long value) Unsafe version ofdstSet
. -
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
.
-