Class VkCopyDescriptorSet

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkCopyDescriptorSet>
org.lwjgl.vulkan.VkCopyDescriptorSet
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class VkCopyDescriptorSet extends org.lwjgl.system.Struct<VkCopyDescriptorSet> implements org.lwjgl.system.NativeResource
Structure specifying a copy descriptor set operation.
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
Valid Usage (Implicit)
  • sType must be STRUCTURE_TYPE_COPY_DESCRIPTOR_SET
  • pNext must be NULL
  • srcSet must be a valid VkDescriptorSet handle
  • dstSet must be a valid VkDescriptorSet handle
  • Both of dstSet, and srcSet must have been created, allocated, or retrieved from the same VkDevice
See Also

UpdateDescriptorSets

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();
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • STYPE

      public static final int STYPE
      The struct member offsets.
    • PNEXT

      public static final int PNEXT
      The struct member offsets.
    • SRCSET

      public static final int SRCSET
      The struct member offsets.
    • SRCBINDING

      public static final int SRCBINDING
      The struct member offsets.
    • SRCARRAYELEMENT

      public static final int SRCARRAYELEMENT
      The struct member offsets.
    • DSTSET

      public static final int DSTSET
      The struct member offsets.
    • DSTBINDING

      public static final int DSTBINDING
      The struct member offsets.
    • DSTARRAYELEMENT

      public static final int DSTARRAYELEMENT
      The struct member offsets.
    • DESCRIPTORCOUNT

      public static final int DESCRIPTORCOUNT
      The struct member offsets.
  • Constructor Details

    • VkCopyDescriptorSet

      public VkCopyDescriptorSet(ByteBuffer container)
      Creates a VkCopyDescriptorSet instance at the current position of the specified ByteBuffer 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()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<VkCopyDescriptorSet>
    • sType

      public int sType()
      a VkStructureType value identifying this structure.
    • pNext

      public long pNext()
      NULL or a pointer to a structure extending this structure.
    • srcSet

      public long srcSet()
      srcSet, srcBinding, and srcArrayElement are the source set, binding, and array element, respectively. If the descriptor binding identified by srcSet and srcBinding has a descriptor type of DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK then srcArrayElement specifies the starting byte offset within the binding to copy from.
    • srcBinding

      public int srcBinding()
      see srcSet
    • srcArrayElement

      public int srcArrayElement()
      see srcSet
    • dstSet

      public long dstSet()
      dstSet, dstBinding, and dstArrayElement are the destination set, binding, and array element, respectively. If the descriptor binding identified by dstSet and dstBinding has a descriptor type of DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK then dstArrayElement specifies the starting byte offset within the binding to copy to.
    • dstBinding

      public int dstBinding()
      see dstSet
    • dstArrayElement

      public int dstArrayElement()
      see dstSet
    • descriptorCount

      public int descriptorCount()
      the number of descriptors to copy from the source to destination. If descriptorCount is greater than the number of remaining array elements in the source or destination binding, those affect consecutive bindings in a manner similar to VkWriteDescriptorSet above. If the descriptor binding identified by srcSet and srcBinding has a descriptor type of DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK then descriptorCount 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

      public VkCopyDescriptorSet sType(int value)
      Sets the specified value to the sType() field.
    • sType$Default

      public VkCopyDescriptorSet sType$Default()
      Sets the STRUCTURE_TYPE_COPY_DESCRIPTOR_SET value to the sType() field.
    • pNext

      public VkCopyDescriptorSet pNext(long value)
      Sets the specified value to the pNext() field.
    • srcSet

      public VkCopyDescriptorSet srcSet(long value)
      Sets the specified value to the srcSet() field.
    • srcBinding

      public VkCopyDescriptorSet srcBinding(int value)
      Sets the specified value to the srcBinding() field.
    • srcArrayElement

      public VkCopyDescriptorSet srcArrayElement(int value)
      Sets the specified value to the srcArrayElement() field.
    • dstSet

      public VkCopyDescriptorSet dstSet(long value)
      Sets the specified value to the dstSet() field.
    • dstBinding

      public VkCopyDescriptorSet dstBinding(int value)
      Sets the specified value to the dstBinding() field.
    • dstArrayElement

      public VkCopyDescriptorSet dstArrayElement(int value)
      Sets the specified value to the dstArrayElement() field.
    • descriptorCount

      public VkCopyDescriptorSet descriptorCount(int value)
      Sets the specified value to the descriptorCount() 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

      public static VkCopyDescriptorSet malloc()
      Returns a new VkCopyDescriptorSet instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static VkCopyDescriptorSet calloc()
      Returns a new VkCopyDescriptorSet instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static VkCopyDescriptorSet create()
      Returns a new VkCopyDescriptorSet instance allocated with BufferUtils.
    • create

      public static VkCopyDescriptorSet create(long address)
      Returns a new VkCopyDescriptorSet instance for the specified memory address.
    • createSafe

      public static @Nullable VkCopyDescriptorSet createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static VkCopyDescriptorSet.Buffer malloc(int capacity)
      Returns a new VkCopyDescriptorSet.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static VkCopyDescriptorSet.Buffer calloc(int capacity)
      Returns a new VkCopyDescriptorSet.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static VkCopyDescriptorSet.Buffer create(int capacity)
      Returns a new VkCopyDescriptorSet.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static VkCopyDescriptorSet.Buffer create(long address, int capacity)
      Create a VkCopyDescriptorSet.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable VkCopyDescriptorSet.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • mallocStack

      @Deprecated public static VkCopyDescriptorSet mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static VkCopyDescriptorSet callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static VkCopyDescriptorSet mallocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static VkCopyDescriptorSet callocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static VkCopyDescriptorSet.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static VkCopyDescriptorSet.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(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. Use malloc(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. Use calloc(int, MemoryStack) instead.
    • malloc

      public static VkCopyDescriptorSet malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new VkCopyDescriptorSet instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static VkCopyDescriptorSet calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new VkCopyDescriptorSet instance allocated on the specified MemoryStack and 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 new VkCopyDescriptorSet.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static VkCopyDescriptorSet.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new VkCopyDescriptorSet.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nsType

      public static int nsType(long struct)
      Unsafe version of sType().
    • npNext

      public static long npNext(long struct)
      Unsafe version of pNext().
    • nsrcSet

      public static long nsrcSet(long struct)
      Unsafe version of srcSet().
    • nsrcBinding

      public static int nsrcBinding(long struct)
      Unsafe version of srcBinding().
    • nsrcArrayElement

      public static int nsrcArrayElement(long struct)
      Unsafe version of srcArrayElement().
    • ndstSet

      public static long ndstSet(long struct)
      Unsafe version of dstSet().
    • ndstBinding

      public static int ndstBinding(long struct)
      Unsafe version of dstBinding().
    • ndstArrayElement

      public static int ndstArrayElement(long struct)
      Unsafe version of dstArrayElement().
    • ndescriptorCount

      public static int ndescriptorCount(long struct)
      Unsafe version of descriptorCount().
    • nsType

      public static void nsType(long struct, int value)
      Unsafe version of sType.
    • npNext

      public static void npNext(long struct, long value)
      Unsafe version of pNext.
    • nsrcSet

      public static void nsrcSet(long struct, long value)
      Unsafe version of srcSet.
    • nsrcBinding

      public static void nsrcBinding(long struct, int value)
      Unsafe version of srcBinding.
    • nsrcArrayElement

      public static void nsrcArrayElement(long struct, int value)
      Unsafe version of srcArrayElement.
    • ndstSet

      public static void ndstSet(long struct, long value)
      Unsafe version of dstSet.
    • ndstBinding

      public static void ndstBinding(long struct, int value)
      Unsafe version of dstBinding.
    • ndstArrayElement

      public static void ndstArrayElement(long struct, int value)
      Unsafe version of dstArrayElement.
    • ndescriptorCount

      public static void ndescriptorCount(long struct, int value)
      Unsafe version of descriptorCount.