Package org.lwjgl.vulkan
Class VkBufferMemoryBarrier
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkBufferMemoryBarrier
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class VkBufferMemoryBarrier extends Struct
Khronos Reference Page
Vulkan SpecificationSpecifies a buffer memory barrier. This type of barrier only applies to memory accesses involving a specific range of the specified buffer object. That is, a memory dependency formed from a buffer memory barrier is scoped to the specified range of the buffer. It is also used to transfer ownership of a buffer range from one queue family to another.
Valid Usage
sTypemust beSTRUCTURE_TYPE_BUFFER_MEMORY_BARRIERpNextmust beNULLsrcAccessMaskmust be a valid combination ofVkAccessFlagBitsvaluesdstAccessMaskmust be a valid combination ofVkAccessFlagBitsvaluesbuffermust be a validVkBufferhandleoffsetmust 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
bufferwas created with a sharing mode ofSHARING_MODE_CONCURRENT,srcQueueFamilyIndexanddstQueueFamilyIndexmust both beQUEUE_FAMILY_IGNORED - If
bufferwas created with a sharing mode ofSHARING_MODE_EXCLUSIVE,srcQueueFamilyIndexanddstQueueFamilyIndexmust either both beQUEUE_FAMILY_IGNORED, or both be a valid queue family - If
bufferwas created with a sharing mode ofSHARING_MODE_EXCLUSIVE, andsrcQueueFamilyIndexanddstQueueFamilyIndexare valid queue families, at least one of them must be the same as the family of the queue that will execute this barrier
Member documentation
sType– the type of this structure. Must be:STRUCTURE_TYPE_BUFFER_MEMORY_BARRIERpNext– reserved for use by extensionssrcAccessMask– a bitmask of the classes of memory accesses performed by the first set of commands that will participate in the dependency. One or more of:dstAccessMask– a bitmask of the classes of memory accesses performed by the second set of commands that will participate in the dependencysrcQueueFamilyIndex– the queue family that is relinquishing ownership of the range of buffer to another queue, orQUEUE_FAMILY_IGNOREDif there is no transfer of ownershipdstQueueFamilyIndex– the queue family that is acquiring ownership of the range of buffer from another queue, orQUEUE_FAMILY_IGNOREDif there is no transfer of ownershipbuffer– a handle to the buffer whose backing memory is affected by the barrieroffset– an offset in bytes into the backing memory for buffer; this is relative to the base offset as bound to the buffersize– a size in bytes of the affected area of backing memory for buffer, orWHOLE_SIZEto use the range from offset to the end of the buffer
Layout
struct VkBufferMemoryBarrier { VkStructureType sType; const void * pNext; VkAccessFlags srcAccessMask; VkAccessFlags dstAccessMask; uint32_t srcQueueFamilyIndex; uint32_t dstQueueFamilyIndex; VkBuffer buffer; VkDeviceSize offset; VkDeviceSize size; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classVkBufferMemoryBarrier.BufferAn array ofVkBufferMemoryBarrierstructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and 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 Modifier and Type Method and Description longbuffer()Returns the value of thebufferfield.VkBufferMemoryBarrierbuffer(long value)Sets the specified value to thebufferfield.static VkBufferMemoryBarriercalloc()Returns a newVkBufferMemoryBarrierinstance allocated withmemCalloc.static VkBufferMemoryBarrier.Buffercalloc(int capacity)Returns a newVkBufferMemoryBarrier.Bufferinstance allocated withmemCalloc.static VkBufferMemoryBarriercallocStack()Returns a newVkBufferMemoryBarrierinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkBufferMemoryBarrier.BuffercallocStack(int capacity)Returns a newVkBufferMemoryBarrier.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkBufferMemoryBarrier.BuffercallocStack(int capacity, MemoryStack stack)Returns a newVkBufferMemoryBarrier.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkBufferMemoryBarriercallocStack(MemoryStack stack)Returns a newVkBufferMemoryBarrierinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.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 ornullif the address isNULL.static VkBufferMemoryBarrier.Buffercreate(long address, int capacity)Create aVkBufferMemoryBarrier.Bufferinstance at the specified memory.intdstAccessMask()Returns the value of thedstAccessMaskfield.VkBufferMemoryBarrierdstAccessMask(int value)Sets the specified value to thedstAccessMaskfield.intdstQueueFamilyIndex()Returns the value of thedstQueueFamilyIndexfield.VkBufferMemoryBarrierdstQueueFamilyIndex(int value)Sets the specified value to thedstQueueFamilyIndexfield.static VkBufferMemoryBarriermalloc()Returns a newVkBufferMemoryBarrierinstance allocated withmemAlloc.static VkBufferMemoryBarrier.Buffermalloc(int capacity)Returns a newVkBufferMemoryBarrier.Bufferinstance allocated withmemAlloc.static VkBufferMemoryBarriermallocStack()Returns a newVkBufferMemoryBarrierinstance allocated on the thread-localMemoryStack.static VkBufferMemoryBarrier.BuffermallocStack(int capacity)Returns a newVkBufferMemoryBarrier.Bufferinstance allocated on the thread-localMemoryStack.static VkBufferMemoryBarrier.BuffermallocStack(int capacity, MemoryStack stack)Returns a newVkBufferMemoryBarrier.Bufferinstance allocated on the specifiedMemoryStack.static VkBufferMemoryBarriermallocStack(MemoryStack stack)Returns a newVkBufferMemoryBarrierinstance allocated on the specifiedMemoryStack.VkBufferMemoryBarriernset(long struct)Unsafe version ofset.longoffset()Returns the value of theoffsetfield.VkBufferMemoryBarrieroffset(long value)Sets the specified value to theoffsetfield.longpNext()Returns the value of thepNextfield.VkBufferMemoryBarrierpNext(long value)Sets the specified value to thepNextfield.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()Returns the value of thesizefield.VkBufferMemoryBarriersize(long value)Sets the specified value to thesizefield.intsizeof()Returns thesizeof(struct).intsrcAccessMask()Returns the value of thesrcAccessMaskfield.VkBufferMemoryBarriersrcAccessMask(int value)Sets the specified value to thesrcAccessMaskfield.intsrcQueueFamilyIndex()Returns the value of thesrcQueueFamilyIndexfield.VkBufferMemoryBarriersrcQueueFamilyIndex(int value)Sets the specified value to thesrcQueueFamilyIndexfield.intsType()Returns the value of thesTypefield.VkBufferMemoryBarriersType(int value)Sets the specified value to thesTypefield.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
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()
Description copied from class:StructReturns thesizeof(struct).
-
sType
public int sType()
Returns the value of thesTypefield.
-
pNext
public long pNext()
Returns the value of thepNextfield.
-
srcAccessMask
public int srcAccessMask()
Returns the value of thesrcAccessMaskfield.
-
dstAccessMask
public int dstAccessMask()
Returns the value of thedstAccessMaskfield.
-
srcQueueFamilyIndex
public int srcQueueFamilyIndex()
Returns the value of thesrcQueueFamilyIndexfield.
-
dstQueueFamilyIndex
public int dstQueueFamilyIndex()
Returns the value of thedstQueueFamilyIndexfield.
-
buffer
public long buffer()
Returns the value of thebufferfield.
-
offset
public long offset()
Returns the value of theoffsetfield.
-
size
public long size()
Returns the value of thesizefield.
-
sType
public VkBufferMemoryBarrier sType(int value)
Sets the specified value to thesTypefield.
-
pNext
public VkBufferMemoryBarrier pNext(long value)
Sets the specified value to thepNextfield.
-
srcAccessMask
public VkBufferMemoryBarrier srcAccessMask(int value)
Sets the specified value to thesrcAccessMaskfield.
-
dstAccessMask
public VkBufferMemoryBarrier dstAccessMask(int value)
Sets the specified value to thedstAccessMaskfield.
-
srcQueueFamilyIndex
public VkBufferMemoryBarrier srcQueueFamilyIndex(int value)
Sets the specified value to thesrcQueueFamilyIndexfield.
-
dstQueueFamilyIndex
public VkBufferMemoryBarrier dstQueueFamilyIndex(int value)
Sets the specified value to thedstQueueFamilyIndexfield.
-
buffer
public VkBufferMemoryBarrier buffer(long value)
Sets the specified value to thebufferfield.
-
offset
public VkBufferMemoryBarrier offset(long value)
Sets the specified value to theoffsetfield.
-
size
public VkBufferMemoryBarrier size(long value)
Sets the specified value to thesizefield.
-
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.
-
nset
public VkBufferMemoryBarrier nset(long struct)
Unsafe version ofset.
-
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 ornullif the address isNULL.
-
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
-
mallocStack
public static VkBufferMemoryBarrier mallocStack()
Returns a newVkBufferMemoryBarrierinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkBufferMemoryBarrier callocStack()
Returns a newVkBufferMemoryBarrierinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkBufferMemoryBarrier mallocStack(MemoryStack stack)
Returns a newVkBufferMemoryBarrierinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkBufferMemoryBarrier callocStack(MemoryStack stack)
Returns a newVkBufferMemoryBarrierinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static VkBufferMemoryBarrier.Buffer mallocStack(int capacity)
Returns a newVkBufferMemoryBarrier.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkBufferMemoryBarrier.Buffer callocStack(int capacity)
Returns a newVkBufferMemoryBarrier.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkBufferMemoryBarrier.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkBufferMemoryBarrier.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static VkBufferMemoryBarrier.Buffer callocStack(int capacity, 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
-
-