- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanWriteDescriptorSet
-
- All Implemented Interfaces:
VulkanWriteDescriptorSetType
public final class VulkanWriteDescriptorSet extends java.lang.Object implements VulkanWriteDescriptorSetType
- See Also:
- "VkWriteDescriptorSet"
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VulkanWriteDescriptorSet.Builder
Builds instances of typeVulkanWriteDescriptorSet
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<VulkanDescriptorBufferInfo>
bufferInfos()
static VulkanWriteDescriptorSet.Builder
builder()
Creates a builder forVulkanWriteDescriptorSet
.static VulkanWriteDescriptorSet
copyOf(VulkanWriteDescriptorSetType instance)
Creates an immutable copy of aVulkanWriteDescriptorSetType
value.int
descriptorCount()
VulkanDescriptorType
descriptorType()
int
destinationArrayElement()
int
destinationBinding()
VulkanDescriptorSetType
destinationSet()
boolean
equals(java.lang.Object another)
This instance is equal to all instances ofVulkanWriteDescriptorSet
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:destinationSet
,destinationBinding
,destinationArrayElement
,descriptorCount
,descriptorType
,imageInfos
,bufferInfos
,texelBufferViews
.java.util.List<VulkanDescriptorImageInfo>
imageInfos()
static VulkanWriteDescriptorSet
of(VulkanDescriptorSetType destinationSet, int destinationBinding, int destinationArrayElement, int descriptorCount, VulkanDescriptorType descriptorType, java.lang.Iterable<? extends VulkanDescriptorImageInfo> imageInfos, java.lang.Iterable<? extends VulkanDescriptorBufferInfo> bufferInfos, java.lang.Iterable<? extends VulkanBufferViewType> texelBufferViews)
Construct a new immutableVulkanWriteDescriptorSet
instance.static VulkanWriteDescriptorSet
of(VulkanDescriptorSetType destinationSet, int destinationBinding, int destinationArrayElement, int descriptorCount, VulkanDescriptorType descriptorType, java.util.List<VulkanDescriptorImageInfo> imageInfos, java.util.List<VulkanDescriptorBufferInfo> bufferInfos, java.util.List<VulkanBufferViewType> texelBufferViews)
Construct a new immutableVulkanWriteDescriptorSet
instance.java.util.List<VulkanBufferViewType>
texelBufferViews()
java.lang.String
toString()
Prints the immutable valueVulkanWriteDescriptorSet
with attribute values.VulkanWriteDescriptorSet
withBufferInfos(VulkanDescriptorBufferInfo... elements)
Copy the current immutable object with elements that replace the content ofbufferInfos
.VulkanWriteDescriptorSet
withBufferInfos(java.lang.Iterable<? extends VulkanDescriptorBufferInfo> elements)
Copy the current immutable object with elements that replace the content ofbufferInfos
.VulkanWriteDescriptorSet
withDescriptorCount(int value)
Copy the current immutable object by setting a value for thedescriptorCount
attribute.VulkanWriteDescriptorSet
withDescriptorType(VulkanDescriptorType value)
Copy the current immutable object by setting a value for thedescriptorType
attribute.VulkanWriteDescriptorSet
withDestinationArrayElement(int value)
Copy the current immutable object by setting a value for thedestinationArrayElement
attribute.VulkanWriteDescriptorSet
withDestinationBinding(int value)
Copy the current immutable object by setting a value for thedestinationBinding
attribute.VulkanWriteDescriptorSet
withDestinationSet(VulkanDescriptorSetType value)
Copy the current immutable object by setting a value for thedestinationSet
attribute.VulkanWriteDescriptorSet
withImageInfos(VulkanDescriptorImageInfo... elements)
Copy the current immutable object with elements that replace the content ofimageInfos
.VulkanWriteDescriptorSet
withImageInfos(java.lang.Iterable<? extends VulkanDescriptorImageInfo> elements)
Copy the current immutable object with elements that replace the content ofimageInfos
.VulkanWriteDescriptorSet
withTexelBufferViews(VulkanBufferViewType... elements)
Copy the current immutable object with elements that replace the content oftexelBufferViews
.VulkanWriteDescriptorSet
withTexelBufferViews(java.lang.Iterable<? extends VulkanBufferViewType> elements)
Copy the current immutable object with elements that replace the content oftexelBufferViews
.
-
-
-
Method Detail
-
destinationSet
public VulkanDescriptorSetType destinationSet()
- Specified by:
destinationSet
in interfaceVulkanWriteDescriptorSetType
- Returns:
- The destination descriptor set to update.
-
destinationBinding
public int destinationBinding()
- Specified by:
destinationBinding
in interfaceVulkanWriteDescriptorSetType
- Returns:
- The descriptor binding within that set.
-
destinationArrayElement
public int destinationArrayElement()
- Specified by:
destinationArrayElement
in interfaceVulkanWriteDescriptorSetType
- Returns:
- The starting element in that array. If the descriptor binding identified by destinationSet and destinationBinding has a descriptor type of VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT then destinationArrayElement specifies the starting byte offset within the binding.
-
descriptorCount
public int descriptorCount()
- Specified by:
descriptorCount
in interfaceVulkanWriteDescriptorSetType
- Returns:
- The number of descriptors to update (the number of elements in imageInfos, bufferInfos, or texelBufferViews , or a value matching the dataSize member of an instance of VkWriteDescriptorSetInlineUniformBlockEXT in the pNext chain , or a value matching the accelerationStructureCount of an instance of VkWriteDescriptorSetAccelerationStructureNV in the pNext chain ). If the descriptor binding identified by destinationSet and destinationBinding has a descriptor type of VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT then descriptorCount specifies the number of bytes to update.
-
descriptorType
public VulkanDescriptorType descriptorType()
- Specified by:
descriptorType
in interfaceVulkanWriteDescriptorSetType
- Returns:
- A VkDescriptorType specifying the type of each descriptor in imageInfos, bufferInfos, or texelBufferViews, as described below. It must be the same type as that specified in VkDescriptorSetLayoutBinding for destinationSet at destinationBinding. The type of the descriptor also controls which array the descriptors are taken from.
-
imageInfos
public java.util.List<VulkanDescriptorImageInfo> imageInfos()
- Specified by:
imageInfos
in interfaceVulkanWriteDescriptorSetType
- Returns:
- An array of VulkanDescriptorImageInfo structures
-
bufferInfos
public java.util.List<VulkanDescriptorBufferInfo> bufferInfos()
- Specified by:
bufferInfos
in interfaceVulkanWriteDescriptorSetType
- Returns:
- An array of VulkanDescriptorBufferInfo structures
-
texelBufferViews
public java.util.List<VulkanBufferViewType> texelBufferViews()
- Specified by:
texelBufferViews
in interfaceVulkanWriteDescriptorSetType
- Returns:
- An array of VulkanBufferViewType handles
-
withDestinationSet
public final VulkanWriteDescriptorSet withDestinationSet(VulkanDescriptorSetType value)
Copy the current immutable object by setting a value for thedestinationSet
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for destinationSet- Returns:
- A modified copy of the
this
object
-
withDestinationBinding
public final VulkanWriteDescriptorSet withDestinationBinding(int value)
Copy the current immutable object by setting a value for thedestinationBinding
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for destinationBinding- Returns:
- A modified copy of the
this
object
-
withDestinationArrayElement
public final VulkanWriteDescriptorSet withDestinationArrayElement(int value)
Copy the current immutable object by setting a value for thedestinationArrayElement
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for destinationArrayElement- Returns:
- A modified copy of the
this
object
-
withDescriptorCount
public final VulkanWriteDescriptorSet withDescriptorCount(int value)
Copy the current immutable object by setting a value for thedescriptorCount
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for descriptorCount- Returns:
- A modified copy of the
this
object
-
withDescriptorType
public final VulkanWriteDescriptorSet withDescriptorType(VulkanDescriptorType value)
Copy the current immutable object by setting a value for thedescriptorType
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for descriptorType- Returns:
- A modified copy of the
this
object
-
withImageInfos
public final VulkanWriteDescriptorSet withImageInfos(VulkanDescriptorImageInfo... elements)
Copy the current immutable object with elements that replace the content ofimageInfos
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withImageInfos
public final VulkanWriteDescriptorSet withImageInfos(java.lang.Iterable<? extends VulkanDescriptorImageInfo> elements)
Copy the current immutable object with elements that replace the content ofimageInfos
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of imageInfos elements to set- Returns:
- A modified copy of
this
object
-
withBufferInfos
public final VulkanWriteDescriptorSet withBufferInfos(VulkanDescriptorBufferInfo... elements)
Copy the current immutable object with elements that replace the content ofbufferInfos
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withBufferInfos
public final VulkanWriteDescriptorSet withBufferInfos(java.lang.Iterable<? extends VulkanDescriptorBufferInfo> elements)
Copy the current immutable object with elements that replace the content ofbufferInfos
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of bufferInfos elements to set- Returns:
- A modified copy of
this
object
-
withTexelBufferViews
public final VulkanWriteDescriptorSet withTexelBufferViews(VulkanBufferViewType... elements)
Copy the current immutable object with elements that replace the content oftexelBufferViews
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withTexelBufferViews
public final VulkanWriteDescriptorSet withTexelBufferViews(java.lang.Iterable<? extends VulkanBufferViewType> elements)
Copy the current immutable object with elements that replace the content oftexelBufferViews
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of texelBufferViews elements to set- Returns:
- A modified copy of
this
object
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofVulkanWriteDescriptorSet
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:destinationSet
,destinationBinding
,destinationArrayElement
,descriptorCount
,descriptorType
,imageInfos
,bufferInfos
,texelBufferViews
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueVulkanWriteDescriptorSet
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
public static VulkanWriteDescriptorSet of(VulkanDescriptorSetType destinationSet, int destinationBinding, int destinationArrayElement, int descriptorCount, VulkanDescriptorType descriptorType, java.util.List<VulkanDescriptorImageInfo> imageInfos, java.util.List<VulkanDescriptorBufferInfo> bufferInfos, java.util.List<VulkanBufferViewType> texelBufferViews)
Construct a new immutableVulkanWriteDescriptorSet
instance.- Parameters:
destinationSet
- The value for thedestinationSet
attributedestinationBinding
- The value for thedestinationBinding
attributedestinationArrayElement
- The value for thedestinationArrayElement
attributedescriptorCount
- The value for thedescriptorCount
attributedescriptorType
- The value for thedescriptorType
attributeimageInfos
- The value for theimageInfos
attributebufferInfos
- The value for thebufferInfos
attributetexelBufferViews
- The value for thetexelBufferViews
attribute- Returns:
- An immutable VulkanWriteDescriptorSet instance
-
of
public static VulkanWriteDescriptorSet of(VulkanDescriptorSetType destinationSet, int destinationBinding, int destinationArrayElement, int descriptorCount, VulkanDescriptorType descriptorType, java.lang.Iterable<? extends VulkanDescriptorImageInfo> imageInfos, java.lang.Iterable<? extends VulkanDescriptorBufferInfo> bufferInfos, java.lang.Iterable<? extends VulkanBufferViewType> texelBufferViews)
Construct a new immutableVulkanWriteDescriptorSet
instance.- Parameters:
destinationSet
- The value for thedestinationSet
attributedestinationBinding
- The value for thedestinationBinding
attributedestinationArrayElement
- The value for thedestinationArrayElement
attributedescriptorCount
- The value for thedescriptorCount
attributedescriptorType
- The value for thedescriptorType
attributeimageInfos
- The value for theimageInfos
attributebufferInfos
- The value for thebufferInfos
attributetexelBufferViews
- The value for thetexelBufferViews
attribute- Returns:
- An immutable VulkanWriteDescriptorSet instance
-
copyOf
public static VulkanWriteDescriptorSet copyOf(VulkanWriteDescriptorSetType instance)
Creates an immutable copy of aVulkanWriteDescriptorSetType
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 VulkanWriteDescriptorSet instance
-
builder
public static VulkanWriteDescriptorSet.Builder builder()
Creates a builder forVulkanWriteDescriptorSet
.- Returns:
- A new VulkanWriteDescriptorSet builder
-
-