Class VulkanMemoryRequirements

    • Method Detail

      • size

        public long size()
        Specified by:
        size in interface VulkanMemoryRequirementsType
        Returns:
        The size, in bytes, of the memory allocation required for the resource.
      • alignment

        public long alignment()
        Specified by:
        alignment in interface VulkanMemoryRequirementsType
        Returns:
        The alignment, in bytes, of the offset within the allocation required for the resource.
      • memoryTypeBits

        public int memoryTypeBits()
        Specified by:
        memoryTypeBits in interface VulkanMemoryRequirementsType
        Returns:
        A bitmask that contains one bit set for every supported memory type for the resource. Bit i is set if and only if the memory type i in the VkPhysicalDeviceMemoryProperties structure for the physical device is supported for the resource.
      • withSize

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

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

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

        public boolean equals​(java.lang.Object another)
        This instance is equal to all instances of VulkanMemoryRequirements that have equal attribute values.
        Overrides:
        equals in class java.lang.Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: size, alignment, memoryTypeBits.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

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

        public static VulkanMemoryRequirements of​(long size,
                                                  long alignment,
                                                  int memoryTypeBits)
        Construct a new immutable VulkanMemoryRequirements instance.
        Parameters:
        size - The value for the size attribute
        alignment - The value for the alignment attribute
        memoryTypeBits - The value for the memoryTypeBits attribute
        Returns:
        An immutable VulkanMemoryRequirements instance
      • copyOf

        public static VulkanMemoryRequirements copyOf​(VulkanMemoryRequirementsType instance)
        Creates an immutable copy of a VulkanMemoryRequirementsType 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 VulkanMemoryRequirements instance