The first access scope is limited to access to memory through the specified buffer range, via access types in the source access mask specified by srcAccessMask. If srcAccessMask includes ACCESS_HOST_WRITE_BIT, a memory domain operation is performed where available memory in the host domain is also made available to the device domain.
The second access scope is limited to access to memory through the specified buffer range, via access types in the destination access mask specified by dstAccessMask. If dstAccessMask includes ACCESS_HOST_WRITE_BIT or ACCESS_HOST_READ_BIT, a memory domain operation is performed where available memory in the device domain is also made available to the host domain.
When MEMORY_PROPERTY_HOST_COHERENT_BIT is used, available memory in host domain is automatically made visible to host domain, and any host write is automatically made available to host domain.
If srcQueueFamilyIndex is not equal to dstQueueFamilyIndex, and srcQueueFamilyIndex is equal to the current queue family, then the memory barrier defines a queue family release operation for the specified buffer range, and the second access scope includes no access, as if dstAccessMask was 0.
If dstQueueFamilyIndex is not equal to srcQueueFamilyIndex, and dstQueueFamilyIndex is equal to the current queue family, then the memory barrier defines a queue family acquire operation for the specified buffer range, and the first access scope includes no access, as if srcAccessMask was 0.
offset must be less than the size of buffersize is not equal to WHOLE_SIZE, size must be greater than 0size is not equal to WHOLE_SIZE, size must be less than or equal to than the size of buffer minus offsetbuffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory objectbuffer was created with a sharing mode of SHARING_MODE_EXCLUSIVE, and srcQueueFamilyIndex and dstQueueFamilyIndex are not equal, srcQueueFamilyIndex must be QUEUE_FAMILY_EXTERNAL, QUEUE_FAMILY_FOREIGN_EXT, or a valid queue familybuffer was created with a sharing mode of SHARING_MODE_EXCLUSIVE, and srcQueueFamilyIndex and dstQueueFamilyIndex are not equal, dstQueueFamilyIndex must be QUEUE_FAMILY_EXTERNAL, QUEUE_FAMILY_FOREIGN_EXT, or a valid queue familysrcQueueFamilyIndex is not equal to dstQueueFamilyIndex, at least one of srcQueueFamilyIndex or dstQueueFamilyIndex must not be QUEUE_FAMILY_EXTERNAL or QUEUE_FAMILY_FOREIGN_EXTVK_KHR_external_memory extension is not enabled, and the value of VkApplicationInfo::apiVersion used to create the VkInstance is not greater than or equal to Version 1.1, srcQueueFamilyIndex must not be QUEUE_FAMILY_EXTERNALVK_KHR_external_memory extension is not enabled, and the value of VkApplicationInfo::apiVersion used to create the VkInstance is not greater than or equal to Version 1.1, dstQueueFamilyIndex must not be QUEUE_FAMILY_EXTERNALVK_EXT_queue_family_foreign extension is not enabled srcQueueFamilyIndex must not be QUEUE_FAMILY_FOREIGN_EXTVK_EXT_queue_family_foreign extension is not enabled dstQueueFamilyIndex must not be QUEUE_FAMILY_FOREIGN_EXTsynchronization2 feature is not enabled, and buffer was created with a sharing mode of SHARING_MODE_CONCURRENT, at least one of srcQueueFamilyIndex and dstQueueFamilyIndex must be QUEUE_FAMILY_IGNOREDsynchronization2 feature is not enabled, and buffer was created with a sharing mode of SHARING_MODE_CONCURRENT, srcQueueFamilyIndex must be QUEUE_FAMILY_IGNORED or QUEUE_FAMILY_EXTERNALsynchronization2 feature is not enabled, and buffer was created with a sharing mode of SHARING_MODE_CONCURRENT, dstQueueFamilyIndex must be QUEUE_FAMILY_IGNORED or QUEUE_FAMILY_EXTERNALsType must be STRUCTURE_TYPE_BUFFER_MEMORY_BARRIERpNext must be NULL or a pointer to a valid instance of VkExternalMemoryAcquireUnmodifiedEXTsType value of each struct in the pNext chain must be uniquebuffer must be a valid VkBuffer handleCmdPipelineBarrier, CmdWaitEvents
struct VkBufferMemoryBarrier {
VkStructureType sType;
void const * pNext;
VkAccessFlags srcAccessMask;
VkAccessFlags dstAccessMask;
uint32_t srcQueueFamilyIndex;
uint32_t dstQueueFamilyIndex;
VkBuffer buffer;
VkDeviceSize offset;
VkDeviceSize size;
}
| Modifier and Type | Class and Description |
|---|---|
| public static class | VkBufferMemoryBarrier.
An array of |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | BUFFER
The struct member offsets. |
| public static final int | DSTACCESSMASK
The struct member offsets. |
| public static final int | DSTQUEUEFAMILYINDEX
The struct member offsets. |
| public static final int | OFFSET
The struct member offsets. |
| public static final int | PNEXT
The struct member offsets. |
| public static final int | SIZE
The struct member offsets. |
| public static final int | SIZEOF
The struct size in bytes. |
| public static final int | SRCACCESSMASK
The struct member offsets. |
| public static final int | SRCQUEUEFAMILYINDEX
The struct member offsets. |
| public static final int | STYPE
The struct member offsets. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | VkBufferMemoryBarrier(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public long | |
| public VkBufferMemoryBarrier | |
| public static VkBufferMemoryBarrier | |
| public static VkBufferMemoryBarrier. | calloc(int
the buffer capacity capacity)Returns a new |
| public static VkBufferMemoryBarrier | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkBufferMemoryBarrier. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static VkBufferMemoryBarrier | |
| public static VkBufferMemoryBarrier | |
| public static VkBufferMemoryBarrier. | |
| public static VkBufferMemoryBarrier. | |
| protected VkBufferMemoryBarrier | create(long
the struct memory address address, ByteBuffer an optional container buffer, to be referenced strongly by the struct instance. container)Implements abstract org. the constructor, but returns the exact type of the Struct subclass.
|
| public static VkBufferMemoryBarrier | |
| public static VkBufferMemoryBarrier | |
| public static VkBufferMemoryBarrier. | create(int
the buffer capacity capacity)Returns a new |
| public static VkBufferMemoryBarrier. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static VkBufferMemoryBarrier | |
| public static VkBufferMemoryBarrier. | |
| public int | |
| public VkBufferMemoryBarrier | |
| public int | |
| public VkBufferMemoryBarrier | |
| public static VkBufferMemoryBarrier | |
| public static VkBufferMemoryBarrier. | malloc(int
the buffer capacity capacity)Returns a new |
| public static VkBufferMemoryBarrier | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkBufferMemoryBarrier. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static VkBufferMemoryBarrier | |
| public static VkBufferMemoryBarrier | |
| public static VkBufferMemoryBarrier. | |
| public static VkBufferMemoryBarrier. | |
| public static long | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static long | |
| public static void | |
| public static long | |
| public static void | |
| public static long | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public long | offset()
an offset in bytes into the backing memory for |
| public VkBufferMemoryBarrier | |
| public long | |
| public VkBufferMemoryBarrier | |
| public VkBufferMemoryBarrier | pNext(VkExternalMemoryAcquireUnmodifiedEXT value)
Prepends the specified |
| public VkBufferMemoryBarrier | set(int sType, long pNext, int srcAccessMask, int dstAccessMask, int srcQueueFamilyIndex, int dstQueueFamilyIndex, long buffer, long offset, long size)
Initializes this struct with the specified values. |
| public VkBufferMemoryBarrier | Returns: this structthe source struct src)Copies the specified struct data to this struct. |
| public long | size()
a size in bytes of the affected area of backing memory for |
| public VkBufferMemoryBarrier | |
| public int | |
| public int | |
| public VkBufferMemoryBarrier | |
| public int | |
| public VkBufferMemoryBarrier | |
| public int | |
| public VkBufferMemoryBarrier | |
| public VkBufferMemoryBarrier |