- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanImageMemoryBarrier
-
- All Implemented Interfaces:
VulkanImageMemoryBarrierType
public final class VulkanImageMemoryBarrier extends java.lang.Object implements VulkanImageMemoryBarrierType
Structure specifying the parameters of an image memory barrier.- See Also:
- "VkImageMemoryBarrier"
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VulkanImageMemoryBarrier.Builder
Builds instances of typeVulkanImageMemoryBarrier
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VulkanImageMemoryBarrier.Builder
builder()
Creates a builder forVulkanImageMemoryBarrier
.static VulkanImageMemoryBarrier
copyOf(VulkanImageMemoryBarrierType instance)
Creates an immutable copy of aVulkanImageMemoryBarrierType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofVulkanImageMemoryBarrier
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:sourceAccessMask
,targetAccessMask
,oldLayout
,newLayout
,sourceQueueFamilyIndex
,targetQueueFamilyIndex
,image
,subresourceRange
.VulkanImageType
image()
VulkanImageLayout
newLayout()
static VulkanImageMemoryBarrier
of(java.lang.Iterable<VulkanAccessFlag> sourceAccessMask, java.lang.Iterable<VulkanAccessFlag> targetAccessMask, VulkanImageLayout oldLayout, VulkanImageLayout newLayout, int sourceQueueFamilyIndex, int targetQueueFamilyIndex, VulkanImageType image, VulkanImageSubresourceRange subresourceRange)
Construct a new immutableVulkanImageMemoryBarrier
instance.static VulkanImageMemoryBarrier
of(java.util.Set<VulkanAccessFlag> sourceAccessMask, java.util.Set<VulkanAccessFlag> targetAccessMask, VulkanImageLayout oldLayout, VulkanImageLayout newLayout, int sourceQueueFamilyIndex, int targetQueueFamilyIndex, VulkanImageType image, VulkanImageSubresourceRange subresourceRange)
Construct a new immutableVulkanImageMemoryBarrier
instance.VulkanImageLayout
oldLayout()
java.util.Set<VulkanAccessFlag>
sourceAccessMask()
int
sourceQueueFamilyIndex()
VulkanImageSubresourceRange
subresourceRange()
java.util.Set<VulkanAccessFlag>
targetAccessMask()
int
targetQueueFamilyIndex()
java.lang.String
toString()
Prints the immutable valueVulkanImageMemoryBarrier
with attribute values.VulkanImageMemoryBarrier
withImage(VulkanImageType value)
Copy the current immutable object by setting a value for theimage
attribute.VulkanImageMemoryBarrier
withNewLayout(VulkanImageLayout value)
Copy the current immutable object by setting a value for thenewLayout
attribute.VulkanImageMemoryBarrier
withOldLayout(VulkanImageLayout value)
Copy the current immutable object by setting a value for theoldLayout
attribute.VulkanImageMemoryBarrier
withSourceAccessMask(VulkanAccessFlag... elements)
Copy the current immutable object with elements that replace the content ofsourceAccessMask
.VulkanImageMemoryBarrier
withSourceAccessMask(java.lang.Iterable<VulkanAccessFlag> elements)
Copy the current immutable object with elements that replace the content ofsourceAccessMask
.VulkanImageMemoryBarrier
withSourceQueueFamilyIndex(int value)
Copy the current immutable object by setting a value for thesourceQueueFamilyIndex
attribute.VulkanImageMemoryBarrier
withSubresourceRange(VulkanImageSubresourceRange value)
Copy the current immutable object by setting a value for thesubresourceRange
attribute.VulkanImageMemoryBarrier
withTargetAccessMask(VulkanAccessFlag... elements)
Copy the current immutable object with elements that replace the content oftargetAccessMask
.VulkanImageMemoryBarrier
withTargetAccessMask(java.lang.Iterable<VulkanAccessFlag> elements)
Copy the current immutable object with elements that replace the content oftargetAccessMask
.VulkanImageMemoryBarrier
withTargetQueueFamilyIndex(int value)
Copy the current immutable object by setting a value for thetargetQueueFamilyIndex
attribute.
-
-
-
Method Detail
-
sourceAccessMask
public java.util.Set<VulkanAccessFlag> sourceAccessMask()
- Specified by:
sourceAccessMask
in interfaceVulkanImageMemoryBarrierType
- Returns:
- The source access mask
-
targetAccessMask
public java.util.Set<VulkanAccessFlag> targetAccessMask()
- Specified by:
targetAccessMask
in interfaceVulkanImageMemoryBarrierType
- Returns:
- The target access mask
-
oldLayout
public VulkanImageLayout oldLayout()
- Specified by:
oldLayout
in interfaceVulkanImageMemoryBarrierType
- Returns:
- The original image layout
-
newLayout
public VulkanImageLayout newLayout()
- Specified by:
newLayout
in interfaceVulkanImageMemoryBarrierType
- Returns:
- The target image layout
-
sourceQueueFamilyIndex
public int sourceQueueFamilyIndex()
- Specified by:
sourceQueueFamilyIndex
in interfaceVulkanImageMemoryBarrierType
- Returns:
- The source queue family for a queue family ownership transfer.
-
targetQueueFamilyIndex
public int targetQueueFamilyIndex()
- Specified by:
targetQueueFamilyIndex
in interfaceVulkanImageMemoryBarrierType
- Returns:
- The target queue family for a queue family ownership transfer.
-
image
public VulkanImageType image()
- Specified by:
image
in interfaceVulkanImageMemoryBarrierType
- Returns:
- The image affected by this barrier.
-
subresourceRange
public VulkanImageSubresourceRange subresourceRange()
- Specified by:
subresourceRange
in interfaceVulkanImageMemoryBarrierType
- Returns:
- The image subresource range within image that is affected by this barrier.
-
withSourceAccessMask
public final VulkanImageMemoryBarrier withSourceAccessMask(VulkanAccessFlag... elements)
Copy the current immutable object with elements that replace the content ofsourceAccessMask
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withSourceAccessMask
public final VulkanImageMemoryBarrier withSourceAccessMask(java.lang.Iterable<VulkanAccessFlag> elements)
Copy the current immutable object with elements that replace the content ofsourceAccessMask
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of sourceAccessMask elements to set- Returns:
- A modified copy of
this
object
-
withTargetAccessMask
public final VulkanImageMemoryBarrier withTargetAccessMask(VulkanAccessFlag... elements)
Copy the current immutable object with elements that replace the content oftargetAccessMask
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withTargetAccessMask
public final VulkanImageMemoryBarrier withTargetAccessMask(java.lang.Iterable<VulkanAccessFlag> elements)
Copy the current immutable object with elements that replace the content oftargetAccessMask
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of targetAccessMask elements to set- Returns:
- A modified copy of
this
object
-
withOldLayout
public final VulkanImageMemoryBarrier withOldLayout(VulkanImageLayout value)
Copy the current immutable object by setting a value for theoldLayout
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for oldLayout- Returns:
- A modified copy of the
this
object
-
withNewLayout
public final VulkanImageMemoryBarrier withNewLayout(VulkanImageLayout value)
Copy the current immutable object by setting a value for thenewLayout
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for newLayout- Returns:
- A modified copy of the
this
object
-
withSourceQueueFamilyIndex
public final VulkanImageMemoryBarrier withSourceQueueFamilyIndex(int value)
Copy the current immutable object by setting a value for thesourceQueueFamilyIndex
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for sourceQueueFamilyIndex- Returns:
- A modified copy of the
this
object
-
withTargetQueueFamilyIndex
public final VulkanImageMemoryBarrier withTargetQueueFamilyIndex(int value)
Copy the current immutable object by setting a value for thetargetQueueFamilyIndex
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for targetQueueFamilyIndex- Returns:
- A modified copy of the
this
object
-
withImage
public final VulkanImageMemoryBarrier withImage(VulkanImageType value)
Copy the current immutable object by setting a value for theimage
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for image- Returns:
- A modified copy of the
this
object
-
withSubresourceRange
public final VulkanImageMemoryBarrier withSubresourceRange(VulkanImageSubresourceRange value)
Copy the current immutable object by setting a value for thesubresourceRange
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for subresourceRange- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofVulkanImageMemoryBarrier
that have equal attribute values.- Overrides:
equals
in classjava.lang.Object
- Returns:
true
ifthis
is equal toanother
instance
-
hashCode
public int hashCode()
Computes a hash code from attributes:sourceAccessMask
,targetAccessMask
,oldLayout
,newLayout
,sourceQueueFamilyIndex
,targetQueueFamilyIndex
,image
,subresourceRange
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueVulkanImageMemoryBarrier
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
public static VulkanImageMemoryBarrier of(java.util.Set<VulkanAccessFlag> sourceAccessMask, java.util.Set<VulkanAccessFlag> targetAccessMask, VulkanImageLayout oldLayout, VulkanImageLayout newLayout, int sourceQueueFamilyIndex, int targetQueueFamilyIndex, VulkanImageType image, VulkanImageSubresourceRange subresourceRange)
Construct a new immutableVulkanImageMemoryBarrier
instance.- Parameters:
sourceAccessMask
- The value for thesourceAccessMask
attributetargetAccessMask
- The value for thetargetAccessMask
attributeoldLayout
- The value for theoldLayout
attributenewLayout
- The value for thenewLayout
attributesourceQueueFamilyIndex
- The value for thesourceQueueFamilyIndex
attributetargetQueueFamilyIndex
- The value for thetargetQueueFamilyIndex
attributeimage
- The value for theimage
attributesubresourceRange
- The value for thesubresourceRange
attribute- Returns:
- An immutable VulkanImageMemoryBarrier instance
-
of
public static VulkanImageMemoryBarrier of(java.lang.Iterable<VulkanAccessFlag> sourceAccessMask, java.lang.Iterable<VulkanAccessFlag> targetAccessMask, VulkanImageLayout oldLayout, VulkanImageLayout newLayout, int sourceQueueFamilyIndex, int targetQueueFamilyIndex, VulkanImageType image, VulkanImageSubresourceRange subresourceRange)
Construct a new immutableVulkanImageMemoryBarrier
instance.- Parameters:
sourceAccessMask
- The value for thesourceAccessMask
attributetargetAccessMask
- The value for thetargetAccessMask
attributeoldLayout
- The value for theoldLayout
attributenewLayout
- The value for thenewLayout
attributesourceQueueFamilyIndex
- The value for thesourceQueueFamilyIndex
attributetargetQueueFamilyIndex
- The value for thetargetQueueFamilyIndex
attributeimage
- The value for theimage
attributesubresourceRange
- The value for thesubresourceRange
attribute- Returns:
- An immutable VulkanImageMemoryBarrier instance
-
copyOf
public static VulkanImageMemoryBarrier copyOf(VulkanImageMemoryBarrierType instance)
Creates an immutable copy of aVulkanImageMemoryBarrierType
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 VulkanImageMemoryBarrier instance
-
builder
public static VulkanImageMemoryBarrier.Builder builder()
Creates a builder forVulkanImageMemoryBarrier
.- Returns:
- A new VulkanImageMemoryBarrier builder
-
-