Class VulkanSemaphoreSubmitInfo

java.lang.Object
com.io7m.jcoronado.api.VulkanSemaphoreSubmitInfo
All Implemented Interfaces:
VulkanSemaphoreSubmitInfoType

public final class VulkanSemaphoreSubmitInfo extends Object implements VulkanSemaphoreSubmitInfoType
The type of Vulkan semaphore submission information.
See Also:
  • "VkSemaphoreSubmitInfo"
  • Method Details

    • semaphore

      public VulkanSemaphoreType semaphore()
      Specified by:
      semaphore in interface VulkanSemaphoreSubmitInfoType
      Returns:
      The semaphore
    • value

      public long value()
      Specified by:
      value in interface VulkanSemaphoreSubmitInfoType
      Returns:
      The value used to signal semaphore or the value waited on by semaphore, if semaphore is a timeline semaphore
    • stageMask

      public Set<VulkanPipelineStageFlag> stageMask()
      Specified by:
      stageMask in interface VulkanSemaphoreSubmitInfoType
      Returns:
      The stage mask
    • deviceIndex

      public long deviceIndex()
      Specified by:
      deviceIndex in interface VulkanSemaphoreSubmitInfoType
      Returns:
      The index of the device within a device group that executes the semaphore wait or signal operation.
    • withSemaphore

      public final VulkanSemaphoreSubmitInfo withSemaphore(VulkanSemaphoreType value)
      Copy the current immutable object by setting a value for the semaphore attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for semaphore
      Returns:
      A modified copy or the this object
    • withValue

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

      public final VulkanSemaphoreSubmitInfo withStageMask(VulkanPipelineStageFlag... elements)
      Copy the current immutable object with elements that replace the content of stageMask.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withStageMask

      public final VulkanSemaphoreSubmitInfo withStageMask(Iterable<VulkanPipelineStageFlag> elements)
      Copy the current immutable object with elements that replace the content of stageMask. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of stageMask elements to set
      Returns:
      A modified copy or this if not changed
    • withDeviceIndex

      public final VulkanSemaphoreSubmitInfo withDeviceIndex(long value)
      Copy the current immutable object by setting a value for the deviceIndex attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for deviceIndex
      Returns:
      A modified copy or the this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of VulkanSemaphoreSubmitInfo 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: semaphore, value, stageMask, deviceIndex.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static VulkanSemaphoreSubmitInfo.Builder builder()
      Creates a builder for VulkanSemaphoreSubmitInfo.
      VulkanSemaphoreSubmitInfo.builder()
         .setSemaphore(com.io7m.jcoronado.api.VulkanSemaphoreType) // required semaphore
         .setValue(long) // optional value
         .addStageMask|addAllStageMask(com.io7m.jcoronado.api.VulkanPipelineStageFlag) // stageMask elements
         .setDeviceIndex(long) // optional deviceIndex
         .build();
      
      Returns:
      A new VulkanSemaphoreSubmitInfo builder