VKBUFFERMEMORYBARRIE(3)

NAME
VkBufferMemoryBarrier - Structure specifying the parameters of a buffer memory barrier

C SPECIFICATION

The VkBufferMemoryBarrier structure is defined as:

    typedef struct VkBufferMemoryBarrier {
        VkStructureType    sType;
        const void*        pNext;
        VkAccessFlags      srcAccessMask;
        VkAccessFlags      dstAccessMask;
        uint32_t           srcQueueFamilyIndex;
        uint32_t           dstQueueFamilyIndex;
        VkBuffer           buffer;
        VkDeviceSize       offset;
        VkDeviceSize       size;
    } VkBufferMemoryBarrier;

MEMBERS

    • sType is the type of this structure.

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

    • srcAccessMask is a bitmask of the classes of memory accesses performed by the first set of commands that will participate in the dependency.

    • dstAccessMask is a bitmask of the classes of memory accesses performed by the second set of commands that will participate in the dependency.

    • srcQueueFamilyIndex is the queue family that is relinquishing ownership of the range of buffer to another queue, or VK_QUEUE_FAMILY_IGNORED if there is no transfer of ownership.

    • dstQueueFamilyIndex is the queue family that is acquiring ownership of the range of buffer from another queue, or VK_QUEUE_FAMILY_IGNORED if there is no transfer of ownership.

    • buffer is a handle to the buffer whose backing memory is affected by the barrier.

    • offset is an offset in bytes into the backing memory for buffer; this is relative to the base offset as bound to the buffer (see vkBindBufferMemory).

    • size is a size in bytes of the affected area of backing memory for buffer, or VK_WHOLE_SIZE to use the range from offset to the end of the buffer.

DESCRIPTION
Valid Usage

    • offset must be less than the size of buffer

    • If size is not equal to VK_WHOLE_SIZE, size must be greater than 0

    • If size is not equal to VK_WHOLE_SIZE, size must be less than or equal to than the size of buffer minus offset

    • If buffer was created with a sharing mode of VK_SHARING_MODE_CONCURRENT, srcQueueFamilyIndex and dstQueueFamilyIndex must both be VK_QUEUE_FAMILY_IGNORED

    • If buffer was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE, srcQueueFamilyIndex and dstQueueFamilyIndex must either both be VK_QUEUE_FAMILY_IGNORED, or both be a valid queue family (see ???)

    • If buffer was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE, and srcQueueFamilyIndex and dstQueueFamilyIndex are valid queue families, at least one of them must be the same as the family of the queue that will execute this barrier
Valid Usage (Implicit)

    • sType must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER

    • pNext must be NULL

    • srcAccessMask must be a valid combination of VkAccessFlagBits values

    • dstAccessMask must be a valid combination of VkAccessFlagBits values

    • buffer must be a valid VkBuffer handle

SEE ALSO

VkAccessFlags, VkBuffer, VkDeviceSize, VkStructureType, vkCmdPipelineBarrier, vkCmdWaitEvents

DOCUMENT NOTES

For more information, see the Vulkan Specification at URL

https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html#VkBufferMemoryBarrier

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification,not directly.

COPYRIGHT

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

AUTHOR

Khronos Group
    Author.