Class VkCopyDescriptorSet
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkCopyDescriptorSet
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkCopyDescriptorSet extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure specifying a copy descriptor set operation.Description
If the
VkDescriptorSetLayoutBindingfordstBindingisDESCRIPTOR_TYPE_MUTABLE_VALVEandsrcBindingis notDESCRIPTOR_TYPE_MUTABLE_VALVE, the new active descriptor type becomes the descriptor type ofsrcBinding. If bothVkDescriptorSetLayoutBindingforsrcBindinganddstBindingareDESCRIPTOR_TYPE_MUTABLE_VALVE, 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
descriptorCountis considered rare.Valid Usage
srcBindingmust be a valid binding withinsrcSet- The sum of
srcArrayElementanddescriptorCountmust 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 dstBindingmust be a valid binding withindstSet- The sum of
dstArrayElementanddescriptorCountmust 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
dstBindingwithindstSetmust be equal to the type ofsrcBindingwithinsrcSet - If
srcSetis 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
srcBindingisDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK,srcArrayElementmust be an integer multiple of 4 - If the descriptor type of the descriptor set binding specified by
dstBindingisDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK,dstArrayElementmust be an integer multiple of 4 - If the descriptor type of the descriptor set binding specified by either
srcBindingordstBindingisDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK,descriptorCountmust be an integer multiple of 4 - If
srcSet’s layout was created with theDESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BITflag set, thendstSet’s layout must also have been created with theDESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BITflag set - If
srcSet’s layout was created with neitherDESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BITnorDESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_VALVEflags set, thendstSet’s layout must have been created without theDESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BITflag set - If the descriptor pool from which
srcSetwas allocated was created with theDESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BITflag set, then the descriptor pool from whichdstSetwas allocated must also have been created with theDESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BITflag set - If the descriptor pool from which
srcSetwas allocated was created with neitherDESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BITnorDESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_VALVEflags set, then the descriptor pool from whichdstSetwas allocated must have been created without theDESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BITflag set - If the descriptor type of the descriptor set binding specified by
dstBindingisDESCRIPTOR_TYPE_SAMPLER, thendstSetmust not have been allocated with a layout that included immutable samplers fordstBinding - If
VkDescriptorSetLayoutBindingfordstSetatdstBindingisDESCRIPTOR_TYPE_MUTABLE_VALVE, the new active descriptor type must exist in the correspondingpMutableDescriptorTypeListslist fordstBindingif the new active descriptor type is notDESCRIPTOR_TYPE_MUTABLE_VALVE - If
VkDescriptorSetLayoutBindingforsrcSetatsrcBindingisDESCRIPTOR_TYPE_MUTABLE_VALVEand theVkDescriptorSetLayoutBindingfordstSetatdstBindingis notDESCRIPTOR_TYPE_MUTABLE_VALVE, the active descriptor type for the source descriptor must match the descriptor type ofdstBinding - If
VkDescriptorSetLayoutBindingfordstSetatdstBindingisDESCRIPTOR_TYPE_MUTABLE_VALVE, and the new active descriptor type isDESCRIPTOR_TYPE_MUTABLE_VALVE, thepMutableDescriptorTypeListsforsrcBindinganddstBindingmust match exactly
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_COPY_DESCRIPTOR_SETpNextmust beNULLsrcSetmust be a validVkDescriptorSethandledstSetmust be a validVkDescriptorSethandle- Both of
dstSet, andsrcSetmust have been created, allocated, or retrieved from the sameVkDevice
See Also
Layout
struct VkCopyDescriptorSet { VkStructureTypesType(); void const *pNext(); VkDescriptorSetsrcSet(); uint32_tsrcBinding(); uint32_tsrcArrayElement(); VkDescriptorSetdstSet(); uint32_tdstBinding(); uint32_tdstArrayElement(); uint32_tdescriptorCount(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkCopyDescriptorSet.BufferAn array ofVkCopyDescriptorSetstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intDESCRIPTORCOUNT
DSTARRAYELEMENT
DSTBINDING
DSTSET
PNEXTThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSRCARRAYELEMENT
SRCBINDING
SRCSET
STYPEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkCopyDescriptorSet(java.nio.ByteBuffer container)Creates aVkCopyDescriptorSetinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static VkCopyDescriptorSetcalloc()Returns a newVkCopyDescriptorSetinstance allocated withmemCalloc.static VkCopyDescriptorSet.Buffercalloc(int capacity)Returns a newVkCopyDescriptorSet.Bufferinstance allocated withmemCalloc.static VkCopyDescriptorSet.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkCopyDescriptorSet.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkCopyDescriptorSetcalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkCopyDescriptorSetinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkCopyDescriptorSetcallocStack()Deprecated.static VkCopyDescriptorSet.BuffercallocStack(int capacity)Deprecated.static VkCopyDescriptorSet.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkCopyDescriptorSetcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static VkCopyDescriptorSetcreate()Returns a newVkCopyDescriptorSetinstance allocated withBufferUtils.static VkCopyDescriptorSet.Buffercreate(int capacity)Returns a newVkCopyDescriptorSet.Bufferinstance allocated withBufferUtils.static VkCopyDescriptorSetcreate(long address)Returns a newVkCopyDescriptorSetinstance for the specified memory address.static VkCopyDescriptorSet.Buffercreate(long address, int capacity)Create aVkCopyDescriptorSet.Bufferinstance at the specified memory.static VkCopyDescriptorSetcreateSafe(long address)static VkCopyDescriptorSet.BuffercreateSafe(long address, int capacity)intdescriptorCount()the number of descriptors to copy from the source to destination.VkCopyDescriptorSetdescriptorCount(int value)Sets the specified value to thedescriptorCount()field.intdstArrayElement()seedstSetVkCopyDescriptorSetdstArrayElement(int value)Sets the specified value to thedstArrayElement()field.intdstBinding()seedstSetVkCopyDescriptorSetdstBinding(int value)Sets the specified value to thedstBinding()field.longdstSet()dstSet,dstBinding, anddstArrayElementare the destination set, binding, and array element, respectively.VkCopyDescriptorSetdstSet(long value)Sets the specified value to thedstSet()field.static VkCopyDescriptorSetmalloc()Returns a newVkCopyDescriptorSetinstance allocated withmemAlloc.static VkCopyDescriptorSet.Buffermalloc(int capacity)Returns a newVkCopyDescriptorSet.Bufferinstance allocated withmemAlloc.static VkCopyDescriptorSet.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkCopyDescriptorSet.Bufferinstance allocated on the specifiedMemoryStack.static VkCopyDescriptorSetmalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkCopyDescriptorSetinstance allocated on the specifiedMemoryStack.static VkCopyDescriptorSetmallocStack()Deprecated.static VkCopyDescriptorSet.BuffermallocStack(int capacity)Deprecated.static VkCopyDescriptorSet.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkCopyDescriptorSetmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static intndescriptorCount(long struct)Unsafe version ofdescriptorCount().static voidndescriptorCount(long struct, int value)Unsafe version ofdescriptorCount.static intndstArrayElement(long struct)Unsafe version ofdstArrayElement().static voidndstArrayElement(long struct, int value)Unsafe version ofdstArrayElement.static intndstBinding(long struct)Unsafe version ofdstBinding().static voidndstBinding(long struct, int value)Unsafe version ofdstBinding.static longndstSet(long struct)Unsafe version ofdstSet().static voidndstSet(long struct, long value)Unsafe version ofdstSet.static longnpNext(long struct)Unsafe version ofpNext().static voidnpNext(long struct, long value)Unsafe version ofpNext.static intnsrcArrayElement(long struct)Unsafe version ofsrcArrayElement().static voidnsrcArrayElement(long struct, int value)Unsafe version ofsrcArrayElement.static intnsrcBinding(long struct)Unsafe version ofsrcBinding().static voidnsrcBinding(long struct, int value)Unsafe version ofsrcBinding.static longnsrcSet(long struct)Unsafe version ofsrcSet().static voidnsrcSet(long struct, long value)Unsafe version ofsrcSet.static intnsType(long struct)Unsafe version ofsType().static voidnsType(long struct, int value)Unsafe version ofsType.longpNext()NULLor a pointer to a structure extending this structure.VkCopyDescriptorSetpNext(long value)Sets the specified value to thepNext()field.VkCopyDescriptorSetset(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.VkCopyDescriptorSetset(VkCopyDescriptorSet src)Copies the specified struct data to this struct.intsizeof()intsrcArrayElement()seesrcSetVkCopyDescriptorSetsrcArrayElement(int value)Sets the specified value to thesrcArrayElement()field.intsrcBinding()seesrcSetVkCopyDescriptorSetsrcBinding(int value)Sets the specified value to thesrcBinding()field.longsrcSet()srcSet,srcBinding, andsrcArrayElementare the source set, binding, and array element, respectively.VkCopyDescriptorSetsrcSet(long value)Sets the specified value to thesrcSet()field.intsType()the type of this structure.VkCopyDescriptorSetsType(int value)Sets the specified value to thesType()field.VkCopyDescriptorSetsType$Default()Sets theSTRUCTURE_TYPE_COPY_DESCRIPTOR_SETvalue to thesType()field.
-
-
-
Constructor Detail
-
VkCopyDescriptorSet
public VkCopyDescriptorSet(java.nio.ByteBuffer container)
Creates aVkCopyDescriptorSetinstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin classorg.lwjgl.system.Struct
-
sType
public int sType()
the type of this structure.
-
pNext
public long pNext()
NULLor a pointer to a structure extending this structure.
-
srcSet
public long srcSet()
srcSet,srcBinding, andsrcArrayElementare the source set, binding, and array element, respectively. If the descriptor binding identified bysrcSetandsrcBindinghas a descriptor type ofDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCKthensrcArrayElementspecifies the starting byte offset within the binding to copy from.
-
srcBinding, srcArrayElement
public int srcBinding() public int srcArrayElement()
seesrcSet
-
dstSet
public long dstSet()
dstSet,dstBinding, anddstArrayElementare the destination set, binding, and array element, respectively. If the descriptor binding identified bydstSetanddstBindinghas a descriptor type ofDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCKthendstArrayElementspecifies the starting byte offset within the binding to copy to.
-
dstBinding, dstArrayElement
public int dstBinding() public int dstArrayElement()
seedstSet
-
descriptorCount
public int descriptorCount()
the number of descriptors to copy from the source to destination. IfdescriptorCountis greater than the number of remaining array elements in the source or destination binding, those affect consecutive bindings in a manner similar toVkWriteDescriptorSetabove. If the descriptor binding identified bysrcSetandsrcBindinghas a descriptor type ofDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCKthendescriptorCountspecifies 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
public VkCopyDescriptorSet sType(int value)
Sets the specified value to thesType()field.
-
sType$Default
public VkCopyDescriptorSet sType$Default()
Sets theSTRUCTURE_TYPE_COPY_DESCRIPTOR_SETvalue to thesType()field.
-
pNext
public VkCopyDescriptorSet pNext(long value)
Sets the specified value to thepNext()field.
-
srcSet
public VkCopyDescriptorSet srcSet(long value)
Sets the specified value to thesrcSet()field.
-
srcBinding
public VkCopyDescriptorSet srcBinding(int value)
Sets the specified value to thesrcBinding()field.
-
srcArrayElement
public VkCopyDescriptorSet srcArrayElement(int value)
Sets the specified value to thesrcArrayElement()field.
-
dstSet
public VkCopyDescriptorSet dstSet(long value)
Sets the specified value to thedstSet()field.
-
dstBinding
public VkCopyDescriptorSet dstBinding(int value)
Sets the specified value to thedstBinding()field.
-
dstArrayElement
public VkCopyDescriptorSet dstArrayElement(int value)
Sets the specified value to thedstArrayElement()field.
-
descriptorCount
public VkCopyDescriptorSet descriptorCount(int value)
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
public VkCopyDescriptorSet set(VkCopyDescriptorSet src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkCopyDescriptorSet malloc()
Returns a newVkCopyDescriptorSetinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkCopyDescriptorSet calloc()
Returns a newVkCopyDescriptorSetinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkCopyDescriptorSet create()
Returns a newVkCopyDescriptorSetinstance allocated withBufferUtils.
-
create
public static VkCopyDescriptorSet create(long address)
Returns a newVkCopyDescriptorSetinstance for the specified memory address.
-
createSafe
@Nullable public static VkCopyDescriptorSet createSafe(long address)
-
malloc
public static VkCopyDescriptorSet.Buffer malloc(int capacity)
Returns a newVkCopyDescriptorSet.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkCopyDescriptorSet.Buffer calloc(int capacity)
Returns a newVkCopyDescriptorSet.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkCopyDescriptorSet.Buffer create(int capacity)
Returns a newVkCopyDescriptorSet.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkCopyDescriptorSet.Buffer create(long address, int capacity)
Create aVkCopyDescriptorSet.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkCopyDescriptorSet.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static VkCopyDescriptorSet mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkCopyDescriptorSet callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkCopyDescriptorSet mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkCopyDescriptorSet callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkCopyDescriptorSet.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkCopyDescriptorSet.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static VkCopyDescriptorSet.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkCopyDescriptorSet.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static VkCopyDescriptorSet malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkCopyDescriptorSetinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkCopyDescriptorSet calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkCopyDescriptorSetinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkCopyDescriptorSet.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkCopyDescriptorSet.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static VkCopyDescriptorSet.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkCopyDescriptorSet.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
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.
-
-