Class VulkanImageMemoryBarrier

java.lang.Object
com.io7m.jcoronado.api.VulkanImageMemoryBarrier
All Implemented Interfaces:
VulkanImageMemoryBarrierType

public final class VulkanImageMemoryBarrier extends Object implements VulkanImageMemoryBarrierType
Structure specifying the parameters of an image memory barrier.
See Also:
  • "VkImageMemoryBarrier"
  • Method Details

    • srcStageMask

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

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

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

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

      public VulkanImageLayout oldLayout()
      Specified by:
      oldLayout in interface VulkanImageMemoryBarrierType
      Returns:
      The original image layout
    • newLayout

      public VulkanImageLayout newLayout()
      Specified by:
      newLayout in interface VulkanImageMemoryBarrierType
      Returns:
      The target image layout
    • srcQueueFamilyIndex

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

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

      public VulkanImageType image()
      Specified by:
      image in interface VulkanImageMemoryBarrierType
      Returns:
      The image affected by this barrier.
    • subresourceRange

      public VulkanImageSubresourceRange subresourceRange()
      Specified by:
      subresourceRange in interface VulkanImageMemoryBarrierType
      Returns:
      The image subresource range within image that is affected by this barrier.
    • withSrcStageMask

      public final VulkanImageMemoryBarrier 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 VulkanImageMemoryBarrier 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 VulkanImageMemoryBarrier 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 VulkanImageMemoryBarrier 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 VulkanImageMemoryBarrier 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 VulkanImageMemoryBarrier 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 VulkanImageMemoryBarrier 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 VulkanImageMemoryBarrier 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
    • withOldLayout

      public final VulkanImageMemoryBarrier withOldLayout(VulkanImageLayout value)
      Copy the current immutable object by setting a value for the oldLayout attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for oldLayout
      Returns:
      A modified copy or the this object
    • withNewLayout

      public final VulkanImageMemoryBarrier withNewLayout(VulkanImageLayout value)
      Copy the current immutable object by setting a value for the newLayout attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for newLayout
      Returns:
      A modified copy or the this object
    • withSrcQueueFamilyIndex

      public final VulkanImageMemoryBarrier 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 VulkanImageMemoryBarrier 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
    • withImage

      public final VulkanImageMemoryBarrier withImage(VulkanImageType value)
      Copy the current immutable object by setting a value for the image attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for image
      Returns:
      A modified copy or the this object
    • withSubresourceRange

      public final VulkanImageMemoryBarrier withSubresourceRange(VulkanImageSubresourceRange value)
      Copy the current immutable object by setting a value for the subresourceRange attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for subresourceRange
      Returns:
      A modified copy or the this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of VulkanImageMemoryBarrier 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, oldLayout, newLayout, srcQueueFamilyIndex, dstQueueFamilyIndex, image, subresourceRange.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static VulkanImageMemoryBarrier copyOf(VulkanImageMemoryBarrierType instance)
      Creates an immutable copy of a VulkanImageMemoryBarrierType 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 VulkanImageMemoryBarrier instance
    • builder

      public static VulkanImageMemoryBarrier.Builder builder()
      Creates a builder for VulkanImageMemoryBarrier.
      VulkanImageMemoryBarrier.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
         .setOldLayout(com.io7m.jcoronado.api.VulkanImageLayout) // required oldLayout
         .setNewLayout(com.io7m.jcoronado.api.VulkanImageLayout) // required newLayout
         .setSrcQueueFamilyIndex(com.io7m.jcoronado.api.VulkanQueueFamilyIndex) // required srcQueueFamilyIndex
         .setDstQueueFamilyIndex(com.io7m.jcoronado.api.VulkanQueueFamilyIndex) // required dstQueueFamilyIndex
         .setImage(com.io7m.jcoronado.api.VulkanImageType) // required image
         .setSubresourceRange(com.io7m.jcoronado.api.VulkanImageSubresourceRange) // required subresourceRange
         .build();
      
      Returns:
      A new VulkanImageMemoryBarrier builder