C Specification

To bind descriptor buffers to a command buffer, call:

// Provided by VK_EXT_descriptor_buffer
void vkCmdBindDescriptorBuffersEXT(
    VkCommandBuffer                             commandBuffer,
    uint32_t                                    bufferCount,
    const VkDescriptorBufferBindingInfoEXT*     pBindingInfos);

Parameters

  • commandBuffer is the command buffer that the descriptor buffers will be bound to.

  • bufferCount is the number of elements in the pBindingInfos array.

  • pBindingInfos is a pointer to an array of VkDescriptorBufferBindingInfoEXT structures.

Description

vkCmdBindDescriptorBuffersEXT causes any offsets previously set by vkCmdSetDescriptorBufferOffsetsEXT that use the bindings numbered [0.. bufferCount-1] to be no longer valid for subsequent bound pipeline commands. Any previously bound buffers at binding points greater than or equal to bufferCount are unbound.

Valid Usage
  • VUID-vkCmdBindDescriptorBuffersEXT-None-08047
    The descriptorBuffer feature must be enabled

  • VUID-vkCmdBindDescriptorBuffersEXT-maxSamplerDescriptorBufferBindings-08048
    There must be no more than VkPhysicalDeviceDescriptorBufferPropertiesEXT::maxSamplerDescriptorBufferBindings descriptor buffers containing sampler descriptor data bound

  • VUID-vkCmdBindDescriptorBuffersEXT-maxResourceDescriptorBufferBindings-08049
    There must be no more than VkPhysicalDeviceDescriptorBufferPropertiesEXT::maxResourceDescriptorBufferBindings descriptor buffers containing resource descriptor data bound

  • VUID-vkCmdBindDescriptorBuffersEXT-None-08050
    There must be no more than 1 descriptor buffer bound that was created with the VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT bit set

  • VUID-vkCmdBindDescriptorBuffersEXT-bufferCount-08051
    bufferCount must be less than or equal to VkPhysicalDeviceDescriptorBufferPropertiesEXT::maxDescriptorBufferBindings

  • VUID-vkCmdBindDescriptorBuffersEXT-pBindingInfos-08052
    For any element of pBindingInfos, if the buffer from which address was queried is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object

  • VUID-vkCmdBindDescriptorBuffersEXT-pBindingInfos-08053
    For any element of pBindingInfos, the buffer from which address was queried must have been created with the VK_BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT bit set if it contains sampler descriptor data

  • VUID-vkCmdBindDescriptorBuffersEXT-pBindingInfos-08054
    For any element of pBindingInfos, the buffer from which address was queried must have been created with the VK_BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT bit set if it contains resource descriptor data

  • VUID-vkCmdBindDescriptorBuffersEXT-pBindingInfos-08055
    For any element of pBindingInfos, usage must match the buffer from which address was queried

Valid Usage (Implicit)
  • VUID-vkCmdBindDescriptorBuffersEXT-commandBuffer-parameter
    commandBuffer must be a valid VkCommandBuffer handle

  • VUID-vkCmdBindDescriptorBuffersEXT-pBindingInfos-parameter
    pBindingInfos must be a valid pointer to an array of bufferCount valid VkDescriptorBufferBindingInfoEXT structures

  • VUID-vkCmdBindDescriptorBuffersEXT-commandBuffer-recording
    commandBuffer must be in the recording state

  • VUID-vkCmdBindDescriptorBuffersEXT-commandBuffer-cmdpool
    The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations

  • VUID-vkCmdBindDescriptorBuffersEXT-videocoding
    This command must only be called outside of a video coding scope

  • VUID-vkCmdBindDescriptorBuffersEXT-bufferCount-arraylength
    bufferCount must be greater than 0

Host Synchronization
  • Host access to commandBuffer must be externally synchronized

  • Host access to the VkCommandPool that commandBuffer was allocated from must be externally synchronized

Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type

Primary
Secondary

Both

Outside

Graphics
Compute

State

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