public class VkBufferMemoryBarrier
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
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, memory writes performed by that access type are also made visible, as that access type is not performed through a resource.
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, available memory writes are also made visible to accesses of those types, as those access types are not performed through a resource.
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 was created with a sharing mode of SHARING_MODE_CONCURRENT, at least one of srcQueueFamilyIndex and dstQueueFamilyIndex must be QUEUE_FAMILY_IGNOREDbuffer was created with a sharing mode of SHARING_MODE_CONCURRENT, and one of srcQueueFamilyIndex and dstQueueFamilyIndex is QUEUE_FAMILY_IGNORED, the other must be QUEUE_FAMILY_IGNORED or a special queue family reserved for external memory ownership transfers, as described in Queue Family Ownership Transfer.buffer was created with a sharing mode of SHARING_MODE_EXCLUSIVE and srcQueueFamilyIndex is QUEUE_FAMILY_IGNORED, dstQueueFamilyIndex must also be QUEUE_FAMILY_IGNOREDbuffer was created with a sharing mode of SHARING_MODE_EXCLUSIVE and srcQueueFamilyIndex is not QUEUE_FAMILY_IGNORED, it must be a valid queue family or a special queue family reserved for external memory transfers, as described in Queue Family Ownership Transfer.buffer was created with a sharing mode of SHARING_MODE_EXCLUSIVE and dstQueueFamilyIndex is not QUEUE_FAMILY_IGNORED, it must be a valid queue family or a special queue family reserved for external memory transfers, as described in Queue Family Ownership Transfer.buffer was created with a sharing mode of SHARING_MODE_EXCLUSIVE, and srcQueueFamilyIndex and dstQueueFamilyIndex are not QUEUE_FAMILY_IGNORED, at least one of them must be the same as the family of the queue that will execute this barrierbuffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory objectsType must be STRUCTURE_TYPE_BUFFER_MEMORY_BARRIERpNext must be NULLbuffer must be a valid VkBuffer handleCmdPipelineBarrier, CmdWaitEvents
sType – the type of this structure.pNext – NULL or a pointer to an extension-specific structure.srcAccessMask – a bitmask of VkAccessFlagBits specifying a source access mask.dstAccessMask – a bitmask of VkAccessFlagBits specifying a destination access mask.srcQueueFamilyIndex – the source queue family for a queue family ownership transfer.dstQueueFamilyIndex – the destination queue family for a queue family ownership transfer.buffer – a handle to the buffer whose backing memory is affected by the barrier.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).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.
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 |
|---|---|
static class |
VkBufferMemoryBarrier.Buffer
An array of
VkBufferMemoryBarrier structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
BUFFER
The struct member offsets.
|
static int |
DSTACCESSMASK
The struct member offsets.
|
static int |
DSTQUEUEFAMILYINDEX
The struct member offsets.
|
static int |
OFFSET
The struct member offsets.
|
static int |
PNEXT
The struct member offsets.
|
static int |
SIZE
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
SRCACCESSMASK
The struct member offsets.
|
static int |
SRCQUEUEFAMILYINDEX
The struct member offsets.
|
static int |
STYPE
The struct member offsets.
|
| Constructor and Description |
|---|
VkBufferMemoryBarrier(java.nio.ByteBuffer container)
Creates a
VkBufferMemoryBarrier instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
long |
buffer()
Returns the value of the
buffer field. |
VkBufferMemoryBarrier |
buffer(long value)
Sets the specified value to the
buffer field. |
static VkBufferMemoryBarrier |
calloc()
Returns a new
VkBufferMemoryBarrier instance allocated with memCalloc. |
static VkBufferMemoryBarrier.Buffer |
calloc(int capacity)
Returns a new
VkBufferMemoryBarrier.Buffer instance allocated with memCalloc. |
static VkBufferMemoryBarrier |
callocStack()
Returns a new
VkBufferMemoryBarrier instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkBufferMemoryBarrier.Buffer |
callocStack(int capacity)
Returns a new
VkBufferMemoryBarrier.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkBufferMemoryBarrier.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkBufferMemoryBarrier.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkBufferMemoryBarrier |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkBufferMemoryBarrier instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkBufferMemoryBarrier |
create()
Returns a new
VkBufferMemoryBarrier instance allocated with BufferUtils. |
static VkBufferMemoryBarrier.Buffer |
create(int capacity)
Returns a new
VkBufferMemoryBarrier.Buffer instance allocated with BufferUtils. |
static VkBufferMemoryBarrier |
create(long address)
Returns a new
VkBufferMemoryBarrier instance for the specified memory address. |
static VkBufferMemoryBarrier.Buffer |
create(long address,
int capacity)
Create a
VkBufferMemoryBarrier.Buffer instance at the specified memory. |
static VkBufferMemoryBarrier |
createSafe(long address)
|
static VkBufferMemoryBarrier.Buffer |
createSafe(long address,
int capacity)
|
int |
dstAccessMask()
Returns the value of the
dstAccessMask field. |
VkBufferMemoryBarrier |
dstAccessMask(int value)
Sets the specified value to the
dstAccessMask field. |
int |
dstQueueFamilyIndex()
Returns the value of the
dstQueueFamilyIndex field. |
VkBufferMemoryBarrier |
dstQueueFamilyIndex(int value)
Sets the specified value to the
dstQueueFamilyIndex field. |
static VkBufferMemoryBarrier |
malloc()
Returns a new
VkBufferMemoryBarrier instance allocated with memAlloc. |
static VkBufferMemoryBarrier.Buffer |
malloc(int capacity)
Returns a new
VkBufferMemoryBarrier.Buffer instance allocated with memAlloc. |
static VkBufferMemoryBarrier |
mallocStack()
Returns a new
VkBufferMemoryBarrier instance allocated on the thread-local MemoryStack. |
static VkBufferMemoryBarrier.Buffer |
mallocStack(int capacity)
Returns a new
VkBufferMemoryBarrier.Buffer instance allocated on the thread-local MemoryStack. |
static VkBufferMemoryBarrier.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkBufferMemoryBarrier.Buffer instance allocated on the specified MemoryStack. |
static VkBufferMemoryBarrier |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkBufferMemoryBarrier instance allocated on the specified MemoryStack. |
static long |
nbuffer(long struct)
Unsafe version of
buffer(). |
static void |
nbuffer(long struct,
long value)
Unsafe version of
buffer. |
static int |
ndstAccessMask(long struct)
Unsafe version of
dstAccessMask(). |
static void |
ndstAccessMask(long struct,
int value)
Unsafe version of
dstAccessMask. |
static int |
ndstQueueFamilyIndex(long struct)
Unsafe version of
dstQueueFamilyIndex(). |
static void |
ndstQueueFamilyIndex(long struct,
int value)
Unsafe version of
dstQueueFamilyIndex. |
static long |
noffset(long struct)
Unsafe version of
offset(). |
static void |
noffset(long struct,
long value)
Unsafe version of
offset. |
static long |
npNext(long struct)
Unsafe version of
pNext(). |
static void |
npNext(long struct,
long value)
Unsafe version of
pNext. |
static long |
nsize(long struct)
Unsafe version of
size(). |
static void |
nsize(long struct,
long value)
Unsafe version of
size. |
static int |
nsrcAccessMask(long struct)
Unsafe version of
srcAccessMask(). |
static void |
nsrcAccessMask(long struct,
int value)
Unsafe version of
srcAccessMask. |
static int |
nsrcQueueFamilyIndex(long struct)
Unsafe version of
srcQueueFamilyIndex(). |
static void |
nsrcQueueFamilyIndex(long struct,
int value)
Unsafe version of
srcQueueFamilyIndex. |
static int |
nsType(long struct)
Unsafe version of
sType(). |
static void |
nsType(long struct,
int value)
Unsafe version of
sType. |
long |
offset()
Returns the value of the
offset field. |
VkBufferMemoryBarrier |
offset(long value)
Sets the specified value to the
offset field. |
long |
pNext()
Returns the value of the
pNext field. |
VkBufferMemoryBarrier |
pNext(long value)
Sets the specified value to the
pNext field. |
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.
|
VkBufferMemoryBarrier |
set(VkBufferMemoryBarrier src)
Copies the specified struct data to this struct.
|
long |
size()
Returns the value of the
size field. |
VkBufferMemoryBarrier |
size(long value)
Sets the specified value to the
size field. |
int |
sizeof() |
int |
srcAccessMask()
Returns the value of the
srcAccessMask field. |
VkBufferMemoryBarrier |
srcAccessMask(int value)
Sets the specified value to the
srcAccessMask field. |
int |
srcQueueFamilyIndex()
Returns the value of the
srcQueueFamilyIndex field. |
VkBufferMemoryBarrier |
srcQueueFamilyIndex(int value)
Sets the specified value to the
srcQueueFamilyIndex field. |
int |
sType()
Returns the value of the
sType field. |
VkBufferMemoryBarrier |
sType(int value)
Sets the specified value to the
sType field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int STYPE
public static final int PNEXT
public static final int SRCACCESSMASK
public static final int DSTACCESSMASK
public static final int SRCQUEUEFAMILYINDEX
public static final int DSTQUEUEFAMILYINDEX
public static final int BUFFER
public static final int OFFSET
public static final int SIZE
public VkBufferMemoryBarrier(java.nio.ByteBuffer container)
VkBufferMemoryBarrier instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be
visible to the struct instance and vice versa.
The created instance holds a strong reference to the container object.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic int sType()
sType field.public long pNext()
pNext field.public int srcAccessMask()
srcAccessMask field.public int dstAccessMask()
dstAccessMask field.public int srcQueueFamilyIndex()
srcQueueFamilyIndex field.public int dstQueueFamilyIndex()
dstQueueFamilyIndex field.public long buffer()
buffer field.public long offset()
offset field.public long size()
size field.public VkBufferMemoryBarrier sType(int value)
sType field.public VkBufferMemoryBarrier pNext(long value)
pNext field.public VkBufferMemoryBarrier srcAccessMask(int value)
srcAccessMask field.public VkBufferMemoryBarrier dstAccessMask(int value)
dstAccessMask field.public VkBufferMemoryBarrier srcQueueFamilyIndex(int value)
srcQueueFamilyIndex field.public VkBufferMemoryBarrier dstQueueFamilyIndex(int value)
dstQueueFamilyIndex field.public VkBufferMemoryBarrier buffer(long value)
buffer field.public VkBufferMemoryBarrier offset(long value)
offset field.public VkBufferMemoryBarrier size(long value)
size field.public VkBufferMemoryBarrier set(int sType, long pNext, int srcAccessMask, int dstAccessMask, int srcQueueFamilyIndex, int dstQueueFamilyIndex, long buffer, long offset, long size)
public VkBufferMemoryBarrier set(VkBufferMemoryBarrier src)
src - the source structpublic static VkBufferMemoryBarrier malloc()
VkBufferMemoryBarrier instance allocated with memAlloc. The instance must be explicitly freed.public static VkBufferMemoryBarrier calloc()
VkBufferMemoryBarrier instance allocated with memCalloc. The instance must be explicitly freed.public static VkBufferMemoryBarrier create()
VkBufferMemoryBarrier instance allocated with BufferUtils.public static VkBufferMemoryBarrier create(long address)
VkBufferMemoryBarrier instance for the specified memory address.@Nullable public static VkBufferMemoryBarrier createSafe(long address)
public static VkBufferMemoryBarrier.Buffer malloc(int capacity)
VkBufferMemoryBarrier.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkBufferMemoryBarrier.Buffer calloc(int capacity)
VkBufferMemoryBarrier.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkBufferMemoryBarrier.Buffer create(int capacity)
VkBufferMemoryBarrier.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static VkBufferMemoryBarrier.Buffer create(long address, int capacity)
VkBufferMemoryBarrier.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static VkBufferMemoryBarrier.Buffer createSafe(long address, int capacity)
public static VkBufferMemoryBarrier mallocStack()
VkBufferMemoryBarrier instance allocated on the thread-local MemoryStack.public static VkBufferMemoryBarrier callocStack()
VkBufferMemoryBarrier instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static VkBufferMemoryBarrier mallocStack(org.lwjgl.system.MemoryStack stack)
VkBufferMemoryBarrier instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static VkBufferMemoryBarrier callocStack(org.lwjgl.system.MemoryStack stack)
VkBufferMemoryBarrier instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static VkBufferMemoryBarrier.Buffer mallocStack(int capacity)
VkBufferMemoryBarrier.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static VkBufferMemoryBarrier.Buffer callocStack(int capacity)
VkBufferMemoryBarrier.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static VkBufferMemoryBarrier.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkBufferMemoryBarrier.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VkBufferMemoryBarrier.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkBufferMemoryBarrier.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static int nsType(long struct)
sType().public static long npNext(long struct)
pNext().public static int nsrcAccessMask(long struct)
srcAccessMask().public static int ndstAccessMask(long struct)
dstAccessMask().public static int nsrcQueueFamilyIndex(long struct)
srcQueueFamilyIndex().public static int ndstQueueFamilyIndex(long struct)
dstQueueFamilyIndex().public static long nbuffer(long struct)
buffer().public static long noffset(long struct)
offset().public static long nsize(long struct)
size().public static void nsType(long struct,
int value)
sType.public static void npNext(long struct,
long value)
pNext.public static void nsrcAccessMask(long struct,
int value)
srcAccessMask.public static void ndstAccessMask(long struct,
int value)
dstAccessMask.public static void nsrcQueueFamilyIndex(long struct,
int value)
srcQueueFamilyIndex.public static void ndstQueueFamilyIndex(long struct,
int value)
dstQueueFamilyIndex.public static void nbuffer(long struct,
long value)
buffer.public static void noffset(long struct,
long value)
offset.public static void nsize(long struct,
long value)
size.Copyright LWJGL. All Rights Reserved. License terms.