Descriptor Buffers

If the descriptorBuffer feature is enabled, an alternative way to specify descriptor sets is via buffers, rather than descriptor set objects.

Putting Descriptors in Memory

Commands are provided to retrieve descriptor data, and also to locate where in memory that data must be written to match the given descriptor set layout.

To determine the amount of memory needed to store all descriptors with a given layout, call:

This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.
// Provided by VK_EXT_descriptor_buffer
void vkGetDescriptorSetLayoutSizeEXT(
    VkDevice                                    device,
    VkDescriptorSetLayout                       layout,
    VkDeviceSize*                               pLayoutSizeInBytes);
  • device is the logical device that gets the size.

  • layout is the descriptor set layout being queried.

  • pLayoutSizeInBytes is a pointer to VkDeviceSize where the size in bytes will be written.

The size of a descriptor set layout will be at least as large as the sum total of the size of all descriptors in the layout, and may be larger. This size represents the amount of memory that will be required to store all of the descriptors for this layout in memory, when placed according to the layout’s offsets as obtained by vkGetDescriptorSetLayoutBindingOffsetEXT.

If any binding in layout is VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT, the returned size includes space for the maximum descriptorCount descriptors as declared for that binding. To compute the required size of a descriptor set with a VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT:

size = offset + descriptorSize × variableDescriptorCount

where offset is obtained by vkGetDescriptorSetLayoutBindingOffsetEXT and descriptorSize is the size of the relevant descriptor as obtained from VkPhysicalDeviceDescriptorBufferPropertiesEXT, and variableDescriptorCount is the equivalent of VkDescriptorSetVariableDescriptorCountAllocateInfo::pDescriptorCounts. For VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, variableDescriptorCount is the size in bytes for the inline uniform block, and descriptorSize is 1.

If VkPhysicalDeviceDescriptorBufferPropertiesEXT::combinedImageSamplerDescriptorSingleArray is VK_FALSE and the variable descriptor type is VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, variableDescriptorCount is always considered to be the upper bound.

Valid Usage
Valid Usage (Implicit)
  • VUID-vkGetDescriptorSetLayoutSizeEXT-device-parameter
    device must be a valid VkDevice handle

  • VUID-vkGetDescriptorSetLayoutSizeEXT-layout-parameter
    layout must be a valid VkDescriptorSetLayout handle

  • VUID-vkGetDescriptorSetLayoutSizeEXT-pLayoutSizeInBytes-parameter
    pLayoutSizeInBytes must be a valid pointer to a VkDeviceSize value

  • VUID-vkGetDescriptorSetLayoutSizeEXT-layout-parent
    layout must have been created, allocated, or retrieved from device

To get the offset of a binding within a descriptor set layout in memory, call:

This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.
// Provided by VK_EXT_descriptor_buffer
void vkGetDescriptorSetLayoutBindingOffsetEXT(
    VkDevice                                    device,
    VkDescriptorSetLayout                       layout,
    uint32_t                                    binding,
    VkDeviceSize*                               pOffset);
  • device is the logical device that gets the offset.

  • layout is the descriptor set layout being queried.

  • binding is the binding number being queried.

  • pOffset is a pointer to VkDeviceSize where the byte offset of the binding will be written.

Each binding in a descriptor set layout is assigned an offset in memory by the implementation. When a shader accesses a resource with that binding, it will access the bound descriptor buffer from that offset to look for its descriptor. This command provides an application with that offset, so that descriptors can be placed in the correct locations. The precise location accessed by a shader for a given descriptor is as follows:

location = bufferAddress + setOffset + descriptorOffset + (arrayElement × descriptorSize)

where bufferAddress and setOffset are the base address and offset for the identified descriptor set as specified by vkCmdBindDescriptorBuffersEXT and vkCmdSetDescriptorBufferOffsetsEXT, descriptorOffset is the offset for the binding returned by this command, arrayElement is the index into the array specified in the shader, and descriptorSize is the size of the relevant descriptor as obtained from VkPhysicalDeviceDescriptorBufferPropertiesEXT. Applications are responsible for placing valid descriptors at the expected location in order for a shader to access it. The overall offset added to bufferAddress to calculate location must be less than VkPhysicalDeviceDescriptorBufferPropertiesEXT::maxSamplerDescriptorBufferRange for samplers and VkPhysicalDeviceDescriptorBufferPropertiesEXT::maxResourceDescriptorBufferRange for resources.

If any binding in layout is VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT, that binding must have the largest offset of any binding.

A descriptor binding with type VK_DESCRIPTOR_TYPE_MUTABLE_EXT can be used. Any potential types in VkMutableDescriptorTypeCreateInfoEXT::pDescriptorTypes for binding share the same offset. If the size of the mutable descriptor is larger than the size of a concrete descriptor type being accessed, the padding area is ignored by the implementation.

Valid Usage
Valid Usage (Implicit)
  • VUID-vkGetDescriptorSetLayoutBindingOffsetEXT-device-parameter
    device must be a valid VkDevice handle

  • VUID-vkGetDescriptorSetLayoutBindingOffsetEXT-layout-parameter
    layout must be a valid VkDescriptorSetLayout handle

  • VUID-vkGetDescriptorSetLayoutBindingOffsetEXT-pOffset-parameter
    pOffset must be a valid pointer to a VkDeviceSize value

  • VUID-vkGetDescriptorSetLayoutBindingOffsetEXT-layout-parent
    layout must have been created, allocated, or retrieved from device

To get descriptor data to place in a buffer, call:

