Class VulkanComputePipelineCreateInfo

java.lang.Object
com.io7m.jcoronado.api.VulkanComputePipelineCreateInfo
All Implemented Interfaces:
VulkanComputePipelineCreateInfoType

public final class VulkanComputePipelineCreateInfo extends Object implements VulkanComputePipelineCreateInfoType
Structure specifying parameters of a newly created compute pipeline.
See Also:
  • "VkComputePipelineCreateInfo"
  • Method Details

    • flags

      public Set<VulkanPipelineCreateFlag> flags()
      Specified by:
      flags in interface VulkanComputePipelineCreateInfoType
      Returns:
      Flags specifying how the pipeline will be generated.
    • stage

      Specified by:
      stage in interface VulkanComputePipelineCreateInfoType
      Returns:
      The shader stages to be included in the graphics pipeline.
    • layout

      public VulkanPipelineLayoutType layout()
      Specified by:
      layout in interface VulkanComputePipelineCreateInfoType
      Returns:
      The description of binding locations used by both the pipeline and descriptor sets used with the pipeline.
    • basePipeline

      public Optional<VulkanPipelineType> basePipeline()
      Specified by:
      basePipeline in interface VulkanComputePipelineCreateInfoType
      Returns:
      A pipeline to derive from.
    • basePipelineIndex

      public OptionalInt basePipelineIndex()
      Specified by:
      basePipelineIndex in interface VulkanComputePipelineCreateInfoType
      Returns:
      An index into the createInfos parameter to use as a pipeline to derive from.
    • withFlags

      public final VulkanComputePipelineCreateInfo withFlags(VulkanPipelineCreateFlag... 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 or this if not changed
    • withStage

      Copy the current immutable object by setting a value for the stage attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for stage
      Returns:
      A modified copy or the this object
    • withLayout

      Copy the current immutable object by setting a value for the layout attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for layout
      Returns:
      A modified copy or the this object
    • withBasePipeline

      public final VulkanComputePipelineCreateInfo withBasePipeline(VulkanPipelineType value)
      Copy the current immutable object by setting a present value for the optional basePipeline attribute.
      Parameters:
      value - The value for basePipeline
      Returns:
      A modified copy or this if not changed
    • withBasePipeline

      public final VulkanComputePipelineCreateInfo withBasePipeline(Optional<? extends VulkanPipelineType> optional)
      Copy the current immutable object by setting an optional value for the basePipeline attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for basePipeline
      Returns:
      A modified copy or this if not changed
    • withBasePipelineIndex

      public final VulkanComputePipelineCreateInfo withBasePipelineIndex(int value)
      Copy the current immutable object by setting a present value for the optional basePipelineIndex attribute.
      Parameters:
      value - The value for basePipelineIndex
      Returns:
      A modified copy or this if not changed
    • withBasePipelineIndex

      public final VulkanComputePipelineCreateInfo withBasePipelineIndex(OptionalInt optional)
      Copy the current immutable object by setting an optional value for the basePipelineIndex attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for basePipelineIndex
      Returns:
      A modified copy or this if not changed
    • equals

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

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

      Creates an immutable copy of a VulkanComputePipelineCreateInfoType 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 VulkanComputePipelineCreateInfo instance
    • builder

      public static VulkanComputePipelineCreateInfo.Builder builder()
      Creates a builder for VulkanComputePipelineCreateInfo.
      VulkanComputePipelineCreateInfo.builder()
         .addFlags|addAllFlags(com.io7m.jcoronado.api.VulkanPipelineCreateFlag) // flags elements
         .setStage(com.io7m.jcoronado.api.VulkanPipelineShaderStageCreateInfo) // required stage
         .setLayout(com.io7m.jcoronado.api.VulkanPipelineLayoutType) // required layout
         .setBasePipeline(Optional<com.io7m.jcoronado.api.VulkanPipelineType>) // optional basePipeline
         .setBasePipelineIndex(OptionalInt) // optional basePipelineIndex
         .build();
      
      Returns:
      A new VulkanComputePipelineCreateInfo builder