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:
  • "VkBufferMemoryBarrier"
  • Method Details

    • srcStageMask

      public Set<VulkanPipelineStageFlag> srcStageMask()
      Specified by:
      srcStageMask in interface VulkanBufferMemoryBarrierType
      Returns:
      The source stage mask
    • srcAccessMask

      public Set<VulkanAccessFlag> srcAccessMask()
      Specified by:
      srcAccessMask in interface VulkanBufferMemoryBarrierType
      Returns:
      The source access mask
    • dstStageMask

      public Set<VulkanPipelineStageFlag> dstStageMask()
      Specified by:
      dstStageMask in interface VulkanBufferMemoryBarrierType
      Returns:
      The destination stage mask
    • dstAccessMask

      public Set<VulkanAccessFlag> dstAccessMask()
      Specified by:
      dstAccessMask in interface VulkanBufferMemoryBarrierType
      Returns:
      The destination access mask
    • srcQueueFamilyIndex

      public VulkanQueueFamilyIndex srcQueueFamilyIndex()
      Specified by:
      srcQueueFamilyIndex in interface VulkanBufferMemoryBarrierType
      Returns:
      The source queue family for a queue family ownership transfer.
    • dstQueueFamilyIndex

      public VulkanQueueFamilyIndex dstQueueFamilyIndex()
      Specified by:
      dstQueueFamilyIndex in interface VulkanBufferMemoryBarrierType
      Returns:
      The target queue family for a queue family ownership transfer.
    • buffer

      public VulkanBufferType buffer()
      Specified by:
      buffer in interface VulkanBufferMemoryBarrierType
      Returns:
      The buffer affected by this barrier.
    • offset

      public long offset()
      Specified by:
      offset in interface VulkanBufferMemoryBarrierType
      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:
      size in interface VulkanBufferMemoryBarrierType
      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.
    • withSrcStageMask

      public final VulkanBufferMemoryBarrier withSrcStageMask(VulkanPipelineStageFlag... elements)
      Copy the current immutable object with elements that replace the content of srcStageMask.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withSrcStageMask

      public final VulkanBufferMemoryBarrier withSrcStageMask(Iterable<VulkanPipelineStageFlag> elements)
      Copy the current immutable object with elements that replace the content of srcStageMask. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of srcStageMask elements to set
      Returns:
      A modified copy or this if not changed
    • withSrcAccessMask

      public final VulkanBufferMemoryBarrier withSrcAccessMask(VulkanAccessFlag... elements)
      Copy the current immutable object with elements that replace the content of srcAccessMask.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withSrcAccessMask

      public final VulkanBufferMemoryBarrier withSrcAccessMask(Iterable<VulkanAccessFlag> elements)
      Copy the current immutable object with elements that replace the content of srcAccessMask. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of srcAccessMask elements to set
      Returns:
      A modified copy or this if not changed
    • withDstStageMask

      public final VulkanBufferMemoryBarrier withDstStageMask(VulkanPipelineStageFlag... elements)
      Copy the current immutable object with elements that replace the content of dstStageMask.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withDstStageMask

      public final VulkanBufferMemoryBarrier withDstStageMask(Iterable<VulkanPipelineStageFlag> elements)
      Copy the current immutable object with elements that replace the content of dstStageMask. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of dstStageMask elements to set
      Returns:
      A modified copy or this if not changed
    • withDstAccessMask

      public final VulkanBufferMemoryBarrier withDstAccessMask(VulkanAccessFlag... elements)
      Copy the current immutable object with elements that replace the content of dstAccessMask.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withDstAccessMask

      public final VulkanBufferMemoryBarrier withDstAccessMask(Iterable<VulkanAccessFlag> elements)
      Copy the current immutable object with elements that replace the content of dstAccessMask. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of dstAccessMask elements to set
      Returns:
      A modified copy or this if not changed
    • withSrcQueueFamilyIndex

      public final VulkanBufferMemoryBarrier withSrcQueueFamilyIndex(VulkanQueueFamilyIndex value)
      Copy the current immutable object by setting a value for the srcQueueFamilyIndex attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for srcQueueFamilyIndex
      Returns:
      A modified copy or the this object
    • withDstQueueFamilyIndex

      public final VulkanBufferMemoryBarrier withDstQueueFamilyIndex(VulkanQueueFamilyIndex value)
      Copy the current immutable object by setting a value for the dstQueueFamilyIndex attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for dstQueueFamilyIndex
      Returns:
      A modified copy or the this object
    • withBuffer

      public final VulkanBufferMemoryBarrier withBuffer(VulkanBufferType value)
      Copy the current immutable object by setting a value for the buffer attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for buffer
      Returns:
      A modified copy or the this object
    • withOffset

      public final VulkanBufferMemoryBarrier withOffset(long value)
      Copy the current immutable object by setting a value for the offset attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for offset
      Returns:
      A modified copy or the this object
    • withSize

      public final VulkanBufferMemoryBarrier withSize(long value)
      Copy the current immutable object by setting a value for the size attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for size
      Returns:
      A modified copy or the this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of VulkanBufferMemoryBarrier that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: srcStageMask, srcAccessMask, dstStageMask, dstAccessMask, srcQueueFamilyIndex, dstQueueFamilyIndex, buffer, offset, size.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value VulkanBufferMemoryBarrier with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      Creates an immutable copy of a VulkanBufferMemoryBarrierType value. 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

      public static VulkanBufferMemoryBarrier.Builder builder()
      Creates a builder for VulkanBufferMemoryBarrier.
      VulkanBufferMemoryBarrier.builder()
         .addSrcStageMask|addAllSrcStageMask(com.io7m.jcoronado.api.VulkanPipelineStageFlag) // srcStageMask elements
         .addSrcAccessMask|addAllSrcAccessMask(com.io7m.jcoronado.api.VulkanAccessFlag) // srcAccessMask elements
         .addDstStageMask|addAllDstStageMask(com.io7m.jcoronado.api.VulkanPipelineStageFlag) // dstStageMask elements
         .addDstAccessMask|addAllDstAccessMask(com.io7m.jcoronado.api.VulkanAccessFlag) // dstAccessMask elements
         .setSrcQueueFamilyIndex(com.io7m.jcoronado.api.VulkanQueueFamilyIndex) // required srcQueueFamilyIndex
         .setDstQueueFamilyIndex(com.io7m.jcoronado.api.VulkanQueueFamilyIndex) // required dstQueueFamilyIndex
         .setBuffer(com.io7m.jcoronado.api.VulkanBufferType) // required buffer
         .setOffset(long) // optional offset
         .setSize(long) // optional size
         .build();
      
      Returns:
      A new VulkanBufferMemoryBarrier builder