C Specification

The VkBindDescriptorSetsInfoKHR structure is defined as:

// Provided by VK_KHR_maintenance6
typedef struct VkBindDescriptorSetsInfoKHR {
    VkStructureType           sType;
    const void*               pNext;
    VkShaderStageFlags        stageFlags;
    VkPipelineLayout          layout;
    uint32_t                  firstSet;
    uint32_t                  descriptorSetCount;
    const VkDescriptorSet*    pDescriptorSets;
    uint32_t                  dynamicOffsetCount;
    const uint32_t*           pDynamicOffsets;
} VkBindDescriptorSetsInfoKHR;

Members

  • sType is a VkStructureType value identifying this structure.

  • pNext is NULL or a pointer to a structure extending this structure.

  • stageFlags is a bitmask of VkShaderStageFlagBits specifying the shader stages the descriptor sets will be bound to.

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

  • firstSet is the set number of the first descriptor set to be bound.

  • descriptorSetCount is the number of elements in the pDescriptorSets array.

  • pDescriptorSets is a pointer to an array of handles to VkDescriptorSet objects describing the descriptor sets to bind to.

  • dynamicOffsetCount is the number of dynamic offsets in the pDynamicOffsets array.

  • pDynamicOffsets is a pointer to an array of uint32_t values specifying dynamic offsets.

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 VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT | VK_SHADER_STAGE_COMPUTE_BIT is equivalent to calling the original version of this command once with VK_PIPELINE_BIND_POINT_GRAPHICS and once with VK_PIPELINE_BIND_POINT_COMPUTE.

Valid Usage
  • VUID-VkBindDescriptorSetsInfoKHR-pDescriptorSets-00358
    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

  • VUID-VkBindDescriptorSetsInfoKHR-dynamicOffsetCount-00359
    dynamicOffsetCount must be equal to the total number of dynamic descriptors in pDescriptorSets

  • VUID-VkBindDescriptorSetsInfoKHR-firstSet-00360
    The sum of firstSet and descriptorSetCount must be less than or equal to VkPipelineLayoutCreateInfo::setLayoutCount provided when layout was created

  • VUID-VkBindDescriptorSetsInfoKHR-pDynamicOffsets-01971
    Each element of pDynamicOffsets which corresponds to a descriptor binding with type VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC must be a multiple of VkPhysicalDeviceLimits::minUniformBufferOffsetAlignment

  • VUID-VkBindDescriptorSetsInfoKHR-pDynamicOffsets-01972
    Each element of pDynamicOffsets which corresponds to a descriptor binding with type VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC must be a multiple of VkPhysicalDeviceLimits::minStorageBufferOffsetAlignment

  • VUID-VkBindDescriptorSetsInfoKHR-pDescriptorSets-01979
    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

  • VUID-VkBindDescriptorSetsInfoKHR-pDescriptorSets-06715
    For each dynamic uniform or storage buffer binding in pDescriptorSets, if the range was set with VK_WHOLE_SIZE then pDynamicOffsets which corresponds to the descriptor binding must be 0

  • VUID-VkBindDescriptorSetsInfoKHR-pDescriptorSets-04616
    Each element of pDescriptorSets must not have been allocated from a VkDescriptorPool with the VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT flag set

  • VUID-VkBindDescriptorSetsInfoKHR-pDescriptorSets-06563
    If graphicsPipelineLibrary is not enabled, each element of pDescriptorSets must be a valid VkDescriptorSet

  • VUID-VkBindDescriptorSetsInfoKHR-pDescriptorSets-08010
    Each element of pDescriptorSets must have been allocated with a VkDescriptorSetLayout which was not created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT

Valid Usage (Implicit)
  • VUID-VkBindDescriptorSetsInfoKHR-sType-sType
    sType must be VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO_KHR

  • VUID-VkBindDescriptorSetsInfoKHR-pNext-pNext
    pNext must be NULL or a pointer to a valid instance of VkPipelineLayoutCreateInfo

  • VUID-VkBindDescriptorSetsInfoKHR-sType-unique
    The sType value of each struct in the pNext chain must be unique

  • VUID-VkBindDescriptorSetsInfoKHR-stageFlags-parameter
    stageFlags must be a valid combination of VkShaderStageFlagBits values

  • VUID-VkBindDescriptorSetsInfoKHR-stageFlags-requiredbitmask
    stageFlags must not be 0

  • VUID-VkBindDescriptorSetsInfoKHR-layout-parameter
    If layout is not VK_NULL_HANDLE, layout must be a valid VkPipelineLayout handle

  • VUID-VkBindDescriptorSetsInfoKHR-pDescriptorSets-parameter
    pDescriptorSets must be a valid pointer to an array of descriptorSetCount valid VkDescriptorSet handles

  • VUID-VkBindDescriptorSetsInfoKHR-pDynamicOffsets-parameter
    If dynamicOffsetCount is not 0, and pDynamicOffsets is not NULL, pDynamicOffsets must be a valid pointer to an array of dynamicOffsetCount or VK_NULL_HANDLE uint32_t values

  • VUID-VkBindDescriptorSetsInfoKHR-descriptorSetCount-arraylength
    descriptorSetCount must be greater than 0

  • VUID-VkBindDescriptorSetsInfoKHR-commonparent
    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

Document Notes

For more information, see the Vulkan Specification

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

Copyright 2014-2024 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0