Class VulkanMemoryBarrier

java.lang.Object
com.io7m.jcoronado.api.VulkanMemoryBarrier
All Implemented Interfaces:
VulkanMemoryBarrierType

public final class VulkanMemoryBarrier extends Object implements VulkanMemoryBarrierType
Structure specifying the parameters of a global memory barrier.
  • Method Details

    • srcAccessMask

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

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

      public final VulkanMemoryBarrier 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 VulkanMemoryBarrier 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
    • withDstAccessMask

      public final VulkanMemoryBarrier 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 VulkanMemoryBarrier 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
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of VulkanMemoryBarrier 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: srcAccessMask, dstAccessMask.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static VulkanMemoryBarrier.Builder builder()
      Creates a builder for VulkanMemoryBarrier.
      VulkanMemoryBarrier.builder()
         .addSrcAccessMask|addAllSrcAccessMask(com.io7m.jcoronado.api.VulkanAccessFlag) // srcAccessMask elements
         .addDstAccessMask|addAllDstAccessMask(com.io7m.jcoronado.api.VulkanAccessFlag) // dstAccessMask elements
         .build();
      
      Returns:
      A new VulkanMemoryBarrier builder