Class VulkanSubpassDescription

java.lang.Object
com.io7m.jcoronado.api.VulkanSubpassDescription
All Implemented Interfaces:
VulkanSubpassDescriptionType

public final class VulkanSubpassDescription extends Object implements VulkanSubpassDescriptionType
Structure specifying a subpass description.
See Also:
  • "VkSubpassDescription"
  • Method Details

    • flags

      Specified by:
      flags in interface VulkanSubpassDescriptionType
      Returns:
      Description flags
    • pipelineBindPoint

      public VulkanPipelineBindPoint pipelineBindPoint()
      Specified by:
      pipelineBindPoint in interface VulkanSubpassDescriptionType
      Returns:
      The pipeline bind point specifying whether this is a graphics or compute subpass.
    • inputAttachments

      public List<VulkanAttachmentReference> inputAttachments()
      Specified by:
      inputAttachments in interface VulkanSubpassDescriptionType
      Returns:
      A list of the render pass’s attachments that can be read in the fragment shader stage during the subpass, and what layout each attachment will be in during the subpass
    • colorAttachments

      public List<VulkanAttachmentReference> colorAttachments()
      Specified by:
      colorAttachments in interface VulkanSubpassDescriptionType
      Returns:
      A list of the render pass’s attachments that will be used as color attachments in the subpass, and what layout each attachment will be in during the subpass.
    • resolveAttachments

      public List<VulkanAttachmentReference> resolveAttachments()
      Specified by:
      resolveAttachments in interface VulkanSubpassDescriptionType
      Returns:
      A list of the the render pass’s attachments that are resolved to at the end of the subpass, and what layout each attachment will be in during the multisample resolve operation.
    • depthStencilAttachment

      public Optional<VulkanAttachmentReference> depthStencilAttachment()
      Specified by:
      depthStencilAttachment in interface VulkanSubpassDescriptionType
      Returns:
      The attachment that will be used for depth/stencil data and the layout it will be in during the subpass.
    • preserveAttachments

      public List<Integer> preserveAttachments()
      Specified by:
      preserveAttachments in interface VulkanSubpassDescriptionType
      Returns:
      A list of render pass attachment indices describing the attachments that are not used by a subpass, but whose contents must be preserved throughout the subpass.
    • withFlags

      public final VulkanSubpassDescription withFlags(VulkanSubpassDescriptionFlag... elements)
      Copy the current immutable object with elements that replace the content of flags.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withFlags

      Copy the current immutable object with elements that replace the content of flags. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of flags elements to set
      Returns:
      A modified copy of this object
    • withPipelineBindPoint

      public final VulkanSubpassDescription withPipelineBindPoint(VulkanPipelineBindPoint value)
      Copy the current immutable object by setting a value for the pipelineBindPoint attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for pipelineBindPoint
      Returns:
      A modified copy of the this object
    • withInputAttachments

      public final VulkanSubpassDescription withInputAttachments(VulkanAttachmentReference... elements)
      Copy the current immutable object with elements that replace the content of inputAttachments.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withInputAttachments

      public final VulkanSubpassDescription withInputAttachments(Iterable<? extends VulkanAttachmentReference> elements)
      Copy the current immutable object with elements that replace the content of inputAttachments. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of inputAttachments elements to set
      Returns:
      A modified copy of this object
    • withColorAttachments

      public final VulkanSubpassDescription withColorAttachments(VulkanAttachmentReference... elements)
      Copy the current immutable object with elements that replace the content of colorAttachments.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withColorAttachments

      public final VulkanSubpassDescription withColorAttachments(Iterable<? extends VulkanAttachmentReference> elements)
      Copy the current immutable object with elements that replace the content of colorAttachments. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of colorAttachments elements to set
      Returns:
      A modified copy of this object
    • withResolveAttachments

      public final VulkanSubpassDescription withResolveAttachments(VulkanAttachmentReference... elements)
      Copy the current immutable object with elements that replace the content of resolveAttachments.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withResolveAttachments

      public final VulkanSubpassDescription withResolveAttachments(Iterable<? extends VulkanAttachmentReference> elements)
      Copy the current immutable object with elements that replace the content of resolveAttachments. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of resolveAttachments elements to set
      Returns:
      A modified copy of this object
    • withDepthStencilAttachment

      public final VulkanSubpassDescription withDepthStencilAttachment(VulkanAttachmentReference value)
      Copy the current immutable object by setting a present value for the optional depthStencilAttachment attribute.
      Parameters:
      value - The value for depthStencilAttachment
      Returns:
      A modified copy of this object
    • withDepthStencilAttachment

      public final VulkanSubpassDescription withDepthStencilAttachment(Optional<? extends VulkanAttachmentReference> optional)
      Copy the current immutable object by setting an optional value for the depthStencilAttachment attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for depthStencilAttachment
      Returns:
      A modified copy of this object
    • withPreserveAttachments

      public final VulkanSubpassDescription withPreserveAttachments(int... elements)
      Copy the current immutable object with elements that replace the content of preserveAttachments.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withPreserveAttachments

      public final VulkanSubpassDescription withPreserveAttachments(Iterable<Integer> elements)
      Copy the current immutable object with elements that replace the content of preserveAttachments. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of preserveAttachments elements to set
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of VulkanSubpassDescription 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: flags, pipelineBindPoint, inputAttachments, colorAttachments, resolveAttachments, depthStencilAttachment, preserveAttachments.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static VulkanSubpassDescription.Builder builder()
      Creates a builder for VulkanSubpassDescription.
       VulkanSubpassDescription.builder()
          .addFlags|addAllFlags(com.io7m.jcoronado.api.VulkanSubpassDescriptionFlag) // flags elements
          .setPipelineBindPoint(com.io7m.jcoronado.api.VulkanPipelineBindPoint) // required pipelineBindPoint
          .addInputAttachments|addAllInputAttachments(VulkanAttachmentReference) // inputAttachments elements
          .addColorAttachments|addAllColorAttachments(VulkanAttachmentReference) // colorAttachments elements
          .addResolveAttachments|addAllResolveAttachments(VulkanAttachmentReference) // resolveAttachments elements
          .setDepthStencilAttachment(VulkanAttachmentReference) // optional depthStencilAttachment
          .addPreserveAttachments|addAllPreserveAttachments(int) // preserveAttachments elements
          .build();
       
      Returns:
      A new VulkanSubpassDescription builder