Class VkBindDescriptorSetsInfo

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkBindDescriptorSetsInfo>
org.lwjgl.vulkan.VkBindDescriptorSetsInfo
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer
Direct Known Subclasses:
VkBindDescriptorSetsInfoKHR

public class VkBindDescriptorSetsInfo extends org.lwjgl.system.Struct<VkBindDescriptorSetsInfo> implements org.lwjgl.system.NativeResource
Structure specifying a descriptor set binding operation.
Description

If stageFlags specifies a subset of all stages corresponding to one or more pipeline bind points, the binding operation still affects all stages corresponding to the given pipeline bind point(s) as if the equivalent original version of this command had been called with the same parameters. For example, specifying a stageFlags value of SHADER_STAGE_VERTEX_BIT | SHADER_STAGE_FRAGMENT_BIT | SHADER_STAGE_COMPUTE_BIT is equivalent to calling the original version of this command once with PIPELINE_BIND_POINT_GRAPHICS and once with PIPELINE_BIND_POINT_COMPUTE.

Valid Usage
  • Each element of pDescriptorSets must have been allocated with a VkDescriptorSetLayout that matches (is the same as, or identically defined as) the VkDescriptorSetLayout at set n in layout, where n is the sum of firstSet and the index into pDescriptorSets
  • dynamicOffsetCount must be equal to the total number of dynamic descriptors in pDescriptorSets
  • The sum of firstSet and descriptorSetCount must be less than or equal to VkPipelineLayoutCreateInfo::setLayoutCount provided when layout was created
  • Each element of pDynamicOffsets which corresponds to a descriptor binding with type DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC must be a multiple of VkPhysicalDeviceLimits::minUniformBufferOffsetAlignment
  • Each element of pDynamicOffsets which corresponds to a descriptor binding with type DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC must be a multiple of VkPhysicalDeviceLimits::minStorageBufferOffsetAlignment
  • For each dynamic uniform or storage buffer binding in pDescriptorSets, the sum of the effective offset and the range of the binding must be less than or equal to the size of the buffer
  • For each dynamic uniform or storage buffer binding in pDescriptorSets, if the range was set with WHOLE_SIZE then pDynamicOffsets which corresponds to the descriptor binding must be 0
  • Each element of pDescriptorSets must not have been allocated from a VkDescriptorPool with the DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT flag set
  • If the graphicsPipelineLibrary feature is not enabled, each element of pDescriptorSets must be a valid VkDescriptorSet
  • Each element of pDescriptorSets must have been allocated with a VkDescriptorSetLayout which was not created with DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT
Valid Usage (Implicit)
  • sType must be STRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO
  • pNext must be NULL or a pointer to a valid instance of VkPipelineLayoutCreateInfo
  • The sType value of each struct in the pNext chain must be unique
  • stageFlags must be a valid combination of VkShaderStageFlagBits values
  • stageFlags must not be 0
  • If layout is not NULL_HANDLE, layout must be a valid VkPipelineLayout handle
  • pDescriptorSets must be a valid pointer to an array of descriptorSetCount valid VkDescriptorSet handles
  • If dynamicOffsetCount is not 0, and pDynamicOffsets is not NULL, pDynamicOffsets must be a valid pointer to an array of dynamicOffsetCount or NULL_HANDLE uint32_t values
  • descriptorSetCount must be greater than 0
  • Both of layout, and the elements of pDescriptorSets that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice
See Also

CmdBindDescriptorSets2, CmdBindDescriptorSets2KHR