This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.
// Provided by VK_EXT_descriptor_buffer
void vkGetDescriptorEXT(
    VkDevice                                    device,
    const VkDescriptorGetInfoEXT*               pDescriptorInfo,
    size_t                                      dataSize,
    void*                                       pDescriptor);
  • device is the logical device that gets the descriptor.

  • pDescriptorInfo is a pointer to a VkDescriptorGetInfoEXT structure specifying the parameters of the descriptor to get.

  • dataSize is the amount of the descriptor data to get in bytes.

  • pDescriptor is a pointer to an application-allocated buffer where the descriptor will be written.

The size of the data for each descriptor type is determined by the value in VkPhysicalDeviceDescriptorBufferPropertiesEXT. This value also defines the stride in bytes for arrays of that descriptor type.

If the VkPhysicalDeviceDescriptorBufferPropertiesEXT::combinedImageSamplerDescriptorSingleArray property is VK_FALSE the implementation requires an array of VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER descriptors to be written into a descriptor buffer as an array of image descriptors, immediately followed by an array of sampler descriptors. Applications must write the first VkPhysicalDeviceDescriptorBufferPropertiesEXT::sampledImageDescriptorSize bytes of the data returned through pDescriptor to the first array, and the remaining VkPhysicalDeviceDescriptorBufferPropertiesEXT::samplerDescriptorSize bytes of the data to the second array. For variable-sized descriptor bindings of VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER descriptors, the two arrays each have a size equal to the upper bound descriptorCount of that binding.

A descriptor obtained by this command references the underlying VkImageView or VkSampler, and these objects must not be destroyed before the last time a descriptor is dynamically accessed. For descriptor types which consume an address instead of an object, the underlying VkBuffer is referenced instead.

Valid Usage
Valid Usage (Implicit)
  • VUID-vkGetDescriptorEXT-device-parameter
    device must be a valid VkDevice handle

  • VUID-vkGetDescriptorEXT-pDescriptorInfo-parameter
    pDescriptorInfo must be a valid pointer to a valid VkDescriptorGetInfoEXT structure

  • VUID-vkGetDescriptorEXT-pDescriptor-parameter
    pDescriptor must be a valid pointer to an array of dataSize bytes

  • VUID-vkGetDescriptorEXT-dataSize-arraylength
    dataSize must be greater than 0

Information about the descriptor to get is passed in a VkDescriptorGetInfoEXT structure:

This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.
// Provided by VK_EXT_descriptor_buffer
typedef struct VkDescriptorGetInfoEXT {
    VkStructureType        sType;
    const void*            pNext;
    VkDescriptorType       type;
    VkDescriptorDataEXT    data;
} VkDescriptorGetInfoEXT;
  • sType is a VkStructureType value identifying this structure.

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

  • type is the type of descriptor to get.

  • data is a VkDescriptorDataEXT union containing the information needed to get the descriptor.

Valid Usage
Valid Usage (Implicit)

Data describing the descriptor is passed in a VkDescriptorDataEXT structure:

This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.
// Provided by VK_EXT_descriptor_buffer
typedef union VkDescriptorDataEXT {
    const VkSampler*                     pSampler;
    const VkDescriptorImageInfo*         pCombinedImageSampler;
    const VkDescriptorImageInfo*         pInputAttachmentImage;
    const VkDescriptorImageInfo*         pSampledImage;
    const VkDescriptorImageInfo*         pStorageImage;
    const VkDescriptorAddressInfoEXT*    pUniformTexelBuffer;
    const VkDescriptorAddressInfoEXT*    pStorageTexelBuffer;
    const VkDescriptorAddressInfoEXT*    pUniformBuffer;
    const VkDescriptorAddressInfoEXT*    pStorageBuffer;
    VkDeviceAddress                      accelerationStructure;
} VkDescriptorDataEXT;

If the nullDescriptor feature is enabled, pSampledImage, pStorageImage, pUniformTexelBuffer, pStorageTexelBuffer, pUniformBuffer, and pStorageBuffer can each be NULL. Loads from a null descriptor return zero values and stores and atomics to a null descriptor are discarded.

If the nullDescriptor feature is enabled, accelerationStructure can be 0. A null acceleration structure descriptor results in the miss shader being invoked.

Valid Usage
This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.
// Provided by VK_EXT_descriptor_buffer
typedef struct VkDescriptorAddressInfoEXT {
    VkStructureType    sType;
    void*              pNext;
    VkDeviceAddress    address;
    VkDeviceSize       range;
    VkFormat           format;
} VkDescriptorAddressInfoEXT;
  • sType is a VkStructureType value identifying this structure.

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

  • address is either 0 or a device address at an offset in a buffer, where the base address can be queried from vkGetBufferDeviceAddress.

  • range is the size in bytes of the buffer or buffer view used by the descriptor.

  • format is the format of the data elements in the buffer view and is ignored for buffers.

Valid Usage
Valid Usage (Implicit)
  • VUID-VkDescriptorAddressInfoEXT-sType-sType
    sType must be VK_STRUCTURE_TYPE_DESCRIPTOR_ADDRESS_INFO_EXT

  • VUID-VkDescriptorAddressInfoEXT-pNext-pNext
    pNext must be NULL

  • VUID-VkDescriptorAddressInfoEXT-address-parameter
    If address is not 0, address must be a valid VkDeviceAddress value

  • VUID-VkDescriptorAddressInfoEXT-format-parameter
    format must be a valid VkFormat value

If the nullDescriptor feature is enabled, address can be zero. Loads from a null descriptor return zero values and stores and atomics to a null descriptor are discarded.

Immutable samplers specified in a descriptor set layout through pImmutableSamplers must be provided by applications when obtaining descriptor data. Immutable samplers written in a descriptor buffer must have identical parameters to the immutable samplers in the descriptor set layout that consumes the sampler.

If the descriptor set layout was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT, there is no buffer backing for the immutable sampler, so this requirement does not exist. The implementation handles allocation of these descriptors internally.

As descriptors are now in regular memory, drivers cannot hide copies of immutable samplers that end up in descriptor sets from the application. As such, applications are required to provide these samplers as if they were not provided immutably.

The VkDescriptorGetTensorInfoARM is defined as:

// Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors
typedef struct VkDescriptorGetTensorInfoARM {
    VkStructureType    sType;
    const void*        pNext;
    VkTensorViewARM    tensorView;
} VkDescriptorGetTensorInfoARM;
Valid Usage
  • VUID-VkDescriptorGetTensorInfoARM-nullDescriptor-09899
    If the nullDescriptor feature is not enabled, tensorView must not be VK_NULL_HANDLE

Valid Usage (Implicit)

Binding Descriptor Buffers

Descriptor buffers have their own separate binding point on the command buffer, with buffers bound using vkCmdBindDescriptorBuffersEXT. vkCmdSetDescriptorBufferOffsetsEXT assigns pairs of buffer binding indices and buffer offsets to the same binding point on the command buffer as vkCmdBindDescriptorSets, allowing subsequent bound pipeline commands to use the specified descriptor buffers. Bindings applied via vkCmdBindDescriptorSets cannot exist simultaneously with those applied via calls to vkCmdSetDescriptorBufferOffsetsEXT or vkCmdBindDescriptorBufferEmbeddedSamplersEXT, as calls to vkCmdSetDescriptorBufferOffsetsEXT or vkCmdBindDescriptorBufferEmbeddedSamplersEXT invalidate any bindings by previous calls to vkCmdBindDescriptorSets and vice-versa.

To bind descriptor buffers to a command buffer, call:

This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.
// Provided by VK_EXT_descriptor_buffer
void vkCmdBindDescriptorBuffersEXT(
    VkCommandBuffer                             commandBuffer,
    uint32_t                                    bufferCount,
    const VkDescriptorBufferBindingInfoEXT*     pBindingInfos);
  • 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.

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
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 VK_QUEUE_COMPUTE_BIT, VK_QUEUE_DATA_GRAPH_BIT_ARM, or VK_QUEUE_GRAPHICS_BIT 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

VK_QUEUE_COMPUTE_BIT
VK_QUEUE_DATA_GRAPH_BIT_ARM
VK_QUEUE_GRAPHICS_BIT

State

Conditional Rendering

vkCmdBindDescriptorBuffersEXT is not affected by conditional rendering

Data describing a descriptor buffer binding is passed in a VkDescriptorBufferBindingInfoEXT structure:

This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.
// Provided by VK_EXT_descriptor_buffer
typedef struct VkDescriptorBufferBindingInfoEXT {
    VkStructureType       sType;
    const void*           pNext;
    VkDeviceAddress       address;
    VkBufferUsageFlags    usage;
} VkDescriptorBufferBindingInfoEXT;

If the pNext chain includes a VkBufferUsageFlags2CreateInfo structure, VkBufferUsageFlags2CreateInfo::usage from that structure is used instead of usage from this structure.

Valid Usage
Valid Usage (Implicit)

When the VkPhysicalDeviceDescriptorBufferPropertiesEXT::bufferlessPushDescriptors property is VK_FALSE, the VkBuffer handle of the buffer for push descriptors is passed in a VkDescriptorBufferBindingPushDescriptorBufferHandleEXT structure:

This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.
// Provided by VK_EXT_descriptor_buffer
typedef struct VkDescriptorBufferBindingPushDescriptorBufferHandleEXT {
    VkStructureType    sType;
    const void*        pNext;
    VkBuffer           buffer;
} VkDescriptorBufferBindingPushDescriptorBufferHandleEXT;
  • sType is a VkStructureType value identifying this structure.

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

  • buffer is the VkBuffer handle of the buffer for push descriptors.

Valid Usage
Valid Usage (Implicit)

To set descriptor buffer offsets in a command buffer, call:

This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.
// Provided by VK_EXT_descriptor_buffer
void vkCmdSetDescriptorBufferOffsetsEXT(
    VkCommandBuffer                             commandBuffer,
    VkPipelineBindPoint                         pipelineBindPoint,
    VkPipelineLayout                            layout,
    uint32_t                                    firstSet,
    uint32_t                                    setCount,
    const uint32_t*                             pBufferIndices,
    const VkDeviceSize*                         pOffsets);
  • commandBuffer is the command buffer in which the descriptor buffer offsets will be set.

  • pipelineBindPoint is a VkPipelineBindPoint indicating the type of the pipeline that will use the descriptors.

  • layout is a VkPipelineLayout object used to program the bindings.

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

  • setCount is the number of elements in the pBufferIndices and pOffsets arrays.

  • pBufferIndices is a pointer to an array of indices into the descriptor buffer binding points set by vkCmdBindDescriptorBuffersEXT.

  • pOffsets is a pointer to an array of VkDeviceSize offsets to apply to the bound descriptor buffers.

vkCmdSetDescriptorBufferOffsetsEXT binds setCount pairs of descriptor buffers, specified by indices into the binding points bound using vkCmdBindDescriptorBuffersEXT, and buffer offsets to set numbers [firstSet..firstSet+setCount-1] for subsequent bound pipeline commands set by pipelineBindPoint. Set [firstSet + i] is bound to the descriptor buffer at binding pBufferIndices[i] at an offset of pOffsets[i]. Any bindings that were previously applied via these sets, or calls to vkCmdBindDescriptorSets, are no longer valid. Other sets will also be invalidated upon calling this command if layout differs from the pipeline layout used to bind those other sets, as described in Pipeline Layout Compatibility.

After binding descriptors, applications can modify descriptor memory either by performing writes on the host or with device commands. When descriptor memory is updated with device commands, visibility for the shader stage accessing a descriptor is ensured with the VK_ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT_EXT access flag. Implementations must not access resources referenced by these descriptors unless they are dynamically accessed by shaders. Descriptors bound with this call can be undefined if they are not dynamically accessed by shaders.

Implementations may read descriptor data for any statically accessed descriptor if the binding in layout is not declared with the VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT flag. If the binding in layout is declared with VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT, implementations must not read descriptor data that is not dynamically accessed.

Applications must ensure that any descriptor which the implementation may read must be in-bounds of the underlying descriptor buffer binding.

Applications can freely decide how large a variable descriptor buffer binding is, so it may not be safe to read such descriptor payloads statically. The intention of these rules is to allow implementations to speculatively prefetch descriptor payloads where feasible.

Dynamically accessing a resource through descriptor data from an unbound region of a sparse partially-resident buffer will result in invalid descriptor data being read, and therefore undefined behavior.

For descriptors written by the host, visibility is implied through the automatic visibility operation on queue submit, and there is no need to consider VK_ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT. Explicit synchronization for descriptors is only required when descriptors are updated on the device.

The requirements above imply that all descriptor bindings have been defined with the equivalent of VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT, VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT and VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT, but enabling those features is not required to get this behavior.

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

  • VUID-vkCmdSetDescriptorBufferOffsetsEXT-pipelineBindPoint-parameter
    pipelineBindPoint must be a valid VkPipelineBindPoint value

  • VUID-vkCmdSetDescriptorBufferOffsetsEXT-layout-parameter
    layout must be a valid VkPipelineLayout handle

  • VUID-vkCmdSetDescriptorBufferOffsetsEXT-pBufferIndices-parameter
    pBufferIndices must be a valid pointer to an array of setCount uint32_t values

  • VUID-vkCmdSetDescriptorBufferOffsetsEXT-pOffsets-parameter
    pOffsets must be a valid pointer to an array of setCount VkDeviceSize values

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

  • VUID-vkCmdSetDescriptorBufferOffsetsEXT-commandBuffer-cmdpool
    The VkCommandPool that commandBuffer was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_DATA_GRAPH_BIT_ARM, or VK_QUEUE_GRAPHICS_BIT operations

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

  • VUID-vkCmdSetDescriptorBufferOffsetsEXT-setCount-arraylength
    setCount must be greater than 0

  • VUID-vkCmdSetDescriptorBufferOffsetsEXT-commonparent
    Both of commandBuffer, and layout must have been created, allocated, or retrieved from the same VkDevice

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

VK_QUEUE_COMPUTE_BIT
VK_QUEUE_DATA_GRAPH_BIT_ARM
VK_QUEUE_GRAPHICS_BIT

State

Conditional Rendering

vkCmdSetDescriptorBufferOffsetsEXT is not affected by conditional rendering

To set descriptor buffer offsets in a command buffer, call:

This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.
// Provided by VK_KHR_maintenance6 with VK_EXT_descriptor_buffer
void vkCmdSetDescriptorBufferOffsets2EXT(
    VkCommandBuffer                             commandBuffer,
    const VkSetDescriptorBufferOffsetsInfoEXT*  pSetDescriptorBufferOffsetsInfo);
  • commandBuffer is the command buffer in which the descriptor buffer offsets will be set.

  • pSetDescriptorBufferOffsetsInfo is a pointer to a VkSetDescriptorBufferOffsetsInfoEXT structure.

Valid Usage
  • VUID-vkCmdSetDescriptorBufferOffsets2EXT-descriptorBuffer-09470
    The descriptorBuffer feature must be enabled

  • VUID-vkCmdSetDescriptorBufferOffsets2EXT-pSetDescriptorBufferOffsetsInfo-09471
    Each bit in pSetDescriptorBufferOffsetsInfo->stageFlags must be a stage supported by the commandBuffer’s parent VkCommandPool’s queue family

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

  • VUID-vkCmdSetDescriptorBufferOffsets2EXT-pSetDescriptorBufferOffsetsInfo-parameter
    pSetDescriptorBufferOffsetsInfo must be a valid pointer to a valid VkSetDescriptorBufferOffsetsInfoEXT structure

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

  • VUID-vkCmdSetDescriptorBufferOffsets2EXT-commandBuffer-cmdpool
    The VkCommandPool that commandBuffer was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_DATA_GRAPH_BIT_ARM, or VK_QUEUE_GRAPHICS_BIT operations

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

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

VK_QUEUE_COMPUTE_BIT
VK_QUEUE_DATA_GRAPH_BIT_ARM
VK_QUEUE_GRAPHICS_BIT

State

Conditional Rendering

vkCmdSetDescriptorBufferOffsets2EXT is not affected by conditional rendering

The VkSetDescriptorBufferOffsetsInfoEXT structure is defined as:

