# VkMemoryBarrier(3) Manual Page

## Name

VkMemoryBarrier - Structure specifying a global memory barrier

## C Specification

The `VkMemoryBarrier` structure is defined as:

    typedef struct VkMemoryBarrier {
        VkStructureType    sType;
        const void*        pNext;
        VkAccessFlags      srcAccessMask;
        VkAccessFlags      dstAccessMask;
    } VkMemoryBarrier;

## Members

- `sType` is the type of this structure.

- `pNext` is `NULL` or a pointer to an extension-specific structure.

- `srcAccessMask` is a bitmask of VkAccessFlagBits specifying a source access mask.

- `dstAccessMask` is a bitmask of VkAccessFlagBits specifying a destination access mask.

## Description

The first access scope is limited to access types in the source access mask specified by `srcAccessMask`.

The second access scope is limited to access types in the destination access mask specified by `dstAccessMask`.

Valid Usage (Implicit)

- `sType` must be `VK_STRUCTURE_TYPE_MEMORY_BARRIER`

- `pNext` must be `NULL`

- `srcAccessMask` must be a valid combination of VkAccessFlagBits values

- `dstAccessMask` must be a valid combination of VkAccessFlagBits values

## See Also

VkAccessFlags, VkStructureType, vkCmdPipelineBarrier, vkCmdWaitEvents

## 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

Copyright (c) 2014-2020 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.