C Specification

The VkMemoryBarrier2 structure is defined as:

// Provided by VK_VERSION_1_3
typedef struct VkMemoryBarrier2 {
    VkStructureType          sType;
    const void*              pNext;
    VkPipelineStageFlags2    srcStageMask;
    VkAccessFlags2           srcAccessMask;
    VkPipelineStageFlags2    dstStageMask;
    VkAccessFlags2           dstAccessMask;
} VkMemoryBarrier2;
// Provided by VK_KHR_synchronization2
// Equivalent to VkMemoryBarrier2
typedef VkMemoryBarrier2 VkMemoryBarrier2KHR;

Members

Description

This structure defines a memory dependency affecting all device memory.

The first synchronization scope and access scope described by this structure include only operations and memory accesses specified by the source stage mask and source access mask.

The second synchronization scope and access scope described by this structure include only operations and memory accesses specified by destination stage mask and destination access mask.

Valid Usage
Valid Usage (Implicit)
  • VUID-VkMemoryBarrier2-sType-sType
    sType must be VK_STRUCTURE_TYPE_MEMORY_BARRIER_2

  • VUID-VkMemoryBarrier2-srcStageMask-parameter
    If srcStageMask is not 0, srcStageMask must be a valid combination of VkPipelineStageFlagBits2 values

  • VUID-VkMemoryBarrier2-srcAccessMask-parameter
    If srcAccessMask is not 0, srcAccessMask must be a valid combination of VkAccessFlagBits2 values

  • VUID-VkMemoryBarrier2-dstStageMask-parameter
    If dstStageMask is not 0, dstStageMask must be a valid combination of VkPipelineStageFlagBits2 values

  • VUID-VkMemoryBarrier2-dstAccessMask-parameter
    If dstAccessMask is not 0, dstAccessMask must be a valid combination of VkAccessFlagBits2 values

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-2026 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0