C Specification

The VkMemoryRangeBarrierKHR structure is defined as:

// Provided by VK_KHR_device_address_commands
typedef struct VkMemoryRangeBarrierKHR {
    VkStructureType             sType;
    const void*                 pNext;
    VkPipelineStageFlags2       srcStageMask;
    VkAccessFlags2              srcAccessMask;
    VkPipelineStageFlags2       dstStageMask;
    VkAccessFlags2              dstAccessMask;
    uint32_t                    srcQueueFamilyIndex;
    uint32_t                    dstQueueFamilyIndex;
    VkDeviceAddressRangeKHR     addressRange;
    VkAddressCommandFlagsKHR    addressFlags;
} VkMemoryRangeBarrierKHR;

Members

Description

This structure defines a memory dependency limited to an address range, and can define a queue family ownership transfer operation for that range.

The first synchronization scope and access scope described by this structure include only operations and memory accesses specified by srcStageMask and srcAccessMask.

The second synchronization scope and access scope described by this structure include only operations and memory accesses specified by dstStageMask and dstAccessMask.

Both access scopes are limited to only memory accesses to memory in addressRange.

If the buffer from which address was queried was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE, and srcQueueFamilyIndex is not equal to dstQueueFamilyIndex, this memory range barrier defines a queue family ownership transfer operation. When executed on a queue in the family identified by srcQueueFamilyIndex, this barrier defines a queue family release operation for the specified address range, and the second synchronization scope does not apply to this operation. When executed on a queue in the family identified by dstQueueFamilyIndex, this barrier defines a queue family acquire operation for the specified address range, and the first synchronization scope does not apply to this operation.

A queue family ownership transfer operation is also defined if the values are not equal, and either is one of the special queue family values reserved for external memory ownership transfers, as described in https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#synchronization-queue-transfers. A queue family release operation is defined when dstQueueFamilyIndex is one of those values, and a queue family acquire operation is defined when srcQueueFamilyIndex is one of those values.

Valid Usage
Valid Usage (Implicit)
  • VUID-VkMemoryRangeBarrierKHR-sType-sType
    sType must be VK_STRUCTURE_TYPE_MEMORY_RANGE_BARRIER_KHR

  • VUID-VkMemoryRangeBarrierKHR-pNext-pNext
    pNext must be NULL

  • VUID-VkMemoryRangeBarrierKHR-srcStageMask-parameter
    srcStageMask must be a valid combination of VkPipelineStageFlagBits2 values

  • VUID-VkMemoryRangeBarrierKHR-srcAccessMask-parameter
    srcAccessMask must be a valid combination of VkAccessFlagBits2 values

  • VUID-VkMemoryRangeBarrierKHR-dstStageMask-parameter
    dstStageMask must be a valid combination of VkPipelineStageFlagBits2 values

  • VUID-VkMemoryRangeBarrierKHR-dstAccessMask-parameter
    dstAccessMask must be a valid combination of VkAccessFlagBits2 values

  • VUID-VkMemoryRangeBarrierKHR-addressFlags-parameter
    addressFlags must be a valid combination of VkAddressCommandFlagBitsKHR 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