C Specification
To record a pipeline barrier, call:
// Provided by VK_VERSION_1_3
void vkCmdPipelineBarrier2(
VkCommandBuffer commandBuffer,
const VkDependencyInfo* pDependencyInfo);
or the equivalent command
// Provided by VK_KHR_synchronization2
void vkCmdPipelineBarrier2KHR(
VkCommandBuffer commandBuffer,
const VkDependencyInfo* pDependencyInfo);
Parameters
-
commandBuffer
is the command buffer into which the command is recorded. -
pDependencyInfo
is a pointer to a VkDependencyInfo structure defining the scopes of this operation.
Description
When vkCmdPipelineBarrier2 is submitted to a queue, it defines memory dependencies between commands that were submitted to the same queue before it, and those submitted to the same queue after it.
The first synchronization scope and
access scope of each memory
dependency defined by pDependencyInfo
are applied to operations that
occurred earlier in submission order.
The second synchronization scope
and access scope of each
memory dependency defined by pDependencyInfo
are applied to operations
that occurred later in submission
order.
If vkCmdPipelineBarrier2
is recorded within a render pass instance,
the synchronization scopes are limited to operations within the same subpass
, or must follow the restrictions for
Tile
Image Access Synchronization if the render pass instance was started with
vkCmdBeginRendering
.
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.