Top Description Inners Fields Constructors Methods
org.lwjgl.vulkan

public Class VkBufferMemoryBarrier

extends Struct<VkBufferMemoryBarrier>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Structure specifying a buffer memory barrier.
Description

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.

Note

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.

Valid Usage
Valid Usage (Implicit)
See Also

CmdPipelineBarrier, CmdWaitEvents

Layout


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

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField 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.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
VkBufferMemoryBarrier(long address, ByteBuffer container)

public
VkBufferMemoryBarrier(ByteBuffer container)

Creates a VkBufferMemoryBarrier instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public long
buffer()

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

public VkBufferMemoryBarrier
buffer(long value)

Sets the specified value to the buffer field.

public static VkBufferMemoryBarrier
calloc()

Returns a new VkBufferMemoryBarrier instance allocated with memCalloc.

public static VkBufferMemoryBarrier.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new VkBufferMemoryBarrier.Buffer instance allocated with memCalloc.

public static VkBufferMemoryBarrier
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new VkBufferMemoryBarrier instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static VkBufferMemoryBarrier.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new VkBufferMemoryBarrier.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static VkBufferMemoryBarrier
callocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static VkBufferMemoryBarrier
callocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static VkBufferMemoryBarrier.Buffer
callocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static VkBufferMemoryBarrier.Buffer
callocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
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.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static VkBufferMemoryBarrier
create()

Returns a new VkBufferMemoryBarrier instance allocated with BufferUtils.

public static VkBufferMemoryBarrier
create(long address)

Returns a new VkBufferMemoryBarrier instance for the specified memory address.

public static VkBufferMemoryBarrier.Buffer
create(int
the buffer capacity
capacity
)

Returns a new VkBufferMemoryBarrier.Buffer instance allocated with BufferUtils.

public static VkBufferMemoryBarrier.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a VkBufferMemoryBarrier.Buffer instance at the specified memory.

public static VkBufferMemoryBarrier
createSafe(long address)

Like create, but returns null if address is NULL.

public static VkBufferMemoryBarrier.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public int
dstAccessMask()

a bitmask of VkAccessFlagBits specifying a destination access mask.

public VkBufferMemoryBarrier
dstAccessMask(int value)

Sets the specified value to the dstAccessMask field.

public int
dstQueueFamilyIndex()

the destination queue family for a queue family ownership transfer.

public VkBufferMemoryBarrier
dstQueueFamilyIndex(int value)

Sets the specified value to the dstQueueFamilyIndex field.

public static VkBufferMemoryBarrier
malloc()

Returns a new VkBufferMemoryBarrier instance allocated with memAlloc.

public static VkBufferMemoryBarrier.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new VkBufferMemoryBarrier.Buffer instance allocated with memAlloc.

public static VkBufferMemoryBarrier
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new VkBufferMemoryBarrier instance allocated on the specified MemoryStack.

public static VkBufferMemoryBarrier.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new VkBufferMemoryBarrier.Buffer instance allocated on the specified MemoryStack.

public static VkBufferMemoryBarrier
mallocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static VkBufferMemoryBarrier
mallocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static VkBufferMemoryBarrier.Buffer
mallocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static VkBufferMemoryBarrier.Buffer
mallocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static long
nbuffer(long struct)

Unsafe version of buffer.

public static void
nbuffer(long struct, long value)

Unsafe version of buffer.

public static int
ndstAccessMask(long struct)

Unsafe version of dstAccessMask.

public static void
ndstAccessMask(long struct, int value)

Unsafe version of dstAccessMask.

public static int
ndstQueueFamilyIndex(long struct)

Unsafe version of dstQueueFamilyIndex.

public static void
ndstQueueFamilyIndex(long struct, int value)

Unsafe version of dstQueueFamilyIndex.

public static long
noffset(long struct)

Unsafe version of offset.

public static void
noffset(long struct, long value)

Unsafe version of offset.

public static long
npNext(long struct)

Unsafe version of pNext.

public static void
npNext(long struct, long value)

Unsafe version of pNext.

public static long
nsize(long struct)

Unsafe version of size.

public static void
nsize(long struct, long value)

Unsafe version of size.

public static int
nsrcAccessMask(long struct)

Unsafe version of srcAccessMask.

public static void
nsrcAccessMask(long struct, int value)

Unsafe version of srcAccessMask.

public static int
nsrcQueueFamilyIndex(long struct)

Unsafe version of srcQueueFamilyIndex.

public static void
nsrcQueueFamilyIndex(long struct, int value)

Unsafe version of srcQueueFamilyIndex.

public static int
nsType(long struct)

Unsafe version of sType.

public static void
nsType(long struct, int value)

Unsafe version of sType.

public long
offset()

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

public VkBufferMemoryBarrier
offset(long value)

Sets the specified value to the offset field.

public long
pNext()

NULL or a pointer to a structure extending this structure.

public VkBufferMemoryBarrier
pNext(long value)

Sets the specified value to the pNext field.

public VkBufferMemoryBarrier
pNext(VkExternalMemoryAcquireUnmodifiedEXT value)

Prepends the specified VkExternalMemoryAcquireUnmodifiedEXT value to the pNext chain.

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 struct
set
(VkBufferMemoryBarrier
the 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 buffer, or WHOLE_SIZE to use the range from offset to the end of the buffer.

public VkBufferMemoryBarrier
size(long value)

Sets the specified value to the size field.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public int
srcAccessMask()

a bitmask of VkAccessFlagBits specifying a source access mask.

public VkBufferMemoryBarrier
srcAccessMask(int value)

Sets the specified value to the srcAccessMask field.

public int
srcQueueFamilyIndex()

the source queue family for a queue family ownership transfer.

public VkBufferMemoryBarrier
srcQueueFamilyIndex(int value)

Sets the specified value to the srcQueueFamilyIndex field.

public int
sType()

a VkStructureType value identifying this structure.

public VkBufferMemoryBarrier
sType(int value)

Sets the specified value to the sType field.

public VkBufferMemoryBarrier
Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate