Class VulkanGraphicsPipelineCreateInfo
java.lang.Object
com.io7m.jcoronado.api.VulkanGraphicsPipelineCreateInfo
- All Implemented Interfaces:
VulkanGraphicsPipelineCreateInfoType
public final class VulkanGraphicsPipelineCreateInfo
extends Object
implements VulkanGraphicsPipelineCreateInfoType
Structure specifying parameters of a newly created graphics pipeline.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeVulkanGraphicsPipelineCreateInfo. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forVulkanGraphicsPipelineCreateInfo.copyOf(VulkanGraphicsPipelineCreateInfoType instance) Creates an immutable copy of aVulkanGraphicsPipelineCreateInfoTypevalue.booleanThis instance is equal to all instances ofVulkanGraphicsPipelineCreateInfothat have equal attribute values.flags()inthashCode()Computes a hash code from attributes:flags,stages,vertexInputState,inputAssemblyState,tessellationState,viewportState,rasterizationState,multisampleState,depthStencilState,colorBlendState,dynamicState,layout,renderPass,subpass,basePipeline,basePipelineIndex.layout()of(Iterable<VulkanPipelineCreateFlag> flags, Iterable<? extends VulkanPipelineShaderStageCreateInfo> stages, VulkanPipelineVertexInputStateCreateInfo vertexInputState, VulkanPipelineInputAssemblyStateCreateInfo inputAssemblyState, Optional<? extends VulkanPipelineTessellationStateCreateInfo> tessellationState, Optional<? extends VulkanPipelineViewportStateCreateInfo> viewportState, VulkanPipelineRasterizationStateCreateInfo rasterizationState, Optional<? extends VulkanPipelineMultisampleStateCreateInfo> multisampleState, Optional<? extends VulkanPipelineDepthStencilStateCreateInfo> depthStencilState, Optional<? extends VulkanPipelineColorBlendStateCreateInfo> colorBlendState, Optional<? extends VulkanPipelineDynamicStateCreateInfo> dynamicState, VulkanPipelineLayoutType layout, VulkanRenderPassType renderPass, int subpass, Optional<? extends VulkanPipelineType> basePipeline, OptionalInt basePipelineIndex) Construct a new immutableVulkanGraphicsPipelineCreateInfoinstance.of(Set<VulkanPipelineCreateFlag> flags, List<VulkanPipelineShaderStageCreateInfo> stages, VulkanPipelineVertexInputStateCreateInfo vertexInputState, VulkanPipelineInputAssemblyStateCreateInfo inputAssemblyState, Optional<VulkanPipelineTessellationStateCreateInfo> tessellationState, Optional<VulkanPipelineViewportStateCreateInfo> viewportState, VulkanPipelineRasterizationStateCreateInfo rasterizationState, Optional<VulkanPipelineMultisampleStateCreateInfo> multisampleState, Optional<VulkanPipelineDepthStencilStateCreateInfo> depthStencilState, Optional<VulkanPipelineColorBlendStateCreateInfo> colorBlendState, Optional<VulkanPipelineDynamicStateCreateInfo> dynamicState, VulkanPipelineLayoutType layout, VulkanRenderPassType renderPass, int subpass, Optional<VulkanPipelineType> basePipeline, OptionalInt basePipelineIndex) Construct a new immutableVulkanGraphicsPipelineCreateInfoinstance.stages()intsubpass()toString()Prints the immutable valueVulkanGraphicsPipelineCreateInfowith attribute values.Copy the current immutable object by setting a present value for the optionalbasePipelineattribute.withBasePipeline(Optional<? extends VulkanPipelineType> optional) Copy the current immutable object by setting an optional value for thebasePipelineattribute.withBasePipelineIndex(int value) Copy the current immutable object by setting a present value for the optionalbasePipelineIndexattribute.withBasePipelineIndex(OptionalInt optional) Copy the current immutable object by setting an optional value for thebasePipelineIndexattribute.Copy the current immutable object by setting a present value for the optionalcolorBlendStateattribute.withColorBlendState(Optional<? extends VulkanPipelineColorBlendStateCreateInfo> optional) Copy the current immutable object by setting an optional value for thecolorBlendStateattribute.Copy the current immutable object by setting a present value for the optionaldepthStencilStateattribute.withDepthStencilState(Optional<? extends VulkanPipelineDepthStencilStateCreateInfo> optional) Copy the current immutable object by setting an optional value for thedepthStencilStateattribute.Copy the current immutable object by setting a present value for the optionaldynamicStateattribute.withDynamicState(Optional<? extends VulkanPipelineDynamicStateCreateInfo> optional) Copy the current immutable object by setting an optional value for thedynamicStateattribute.withFlags(VulkanPipelineCreateFlag... elements) Copy the current immutable object with elements that replace the content offlags.withFlags(Iterable<VulkanPipelineCreateFlag> elements) Copy the current immutable object with elements that replace the content offlags.Copy the current immutable object by setting a value for theinputAssemblyStateattribute.Copy the current immutable object by setting a value for thelayoutattribute.Copy the current immutable object by setting a present value for the optionalmultisampleStateattribute.withMultisampleState(Optional<? extends VulkanPipelineMultisampleStateCreateInfo> optional) Copy the current immutable object by setting an optional value for themultisampleStateattribute.Copy the current immutable object by setting a value for therasterizationStateattribute.Copy the current immutable object by setting a value for therenderPassattribute.withStages(VulkanPipelineShaderStageCreateInfo... elements) Copy the current immutable object with elements that replace the content ofstages.withStages(Iterable<? extends VulkanPipelineShaderStageCreateInfo> elements) Copy the current immutable object with elements that replace the content ofstages.withSubpass(int value) Copy the current immutable object by setting a value for thesubpassattribute.Copy the current immutable object by setting a present value for the optionaltessellationStateattribute.withTessellationState(Optional<? extends VulkanPipelineTessellationStateCreateInfo> optional) Copy the current immutable object by setting an optional value for thetessellationStateattribute.Copy the current immutable object by setting a value for thevertexInputStateattribute.Copy the current immutable object by setting a present value for the optionalviewportStateattribute.withViewportState(Optional<? extends VulkanPipelineViewportStateCreateInfo> optional) Copy the current immutable object by setting an optional value for theviewportStateattribute.
-
Method Details
-
flags
- Specified by:
flagsin interfaceVulkanGraphicsPipelineCreateInfoType- Returns:
- Flags specifying how the pipeline will be generated.
-
stages
- Specified by:
stagesin interfaceVulkanGraphicsPipelineCreateInfoType- Returns:
- The shader stages to be included in the graphics pipeline.
-
vertexInputState
- Specified by:
vertexInputStatein interfaceVulkanGraphicsPipelineCreateInfoType- Returns:
- State for the vertex shading stage
-
inputAssemblyState
- Specified by:
inputAssemblyStatein interfaceVulkanGraphicsPipelineCreateInfoType- Returns:
- State for the input assembly stage
-
tessellationState
- Specified by:
tessellationStatein interfaceVulkanGraphicsPipelineCreateInfoType- Returns:
- State for the tesselation stage
-
viewportState
- Specified by:
viewportStatein interfaceVulkanGraphicsPipelineCreateInfoType- Returns:
- State for the viewport
-
rasterizationState
- Specified by:
rasterizationStatein interfaceVulkanGraphicsPipelineCreateInfoType- Returns:
- State for the rasterization stage
-
multisampleState
- Specified by:
multisampleStatein interfaceVulkanGraphicsPipelineCreateInfoType- Returns:
- State for multisampling
-
depthStencilState
- Specified by:
depthStencilStatein interfaceVulkanGraphicsPipelineCreateInfoType- Returns:
- State for the depth/stencil buffer
-
colorBlendState
- Specified by:
colorBlendStatein interfaceVulkanGraphicsPipelineCreateInfoType- Returns:
- State for the color blending stage
-
dynamicState
- Specified by:
dynamicStatein interfaceVulkanGraphicsPipelineCreateInfoType- Returns:
- Dynamic state
-
layout
- Specified by:
layoutin interfaceVulkanGraphicsPipelineCreateInfoType- Returns:
- The description of binding locations used by both the pipeline and descriptor sets used with the pipeline.
-
renderPass
- Specified by:
renderPassin interfaceVulkanGraphicsPipelineCreateInfoType- Returns:
- A handle to a render pass object describing the environment in which the pipeline will be used; the pipeline must only be used with an instance of any render pass compatible with the one provided.
-
subpass
public int subpass()- Specified by:
subpassin interfaceVulkanGraphicsPipelineCreateInfoType- Returns:
- The index of the subpass in the render pass where this pipeline will be used.
-
basePipeline
- Specified by:
basePipelinein interfaceVulkanGraphicsPipelineCreateInfoType- Returns:
- A pipeline to derive from.
-
basePipelineIndex
- Specified by:
basePipelineIndexin interfaceVulkanGraphicsPipelineCreateInfoType- Returns:
- An index into the createInfos parameter to use as a pipeline to derive from.
-
withFlags
Copy the current immutable object with elements that replace the content offlags.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withFlags
public final VulkanGraphicsPipelineCreateInfo withFlags(Iterable<VulkanPipelineCreateFlag> 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
thisobject
-
withStages
public final VulkanGraphicsPipelineCreateInfo withStages(VulkanPipelineShaderStageCreateInfo... elements) Copy the current immutable object with elements that replace the content ofstages.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withStages
public final VulkanGraphicsPipelineCreateInfo withStages(Iterable<? extends VulkanPipelineShaderStageCreateInfo> elements) Copy the current immutable object with elements that replace the content ofstages. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of stages elements to set- Returns:
- A modified copy of
thisobject
-
withVertexInputState
public final VulkanGraphicsPipelineCreateInfo withVertexInputState(VulkanPipelineVertexInputStateCreateInfo value) Copy the current immutable object by setting a value for thevertexInputStateattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for vertexInputState- Returns:
- A modified copy of the
thisobject
-
withInputAssemblyState
public final VulkanGraphicsPipelineCreateInfo withInputAssemblyState(VulkanPipelineInputAssemblyStateCreateInfo value) Copy the current immutable object by setting a value for theinputAssemblyStateattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for inputAssemblyState- Returns:
- A modified copy of the
thisobject
-
withTessellationState
public final VulkanGraphicsPipelineCreateInfo withTessellationState(VulkanPipelineTessellationStateCreateInfo value) Copy the current immutable object by setting a present value for the optionaltessellationStateattribute.- Parameters:
value- The value for tessellationState- Returns:
- A modified copy of
thisobject
-
withTessellationState
public final VulkanGraphicsPipelineCreateInfo withTessellationState(Optional<? extends VulkanPipelineTessellationStateCreateInfo> optional) Copy the current immutable object by setting an optional value for thetessellationStateattribute. 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 tessellationState- Returns:
- A modified copy of
thisobject
-
withViewportState
public final VulkanGraphicsPipelineCreateInfo withViewportState(VulkanPipelineViewportStateCreateInfo value) Copy the current immutable object by setting a present value for the optionalviewportStateattribute.- Parameters:
value- The value for viewportState- Returns:
- A modified copy of
thisobject
-
withViewportState
public final VulkanGraphicsPipelineCreateInfo withViewportState(Optional<? extends VulkanPipelineViewportStateCreateInfo> optional) Copy the current immutable object by setting an optional value for theviewportStateattribute. 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 viewportState- Returns:
- A modified copy of
thisobject
-
withRasterizationState
public final VulkanGraphicsPipelineCreateInfo withRasterizationState(VulkanPipelineRasterizationStateCreateInfo value) Copy the current immutable object by setting a value for therasterizationStateattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for rasterizationState- Returns:
- A modified copy of the
thisobject
-
withMultisampleState
public final VulkanGraphicsPipelineCreateInfo withMultisampleState(VulkanPipelineMultisampleStateCreateInfo value) Copy the current immutable object by setting a present value for the optionalmultisampleStateattribute.- Parameters:
value- The value for multisampleState- Returns:
- A modified copy of
thisobject
-
withMultisampleState
public final VulkanGraphicsPipelineCreateInfo withMultisampleState(Optional<? extends VulkanPipelineMultisampleStateCreateInfo> optional) Copy the current immutable object by setting an optional value for themultisampleStateattribute. 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 multisampleState- Returns:
- A modified copy of
thisobject
-
withDepthStencilState
public final VulkanGraphicsPipelineCreateInfo withDepthStencilState(VulkanPipelineDepthStencilStateCreateInfo value) Copy the current immutable object by setting a present value for the optionaldepthStencilStateattribute.- Parameters:
value- The value for depthStencilState- Returns:
- A modified copy of
thisobject
-
withDepthStencilState
public final VulkanGraphicsPipelineCreateInfo withDepthStencilState(Optional<? extends VulkanPipelineDepthStencilStateCreateInfo> optional) Copy the current immutable object by setting an optional value for thedepthStencilStateattribute. 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 depthStencilState- Returns:
- A modified copy of
thisobject
-
withColorBlendState
public final VulkanGraphicsPipelineCreateInfo withColorBlendState(VulkanPipelineColorBlendStateCreateInfo value) Copy the current immutable object by setting a present value for the optionalcolorBlendStateattribute.- Parameters:
value- The value for colorBlendState- Returns:
- A modified copy of
thisobject
-
withColorBlendState
public final VulkanGraphicsPipelineCreateInfo withColorBlendState(Optional<? extends VulkanPipelineColorBlendStateCreateInfo> optional) Copy the current immutable object by setting an optional value for thecolorBlendStateattribute. 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 colorBlendState- Returns:
- A modified copy of
thisobject
-
withDynamicState
public final VulkanGraphicsPipelineCreateInfo withDynamicState(VulkanPipelineDynamicStateCreateInfo value) Copy the current immutable object by setting a present value for the optionaldynamicStateattribute.- Parameters:
value- The value for dynamicState- Returns:
- A modified copy of
thisobject
-
withDynamicState
public final VulkanGraphicsPipelineCreateInfo withDynamicState(Optional<? extends VulkanPipelineDynamicStateCreateInfo> optional) Copy the current immutable object by setting an optional value for thedynamicStateattribute. 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 dynamicState- Returns:
- A modified copy of
thisobject
-
withLayout
Copy the current immutable object by setting a value for thelayoutattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for layout- Returns:
- A modified copy of the
thisobject
-
withRenderPass
Copy the current immutable object by setting a value for therenderPassattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for renderPass- Returns:
- A modified copy of the
thisobject
-
withSubpass
Copy the current immutable object by setting a value for thesubpassattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for subpass- Returns:
- A modified copy of the
thisobject
-
withBasePipeline
Copy the current immutable object by setting a present value for the optionalbasePipelineattribute.- Parameters:
value- The value for basePipeline- Returns:
- A modified copy of
thisobject
-
withBasePipeline
public final VulkanGraphicsPipelineCreateInfo withBasePipeline(Optional<? extends VulkanPipelineType> optional) Copy the current immutable object by setting an optional value for thebasePipelineattribute. 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 basePipeline- Returns:
- A modified copy of
thisobject
-
withBasePipelineIndex
Copy the current immutable object by setting a present value for the optionalbasePipelineIndexattribute.- Parameters:
value- The value for basePipelineIndex- Returns:
- A modified copy of
thisobject
-
withBasePipelineIndex
Copy the current immutable object by setting an optional value for thebasePipelineIndexattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for basePipelineIndex- Returns:
- A modified copy of
thisobject
-
equals
-
hashCode
public int hashCode()Computes a hash code from attributes:flags,stages,vertexInputState,inputAssemblyState,tessellationState,viewportState,rasterizationState,multisampleState,depthStencilState,colorBlendState,dynamicState,layout,renderPass,subpass,basePipeline,basePipelineIndex. -
toString
-
of
public static VulkanGraphicsPipelineCreateInfo of(Set<VulkanPipelineCreateFlag> flags, List<VulkanPipelineShaderStageCreateInfo> stages, VulkanPipelineVertexInputStateCreateInfo vertexInputState, VulkanPipelineInputAssemblyStateCreateInfo inputAssemblyState, Optional<VulkanPipelineTessellationStateCreateInfo> tessellationState, Optional<VulkanPipelineViewportStateCreateInfo> viewportState, VulkanPipelineRasterizationStateCreateInfo rasterizationState, Optional<VulkanPipelineMultisampleStateCreateInfo> multisampleState, Optional<VulkanPipelineDepthStencilStateCreateInfo> depthStencilState, Optional<VulkanPipelineColorBlendStateCreateInfo> colorBlendState, Optional<VulkanPipelineDynamicStateCreateInfo> dynamicState, VulkanPipelineLayoutType layout, VulkanRenderPassType renderPass, int subpass, Optional<VulkanPipelineType> basePipeline, OptionalInt basePipelineIndex) Construct a new immutableVulkanGraphicsPipelineCreateInfoinstance.- Parameters:
flags- The value for theflagsattributestages- The value for thestagesattributevertexInputState- The value for thevertexInputStateattributeinputAssemblyState- The value for theinputAssemblyStateattributetessellationState- The value for thetessellationStateattributeviewportState- The value for theviewportStateattributerasterizationState- The value for therasterizationStateattributemultisampleState- The value for themultisampleStateattributedepthStencilState- The value for thedepthStencilStateattributecolorBlendState- The value for thecolorBlendStateattributedynamicState- The value for thedynamicStateattributelayout- The value for thelayoutattributerenderPass- The value for therenderPassattributesubpass- The value for thesubpassattributebasePipeline- The value for thebasePipelineattributebasePipelineIndex- The value for thebasePipelineIndexattribute- Returns:
- An immutable VulkanGraphicsPipelineCreateInfo instance
-
of
public static VulkanGraphicsPipelineCreateInfo of(Iterable<VulkanPipelineCreateFlag> flags, Iterable<? extends VulkanPipelineShaderStageCreateInfo> stages, VulkanPipelineVertexInputStateCreateInfo vertexInputState, VulkanPipelineInputAssemblyStateCreateInfo inputAssemblyState, Optional<? extends VulkanPipelineTessellationStateCreateInfo> tessellationState, Optional<? extends VulkanPipelineViewportStateCreateInfo> viewportState, VulkanPipelineRasterizationStateCreateInfo rasterizationState, Optional<? extends VulkanPipelineMultisampleStateCreateInfo> multisampleState, Optional<? extends VulkanPipelineDepthStencilStateCreateInfo> depthStencilState, Optional<? extends VulkanPipelineColorBlendStateCreateInfo> colorBlendState, Optional<? extends VulkanPipelineDynamicStateCreateInfo> dynamicState, VulkanPipelineLayoutType layout, VulkanRenderPassType renderPass, int subpass, Optional<? extends VulkanPipelineType> basePipeline, OptionalInt basePipelineIndex) Construct a new immutableVulkanGraphicsPipelineCreateInfoinstance.- Parameters:
flags- The value for theflagsattributestages- The value for thestagesattributevertexInputState- The value for thevertexInputStateattributeinputAssemblyState- The value for theinputAssemblyStateattributetessellationState- The value for thetessellationStateattributeviewportState- The value for theviewportStateattributerasterizationState- The value for therasterizationStateattributemultisampleState- The value for themultisampleStateattributedepthStencilState- The value for thedepthStencilStateattributecolorBlendState- The value for thecolorBlendStateattributedynamicState- The value for thedynamicStateattributelayout- The value for thelayoutattributerenderPass- The value for therenderPassattributesubpass- The value for thesubpassattributebasePipeline- The value for thebasePipelineattributebasePipelineIndex- The value for thebasePipelineIndexattribute- Returns:
- An immutable VulkanGraphicsPipelineCreateInfo instance
-
copyOf
public static VulkanGraphicsPipelineCreateInfo copyOf(VulkanGraphicsPipelineCreateInfoType instance) Creates an immutable copy of aVulkanGraphicsPipelineCreateInfoTypevalue. 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 VulkanGraphicsPipelineCreateInfo instance
-
builder
Creates a builder forVulkanGraphicsPipelineCreateInfo.VulkanGraphicsPipelineCreateInfo.builder() .addFlags|addAllFlags(com.io7m.jcoronado.api.VulkanPipelineCreateFlag) //flagselements .addStages|addAllStages(VulkanPipelineShaderStageCreateInfo) //stageselements .setVertexInputState(com.io7m.jcoronado.api.VulkanPipelineVertexInputStateCreateInfo) // requiredvertexInputState.setInputAssemblyState(com.io7m.jcoronado.api.VulkanPipelineInputAssemblyStateCreateInfo) // requiredinputAssemblyState.setTessellationState(VulkanPipelineTessellationStateCreateInfo) // optionaltessellationState.setViewportState(VulkanPipelineViewportStateCreateInfo) // optionalviewportState.setRasterizationState(com.io7m.jcoronado.api.VulkanPipelineRasterizationStateCreateInfo) // requiredrasterizationState.setMultisampleState(VulkanPipelineMultisampleStateCreateInfo) // optionalmultisampleState.setDepthStencilState(VulkanPipelineDepthStencilStateCreateInfo) // optionaldepthStencilState.setColorBlendState(VulkanPipelineColorBlendStateCreateInfo) // optionalcolorBlendState.setDynamicState(VulkanPipelineDynamicStateCreateInfo) // optionaldynamicState.setLayout(com.io7m.jcoronado.api.VulkanPipelineLayoutType) // requiredlayout.setRenderPass(com.io7m.jcoronado.api.VulkanRenderPassType) // requiredrenderPass.setSubpass(int) // requiredsubpass.setBasePipeline(com.io7m.jcoronado.api.VulkanPipelineType) // optionalbasePipeline.setBasePipelineIndex(int) // optionalbasePipelineIndex.build();- Returns:
- A new VulkanGraphicsPipelineCreateInfo builder
-