Class VkBufferMemoryBarrier
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkBufferMemoryBarrier
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkBufferMemoryBarrier extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure 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. IfsrcAccessMaskincludesACCESS_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. IfdstAccessMaskincludesACCESS_HOST_WRITE_BITorACCESS_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
srcQueueFamilyIndexis not equal todstQueueFamilyIndex, andsrcQueueFamilyIndexis 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 ifdstAccessMaskwas 0.If
dstQueueFamilyIndexis not equal tosrcQueueFamilyIndex, anddstQueueFamilyIndexis 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 ifsrcAccessMaskwas 0.Valid Usage
offsetmust be less than the size ofbuffer- If
sizeis not equal toWHOLE_SIZE,sizemust be greater than 0 - If
sizeis not equal toWHOLE_SIZE,sizemust be less than or equal to than the size ofbufferminusoffset - If
bufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject - If
srcQueueFamilyIndexis not equal todstQueueFamilyIndex, at least one must not be a special queue family reserved for external memory ownership transfers, as described in Queue Family Ownership Transfer - If
bufferwas created with a sharing mode ofSHARING_MODE_CONCURRENT,srcQueueFamilyIndexanddstQueueFamilyIndexare not equal, and one ofsrcQueueFamilyIndexanddstQueueFamilyIndexis one of the special queue family values reserved for external memory transfers, the other must beQUEUE_FAMILY_IGNORED - If
bufferwas created with a sharing mode ofSHARING_MODE_EXCLUSIVE, andsrcQueueFamilyIndexanddstQueueFamilyIndexare not equal,srcQueueFamilyIndexanddstQueueFamilyIndexmust both be valid queue families, or one of the special queue family values reserved for external memory transfers, as described in Queue Family Ownership Transfer - If the
synchronization2feature is not enabled, andbufferwas created with a sharing mode ofSHARING_MODE_CONCURRENT, at least one ofsrcQueueFamilyIndexanddstQueueFamilyIndexmust beQUEUE_FAMILY_IGNORED
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_BUFFER_MEMORY_BARRIERpNextmust beNULLbuffermust be a validVkBufferhandle
See Also
CmdPipelineBarrier,CmdWaitEventsLayout
struct VkBufferMemoryBarrier { VkStructureTypesType(); void const *pNext(); VkAccessFlagssrcAccessMask(); VkAccessFlagsdstAccessMask(); uint32_tsrcQueueFamilyIndex(); uint32_tdstQueueFamilyIndex(); VkBufferbuffer(); VkDeviceSizeoffset(); VkDeviceSizesize(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkBufferMemoryBarrier.BufferAn array ofVkBufferMemoryBarrierstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intBUFFER
DSTACCESSMASK
DSTQUEUEFAMILYINDEX
OFFSET
PNEXT
SIZEThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSRCACCESSMASK
SRCQUEUEFAMILYINDEX
STYPEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkBufferMemoryBarrier(java.nio.ByteBuffer container)Creates aVkBufferMemoryBarrierinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description longbuffer()a handle to the buffer whose backing memory is affected by the barrier.VkBufferMemoryBarrierbuffer(long value)Sets the specified value to thebuffer()field.static VkBufferMemoryBarriercalloc()Returns a newVkBufferMemoryBarrierinstance allocated withmemCalloc.static VkBufferMemoryBarrier.Buffercalloc(int capacity)Returns a newVkBufferMemoryBarrier.Bufferinstance allocated withmemCalloc.static VkBufferMemoryBarrier.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkBufferMemoryBarrier.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkBufferMemoryBarriercalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkBufferMemoryBarrierinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkBufferMemoryBarriercallocStack()Deprecated.static VkBufferMemoryBarrier.BuffercallocStack(int capacity)Deprecated.static VkBufferMemoryBarrier.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkBufferMemoryBarriercallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static VkBufferMemoryBarriercreate()Returns a newVkBufferMemoryBarrierinstance allocated withBufferUtils.static VkBufferMemoryBarrier.Buffercreate(int capacity)Returns a newVkBufferMemoryBarrier.Bufferinstance allocated withBufferUtils.static VkBufferMemoryBarriercreate(long address)Returns a newVkBufferMemoryBarrierinstance for the specified memory address.static VkBufferMemoryBarrier.Buffercreate(long address, int capacity)Create aVkBufferMemoryBarrier.Bufferinstance at the specified memory.static VkBufferMemoryBarriercreateSafe(long address)static VkBufferMemoryBarrier.BuffercreateSafe(long address, int capacity)intdstAccessMask()a bitmask ofVkAccessFlagBitsspecifying a destination access mask.VkBufferMemoryBarrierdstAccessMask(int value)Sets the specified value to thedstAccessMask()field.intdstQueueFamilyIndex()the destination queue family for a queue family ownership transfer.VkBufferMemoryBarrierdstQueueFamilyIndex(int value)Sets the specified value to thedstQueueFamilyIndex()field.static VkBufferMemoryBarriermalloc()Returns a newVkBufferMemoryBarrierinstance allocated withmemAlloc.static VkBufferMemoryBarrier.Buffermalloc(int capacity)Returns a newVkBufferMemoryBarrier.Bufferinstance allocated withmemAlloc.static VkBufferMemoryBarrier.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkBufferMemoryBarrier.Bufferinstance allocated on the specifiedMemoryStack.static VkBufferMemoryBarriermalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkBufferMemoryBarrierinstance allocated on the specifiedMemoryStack.static VkBufferMemoryBarriermallocStack()Deprecated.static VkBufferMemoryBarrier.BuffermallocStack(int capacity)Deprecated.static VkBufferMemoryBarrier.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkBufferMemoryBarriermallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static longnbuffer(long struct)Unsafe version ofbuffer().static voidnbuffer(long struct, long value)Unsafe version ofbuffer.static intndstAccessMask(long struct)Unsafe version ofdstAccessMask().static voidndstAccessMask(long struct, int value)Unsafe version ofdstAccessMask.static intndstQueueFamilyIndex(long struct)Unsafe version ofdstQueueFamilyIndex().static voidndstQueueFamilyIndex(long struct, int value)Unsafe version ofdstQueueFamilyIndex.static longnoffset(long struct)Unsafe version ofoffset().static voidnoffset(long struct, long value)Unsafe version ofoffset.static longnpNext(long struct)Unsafe version ofpNext().static voidnpNext(long struct, long value)Unsafe version ofpNext.static longnsize(long struct)Unsafe version ofsize().static voidnsize(long struct, long value)Unsafe version ofsize.static intnsrcAccessMask(long struct)Unsafe version ofsrcAccessMask().static voidnsrcAccessMask(long struct, int value)Unsafe version ofsrcAccessMask.static intnsrcQueueFamilyIndex(long struct)Unsafe version ofsrcQueueFamilyIndex().static voidnsrcQueueFamilyIndex(long struct, int value)Unsafe version ofsrcQueueFamilyIndex.static intnsType(long struct)Unsafe version ofsType().static voidnsType(long struct, int value)Unsafe version ofsType.longoffset()an offset in bytes into the backing memory forbuffer; this is relative to the base offset as bound to the buffer (seeBindBufferMemory).VkBufferMemoryBarrieroffset(long value)Sets the specified value to theoffset()field.longpNext()NULLor a pointer to a structure extending this structure.VkBufferMemoryBarrierpNext(long value)Sets the specified value to thepNext()field.VkBufferMemoryBarrierset(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.VkBufferMemoryBarrierset(VkBufferMemoryBarrier src)Copies the specified struct data to this struct.longsize()a size in bytes of the affected area of backing memory forbuffer, orWHOLE_SIZEto use the range fromoffsetto the end of the buffer.VkBufferMemoryBarriersize(long value)Sets the specified value to thesize()field.intsizeof()intsrcAccessMask()a bitmask ofVkAccessFlagBitsspecifying a source access mask.VkBufferMemoryBarriersrcAccessMask(int value)Sets the specified value to thesrcAccessMask()field.intsrcQueueFamilyIndex()the source queue family for a queue family ownership transfer.VkBufferMemoryBarriersrcQueueFamilyIndex(int value)Sets the specified value to thesrcQueueFamilyIndex()field.intsType()the type of this structure.VkBufferMemoryBarriersType(int value)Sets the specified value to thesType()field.VkBufferMemoryBarriersType$Default()Sets theSTRUCTURE_TYPE_BUFFER_MEMORY_BARRIERvalue to thesType()field.
-
-
-
Constructor Detail
-
VkBufferMemoryBarrier
public VkBufferMemoryBarrier(java.nio.ByteBuffer container)
Creates aVkBufferMemoryBarrierinstance at the current position of the specifiedByteBuffercontainer. 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.
-
-
Method Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
sType
public int sType()
the type of this structure.
-
pNext
public long pNext()
NULLor a pointer to a structure extending this structure.
-
srcAccessMask
public int srcAccessMask()
a bitmask ofVkAccessFlagBitsspecifying a source access mask.
-
dstAccessMask
public int dstAccessMask()
a bitmask ofVkAccessFlagBitsspecifying a destination access mask.
-
srcQueueFamilyIndex
public int srcQueueFamilyIndex()
the source queue family for a queue family ownership transfer.
-
dstQueueFamilyIndex
public int dstQueueFamilyIndex()
the destination queue family for a queue family ownership transfer.
-
buffer
public long buffer()
a handle to the buffer whose backing memory is affected by the barrier.
-
offset
public long offset()
an offset in bytes into the backing memory forbuffer; this is relative to the base offset as bound to the buffer (seeBindBufferMemory).
-
size
public long size()
a size in bytes of the affected area of backing memory forbuffer, orWHOLE_SIZEto use the range fromoffsetto the end of the buffer.
-
sType
public VkBufferMemoryBarrier sType(int value)
Sets the specified value to thesType()field.
-
sType$Default
public VkBufferMemoryBarrier sType$Default()
Sets theSTRUCTURE_TYPE_BUFFER_MEMORY_BARRIERvalue to thesType()field.
-
pNext
public VkBufferMemoryBarrier pNext(long value)
Sets the specified value to thepNext()field.
-
srcAccessMask
public VkBufferMemoryBarrier srcAccessMask(int value)
Sets the specified value to thesrcAccessMask()field.
-
dstAccessMask
public VkBufferMemoryBarrier dstAccessMask(int value)
Sets the specified value to thedstAccessMask()field.
-
srcQueueFamilyIndex
public VkBufferMemoryBarrier srcQueueFamilyIndex(int value)
Sets the specified value to thesrcQueueFamilyIndex()field.
-
dstQueueFamilyIndex
public VkBufferMemoryBarrier dstQueueFamilyIndex(int value)
Sets the specified value to thedstQueueFamilyIndex()field.
-
buffer
public VkBufferMemoryBarrier buffer(long value)
Sets the specified value to thebuffer()field.
-
offset
public VkBufferMemoryBarrier offset(long value)
Sets the specified value to theoffset()field.
-
size
public VkBufferMemoryBarrier size(long value)
Sets the specified value to thesize()field.
-
set
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.
-
set
public VkBufferMemoryBarrier set(VkBufferMemoryBarrier src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkBufferMemoryBarrier malloc()
Returns a newVkBufferMemoryBarrierinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkBufferMemoryBarrier calloc()
Returns a newVkBufferMemoryBarrierinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkBufferMemoryBarrier create()
Returns a newVkBufferMemoryBarrierinstance allocated withBufferUtils.
-
create
public static VkBufferMemoryBarrier create(long address)
Returns a newVkBufferMemoryBarrierinstance for the specified memory address.
-
createSafe
@Nullable public static VkBufferMemoryBarrier createSafe(long address)
-
malloc
public static VkBufferMemoryBarrier.Buffer malloc(int capacity)
Returns a newVkBufferMemoryBarrier.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkBufferMemoryBarrier.Buffer calloc(int capacity)
Returns a newVkBufferMemoryBarrier.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkBufferMemoryBarrier.Buffer create(int capacity)
Returns a newVkBufferMemoryBarrier.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkBufferMemoryBarrier.Buffer create(long address, int capacity)
Create aVkBufferMemoryBarrier.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkBufferMemoryBarrier.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static VkBufferMemoryBarrier mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkBufferMemoryBarrier callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkBufferMemoryBarrier mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkBufferMemoryBarrier callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkBufferMemoryBarrier.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkBufferMemoryBarrier.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static VkBufferMemoryBarrier.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkBufferMemoryBarrier.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static VkBufferMemoryBarrier malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkBufferMemoryBarrierinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkBufferMemoryBarrier calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkBufferMemoryBarrierinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkBufferMemoryBarrier.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkBufferMemoryBarrier.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static VkBufferMemoryBarrier.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkBufferMemoryBarrier.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nsType
public static int nsType(long struct)
Unsafe version ofsType().
-
npNext
public static long npNext(long struct)
Unsafe version ofpNext().
-
nsrcAccessMask
public static int nsrcAccessMask(long struct)
Unsafe version ofsrcAccessMask().
-
ndstAccessMask
public static int ndstAccessMask(long struct)
Unsafe version ofdstAccessMask().
-
nsrcQueueFamilyIndex
public static int nsrcQueueFamilyIndex(long struct)
Unsafe version ofsrcQueueFamilyIndex().
-
ndstQueueFamilyIndex
public static int ndstQueueFamilyIndex(long struct)
Unsafe version ofdstQueueFamilyIndex().
-
nbuffer
public static long nbuffer(long struct)
Unsafe version ofbuffer().
-
noffset
public static long noffset(long struct)
Unsafe version ofoffset().
-
nsize
public static long nsize(long struct)
Unsafe version ofsize().
-
nsType
public static void nsType(long struct, int value)Unsafe version ofsType.
-
npNext
public static void npNext(long struct, long value)Unsafe version ofpNext.
-
nsrcAccessMask
public static void nsrcAccessMask(long struct, int value)Unsafe version ofsrcAccessMask.
-
ndstAccessMask
public static void ndstAccessMask(long struct, int value)Unsafe version ofdstAccessMask.
-
nsrcQueueFamilyIndex
public static void nsrcQueueFamilyIndex(long struct, int value)Unsafe version ofsrcQueueFamilyIndex.
-
ndstQueueFamilyIndex
public static void ndstQueueFamilyIndex(long struct, int value)Unsafe version ofdstQueueFamilyIndex.
-
nbuffer
public static void nbuffer(long struct, long value)Unsafe version ofbuffer.
-
noffset
public static void noffset(long struct, long value)Unsafe version ofoffset.
-
nsize
public static void nsize(long struct, long value)Unsafe version ofsize.
-
-