// Provided by VK_KHR_maintenance6 with VK_EXT_descriptor_buffer
typedef struct VkSetDescriptorBufferOffsetsInfoEXT {
    VkStructureType        sType;
    const void*            pNext;
    VkShaderStageFlags     stageFlags;
    VkPipelineLayout       layout;
    uint32_t               firstSet;
    uint32_t               setCount;
    const uint32_t*        pBufferIndices;
    const VkDeviceSize*    pOffsets;
} VkSetDescriptorBufferOffsetsInfoEXT;
  • 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 VkPipelineLayoutCreateInfo structure off the pNext

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

  • setCount is the number of elements in the pBufferIndices and pOffsets arrays.

  • pBufferIndices is a pointer to an array of indices into the descriptor buffer binding points set by vkCmdBindDescriptorBuffersEXT.

  • pOffsets is a pointer to an array of VkDeviceSize offsets to apply to the bound descriptor buffers.

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
Valid Usage (Implicit)
  • VUID-VkSetDescriptorBufferOffsetsInfoEXT-sType-sType
    sType must be VK_STRUCTURE_TYPE_SET_DESCRIPTOR_BUFFER_OFFSETS_INFO_EXT

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

  • VUID-VkSetDescriptorBufferOffsetsInfoEXT-sType-unique
    The sType value of each structure in the pNext chain must be unique

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

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

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

  • VUID-VkSetDescriptorBufferOffsetsInfoEXT-pBufferIndices-parameter
    pBufferIndices must be a valid pointer to an array of setCount uint32_t values

  • VUID-VkSetDescriptorBufferOffsetsInfoEXT-pOffsets-parameter
    pOffsets must be a valid pointer to an array of setCount VkDeviceSize values

  • VUID-VkSetDescriptorBufferOffsetsInfoEXT-setCount-arraylength
    setCount must be greater than 0

To bind an embedded immutable sampler set to a command buffer, call:

This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.
// Provided by VK_EXT_descriptor_buffer
void vkCmdBindDescriptorBufferEmbeddedSamplersEXT(
    VkCommandBuffer                             commandBuffer,
    VkPipelineBindPoint                         pipelineBindPoint,
    VkPipelineLayout                            layout,
    uint32_t                                    set);
  • commandBuffer is the command buffer that the embedded immutable samplers will be bound to.

  • pipelineBindPoint is a VkPipelineBindPoint indicating the type of the pipeline that will use the embedded immutable samplers.

  • layout is a VkPipelineLayout object used to program the bindings.

  • set is the number of the set to be bound.

vkCmdBindDescriptorBufferEmbeddedSamplersEXT binds the embedded immutable samplers in set of layout to set for the command buffer for subsequent bound pipeline commands set by pipelineBindPoint. Any previous binding to this set by vkCmdSetDescriptorBufferOffsetsEXT or this command is overwritten. Any sets that were last bound by a call to vkCmdBindDescriptorSets are invalidated upon calling this command. Other sets will also be invalidated upon calling this command if layout differs from the pipeline layout used to bind those other sets, as described in Pipeline Layout Compatibility.

Valid Usage
  • VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-set-08070
    The VkDescriptorSetLayout at index set when layout was created must have been created with the VK_DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT bit set

  • VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-set-08071
    set must be less than or equal to VkPipelineLayoutCreateInfo::setLayoutCount provided when layout was created

  • VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-None-08068
    The descriptorBuffer feature must be enabled

  • VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-pipelineBindPoint-08069
    pipelineBindPoint must be supported by the commandBuffer’s parent VkCommandPool’s queue family

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

  • VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-pipelineBindPoint-parameter
    pipelineBindPoint must be a valid VkPipelineBindPoint value

  • VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-layout-parameter
    layout must be a valid VkPipelineLayout handle

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

  • VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-commandBuffer-cmdpool
    The VkCommandPool that commandBuffer was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

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

  • VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-commonparent
    Both of commandBuffer, and layout must have been created, allocated, or retrieved from the same VkDevice

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

VK_QUEUE_COMPUTE_BIT
VK_QUEUE_GRAPHICS_BIT

State

Conditional Rendering

vkCmdBindDescriptorBufferEmbeddedSamplersEXT is not affected by conditional rendering

To bind an embedded immutable sampler set to a command buffer, call:

This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.
// Provided by VK_KHR_maintenance6 with VK_EXT_descriptor_buffer
void vkCmdBindDescriptorBufferEmbeddedSamplers2EXT(
    VkCommandBuffer                             commandBuffer,
    const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo);
  • commandBuffer is the command buffer that the embedded immutable samplers will be bound to.

  • pBindDescriptorBufferEmbeddedSamplersInfo is a pointer to a VkBindDescriptorBufferEmbeddedSamplersInfoEXT structure.

Valid Usage
  • VUID-vkCmdBindDescriptorBufferEmbeddedSamplers2EXT-descriptorBuffer-09472
    The descriptorBuffer feature must be enabled

  • VUID-vkCmdBindDescriptorBufferEmbeddedSamplers2EXT-pBindDescriptorBufferEmbeddedSamplersInfo-09473
    Each bit in pBindDescriptorBufferEmbeddedSamplersInfo->stageFlags must be a stage supported by the commandBuffer’s parent VkCommandPool’s queue family

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

  • VUID-vkCmdBindDescriptorBufferEmbeddedSamplers2EXT-pBindDescriptorBufferEmbeddedSamplersInfo-parameter
    pBindDescriptorBufferEmbeddedSamplersInfo must be a valid pointer to a valid VkBindDescriptorBufferEmbeddedSamplersInfoEXT structure

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

  • VUID-vkCmdBindDescriptorBufferEmbeddedSamplers2EXT-commandBuffer-cmdpool
    The VkCommandPool that commandBuffer was allocated from must support VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT operations

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

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

VK_QUEUE_COMPUTE_BIT
VK_QUEUE_GRAPHICS_BIT

State

Conditional Rendering

vkCmdBindDescriptorBufferEmbeddedSamplers2EXT is not affected by conditional rendering

The VkBindDescriptorBufferEmbeddedSamplersInfoEXT structure is defined as:

// Provided by VK_KHR_maintenance6 with VK_EXT_descriptor_buffer
typedef struct VkBindDescriptorBufferEmbeddedSamplersInfoEXT {
    VkStructureType       sType;
    const void*           pNext;
    VkShaderStageFlags    stageFlags;
    VkPipelineLayout      layout;
    uint32_t              set;
} VkBindDescriptorBufferEmbeddedSamplersInfoEXT;

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
Valid Usage (Implicit)
  • VUID-VkBindDescriptorBufferEmbeddedSamplersInfoEXT-sType-sType
    sType must be VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_BUFFER_EMBEDDED_SAMPLERS_INFO_EXT

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

  • VUID-VkBindDescriptorBufferEmbeddedSamplersInfoEXT-sType-unique
    The sType value of each structure in the pNext chain must be unique

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

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

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

Updating Descriptor Buffers

Updates to descriptor data in buffers can be performed by any operation on either the host or device that can access memory.

Descriptor buffer reads can be synchronized using VK_ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT_EXT in the relevant shader stage.

Push Descriptors With Descriptor Buffers

If the descriptorBufferPushDescriptors feature is enabled, push descriptors can be used with descriptor buffers in the same way as with descriptor sets.

The VkPhysicalDeviceDescriptorBufferPropertiesEXT::bufferlessPushDescriptors property indicates whether the implementation requires a buffer to back push descriptors. If the property is VK_FALSE then before recording any push descriptors, the application must bind exactly 1 descriptor buffer that was created with the VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT usage flag set. When this buffer is bound, any previously recorded push descriptors that are required for a subsequent command must be recorded again.

Capture and Replay

In a similar way to bufferDeviceAddressCaptureReplay, the descriptorBufferCaptureReplay feature allows the creation of opaque handles for objects at capture time that can be passed into object creation calls in a future replay, causing descriptors to be created with the same data. The opaque memory address for any memory used by these resources must have been captured using vkGetDeviceMemoryOpaqueCaptureAddress and be replayed using VkMemoryOpaqueCaptureAddressAllocateInfo.

To get the opaque descriptor data for a buffer, call:

This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.
// Provided by VK_EXT_descriptor_buffer
VkResult vkGetBufferOpaqueCaptureDescriptorDataEXT(
    VkDevice                                    device,
    const VkBufferCaptureDescriptorDataInfoEXT* pInfo,
    void*                                       pData);
  • device is the logical device that gets the data.

  • pInfo is a pointer to a VkBufferCaptureDescriptorDataInfoEXT structure specifying the buffer.

  • pData is a pointer to an application-allocated buffer where the data will be written.

Valid Usage
Valid Usage (Implicit)
  • VUID-vkGetBufferOpaqueCaptureDescriptorDataEXT-device-parameter
    device must be a valid VkDevice handle

  • VUID-vkGetBufferOpaqueCaptureDescriptorDataEXT-pInfo-parameter
    pInfo must be a valid pointer to a valid VkBufferCaptureDescriptorDataInfoEXT structure

  • VUID-vkGetBufferOpaqueCaptureDescriptorDataEXT-pData-parameter
    pData must be a pointer value

Information about the buffer to get descriptor buffer capture data for is passed in a VkBufferCaptureDescriptorDataInfoEXT structure:

This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.
// Provided by VK_EXT_descriptor_buffer
typedef struct VkBufferCaptureDescriptorDataInfoEXT {
    VkStructureType    sType;
    const void*        pNext;
    VkBuffer           buffer;
} VkBufferCaptureDescriptorDataInfoEXT;
  • sType is a VkStructureType value identifying this structure.

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

  • buffer is the VkBuffer handle of the buffer to get opaque capture data for.

Valid Usage
Valid Usage (Implicit)

To get the opaque capture descriptor data for an image, call:

This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.
// Provided by VK_EXT_descriptor_buffer
VkResult vkGetImageOpaqueCaptureDescriptorDataEXT(
    VkDevice                                    device,
    const VkImageCaptureDescriptorDataInfoEXT*  pInfo,
    void*                                       pData);
  • device is the logical device that gets the data.

  • pInfo is a pointer to a VkImageCaptureDescriptorDataInfoEXT structure specifying the image.

  • pData is a pointer to an application-allocated buffer where the data will be written.

Valid Usage
Valid Usage (Implicit)
  • VUID-vkGetImageOpaqueCaptureDescriptorDataEXT-device-parameter
    device must be a valid VkDevice handle

  • VUID-vkGetImageOpaqueCaptureDescriptorDataEXT-pInfo-parameter
    pInfo must be a valid pointer to a valid VkImageCaptureDescriptorDataInfoEXT structure

  • VUID-vkGetImageOpaqueCaptureDescriptorDataEXT-pData-parameter
    pData must be a pointer value

Information about the image to get descriptor buffer capture data for is passed in a VkImageCaptureDescriptorDataInfoEXT structure:

This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.
// Provided by VK_EXT_descriptor_buffer
typedef struct VkImageCaptureDescriptorDataInfoEXT {
    VkStructureType    sType;
    const void*        pNext;
    VkImage            image;
} VkImageCaptureDescriptorDataInfoEXT;
  • sType is a VkStructureType value identifying this structure.

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

  • image is the VkImage handle of the image to get opaque capture data for.

Valid Usage
Valid Usage (Implicit)

To get the opaque capture descriptor data for an image view, call:

This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.
// Provided by VK_EXT_descriptor_buffer
VkResult vkGetImageViewOpaqueCaptureDescriptorDataEXT(
    VkDevice                                    device,
    const VkImageViewCaptureDescriptorDataInfoEXT* pInfo,
    void*                                       pData);
  • device is the logical device that gets the data.

  • pInfo is a pointer to a VkImageViewCaptureDescriptorDataInfoEXT structure specifying the image view.

  • pData is a pointer to an application-allocated buffer where the data will be written.

Valid Usage
Valid Usage (Implicit)
  • VUID-vkGetImageViewOpaqueCaptureDescriptorDataEXT-device-parameter
    device must be a valid VkDevice handle

  • VUID-vkGetImageViewOpaqueCaptureDescriptorDataEXT-pInfo-parameter
    pInfo must be a valid pointer to a valid VkImageViewCaptureDescriptorDataInfoEXT structure

  • VUID-vkGetImageViewOpaqueCaptureDescriptorDataEXT-pData-parameter
    pData must be a pointer value

Information about the image view to get descriptor buffer capture data for is passed in a VkImageViewCaptureDescriptorDataInfoEXT structure:

This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.
// Provided by VK_EXT_descriptor_buffer
typedef struct VkImageViewCaptureDescriptorDataInfoEXT {
    VkStructureType    sType;
    const void*        pNext;
    VkImageView        imageView;
} VkImageViewCaptureDescriptorDataInfoEXT;
  • sType is a VkStructureType value identifying this structure.

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

  • imageView is the VkImageView handle of the image view to get opaque capture data for.

Valid Usage
Valid Usage (Implicit)

To get the opaque capture descriptor data for a sampler, call:

This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.
// Provided by VK_EXT_descriptor_buffer
VkResult vkGetSamplerOpaqueCaptureDescriptorDataEXT(
    VkDevice                                    device,
    const VkSamplerCaptureDescriptorDataInfoEXT* pInfo,
    void*                                       pData);
  • device is the logical device that gets the data.

  • pInfo is a pointer to a VkSamplerCaptureDescriptorDataInfoEXT structure specifying the sampler.

  • pData is a pointer to an application-allocated buffer where the data will be written.

Valid Usage
Valid Usage (Implicit)
  • VUID-vkGetSamplerOpaqueCaptureDescriptorDataEXT-device-parameter
    device must be a valid VkDevice handle

  • VUID-vkGetSamplerOpaqueCaptureDescriptorDataEXT-pInfo-parameter
    pInfo must be a valid pointer to a valid VkSamplerCaptureDescriptorDataInfoEXT structure

  • VUID-vkGetSamplerOpaqueCaptureDescriptorDataEXT-pData-parameter
    pData must be a pointer value

Information about the sampler to get descriptor buffer capture data for is passed in a VkSamplerCaptureDescriptorDataInfoEXT structure:

This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.
// Provided by VK_EXT_descriptor_buffer
typedef struct VkSamplerCaptureDescriptorDataInfoEXT {
    VkStructureType    sType;
    const void*        pNext;
    VkSampler          sampler;
} VkSamplerCaptureDescriptorDataInfoEXT;
  • sType is a VkStructureType value identifying this structure.

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

  • sampler is the VkSampler handle of the sampler to get opaque capture data for.

Valid Usage
Valid Usage (Implicit)

To get the opaque capture descriptor data for an acceleration structure, call:

This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.
// Provided by VK_EXT_descriptor_buffer with VK_KHR_acceleration_structure or VK_NV_ray_tracing
VkResult vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT(
    VkDevice                                    device,
    const VkAccelerationStructureCaptureDescriptorDataInfoEXT* pInfo,
    void*                                       pData);
  • device is the logical device that gets the data.

  • pInfo is a pointer to a VkAccelerationStructureCaptureDescriptorDataInfoEXT structure specifying the acceleration structure.

  • pData is a pointer to an application-allocated buffer where the data will be written.

Valid Usage
  • VUID-vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT-None-08088
    The descriptorBufferCaptureReplay feature must be enabled

  • VUID-vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT-pData-08089
    pData must point to a buffer that is at least VkPhysicalDeviceDescriptorBufferPropertiesEXT::accelerationStructureCaptureReplayDescriptorDataSize bytes in size

  • VUID-vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT-device-08090
    If device was created with multiple physical devices, then the bufferDeviceAddressMultiDevice feature must be enabled

Valid Usage (Implicit)
  • VUID-vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT-device-parameter
    device must be a valid VkDevice handle

  • VUID-vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT-pInfo-parameter
    pInfo must be a valid pointer to a valid VkAccelerationStructureCaptureDescriptorDataInfoEXT structure

  • VUID-vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT-pData-parameter
    pData must be a pointer value

Information about the acceleration structure to get descriptor buffer capture data for is passed in a VkAccelerationStructureCaptureDescriptorDataInfoEXT structure:

This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.
// Provided by VK_EXT_descriptor_buffer with VK_KHR_acceleration_structure or VK_NV_ray_tracing
typedef struct VkAccelerationStructureCaptureDescriptorDataInfoEXT {
    VkStructureType               sType;
    const void*                   pNext;
    VkAccelerationStructureKHR    accelerationStructure;
    VkAccelerationStructureNV     accelerationStructureNV;
} VkAccelerationStructureCaptureDescriptorDataInfoEXT;
  • sType is a VkStructureType value identifying this structure.

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

  • accelerationStructure is the VkAccelerationStructureKHR handle of the acceleration structure to get opaque capture data for.

  • accelerationStructureNV is the VkAccelerationStructureNV handle of the acceleration structure to get opaque capture data for.

Valid Usage
Valid Usage (Implicit)
  • VUID-VkAccelerationStructureCaptureDescriptorDataInfoEXT-sType-sType
    sType must be VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT

  • VUID-VkAccelerationStructureCaptureDescriptorDataInfoEXT-pNext-pNext
    pNext must be NULL

  • VUID-VkAccelerationStructureCaptureDescriptorDataInfoEXT-accelerationStructure-parameter
    If accelerationStructure is not VK_NULL_HANDLE, accelerationStructure must be a valid VkAccelerationStructureKHR handle

  • VUID-VkAccelerationStructureCaptureDescriptorDataInfoEXT-accelerationStructureNV-parameter
    If accelerationStructureNV is not VK_NULL_HANDLE, accelerationStructureNV must be a valid VkAccelerationStructureNV handle

  • VUID-VkAccelerationStructureCaptureDescriptorDataInfoEXT-commonparent
    Both of accelerationStructure, and accelerationStructureNV that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

The VkOpaqueCaptureDescriptorDataCreateInfoEXT structure is defined as:

This functionality is superseded by VK_EXT_descriptor_heap. See Legacy Functionality for more information.
// Provided by VK_EXT_descriptor_buffer
typedef struct VkOpaqueCaptureDescriptorDataCreateInfoEXT {
    VkStructureType    sType;
    const void*        pNext;
    const void*        opaqueCaptureDescriptorData;
} VkOpaqueCaptureDescriptorDataCreateInfoEXT;

During replay, opaque descriptor capture data can be specified by adding a VkOpaqueCaptureDescriptorDataCreateInfoEXT structure to the relevant pNext chain of a VkBufferCreateInfo, VkImageCreateInfo, VkImageViewCreateInfo, VkSamplerCreateInfo, VkTensorCreateInfoARM, VkTensorViewCreateInfoARM, VkAccelerationStructureCreateInfoNV or VkAccelerationStructureCreateInfoKHR structure.

When providing opaque capture data for an image, if the pNext chain of VkImageCreateInfo or VkTensorCreateInfoARM contains an instance of both this structure and VkOpaqueCaptureDataCreateInfoEXT, they should both specify data from the same original resource. If they have capture data from different original resources, resource creation is much more likely to fail.

Valid Usage (Implicit)

To get the opaque capture descriptor data for a tensor, call:

// Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors
VkResult vkGetTensorOpaqueCaptureDescriptorDataARM(
    VkDevice                                    device,
    const VkTensorCaptureDescriptorDataInfoARM* pInfo,
    void*                                       pData);
  • device is the logical device that gets the data.

  • pInfo is a pointer to a VkTensorCaptureDescriptorDataInfoARM structure specifying the tensor.

  • pData is a pointer to a user-allocated buffer where the data will be written.

Valid Usage
Valid Usage (Implicit)
  • VUID-vkGetTensorOpaqueCaptureDescriptorDataARM-device-parameter
    device must be a valid VkDevice handle

  • VUID-vkGetTensorOpaqueCaptureDescriptorDataARM-pInfo-parameter
    pInfo must be a valid pointer to a valid VkTensorCaptureDescriptorDataInfoARM structure

  • VUID-vkGetTensorOpaqueCaptureDescriptorDataARM-pData-parameter
    pData must be a pointer value

Information about the tensor to get descriptor buffer capture data for is passed in a VkTensorCaptureDescriptorDataInfoARM structure:

// Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors
typedef struct VkTensorCaptureDescriptorDataInfoARM {
    VkStructureType    sType;
    const void*        pNext;
    VkTensorARM        tensor;
} VkTensorCaptureDescriptorDataInfoARM;
  • sType is a VkStructureType value identifying this structure.

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

  • tensor is the VkTensorARM handle of the tensor to get opaque capture data for.

Valid Usage
Valid Usage (Implicit)

To get the opaque capture descriptor data for a tensor view, call:

// Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors
VkResult vkGetTensorViewOpaqueCaptureDescriptorDataARM(
    VkDevice                                    device,
    const VkTensorViewCaptureDescriptorDataInfoARM* pInfo,
    void*                                       pData);
  • device is the logical device that gets the data.

  • pInfo is a pointer to a VkTensorViewCaptureDescriptorDataInfoARM structure specifying the tensor view.

  • pData is a pointer to a user-allocated buffer where the data will be written.

Valid Usage
Valid Usage (Implicit)
  • VUID-vkGetTensorViewOpaqueCaptureDescriptorDataARM-device-parameter
    device must be a valid VkDevice handle

  • VUID-vkGetTensorViewOpaqueCaptureDescriptorDataARM-pInfo-parameter
    pInfo must be a valid pointer to a valid VkTensorViewCaptureDescriptorDataInfoARM structure

  • VUID-vkGetTensorViewOpaqueCaptureDescriptorDataARM-pData-parameter
    pData must be a pointer value

Information about the tensor view to get descriptor buffer capture data for is passed in a VkTensorViewCaptureDescriptorDataInfoARM structure:

// Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors
typedef struct VkTensorViewCaptureDescriptorDataInfoARM {
    VkStructureType    sType;
    const void*        pNext;
    VkTensorViewARM    tensorView;
} VkTensorViewCaptureDescriptorDataInfoARM;
  • sType is a VkStructureType value identifying this structure.

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

  • tensorView is the VkTensorViewARM handle of the tensor view to get opaque capture data for.

Valid Usage
Valid Usage (Implicit)