- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanSubpassDescription
-
- All Implemented Interfaces:
VulkanSubpassDescriptionType
public final class VulkanSubpassDescription extends java.lang.Object implements VulkanSubpassDescriptionType
Structure specifying a subpass description.- See Also:
- "VkSubpassDescription"
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VulkanSubpassDescription.Builder
Builds instances of typeVulkanSubpassDescription
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VulkanSubpassDescription.Builder
builder()
Creates a builder forVulkanSubpassDescription
.java.util.List<VulkanAttachmentReference>
colorAttachments()
static VulkanSubpassDescription
copyOf(VulkanSubpassDescriptionType instance)
Creates an immutable copy of aVulkanSubpassDescriptionType
value.java.util.Optional<VulkanAttachmentReference>
depthStencilAttachment()
boolean
equals(java.lang.Object another)
This instance is equal to all instances ofVulkanSubpassDescription
that have equal attribute values.java.util.Set<VulkanSubpassDescriptionFlag>
flags()
int
hashCode()
Computes a hash code from attributes:flags
,pipelineBindPoint
,inputAttachments
,colorAttachments
,resolveAttachments
,depthStencilAttachment
,preserveAttachments
.java.util.List<VulkanAttachmentReference>
inputAttachments()
VulkanPipelineBindPoint
pipelineBindPoint()
java.util.List<java.lang.Integer>
preserveAttachments()
java.util.List<VulkanAttachmentReference>
resolveAttachments()
java.lang.String
toString()
Prints the immutable valueVulkanSubpassDescription
with attribute values.VulkanSubpassDescription
withColorAttachments(VulkanAttachmentReference... elements)
Copy the current immutable object with elements that replace the content ofcolorAttachments
.VulkanSubpassDescription
withColorAttachments(java.lang.Iterable<? extends VulkanAttachmentReference> elements)
Copy the current immutable object with elements that replace the content ofcolorAttachments
.VulkanSubpassDescription
withDepthStencilAttachment(VulkanAttachmentReference value)
Copy the current immutable object by setting a present value for the optionaldepthStencilAttachment
attribute.VulkanSubpassDescription
withDepthStencilAttachment(java.util.Optional<? extends VulkanAttachmentReference> optional)
Copy the current immutable object by setting an optional value for thedepthStencilAttachment
attribute.VulkanSubpassDescription
withFlags(VulkanSubpassDescriptionFlag... elements)
Copy the current immutable object with elements that replace the content offlags
.VulkanSubpassDescription
withFlags(java.lang.Iterable<VulkanSubpassDescriptionFlag> elements)
Copy the current immutable object with elements that replace the content offlags
.VulkanSubpassDescription
withInputAttachments(VulkanAttachmentReference... elements)
Copy the current immutable object with elements that replace the content ofinputAttachments
.VulkanSubpassDescription
withInputAttachments(java.lang.Iterable<? extends VulkanAttachmentReference> elements)
Copy the current immutable object with elements that replace the content ofinputAttachments
.VulkanSubpassDescription
withPipelineBindPoint(VulkanPipelineBindPoint value)
Copy the current immutable object by setting a value for thepipelineBindPoint
attribute.VulkanSubpassDescription
withPreserveAttachments(int... elements)
Copy the current immutable object with elements that replace the content ofpreserveAttachments
.VulkanSubpassDescription
withPreserveAttachments(java.lang.Iterable<java.lang.Integer> elements)
Copy the current immutable object with elements that replace the content ofpreserveAttachments
.VulkanSubpassDescription
withResolveAttachments(VulkanAttachmentReference... elements)
Copy the current immutable object with elements that replace the content ofresolveAttachments
.VulkanSubpassDescription
withResolveAttachments(java.lang.Iterable<? extends VulkanAttachmentReference> elements)
Copy the current immutable object with elements that replace the content ofresolveAttachments
.
-
-
-
Method Detail
-
flags
public java.util.Set<VulkanSubpassDescriptionFlag> flags()
- Specified by:
flags
in interfaceVulkanSubpassDescriptionType
- Returns:
- Description flags
-
pipelineBindPoint
public VulkanPipelineBindPoint pipelineBindPoint()
- Specified by:
pipelineBindPoint
in interfaceVulkanSubpassDescriptionType
- Returns:
- The pipeline bind point specifying whether this is a graphics or compute subpass.
-
inputAttachments
public java.util.List<VulkanAttachmentReference> inputAttachments()
- Specified by:
inputAttachments
in interfaceVulkanSubpassDescriptionType
- 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 java.util.List<VulkanAttachmentReference> colorAttachments()
- Specified by:
colorAttachments
in interfaceVulkanSubpassDescriptionType
- 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 java.util.List<VulkanAttachmentReference> resolveAttachments()
- Specified by:
resolveAttachments
in interfaceVulkanSubpassDescriptionType
- 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 java.util.Optional<VulkanAttachmentReference> depthStencilAttachment()
- Specified by:
depthStencilAttachment
in interfaceVulkanSubpassDescriptionType
- Returns:
- The attachment that will be used for depth/stencil data and the layout it will be in during the subpass.
-
preserveAttachments
public java.util.List<java.lang.Integer> preserveAttachments()
- Specified by:
preserveAttachments
in interfaceVulkanSubpassDescriptionType
- 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 offlags
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withFlags
public final VulkanSubpassDescription withFlags(java.lang.Iterable<VulkanSubpassDescriptionFlag> elements)
Copy the current immutable object with elements that replace the content offlags
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- 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 thepipelineBindPoint
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- 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 ofinputAttachments
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withInputAttachments
public final VulkanSubpassDescription withInputAttachments(java.lang.Iterable<? extends VulkanAttachmentReference> elements)
Copy the current immutable object with elements that replace the content ofinputAttachments
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- 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 ofcolorAttachments
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withColorAttachments
public final VulkanSubpassDescription withColorAttachments(java.lang.Iterable<? extends VulkanAttachmentReference> elements)
Copy the current immutable object with elements that replace the content ofcolorAttachments
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- 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 ofresolveAttachments
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withResolveAttachments
public final VulkanSubpassDescription withResolveAttachments(java.lang.Iterable<? extends VulkanAttachmentReference> elements)
Copy the current immutable object with elements that replace the content ofresolveAttachments
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- 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 optionaldepthStencilAttachment
attribute.- Parameters:
value
- The value for depthStencilAttachment- Returns:
- A modified copy of
this
object
-
withDepthStencilAttachment
public final VulkanSubpassDescription withDepthStencilAttachment(java.util.Optional<? extends VulkanAttachmentReference> optional)
Copy the current immutable object by setting an optional value for thedepthStencilAttachment
attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis
.- 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 ofpreserveAttachments
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withPreserveAttachments
public final VulkanSubpassDescription withPreserveAttachments(java.lang.Iterable<java.lang.Integer> elements)
Copy the current immutable object with elements that replace the content ofpreserveAttachments
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of preserveAttachments elements to set- Returns:
- A modified copy of
this
object
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofVulkanSubpassDescription
that have equal attribute values.- Overrides:
equals
in classjava.lang.Object
- Returns:
true
ifthis
is equal toanother
instance
-
hashCode
public int hashCode()
Computes a hash code from attributes:flags
,pipelineBindPoint
,inputAttachments
,colorAttachments
,resolveAttachments
,depthStencilAttachment
,preserveAttachments
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueVulkanSubpassDescription
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
copyOf
public static VulkanSubpassDescription copyOf(VulkanSubpassDescriptionType instance)
Creates an immutable copy of aVulkanSubpassDescriptionType
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 forVulkanSubpassDescription
.- Returns:
- A new VulkanSubpassDescription builder
-
-