Layout


 struct VkBindDescriptorSetsInfo {
     VkStructureType sType();
     void const * pNext();
     VkShaderStageFlags stageFlags();
     VkPipelineLayout layout();
     uint32_t firstSet();
     uint32_t descriptorSetCount();
     VkDescriptorSet const * pDescriptorSets();
     uint32_t dynamicOffsetCount();
     uint32_t const * pDynamicOffsets();
 }
  • 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.
    • STAGEFLAGS

      public static final int STAGEFLAGS
      The struct member offsets.
    • LAYOUT

      public static final int LAYOUT
      The struct member offsets.
    • FIRSTSET

      public static final int FIRSTSET
      The struct member offsets.
    • DESCRIPTORSETCOUNT

      public static final int DESCRIPTORSETCOUNT
      The struct member offsets.
    • PDESCRIPTORSETS

      public static final int PDESCRIPTORSETS
      The struct member offsets.
    • DYNAMICOFFSETCOUNT

      public static final int DYNAMICOFFSETCOUNT
      The struct member offsets.
    • PDYNAMICOFFSETS

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

    • VkBindDescriptorSetsInfo

      public VkBindDescriptorSetsInfo(ByteBuffer container)
      Creates a VkBindDescriptorSetsInfo 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<VkBindDescriptorSetsInfo>
    • sType

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

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

      public int stageFlags()
      a bitmask of VkShaderStageFlagBits specifying the shader stages the descriptor sets will be bound to.
    • layout

      public long layout()
      a VkPipelineLayout object used to program the bindings. If the dynamicPipelineLayout feature is enabled, layout can be NULL_HANDLE and the layout must be specified by chaining the VkPipelineLayoutCreateInfo structure off the pNext
    • firstSet

      public int firstSet()
      the set number of the first descriptor set to be bound.
    • descriptorSetCount

      public int descriptorSetCount()
      the number of elements in the pDescriptorSets array.
    • pDescriptorSets

      public LongBuffer pDescriptorSets()
      a pointer to an array of handles to VkDescriptorSet objects describing the descriptor sets to bind to.
    • dynamicOffsetCount

      public int dynamicOffsetCount()
      the number of dynamic offsets in the pDynamicOffsets array.
    • pDynamicOffsets

      public @Nullable IntBuffer pDynamicOffsets()
      a pointer to an array of uint32_t values specifying dynamic offsets.
    • sType

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

      public VkBindDescriptorSetsInfo sType$Default()
    • pNext

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

      Prepends the specified VkPipelineLayoutCreateInfo value to the pNext chain.
    • stageFlags

      public VkBindDescriptorSetsInfo stageFlags(int value)
      Sets the specified value to the stageFlags() field.
    • layout

      public VkBindDescriptorSetsInfo layout(long value)
      Sets the specified value to the layout() field.
    • firstSet

      public VkBindDescriptorSetsInfo firstSet(int value)
      Sets the specified value to the firstSet() field.
    • pDescriptorSets

      public VkBindDescriptorSetsInfo pDescriptorSets(LongBuffer value)
      Sets the address of the specified LongBuffer to the pDescriptorSets() field.
    • dynamicOffsetCount

      public VkBindDescriptorSetsInfo dynamicOffsetCount(int value)
      Sets the specified value to the dynamicOffsetCount() field.
    • pDynamicOffsets

      public VkBindDescriptorSetsInfo pDynamicOffsets(@Nullable IntBuffer value)
      Sets the address of the specified IntBuffer to the pDynamicOffsets() field.
    • set

      public VkBindDescriptorSetsInfo set(int sType, long pNext, int stageFlags, long layout, int firstSet, LongBuffer pDescriptorSets, int dynamicOffsetCount, @Nullable IntBuffer pDynamicOffsets)
      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 VkBindDescriptorSetsInfo malloc()
      Returns a new VkBindDescriptorSetsInfo instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

      public static VkBindDescriptorSetsInfo calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new VkBindDescriptorSetsInfo instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

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

      public static VkBindDescriptorSetsInfo.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new VkBindDescriptorSetsInfo.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().
    • nstageFlags

      public static int nstageFlags(long struct)
      Unsafe version of stageFlags().
    • nlayout

      public static long nlayout(long struct)
      Unsafe version of layout().
    • nfirstSet

      public static int nfirstSet(long struct)
      Unsafe version of firstSet().
    • ndescriptorSetCount

      public static int ndescriptorSetCount(long struct)
      Unsafe version of descriptorSetCount().
    • npDescriptorSets

      public static LongBuffer npDescriptorSets(long struct)
      Unsafe version of pDescriptorSets.
    • ndynamicOffsetCount

      public static int ndynamicOffsetCount(long struct)
      Unsafe version of dynamicOffsetCount().
    • npDynamicOffsets

      public static @Nullable IntBuffer npDynamicOffsets(long struct)
      Unsafe version of pDynamicOffsets.
    • 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.
    • nstageFlags

      public static void nstageFlags(long struct, int value)
      Unsafe version of stageFlags.
    • nlayout

      public static void nlayout(long struct, long value)
      Unsafe version of layout.
    • nfirstSet

      public static void nfirstSet(long struct, int value)
      Unsafe version of firstSet.
    • ndescriptorSetCount

      public static void ndescriptorSetCount(long struct, int value)
      Sets the specified value to the descriptorSetCount field of the specified struct.
    • npDescriptorSets

      public static void npDescriptorSets(long struct, LongBuffer value)
      Unsafe version of pDescriptorSets.
    • ndynamicOffsetCount

      public static void ndynamicOffsetCount(long struct, int value)
      Sets the specified value to the dynamicOffsetCount field of the specified struct.
    • npDynamicOffsets

      public static void npDynamicOffsets(long struct, @Nullable IntBuffer value)
      Unsafe version of pDynamicOffsets.
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate