Class VMAAllocationCreateInfo
java.lang.Object
com.io7m.jcoronado.vma.VMAAllocationCreateInfo
- All Implemented Interfaces:
VMAAllocationCreateInfoType
Information required to create an allocation.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeVMAAllocationCreateInfo. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forVMAAllocationCreateInfo.static VMAAllocationCreateInfocopyOf(VMAAllocationCreateInfoType instance) Creates an immutable copy of aVMAAllocationCreateInfoTypevalue.booleanThis instance is equal to all instances ofVMAAllocationCreateInfothat have equal attribute values.flags()inthashCode()Computes a hash code from attributes:flags,usage,requiredFlags,preferredFlags,memoryTypeBits.longtoString()Prints the immutable valueVMAAllocationCreateInfowith attribute values.usage()final VMAAllocationCreateInfowithFlags(VMAAllocationCreateFlag... elements) Copy the current immutable object with elements that replace the content offlags.final VMAAllocationCreateInfowithFlags(Iterable<VMAAllocationCreateFlag> elements) Copy the current immutable object with elements that replace the content offlags.final VMAAllocationCreateInfowithMemoryTypeBits(long value) Copy the current immutable object by setting a value for thememoryTypeBitsattribute.final VMAAllocationCreateInfowithPreferredFlags(VulkanMemoryPropertyFlag... elements) Copy the current immutable object with elements that replace the content ofpreferredFlags.final VMAAllocationCreateInfowithPreferredFlags(Iterable<VulkanMemoryPropertyFlag> elements) Copy the current immutable object with elements that replace the content ofpreferredFlags.final VMAAllocationCreateInfowithRequiredFlags(VulkanMemoryPropertyFlag... elements) Copy the current immutable object with elements that replace the content ofrequiredFlags.final VMAAllocationCreateInfowithRequiredFlags(Iterable<VulkanMemoryPropertyFlag> elements) Copy the current immutable object with elements that replace the content ofrequiredFlags.final VMAAllocationCreateInfowithUsage(VMAMemoryUsage value) Copy the current immutable object by setting a value for theusageattribute.
-
Method Details
-
flags
- Specified by:
flagsin interfaceVMAAllocationCreateInfoType- Returns:
- The creation flags
-
usage
- Specified by:
usagein interfaceVMAAllocationCreateInfoType- Returns:
- The intended usage of the memory allocation
-
requiredFlags
- Specified by:
requiredFlagsin interfaceVMAAllocationCreateInfoType- Returns:
- The flags that must be set in a memory type chosen for an allocation.
-
preferredFlags
- Specified by:
preferredFlagsin interfaceVMAAllocationCreateInfoType- Returns:
- The flags that preferably should be set in a memory type chosen for an allocation.
-
memoryTypeBits
public long memoryTypeBits()- Specified by:
memoryTypeBitsin interfaceVMAAllocationCreateInfoType- Returns:
- A bitmask containing one bit set for every memory type acceptable for this allocation.
-
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
-
withUsage
Copy the current immutable object by setting a value for theusageattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for usage- Returns:
- A modified copy or the
thisobject
-
withRequiredFlags
Copy the current immutable object with elements that replace the content ofrequiredFlags.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withRequiredFlags
Copy the current immutable object with elements that replace the content ofrequiredFlags. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of requiredFlags elements to set- Returns:
- A modified copy or
thisif not changed
-
withPreferredFlags
Copy the current immutable object with elements that replace the content ofpreferredFlags.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withPreferredFlags
public final VMAAllocationCreateInfo withPreferredFlags(Iterable<VulkanMemoryPropertyFlag> elements) Copy the current immutable object with elements that replace the content ofpreferredFlags. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of preferredFlags elements to set- Returns:
- A modified copy or
thisif not changed
-
withMemoryTypeBits
Copy the current immutable object by setting a value for thememoryTypeBitsattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for memoryTypeBits- Returns:
- A modified copy or the
thisobject
-
equals
-
hashCode
-
toString
-
copyOf
Creates an immutable copy of aVMAAllocationCreateInfoTypevalue. 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 VMAAllocationCreateInfo instance
-
builder
Creates a builder forVMAAllocationCreateInfo.VMAAllocationCreateInfo.builder() .addFlags|addAllFlags(com.io7m.jcoronado.vma.VMAAllocationCreateFlag) //
flagselements .setUsage(com.io7m.jcoronado.vma.VMAMemoryUsage) // optionalusage.addRequiredFlags|addAllRequiredFlags(com.io7m.jcoronado.api.VulkanMemoryPropertyFlag) //requiredFlagselements .addPreferredFlags|addAllPreferredFlags(com.io7m.jcoronado.api.VulkanMemoryPropertyFlag) //preferredFlagselements .setMemoryTypeBits(long) // optionalmemoryTypeBits.build();- Returns:
- A new VMAAllocationCreateInfo builder
-