Class VulkanQueueFamilyProperties

java.lang.Object
com.io7m.jcoronado.api.VulkanQueueFamilyProperties
All Implemented Interfaces:
VulkanQueueFamilyPropertiesType

public final class VulkanQueueFamilyProperties extends Object implements VulkanQueueFamilyPropertiesType
The properties of a queue family.
See Also:
  • "VkQueueFamilyProperties"
  • Method Details

    • queueFamilyIndex

      public VulkanQueueFamilyIndex queueFamilyIndex()
      Specified by:
      queueFamilyIndex in interface VulkanQueueFamilyPropertiesType
      Returns:
      The index of the queue family
    • queueCount

      public int queueCount()
      Specified by:
      queueCount in interface VulkanQueueFamilyPropertiesType
      Returns:
      The number of queues available in the family
    • queueFlags

      public Set<VulkanQueueFamilyPropertyFlag> queueFlags()
      Specified by:
      queueFlags in interface VulkanQueueFamilyPropertiesType
      Returns:
      The property flags for the queue family
    • timestampValidBits

      public int timestampValidBits()
      Specified by:
      timestampValidBits in interface VulkanQueueFamilyPropertiesType
      Returns:
      The unsigned integer count of meaningful bits in the timestamps written via vkCmdWriteTimestamp.
    • minImageTransferGranularity

      public VulkanExtent3D minImageTransferGranularity()
      Specified by:
      minImageTransferGranularity in interface VulkanQueueFamilyPropertiesType
      Returns:
      The minimum granularity supported for image transfer operations on the queues in this queue family.
    • withQueueFamilyIndex

      public final VulkanQueueFamilyProperties withQueueFamilyIndex(VulkanQueueFamilyIndex value)
      Copy the current immutable object by setting a value for the queueFamilyIndex attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for queueFamilyIndex
      Returns:
      A modified copy of the this object
    • withQueueCount

      public final VulkanQueueFamilyProperties withQueueCount(int value)
      Copy the current immutable object by setting a value for the queueCount attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for queueCount
      Returns:
      A modified copy of the this object
    • withQueueFlags

      public final VulkanQueueFamilyProperties withQueueFlags(VulkanQueueFamilyPropertyFlag... elements)
      Copy the current immutable object with elements that replace the content of queueFlags.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withQueueFlags

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

      public final VulkanQueueFamilyProperties withTimestampValidBits(int value)
      Copy the current immutable object by setting a value for the timestampValidBits attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for timestampValidBits
      Returns:
      A modified copy of the this object
    • withMinImageTransferGranularity

      public final VulkanQueueFamilyProperties withMinImageTransferGranularity(VulkanExtent3D value)
      Copy the current immutable object by setting a value for the minImageTransferGranularity attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for minImageTransferGranularity
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of VulkanQueueFamilyProperties 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: queueFamilyIndex, queueCount, queueFlags, timestampValidBits, minImageTransferGranularity.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static VulkanQueueFamilyProperties of(VulkanQueueFamilyIndex queueFamilyIndex, int queueCount, Set<VulkanQueueFamilyPropertyFlag> queueFlags, int timestampValidBits, VulkanExtent3D minImageTransferGranularity)
      Construct a new immutable VulkanQueueFamilyProperties instance.
      Parameters:
      queueFamilyIndex - The value for the queueFamilyIndex attribute
      queueCount - The value for the queueCount attribute
      queueFlags - The value for the queueFlags attribute
      timestampValidBits - The value for the timestampValidBits attribute
      minImageTransferGranularity - The value for the minImageTransferGranularity attribute
      Returns:
      An immutable VulkanQueueFamilyProperties instance
    • of

      public static VulkanQueueFamilyProperties of(VulkanQueueFamilyIndex queueFamilyIndex, int queueCount, Iterable<VulkanQueueFamilyPropertyFlag> queueFlags, int timestampValidBits, VulkanExtent3D minImageTransferGranularity)
      Construct a new immutable VulkanQueueFamilyProperties instance.
      Parameters:
      queueFamilyIndex - The value for the queueFamilyIndex attribute
      queueCount - The value for the queueCount attribute
      queueFlags - The value for the queueFlags attribute
      timestampValidBits - The value for the timestampValidBits attribute
      minImageTransferGranularity - The value for the minImageTransferGranularity attribute
      Returns:
      An immutable VulkanQueueFamilyProperties instance
    • copyOf

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

      public static VulkanQueueFamilyProperties.Builder builder()
      Creates a builder for VulkanQueueFamilyProperties.
       VulkanQueueFamilyProperties.builder()
          .setQueueFamilyIndex(com.io7m.jcoronado.api.VulkanQueueFamilyIndex) // required queueFamilyIndex
          .setQueueCount(int) // required queueCount
          .addQueueFlags|addAllQueueFlags(com.io7m.jcoronado.api.VulkanQueueFamilyPropertyFlag) // queueFlags elements
          .setTimestampValidBits(int) // required timestampValidBits
          .setMinImageTransferGranularity(com.io7m.jcoronado.api.VulkanExtent3D) // required minImageTransferGranularity
          .build();
       
      Returns:
      A new VulkanQueueFamilyProperties builder