Class VMAAllocatorCreateInfo
java.lang.Object
com.io7m.jcoronado.vma.VMAAllocatorCreateInfo
- All Implemented Interfaces:
VMAAllocatorCreateInfoType
Information required to create an allocator.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeVMAAllocatorCreateInfo. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forVMAAllocatorCreateInfo.static VMAAllocatorCreateInfocopyOf(VMAAllocatorCreateInfoType instance) Creates an immutable copy of aVMAAllocatorCreateInfoTypevalue.booleanThis instance is equal to all instances ofVMAAllocatorCreateInfothat have equal attribute values.flags()inthashCode()Computes a hash code from attributes:flags,logicalDevice,preferredLargeHeapBlockSize,frameInUseCount.toString()Prints the immutable valueVMAAllocatorCreateInfowith attribute values.final VMAAllocatorCreateInfowithFlags(VMAAllocatorCreateFlag... elements) Copy the current immutable object with elements that replace the content offlags.final VMAAllocatorCreateInfowithFlags(Iterable<VMAAllocatorCreateFlag> elements) Copy the current immutable object with elements that replace the content offlags.final VMAAllocatorCreateInfowithFrameInUseCount(int value) Copy the current immutable object by setting a present value for the optionalframeInUseCountattribute.final VMAAllocatorCreateInfowithFrameInUseCount(OptionalInt optional) Copy the current immutable object by setting an optional value for theframeInUseCountattribute.final VMAAllocatorCreateInfoCopy the current immutable object by setting a value for thelogicalDeviceattribute.final VMAAllocatorCreateInfowithPreferredLargeHeapBlockSize(long value) Copy the current immutable object by setting a present value for the optionalpreferredLargeHeapBlockSizeattribute.final VMAAllocatorCreateInfowithPreferredLargeHeapBlockSize(OptionalLong optional) Copy the current immutable object by setting an optional value for thepreferredLargeHeapBlockSizeattribute.
-
Method Details
-
flags
- Specified by:
flagsin interfaceVMAAllocatorCreateInfoType- Returns:
- The allocator flags
-
logicalDevice
- Specified by:
logicalDevicein interfaceVMAAllocatorCreateInfoType- Returns:
- The logical device used for allocations
-
preferredLargeHeapBlockSize
- Specified by:
preferredLargeHeapBlockSizein interfaceVMAAllocatorCreateInfoType- Returns:
- The preferred size of a single VkDeviceMemory block to be allocated from large heaps > 1 GiB.
-
frameInUseCount
- Specified by:
frameInUseCountin interfaceVMAAllocatorCreateInfoType- Returns:
- The maximum number of additional frames that are in use at the same time as current frame.
- See Also:
-
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
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 or
thisif not changed
-
withLogicalDevice
Copy the current immutable object by setting a value for thelogicalDeviceattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for logicalDevice- Returns:
- A modified copy or the
thisobject
-
withPreferredLargeHeapBlockSize
Copy the current immutable object by setting a present value for the optionalpreferredLargeHeapBlockSizeattribute.- Parameters:
value- The value for preferredLargeHeapBlockSize- Returns:
- A modified copy or
thisif not changed
-
withPreferredLargeHeapBlockSize
Copy the current immutable object by setting an optional value for thepreferredLargeHeapBlockSizeattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for preferredLargeHeapBlockSize- Returns:
- A modified copy or
thisif not changed
-
withFrameInUseCount
Copy the current immutable object by setting a present value for the optionalframeInUseCountattribute.- Parameters:
value- The value for frameInUseCount- Returns:
- A modified copy or
thisif not changed
-
withFrameInUseCount
Copy the current immutable object by setting an optional value for theframeInUseCountattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for frameInUseCount- Returns:
- A modified copy or
thisif not changed
-
equals
-
hashCode
-
toString
-
copyOf
Creates an immutable copy of aVMAAllocatorCreateInfoTypevalue. 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 VMAAllocatorCreateInfo instance
-
builder
Creates a builder forVMAAllocatorCreateInfo.VMAAllocatorCreateInfo.builder() .addFlags|addAllFlags(com.io7m.jcoronado.vma.VMAAllocatorCreateFlag) //
flagselements .setLogicalDevice(com.io7m.jcoronado.api.VulkanLogicalDeviceType) // requiredlogicalDevice.setPreferredLargeHeapBlockSize(OptionalLong) // optionalpreferredLargeHeapBlockSize.setFrameInUseCount(OptionalInt) // optionalframeInUseCount.build();- Returns:
- A new VMAAllocatorCreateInfo builder
-