Package org.lwjgl.vulkan
Class VkWriteDescriptorSet
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkWriteDescriptorSet
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class VkWriteDescriptorSet extends Struct
Khronos Reference Page
Vulkan SpecificationDescribes an operation updating the descriptor set using descriptors for resources specified in the structure.
Valid Usage
sTypemust beSTRUCTURE_TYPE_WRITE_DESCRIPTOR_SETpNextmust beNULLdstSetmust be a validVkDescriptorSethandledescriptorTypemust be a validVkDescriptorTypevaluedescriptorCountmust be greater than 0- Each of
dstSetand the elements ofpTexelBufferViewthat are valid handles must have been created, allocated or retrieved from the sameVkDevice dstBindingmust be a valid binding point withindstSetdescriptorTypemust match the type ofdstBindingwithindstSet- The sum of
dstArrayElementanddescriptorCountmust be less than or equal to the number of array elements in the descriptor set binding specified bydstBinding, and all applicable consecutive bindings - If
descriptorTypeisDESCRIPTOR_TYPE_SAMPLER,DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,DESCRIPTOR_TYPE_SAMPLED_IMAGE,DESCRIPTOR_TYPE_STORAGE_IMAGEorDESCRIPTOR_TYPE_INPUT_ATTACHMENT,pImageInfomust be a pointer to an array ofdescriptorCountvalidVkDescriptorImageInfostructures - If
descriptorTypeisDESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFERorDESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER,pTexelBufferViewmust be a pointer to an array ofdescriptorCountvalidVkBufferViewhandles - If
descriptorTypeisDESCRIPTOR_TYPE_UNIFORM_BUFFER,DESCRIPTOR_TYPE_STORAGE_BUFFER,DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMICorDESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC,pBufferInfomust be a pointer to an array ofdescriptorCountvalidVkDescriptorBufferInfostructures - If
descriptorTypeisDESCRIPTOR_TYPE_SAMPLERorDESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, anddstSetwas not created with a layout that included immutable samplers fordstBindingwithdescriptorType, thesamplermember of any given element ofpImageInfomust be a validVkSamplerobject - If
descriptorTypeisDESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,DESCRIPTOR_TYPE_SAMPLED_IMAGE,DESCRIPTOR_TYPE_STORAGE_IMAGEorDESCRIPTOR_TYPE_INPUT_ATTACHMENT, theimageViewandimageLayoutmembers of any given element ofpImageInfomust be a validVkImageViewandVkImageLayout, respectively - If
descriptorTypeisDESCRIPTOR_TYPE_UNIFORM_BUFFERorDESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, theoffsetmember of any given element ofpBufferInfomust be a multiple ofVkPhysicalDeviceLimits::minUniformBufferOffsetAlignment - If
descriptorTypeisDESCRIPTOR_TYPE_STORAGE_BUFFERorDESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, theoffsetmember of any given element ofpBufferInfomust be a multiple ofVkPhysicalDeviceLimits::minStorageBufferOffsetAlignment - If
descriptorTypeisDESCRIPTOR_TYPE_UNIFORM_BUFFERorDESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, thebuffermember of any given element ofpBufferInfomust have been created withBUFFER_USAGE_UNIFORM_BUFFER_BITset - If
descriptorTypeisDESCRIPTOR_TYPE_STORAGE_BUFFERorDESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, thebuffermember of any given element ofpBufferInfomust have been created withBUFFER_USAGE_STORAGE_BUFFER_BITset - If
descriptorTypeisDESCRIPTOR_TYPE_UNIFORM_BUFFERorDESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, therangemember of any given element ofpBufferInfomust be less than or equal toVkPhysicalDeviceLimits::maxUniformBufferRange - If
descriptorTypeisDESCRIPTOR_TYPE_STORAGE_BUFFERorDESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, therangemember of any given element ofpBufferInfomust be less than or equal toVkPhysicalDeviceLimits::maxStorageBufferRange - If
descriptorTypeisDESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, theVkBufferthat any given element ofpTexelBufferViewwas created from must have been created withBUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BITset - If
descriptorTypeisDESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, theVkBufferthat any given element ofpTexelBufferViewwas created from must have been created withBUFFER_USAGE_STORAGE_TEXEL_BUFFER_BITset - If
descriptorTypeisDESCRIPTOR_TYPE_STORAGE_IMAGEorDESCRIPTOR_TYPE_INPUT_ATTACHMENT, theimageViewmember of any given element ofpImageInfomust have been created with the identity swizzle
Member documentation
sType– the type of this structure. Must be:STRUCTURE_TYPE_WRITE_DESCRIPTOR_SETpNext– reserved for use by extensionsdstSet– the destination descriptor set to updatedstBinding– the descriptor binding within that setdstArrayElement– the starting element in that arraydescriptorCount– the number of descriptors to update (the number of elements inpImageInfO,pBufferInfO, orpTexelBufferVieW)descriptorType– the type of each descriptor inpImageInfo,pBufferInfo, orpTexelBufferView, and must be the same type as what was specified inVkDescriptorSetLayoutBindingfordstSetatdstBinding. The type of the descriptor also controls which array the descriptors are taken from. One of:pImageInfo– points to an array ofVkDescriptorImageInfostructures or is ignoredpBufferInfo– points to an array ofVkDescriptorBufferInfostructures or is ignoredpTexelBufferView– points to an array ofVkBufferViewhandles or is ignored
Layout
struct VkWriteDescriptorSet { VkStructureType sType; const void * pNext; VkDescriptorSet dstSet; uint32_t dstBinding; uint32_t dstArrayElement; uint32_t descriptorCount; VkDescriptorType descriptorType; const VkDescriptorImageInfo * pImageInfo; const VkDescriptorBufferInfo * pBufferInfo; const VkBufferView * pTexelBufferView; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classVkWriteDescriptorSet.BufferAn array ofVkWriteDescriptorSetstructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and Description VkWriteDescriptorSet(java.nio.ByteBuffer container)Creates aVkWriteDescriptorSetinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static VkWriteDescriptorSetcalloc()Returns a newVkWriteDescriptorSetinstance allocated withmemCalloc.static VkWriteDescriptorSet.Buffercalloc(int capacity)Returns a newVkWriteDescriptorSet.Bufferinstance allocated withmemCalloc.static VkWriteDescriptorSetcallocStack()Returns a newVkWriteDescriptorSetinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkWriteDescriptorSet.BuffercallocStack(int capacity)Returns a newVkWriteDescriptorSet.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkWriteDescriptorSet.BuffercallocStack(int capacity, MemoryStack stack)Returns a newVkWriteDescriptorSet.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkWriteDescriptorSetcallocStack(MemoryStack stack)Returns a newVkWriteDescriptorSetinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkWriteDescriptorSetcreate()Returns a newVkWriteDescriptorSetinstance allocated withBufferUtils.static VkWriteDescriptorSet.Buffercreate(int capacity)Returns a newVkWriteDescriptorSet.Bufferinstance allocated withBufferUtils.static VkWriteDescriptorSetcreate(long address)Returns a newVkWriteDescriptorSetinstance for the specified memory address ornullif the address isNULL.static VkWriteDescriptorSet.Buffercreate(long address, int capacity)Create aVkWriteDescriptorSet.Bufferinstance at the specified memory.intdescriptorCount()Returns the value of thedescriptorCountfield.intdescriptorType()Returns the value of thedescriptorTypefield.VkWriteDescriptorSetdescriptorType(int value)Sets the specified value to thedescriptorTypefield.intdstArrayElement()Returns the value of thedstArrayElementfield.VkWriteDescriptorSetdstArrayElement(int value)Sets the specified value to thedstArrayElementfield.intdstBinding()Returns the value of thedstBindingfield.VkWriteDescriptorSetdstBinding(int value)Sets the specified value to thedstBindingfield.longdstSet()Returns the value of thedstSetfield.VkWriteDescriptorSetdstSet(long value)Sets the specified value to thedstSetfield.static VkWriteDescriptorSetmalloc()Returns a newVkWriteDescriptorSetinstance allocated withmemAlloc.static VkWriteDescriptorSet.Buffermalloc(int capacity)Returns a newVkWriteDescriptorSet.Bufferinstance allocated withmemAlloc.static VkWriteDescriptorSetmallocStack()Returns a newVkWriteDescriptorSetinstance allocated on the thread-localMemoryStack.static VkWriteDescriptorSet.BuffermallocStack(int capacity)Returns a newVkWriteDescriptorSet.Bufferinstance allocated on the thread-localMemoryStack.static VkWriteDescriptorSet.BuffermallocStack(int capacity, MemoryStack stack)Returns a newVkWriteDescriptorSet.Bufferinstance allocated on the specifiedMemoryStack.static VkWriteDescriptorSetmallocStack(MemoryStack stack)Returns a newVkWriteDescriptorSetinstance allocated on the specifiedMemoryStack.VkWriteDescriptorSetnset(long struct)Unsafe version ofset.VkDescriptorBufferInfo.BufferpBufferInfo()Returns aVkDescriptorBufferInfo.Bufferview of the struct array pointed to by thepBufferInfofield.VkWriteDescriptorSetpBufferInfo(VkDescriptorBufferInfo.Buffer value)Sets the address of the specifiedVkDescriptorBufferInfo.Bufferto thepBufferInfofield.VkDescriptorImageInfo.BufferpImageInfo()Returns aVkDescriptorImageInfo.Bufferview of the struct array pointed to by thepImageInfofield.VkWriteDescriptorSetpImageInfo(VkDescriptorImageInfo.Buffer value)Sets the address of the specifiedVkDescriptorImageInfo.Bufferto thepImageInfofield.longpNext()Returns the value of thepNextfield.VkWriteDescriptorSetpNext(long value)Sets the specified value to thepNextfield.java.nio.LongBufferpTexelBufferView()Returns aLongBufferview of the data pointed to by thepTexelBufferViewfield.VkWriteDescriptorSetpTexelBufferView(java.nio.LongBuffer value)Sets the address of the specifiedLongBufferto thepTexelBufferViewfield.VkWriteDescriptorSetset(int sType, long pNext, long dstSet, int dstBinding, int dstArrayElement, int descriptorType, VkDescriptorImageInfo.Buffer pImageInfo, VkDescriptorBufferInfo.Buffer pBufferInfo, java.nio.LongBuffer pTexelBufferView)Initializes this struct with the specified values.VkWriteDescriptorSetset(VkWriteDescriptorSet src)Copies the specified struct data to this struct.intsizeof()Returns thesizeof(struct).intsType()Returns the value of thesTypefield.VkWriteDescriptorSetsType(int value)Sets the specified value to thesTypefield.static voidvalidate(long struct)Validates pointer members that should not beNULL.static voidvalidate(long array, int count)CallsVkWriteDescriptorSet.validate(long)for each struct contained in the specified struct array.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
Constructor Detail
-
VkWriteDescriptorSet
public VkWriteDescriptorSet(java.nio.ByteBuffer container)
Creates aVkWriteDescriptorSetinstance at the current position of the specifiedByteBuffercontainer. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Detail
-
sizeof
public int sizeof()
Description copied from class:StructReturns thesizeof(struct).
-
sType
public int sType()
Returns the value of thesTypefield.
-
pNext
public long pNext()
Returns the value of thepNextfield.
-
dstSet
public long dstSet()
Returns the value of thedstSetfield.
-
dstBinding
public int dstBinding()
Returns the value of thedstBindingfield.
-
dstArrayElement
public int dstArrayElement()
Returns the value of thedstArrayElementfield.
-
descriptorCount
public int descriptorCount()
Returns the value of thedescriptorCountfield.
-
descriptorType
public int descriptorType()
Returns the value of thedescriptorTypefield.
-
pImageInfo
public VkDescriptorImageInfo.Buffer pImageInfo()
Returns aVkDescriptorImageInfo.Bufferview of the struct array pointed to by thepImageInfofield.
-
pBufferInfo
public VkDescriptorBufferInfo.Buffer pBufferInfo()
Returns aVkDescriptorBufferInfo.Bufferview of the struct array pointed to by thepBufferInfofield.
-
pTexelBufferView
public java.nio.LongBuffer pTexelBufferView()
Returns aLongBufferview of the data pointed to by thepTexelBufferViewfield.
-
sType
public VkWriteDescriptorSet sType(int value)
Sets the specified value to thesTypefield.
-
pNext
public VkWriteDescriptorSet pNext(long value)
Sets the specified value to thepNextfield.
-
dstSet
public VkWriteDescriptorSet dstSet(long value)
Sets the specified value to thedstSetfield.
-
dstBinding
public VkWriteDescriptorSet dstBinding(int value)
Sets the specified value to thedstBindingfield.
-
dstArrayElement
public VkWriteDescriptorSet dstArrayElement(int value)
Sets the specified value to thedstArrayElementfield.
-
descriptorType
public VkWriteDescriptorSet descriptorType(int value)
Sets the specified value to thedescriptorTypefield.
-
pImageInfo
public VkWriteDescriptorSet pImageInfo(VkDescriptorImageInfo.Buffer value)
Sets the address of the specifiedVkDescriptorImageInfo.Bufferto thepImageInfofield.
-
pBufferInfo
public VkWriteDescriptorSet pBufferInfo(VkDescriptorBufferInfo.Buffer value)
Sets the address of the specifiedVkDescriptorBufferInfo.Bufferto thepBufferInfofield.
-
pTexelBufferView
public VkWriteDescriptorSet pTexelBufferView(java.nio.LongBuffer value)
Sets the address of the specifiedLongBufferto thepTexelBufferViewfield.
-
set
public VkWriteDescriptorSet set(int sType, long pNext, long dstSet, int dstBinding, int dstArrayElement, int descriptorType, VkDescriptorImageInfo.Buffer pImageInfo, VkDescriptorBufferInfo.Buffer pBufferInfo, java.nio.LongBuffer pTexelBufferView)
Initializes this struct with the specified values.
-
nset
public VkWriteDescriptorSet nset(long struct)
Unsafe version ofset.
-
set
public VkWriteDescriptorSet set(VkWriteDescriptorSet src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkWriteDescriptorSet malloc()
Returns a newVkWriteDescriptorSetinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkWriteDescriptorSet calloc()
Returns a newVkWriteDescriptorSetinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkWriteDescriptorSet create()
Returns a newVkWriteDescriptorSetinstance allocated withBufferUtils.
-
create
public static VkWriteDescriptorSet create(long address)
Returns a newVkWriteDescriptorSetinstance for the specified memory address ornullif the address isNULL.
-
malloc
public static VkWriteDescriptorSet.Buffer malloc(int capacity)
Returns a newVkWriteDescriptorSet.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkWriteDescriptorSet.Buffer calloc(int capacity)
Returns a newVkWriteDescriptorSet.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkWriteDescriptorSet.Buffer create(int capacity)
Returns a newVkWriteDescriptorSet.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkWriteDescriptorSet.Buffer create(long address, int capacity)
Create aVkWriteDescriptorSet.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static VkWriteDescriptorSet mallocStack()
Returns a newVkWriteDescriptorSetinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkWriteDescriptorSet callocStack()
Returns a newVkWriteDescriptorSetinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkWriteDescriptorSet mallocStack(MemoryStack stack)
Returns a newVkWriteDescriptorSetinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkWriteDescriptorSet callocStack(MemoryStack stack)
Returns a newVkWriteDescriptorSetinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static VkWriteDescriptorSet.Buffer mallocStack(int capacity)
Returns a newVkWriteDescriptorSet.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkWriteDescriptorSet.Buffer callocStack(int capacity)
Returns a newVkWriteDescriptorSet.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkWriteDescriptorSet.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkWriteDescriptorSet.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static VkWriteDescriptorSet.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newVkWriteDescriptorSet.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
validate
public static void validate(long array, int count)CallsVkWriteDescriptorSet.validate(long)for each struct contained in the specified struct array.- Parameters:
array- the struct array to validatecount- the number of structs inarray
-
-