Class VulkanWriteDescriptorSet
java.lang.Object
com.io7m.jcoronado.api.VulkanWriteDescriptorSet
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeVulkanWriteDescriptorSet. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forVulkanWriteDescriptorSet.static VulkanWriteDescriptorSetcopyOf(VulkanWriteDescriptorSetType instance) Creates an immutable copy of aVulkanWriteDescriptorSetTypevalue.intintintbooleanThis instance is equal to all instances ofVulkanWriteDescriptorSetthat have equal attribute values.inthashCode()Computes a hash code from attributes:destinationSet,destinationBinding,destinationArrayElement,descriptorCount,descriptorType,imageInfos,bufferInfos,texelBufferViews.static VulkanWriteDescriptorSetof(VulkanDescriptorSetType destinationSet, int destinationBinding, int destinationArrayElement, int descriptorCount, VulkanDescriptorType descriptorType, Iterable<? extends VulkanDescriptorImageInfo> imageInfos, Iterable<? extends VulkanDescriptorBufferInfo> bufferInfos, Iterable<? extends VulkanBufferViewType> texelBufferViews) Construct a new immutableVulkanWriteDescriptorSetinstance.static VulkanWriteDescriptorSetof(VulkanDescriptorSetType destinationSet, int destinationBinding, int destinationArrayElement, int descriptorCount, VulkanDescriptorType descriptorType, List<VulkanDescriptorImageInfo> imageInfos, List<VulkanDescriptorBufferInfo> bufferInfos, List<VulkanBufferViewType> texelBufferViews) Construct a new immutableVulkanWriteDescriptorSetinstance.toString()Prints the immutable valueVulkanWriteDescriptorSetwith attribute values.final VulkanWriteDescriptorSetwithBufferInfos(VulkanDescriptorBufferInfo... elements) Copy the current immutable object with elements that replace the content ofbufferInfos.final VulkanWriteDescriptorSetwithBufferInfos(Iterable<? extends VulkanDescriptorBufferInfo> elements) Copy the current immutable object with elements that replace the content ofbufferInfos.final VulkanWriteDescriptorSetwithDescriptorCount(int value) Copy the current immutable object by setting a value for thedescriptorCountattribute.final VulkanWriteDescriptorSetCopy the current immutable object by setting a value for thedescriptorTypeattribute.final VulkanWriteDescriptorSetwithDestinationArrayElement(int value) Copy the current immutable object by setting a value for thedestinationArrayElementattribute.final VulkanWriteDescriptorSetwithDestinationBinding(int value) Copy the current immutable object by setting a value for thedestinationBindingattribute.final VulkanWriteDescriptorSetCopy the current immutable object by setting a value for thedestinationSetattribute.final VulkanWriteDescriptorSetwithImageInfos(VulkanDescriptorImageInfo... elements) Copy the current immutable object with elements that replace the content ofimageInfos.final VulkanWriteDescriptorSetwithImageInfos(Iterable<? extends VulkanDescriptorImageInfo> elements) Copy the current immutable object with elements that replace the content ofimageInfos.final VulkanWriteDescriptorSetwithTexelBufferViews(VulkanBufferViewType... elements) Copy the current immutable object with elements that replace the content oftexelBufferViews.final VulkanWriteDescriptorSetwithTexelBufferViews(Iterable<? extends VulkanBufferViewType> elements) Copy the current immutable object with elements that replace the content oftexelBufferViews.
-
Method Details
-
destinationSet
- Specified by:
destinationSetin interfaceVulkanWriteDescriptorSetType- Returns:
- The destination descriptor set to update.
-
destinationBinding
public int destinationBinding()- Specified by:
destinationBindingin interfaceVulkanWriteDescriptorSetType- Returns:
- The descriptor binding within that set.
-
destinationArrayElement
public int destinationArrayElement()- Specified by:
destinationArrayElementin 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:
descriptorCountin 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
- Specified by:
descriptorTypein 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
- Specified by:
imageInfosin interfaceVulkanWriteDescriptorSetType- Returns:
- An array of VulkanDescriptorImageInfo structures
-
bufferInfos
- Specified by:
bufferInfosin interfaceVulkanWriteDescriptorSetType- Returns:
- An array of VulkanDescriptorBufferInfo structures
-
texelBufferViews
- Specified by:
texelBufferViewsin interfaceVulkanWriteDescriptorSetType- Returns:
- An array of VulkanBufferViewType handles
-
withDestinationSet
Copy the current immutable object by setting a value for thedestinationSetattribute. 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
thisobject
-
withDestinationBinding
Copy the current immutable object by setting a value for thedestinationBindingattribute. 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
thisobject
-
withDestinationArrayElement
Copy the current immutable object by setting a value for thedestinationArrayElementattribute. 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
thisobject
-
withDescriptorCount
Copy the current immutable object by setting a value for thedescriptorCountattribute. 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
thisobject
-
withDescriptorType
Copy the current immutable object by setting a value for thedescriptorTypeattribute. 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
thisobject
-
withImageInfos
Copy the current immutable object with elements that replace the content ofimageInfos.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withImageInfos
public final VulkanWriteDescriptorSet withImageInfos(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
thisobject
-
withBufferInfos
Copy the current immutable object with elements that replace the content ofbufferInfos.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withBufferInfos
public final VulkanWriteDescriptorSet withBufferInfos(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
thisobject
-
withTexelBufferViews
Copy the current immutable object with elements that replace the content oftexelBufferViews.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withTexelBufferViews
public final VulkanWriteDescriptorSet withTexelBufferViews(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
thisobject
-
equals
-
hashCode
-
toString
-
of
public static VulkanWriteDescriptorSet of(VulkanDescriptorSetType destinationSet, int destinationBinding, int destinationArrayElement, int descriptorCount, VulkanDescriptorType descriptorType, List<VulkanDescriptorImageInfo> imageInfos, List<VulkanDescriptorBufferInfo> bufferInfos, List<VulkanBufferViewType> texelBufferViews) Construct a new immutableVulkanWriteDescriptorSetinstance.- Parameters:
destinationSet- The value for thedestinationSetattributedestinationBinding- The value for thedestinationBindingattributedestinationArrayElement- The value for thedestinationArrayElementattributedescriptorCount- The value for thedescriptorCountattributedescriptorType- The value for thedescriptorTypeattributeimageInfos- The value for theimageInfosattributebufferInfos- The value for thebufferInfosattributetexelBufferViews- The value for thetexelBufferViewsattribute- Returns:
- An immutable VulkanWriteDescriptorSet instance
-
of
public static VulkanWriteDescriptorSet of(VulkanDescriptorSetType destinationSet, int destinationBinding, int destinationArrayElement, int descriptorCount, VulkanDescriptorType descriptorType, Iterable<? extends VulkanDescriptorImageInfo> imageInfos, Iterable<? extends VulkanDescriptorBufferInfo> bufferInfos, Iterable<? extends VulkanBufferViewType> texelBufferViews) Construct a new immutableVulkanWriteDescriptorSetinstance.- Parameters:
destinationSet- The value for thedestinationSetattributedestinationBinding- The value for thedestinationBindingattributedestinationArrayElement- The value for thedestinationArrayElementattributedescriptorCount- The value for thedescriptorCountattributedescriptorType- The value for thedescriptorTypeattributeimageInfos- The value for theimageInfosattributebufferInfos- The value for thebufferInfosattributetexelBufferViews- The value for thetexelBufferViewsattribute- Returns:
- An immutable VulkanWriteDescriptorSet instance
-
copyOf
Creates an immutable copy of aVulkanWriteDescriptorSetTypevalue. 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
Creates a builder forVulkanWriteDescriptorSet.VulkanWriteDescriptorSet.builder() .setDestinationSet(com.io7m.jcoronado.api.VulkanDescriptorSetType) // requireddestinationSet.setDestinationBinding(int) // requireddestinationBinding.setDestinationArrayElement(int) // optionaldestinationArrayElement.setDescriptorCount(int) // requireddescriptorCount.setDescriptorType(com.io7m.jcoronado.api.VulkanDescriptorType) // requireddescriptorType.addImageInfos|addAllImageInfos(VulkanDescriptorImageInfo) //imageInfoselements .addBufferInfos|addAllBufferInfos(VulkanDescriptorBufferInfo) //bufferInfoselements .addTexelBufferViews|addAllTexelBufferViews(com.io7m.jcoronado.api.VulkanBufferViewType) //texelBufferViewselements .build();- Returns:
- A new VulkanWriteDescriptorSet builder
-