C Specification
The VkBufferMemoryBarrier2KHR structure is defined as:
// Provided by VK_KHR_synchronization2
typedef struct VkBufferMemoryBarrier2KHR {
VkStructureType sType;
const void* pNext;
VkPipelineStageFlags2KHR srcStageMask;
VkAccessFlags2KHR srcAccessMask;
VkPipelineStageFlags2KHR dstStageMask;
VkAccessFlags2KHR dstAccessMask;
uint32_t srcQueueFamilyIndex;
uint32_t dstQueueFamilyIndex;
VkBuffer buffer;
VkDeviceSize offset;
VkDeviceSize size;
} VkBufferMemoryBarrier2KHR;
Members
-
sTypeis the type of this structure. -
pNextisNULLor a pointer to a structure extending this structure. -
srcStageMaskis a VkPipelineStageFlags2KHR mask of pipeline stages to be included in the first synchronization scope. -
srcAccessMaskis a VkAccessFlags2KHR mask of pipeline first access scope. -
dstStageMaskis a VkPipelineStageFlags2KHR mask of pipeline stages to be included in the second synchronization scope. -
dstStageMaskis a VkAccessFlags2KHR mask of pipeline second access scope. -
srcQueueFamilyIndexis the source queue family for a queue family ownership transfer. -
dstQueueFamilyIndexis the destination queue family for a queue family ownership transfer. -
bufferis a handle to the buffer whose backing memory is affected by the barrier. -
offsetis an offset in bytes into the backing memory forbuffer; this is relative to the base offset as bound to the buffer (see vkBindBufferMemory). -
sizeis a size in bytes of the affected area of backing memory forbuffer, orVK_WHOLE_SIZEto use the range fromoffsetto the end of the buffer.
Description
This structure defines a memory dependency limited to a range of a buffer, and optionally defines a queue family transfer operation for that range.
The first synchronization scope and
access scope described by
this structure include only operations and memory accesses specified by
elements srcStageMask and srcAccessMask.
The second synchronization scope
and access scope described
by this structure include only operations and memory accesses specified by
elements dstStageMask and dstAccessMask.
Both access scopes are
limited to only memory accesses to buffer in the range defined by
offset and size.
If buffer was created with VK_SHARING_MODE_CONCURRENT, and
srcQueueFamilyIndex is not equal to dstQueueFamilyIndex, this
memory barrier defines a queue family
transfer operation.
When executed on a queue in the family identified by
srcQueueFamilyIndex, this barrier defines a
queue family release operation
for the specified buffer range, and the second synchronization and access
scopes do not synchronize operations on that queue.
When executed on a queue in the family identified by
dstQueueFamilyIndex, this barrier defines a
queue family acquire operation
for the specified buffer range, and the first synchronization and access
scopes do not synchronize operations on that queue.
A queue family 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://www.khronos.org/registry/vulkan/specs/1.2-extensions/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.
See Also
VkAccessFlags2KHR, VkBuffer, VkDependencyInfoKHR, VkDeviceSize, VkPipelineStageFlags2KHR, VkStructureType
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.