Class VulkanBufferMemoryBarrier
java.lang.Object
com.io7m.jcoronado.api.VulkanBufferMemoryBarrier
- All Implemented Interfaces:
VulkanBufferMemoryBarrierType
public final class VulkanBufferMemoryBarrier
extends Object
implements VulkanBufferMemoryBarrierType
Structure specifying the parameters of a buffer memory barrier.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeVulkanBufferMemoryBarrier. -
Method Summary
Modifier and TypeMethodDescriptionbuffer()builder()Creates a builder forVulkanBufferMemoryBarrier.static VulkanBufferMemoryBarriercopyOf(VulkanBufferMemoryBarrierType instance) Creates an immutable copy of aVulkanBufferMemoryBarrierTypevalue.booleanThis instance is equal to all instances ofVulkanBufferMemoryBarrierthat have equal attribute values.inthashCode()Computes a hash code from attributes:sourceAccessMask,targetAccessMask,sourceQueueFamilyIndex,targetQueueFamilyIndex,buffer,offset,size.static VulkanBufferMemoryBarrierof(Iterable<VulkanAccessFlag> sourceAccessMask, Iterable<VulkanAccessFlag> targetAccessMask, VulkanQueueFamilyIndex sourceQueueFamilyIndex, VulkanQueueFamilyIndex targetQueueFamilyIndex, VulkanBufferType buffer, long offset, long size) Construct a new immutableVulkanBufferMemoryBarrierinstance.static VulkanBufferMemoryBarrierof(Set<VulkanAccessFlag> sourceAccessMask, Set<VulkanAccessFlag> targetAccessMask, VulkanQueueFamilyIndex sourceQueueFamilyIndex, VulkanQueueFamilyIndex targetQueueFamilyIndex, VulkanBufferType buffer, long offset, long size) Construct a new immutableVulkanBufferMemoryBarrierinstance.longoffset()longsize()toString()Prints the immutable valueVulkanBufferMemoryBarrierwith attribute values.withBuffer(VulkanBufferType value) Copy the current immutable object by setting a value for thebufferattribute.withOffset(long value) Copy the current immutable object by setting a value for theoffsetattribute.withSize(long value) Copy the current immutable object by setting a value for thesizeattribute.withSourceAccessMask(VulkanAccessFlag... elements) Copy the current immutable object with elements that replace the content ofsourceAccessMask.withSourceAccessMask(Iterable<VulkanAccessFlag> elements) Copy the current immutable object with elements that replace the content ofsourceAccessMask.Copy the current immutable object by setting a value for thesourceQueueFamilyIndexattribute.withTargetAccessMask(VulkanAccessFlag... elements) Copy the current immutable object with elements that replace the content oftargetAccessMask.withTargetAccessMask(Iterable<VulkanAccessFlag> elements) Copy the current immutable object with elements that replace the content oftargetAccessMask.Copy the current immutable object by setting a value for thetargetQueueFamilyIndexattribute.
-
Method Details
-
sourceAccessMask
- Specified by:
sourceAccessMaskin interfaceVulkanBufferMemoryBarrierType- Returns:
- The source access mask
-
targetAccessMask
- Specified by:
targetAccessMaskin interfaceVulkanBufferMemoryBarrierType- Returns:
- The target access mask
-
sourceQueueFamilyIndex
- Specified by:
sourceQueueFamilyIndexin interfaceVulkanBufferMemoryBarrierType- Returns:
- The source queue family for a queue family ownership transfer.
-
targetQueueFamilyIndex
- Specified by:
targetQueueFamilyIndexin interfaceVulkanBufferMemoryBarrierType- Returns:
- The target queue family for a queue family ownership transfer.
-
buffer
- Specified by:
bufferin interfaceVulkanBufferMemoryBarrierType- Returns:
- The buffer affected by this barrier.
-
offset
public long offset()- Specified by:
offsetin interfaceVulkanBufferMemoryBarrierType- Returns:
- An offset in bytes into the backing memory for buffer; this is relative to the base offset as bound to the buffer
-
size
public long size()- Specified by:
sizein interfaceVulkanBufferMemoryBarrierType- Returns:
- A size in bytes of the affected area of backing memory for buffer, or VK_WHOLE_SIZE to use the range from offset to the end of the buffer.
-
withSourceAccessMask
Copy the current immutable object with elements that replace the content ofsourceAccessMask.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withSourceAccessMask
Copy the current immutable object with elements that replace the content ofsourceAccessMask. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of sourceAccessMask elements to set- Returns:
- A modified copy of
thisobject
-
withTargetAccessMask
Copy the current immutable object with elements that replace the content oftargetAccessMask.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withTargetAccessMask
Copy the current immutable object with elements that replace the content oftargetAccessMask. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of targetAccessMask elements to set- Returns:
- A modified copy of
thisobject
-
withSourceQueueFamilyIndex
Copy the current immutable object by setting a value for thesourceQueueFamilyIndexattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for sourceQueueFamilyIndex- Returns:
- A modified copy of the
thisobject
-
withTargetQueueFamilyIndex
Copy the current immutable object by setting a value for thetargetQueueFamilyIndexattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for targetQueueFamilyIndex- Returns:
- A modified copy of the
thisobject
-
withBuffer
Copy the current immutable object by setting a value for thebufferattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for buffer- Returns:
- A modified copy of the
thisobject
-
withOffset
Copy the current immutable object by setting a value for theoffsetattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for offset- Returns:
- A modified copy of the
thisobject
-
withSize
Copy the current immutable object by setting a value for thesizeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for size- Returns:
- A modified copy of the
thisobject
-
equals
-
hashCode
-
toString
-
of
public static VulkanBufferMemoryBarrier of(Set<VulkanAccessFlag> sourceAccessMask, Set<VulkanAccessFlag> targetAccessMask, VulkanQueueFamilyIndex sourceQueueFamilyIndex, VulkanQueueFamilyIndex targetQueueFamilyIndex, VulkanBufferType buffer, long offset, long size) Construct a new immutableVulkanBufferMemoryBarrierinstance.- Parameters:
sourceAccessMask- The value for thesourceAccessMaskattributetargetAccessMask- The value for thetargetAccessMaskattributesourceQueueFamilyIndex- The value for thesourceQueueFamilyIndexattributetargetQueueFamilyIndex- The value for thetargetQueueFamilyIndexattributebuffer- The value for thebufferattributeoffset- The value for theoffsetattributesize- The value for thesizeattribute- Returns:
- An immutable VulkanBufferMemoryBarrier instance
-
of
public static VulkanBufferMemoryBarrier of(Iterable<VulkanAccessFlag> sourceAccessMask, Iterable<VulkanAccessFlag> targetAccessMask, VulkanQueueFamilyIndex sourceQueueFamilyIndex, VulkanQueueFamilyIndex targetQueueFamilyIndex, VulkanBufferType buffer, long offset, long size) Construct a new immutableVulkanBufferMemoryBarrierinstance.- Parameters:
sourceAccessMask- The value for thesourceAccessMaskattributetargetAccessMask- The value for thetargetAccessMaskattributesourceQueueFamilyIndex- The value for thesourceQueueFamilyIndexattributetargetQueueFamilyIndex- The value for thetargetQueueFamilyIndexattributebuffer- The value for thebufferattributeoffset- The value for theoffsetattributesize- The value for thesizeattribute- Returns:
- An immutable VulkanBufferMemoryBarrier instance
-
copyOf
Creates an immutable copy of aVulkanBufferMemoryBarrierTypevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable VulkanBufferMemoryBarrier instance
-
builder
Creates a builder forVulkanBufferMemoryBarrier.VulkanBufferMemoryBarrier.builder() .addSourceAccessMask|addAllSourceAccessMask(com.io7m.jcoronado.api.VulkanAccessFlag) //sourceAccessMaskelements .addTargetAccessMask|addAllTargetAccessMask(com.io7m.jcoronado.api.VulkanAccessFlag) //targetAccessMaskelements .setSourceQueueFamilyIndex(com.io7m.jcoronado.api.VulkanQueueFamilyIndex) // requiredsourceQueueFamilyIndex.setTargetQueueFamilyIndex(com.io7m.jcoronado.api.VulkanQueueFamilyIndex) // requiredtargetQueueFamilyIndex.setBuffer(com.io7m.jcoronado.api.VulkanBufferType) // requiredbuffer.setOffset(long) // requiredoffset.setSize(long) // requiredsize.build();- Returns:
- A new VulkanBufferMemoryBarrier builder
-