VKCMDBINDDESCRIPTORS(3)

NAME
vkCmdBindDescriptorSets - Binds descriptor sets to a command buffer.

C SPECIFICATION

    void vkCmdBindDescriptorSets(
        VkCommandBuffer                             commandBuffer,
        VkPipelineBindPoint                         pipelineBindPoint,
        VkPipelineLayout                            layout,
        uint32_t                                    firstSet,
        uint32_t                                    descriptorSetCount,
        const VkDescriptorSet*                      pDescriptorSets,
        uint32_t                                    dynamicOffsetCount,
        const uint32_t*                             pDynamicOffsets);

PARAMETERS

commandBuffer
    The command buffer into which the command is to be placed.

pipelineBindPoint
    The pipeline bind point the descriptor sets should be bound to.

layout
    A handle to the layout used to create the descriptor sets.

firstSet
    The first descriptor set index of the pipeline bind point updated by the command.

descriptorSetCount
    The number of descriptor set index of the pipeline bind point updated by the command.

pDescriptorSets
    An array of descriptorSetCount number of descriptor set objects to bind.

dynamicOffsetCount
    The number of dynamic offsets to be applied to the descriptor sets.

pDynamicOffsets
    An array of dynamicOffsetCount number of offsets, each corresponding to a dynamic buffer descriptor in the specified descriptor sets.

DESCRIPTION

vkCmdBindDescriptorSets updates descriptorSetCount number of descriptor set bindings of the pipeline bind point specified by pipelineBindPoint starting from descriptor set index specified by firstSet. The parameter pDescriptorSets specifies an array of descriptorSetCount number of descriptor set objects to bind.

pDynamicOffsets provides dynamicOffsetCount number of offsets used for the dynamic buffer descriptors in the specified descriptor sets. Each offset corresponds to one dynamic buffer descriptor entry in the set index range. The order the offsets should be specified so that offsets corresponding to lower indexed sets appear before offsets corresponding to higher indexed sets, while offsets of the same set index should be specified so that offsets corresponding to lower indexed bindings appear before offsets corresponding to higher indexed bindings.

VALID USAGE

    • commandBuffer must be a valid VkCommandBuffer handle

    • pipelineBindPoint must be a valid VkPipelineBindPoint value

    • layout must be a valid VkPipelineLayout handle

    • pDescriptorSets must be a pointer to an array of descriptorSetCount valid VkDescriptorSet handles

    • If dynamicOffsetCount is not 0, pDynamicOffsets must be a pointer to an array of dynamicOffsetCount uint32_t values

    • commandBuffer must be in the recording state

    • The VkCommandPool that commandBuffer was allocated from must support graphics or compute operations

    • descriptorSetCount must be greater than 0

    • Each of commandBuffer, layout and the elements of pDescriptorSets must have been created, allocated or retrieved from the same VkDevice

    • Any given element of pDescriptorSets must have been created with a VkDescriptorSetLayout that matches (is the same as, or defined identically to) 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

    • pipelineBindPoint must be supported by the commandBuffer’s parent VkCommandPool’s queue family

    • Any given element of pDynamicOffsets must satisfy the required alignment for the corresponding descriptor binding’s descriptor type

HOST SYNCHRONIZATION

    • Host access to commandBuffer must be externally synchronized

COMMAND PROPERTIES
Command Buffer Levels | Render Pass Scope | Supported Queue Types
Primary Secondary | Both | GRAPHICS COMPUTE

SEE ALSO

vkAllocateDescriptorSets, vkFreeDescriptorSets, vkCreateDescriptorPool, vkCreateDescriptorSetLayout

COPYRIGHT

Copyright © 2014-2016 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.

AUTHOR

Khronos Group
    Author.