VKBUFFERMEMORYBARRIE(3)

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

C SPECIFICATION

    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;

FIELDS

sType
    Structure type. Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER.

pNext
    Pointer to next structure in the structure chain when applicable.

outputMask
    Types of writes to the buffer to flush (see VkMemoryOutputFlags for more detail).

inputMask
    Types of reads from the buffer to invalidate (see VkMemoryInputFlags for more detail).

srcQueueFamilyIndex
    Identifies the source queue family to transfer ownership of the buffer from. A value of VK_QUEUE_FAMILY_IGNORED indicates that this member should be ignored.

destQueueFamilyIndex
    Identifies the destination queue family to transfer ownership of the buffer to. A value of VK_QUEUE_FAMILY_IGNORED indicates that this member should be ignored.

buffer
    Buffer object the memory barrier applies to.

offset
    Byte offset of the sub-range of the buffer the memory barrier applies to.

size
    Size in bytes of the sub-range of the buffer the memory barrier applies to.

VALID USAGE

    • 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

    • 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

DESCRIPTION

This structure specifies the parameters of a buffer memory barrier that can be passed in the ppMemoryBarriers parameter of vkCmdPipelineBarrier and vkCmdWaitEvents.

SEE ALSO

vkCmdPipelineBarrier, vkCmdWaitEvents, VkMemoryBarrier, VkImageMemoryBarrier

COPYRIGHT

Copyright © 2014-2016 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.

AUTHOR

Khronos Group
    Author.