Class VulkanSubpassDependency

java.lang.Object
com.io7m.jcoronado.api.VulkanSubpassDependency
All Implemented Interfaces:
VulkanSubpassDependencyType

public final class VulkanSubpassDependency extends Object implements VulkanSubpassDependencyType
Structure specifying a subpass dependency.
See Also:
  • "VkSubpassDependency"
  • Method Details

    • srcSubpass

      public int srcSubpass()
      Specified by:
      srcSubpass in interface VulkanSubpassDependencyType
      Returns:
      The subpass index of the first subpass in the dependency, or VK_SUBPASS_EXTERNAL.
    • dstSubpass

      public int dstSubpass()
      Specified by:
      dstSubpass in interface VulkanSubpassDependencyType
      Returns:
      The subpass index of the second subpass in the dependency, or VK_SUBPASS_EXTERNAL.
    • srcStageMask

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

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

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

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

      public Set<VulkanDependencyFlag> dependencyFlags()
      Specified by:
      dependencyFlags in interface VulkanSubpassDependencyType
      Returns:
      The dependency flags for the subpass
    • withSrcSubpass

      public final VulkanSubpassDependency withSrcSubpass(int value)
      Copy the current immutable object by setting a value for the srcSubpass attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for srcSubpass
      Returns:
      A modified copy or the this object
    • withDstSubpass

      public final VulkanSubpassDependency withDstSubpass(int value)
      Copy the current immutable object by setting a value for the dstSubpass attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for dstSubpass
      Returns:
      A modified copy or the this object
    • withSrcStageMask

      public final VulkanSubpassDependency 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 VulkanSubpassDependency 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
    • withDstStageMask

      public final VulkanSubpassDependency 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 VulkanSubpassDependency 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
    • withSrcAccessMask

      public final VulkanSubpassDependency 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 VulkanSubpassDependency 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 VulkanSubpassDependency 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 VulkanSubpassDependency 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
    • withDependencyFlags

      public final VulkanSubpassDependency withDependencyFlags(VulkanDependencyFlag... elements)
      Copy the current immutable object with elements that replace the content of dependencyFlags.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withDependencyFlags

      public final VulkanSubpassDependency withDependencyFlags(Iterable<VulkanDependencyFlag> elements)
      Copy the current immutable object with elements that replace the content of dependencyFlags. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of dependencyFlags 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 VulkanSubpassDependency 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: srcSubpass, dstSubpass, srcStageMask, dstStageMask, srcAccessMask, dstAccessMask, dependencyFlags.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static VulkanSubpassDependency.Builder builder()
      Creates a builder for VulkanSubpassDependency.
      VulkanSubpassDependency.builder()
         .setSrcSubpass(int) // optional srcSubpass
         .setDstSubpass(int) // optional dstSubpass
         .addSrcStageMask|addAllSrcStageMask(com.io7m.jcoronado.api.VulkanPipelineStageFlag) // srcStageMask elements
         .addDstStageMask|addAllDstStageMask(com.io7m.jcoronado.api.VulkanPipelineStageFlag) // dstStageMask elements
         .addSrcAccessMask|addAllSrcAccessMask(com.io7m.jcoronado.api.VulkanAccessFlag) // srcAccessMask elements
         .addDstAccessMask|addAllDstAccessMask(com.io7m.jcoronado.api.VulkanAccessFlag) // dstAccessMask elements
         .addDependencyFlags|addAllDependencyFlags(com.io7m.jcoronado.api.VulkanDependencyFlag) // dependencyFlags elements
         .build();
      
      Returns:
      A new VulkanSubpassDependency builder