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
sType
must beSTRUCTURE_TYPE_WRITE_DESCRIPTOR_SET
pNext
must beNULL
dstSet
must be a validVkDescriptorSet
handledescriptorType
must be a validVkDescriptorType
valuedescriptorCount
must be greater than 0- Each of
dstSet
and the elements ofpTexelBufferView
that are valid handles must have been created, allocated or retrieved from the sameVkDevice
dstBinding
must be a valid binding point withindstSet
descriptorType
must match the type ofdstBinding
withindstSet
- The sum of
dstArrayElement
anddescriptorCount
must be less than or equal to the number of array elements in the descriptor set binding specified bydstBinding
, and all applicable consecutive bindings - If
descriptorType
isDESCRIPTOR_TYPE_SAMPLER
,DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
,DESCRIPTOR_TYPE_SAMPLED_IMAGE
,DESCRIPTOR_TYPE_STORAGE_IMAGE
orDESCRIPTOR_TYPE_INPUT_ATTACHMENT
,pImageInfo
must be a pointer to an array ofdescriptorCount
validVkDescriptorImageInfo
structures - If
descriptorType
isDESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER
orDESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER
,pTexelBufferView
must be a pointer to an array ofdescriptorCount
validVkBufferView
handles - If
descriptorType
isDESCRIPTOR_TYPE_UNIFORM_BUFFER
,DESCRIPTOR_TYPE_STORAGE_BUFFER
,DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
orDESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
,pBufferInfo
must be a pointer to an array ofdescriptorCount
validVkDescriptorBufferInfo
structures - If
descriptorType
isDESCRIPTOR_TYPE_SAMPLER
orDESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
, anddstSet
was not created with a layout that included immutable samplers fordstBinding
withdescriptorType
, thesampler
member of any given element ofpImageInfo
must be a validVkSampler
object - If
descriptorType
isDESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
,DESCRIPTOR_TYPE_SAMPLED_IMAGE
,DESCRIPTOR_TYPE_STORAGE_IMAGE
orDESCRIPTOR_TYPE_INPUT_ATTACHMENT
, theimageView
andimageLayout
members of any given element ofpImageInfo
must be a validVkImageView
andVkImageLayout
, respectively - If
descriptorType
isDESCRIPTOR_TYPE_UNIFORM_BUFFER
orDESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
, theoffset
member of any given element ofpBufferInfo
must be a multiple ofVkPhysicalDeviceLimits
::minUniformBufferOffsetAlignment
- If
descriptorType
isDESCRIPTOR_TYPE_STORAGE_BUFFER
orDESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
, theoffset
member of any given element ofpBufferInfo
must be a multiple ofVkPhysicalDeviceLimits
::minStorageBufferOffsetAlignment
- If
descriptorType
isDESCRIPTOR_TYPE_UNIFORM_BUFFER
orDESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
, thebuffer
member of any given element ofpBufferInfo
must have been created withBUFFER_USAGE_UNIFORM_BUFFER_BIT
set - If
descriptorType
isDESCRIPTOR_TYPE_STORAGE_BUFFER
orDESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
, thebuffer
member of any given element ofpBufferInfo
must have been created withBUFFER_USAGE_STORAGE_BUFFER_BIT
set - If
descriptorType
isDESCRIPTOR_TYPE_UNIFORM_BUFFER
orDESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
, therange
member of any given element ofpBufferInfo
must be less than or equal toVkPhysicalDeviceLimits
::maxUniformBufferRange
- If
descriptorType
isDESCRIPTOR_TYPE_STORAGE_BUFFER
orDESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
, therange
member of any given element ofpBufferInfo
must be less than or equal toVkPhysicalDeviceLimits
::maxStorageBufferRange
- If
descriptorType
isDESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER
, theVkBuffer
that any given element ofpTexelBufferView
was created from must have been created withBUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT
set - If
descriptorType
isDESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER
, theVkBuffer
that any given element ofpTexelBufferView
was created from must have been created withBUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT
set - If
descriptorType
isDESCRIPTOR_TYPE_STORAGE_IMAGE
orDESCRIPTOR_TYPE_INPUT_ATTACHMENT
, theimageView
member of any given element ofpImageInfo
must have been created with the identity swizzle
Member documentation
sType
– the type of this structure. Must be:STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET
pNext
– 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 inVkDescriptorSetLayoutBinding
fordstSet
atdstBinding
. The type of the descriptor also controls which array the descriptors are taken from. One of:pImageInfo
– points to an array ofVkDescriptorImageInfo
structures or is ignoredpBufferInfo
– points to an array ofVkDescriptorBufferInfo
structures or is ignoredpTexelBufferView
– points to an array ofVkBufferView
handles 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 class
VkWriteDescriptorSet.Buffer
An array ofVkWriteDescriptorSet
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The 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 aVkWriteDescriptorSet
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static VkWriteDescriptorSet
calloc()
Returns a newVkWriteDescriptorSet
instance allocated withmemCalloc
.static VkWriteDescriptorSet.Buffer
calloc(int capacity)
Returns a newVkWriteDescriptorSet.Buffer
instance allocated withmemCalloc
.static VkWriteDescriptorSet
callocStack()
Returns a newVkWriteDescriptorSet
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkWriteDescriptorSet.Buffer
callocStack(int capacity)
Returns a newVkWriteDescriptorSet.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkWriteDescriptorSet.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newVkWriteDescriptorSet.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkWriteDescriptorSet
callocStack(MemoryStack stack)
Returns a newVkWriteDescriptorSet
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkWriteDescriptorSet
create()
Returns a newVkWriteDescriptorSet
instance allocated withBufferUtils
.static VkWriteDescriptorSet.Buffer
create(int capacity)
Returns a newVkWriteDescriptorSet.Buffer
instance allocated withBufferUtils
.static VkWriteDescriptorSet
create(long address)
Returns a newVkWriteDescriptorSet
instance for the specified memory address ornull
if the address isNULL
.static VkWriteDescriptorSet.Buffer
create(long address, int capacity)
Create aVkWriteDescriptorSet.Buffer
instance at the specified memory.int
descriptorCount()
Returns the value of thedescriptorCount
field.int
descriptorType()
Returns the value of thedescriptorType
field.VkWriteDescriptorSet
descriptorType(int value)
Sets the specified value to thedescriptorType
field.int
dstArrayElement()
Returns the value of thedstArrayElement
field.VkWriteDescriptorSet
dstArrayElement(int value)
Sets the specified value to thedstArrayElement
field.int
dstBinding()
Returns the value of thedstBinding
field.VkWriteDescriptorSet
dstBinding(int value)
Sets the specified value to thedstBinding
field.long
dstSet()
Returns the value of thedstSet
field.VkWriteDescriptorSet
dstSet(long value)
Sets the specified value to thedstSet
field.static VkWriteDescriptorSet
malloc()
Returns a newVkWriteDescriptorSet
instance allocated withmemAlloc
.static VkWriteDescriptorSet.Buffer
malloc(int capacity)
Returns a newVkWriteDescriptorSet.Buffer
instance allocated withmemAlloc
.static VkWriteDescriptorSet
mallocStack()
Returns a newVkWriteDescriptorSet
instance allocated on the thread-localMemoryStack
.static VkWriteDescriptorSet.Buffer
mallocStack(int capacity)
Returns a newVkWriteDescriptorSet.Buffer
instance allocated on the thread-localMemoryStack
.static VkWriteDescriptorSet.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newVkWriteDescriptorSet.Buffer
instance allocated on the specifiedMemoryStack
.static VkWriteDescriptorSet
mallocStack(MemoryStack stack)
Returns a newVkWriteDescriptorSet
instance allocated on the specifiedMemoryStack
.VkWriteDescriptorSet
nset(long struct)
Unsafe version ofset
.VkDescriptorBufferInfo.Buffer
pBufferInfo()
Returns aVkDescriptorBufferInfo.Buffer
view of the struct array pointed to by thepBufferInfo
field.VkWriteDescriptorSet
pBufferInfo(VkDescriptorBufferInfo.Buffer value)
Sets the address of the specifiedVkDescriptorBufferInfo.Buffer
to thepBufferInfo
field.VkDescriptorImageInfo.Buffer
pImageInfo()
Returns aVkDescriptorImageInfo.Buffer
view of the struct array pointed to by thepImageInfo
field.VkWriteDescriptorSet
pImageInfo(VkDescriptorImageInfo.Buffer value)
Sets the address of the specifiedVkDescriptorImageInfo.Buffer
to thepImageInfo
field.long
pNext()
Returns the value of thepNext
field.VkWriteDescriptorSet
pNext(long value)
Sets the specified value to thepNext
field.java.nio.LongBuffer
pTexelBufferView()
Returns aLongBuffer
view of the data pointed to by thepTexelBufferView
field.VkWriteDescriptorSet
pTexelBufferView(java.nio.LongBuffer value)
Sets the address of the specifiedLongBuffer
to thepTexelBufferView
field.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.VkWriteDescriptorSet
set(VkWriteDescriptorSet src)
Copies the specified struct data to this struct.int
sizeof()
Returns thesizeof(struct)
.int
sType()
Returns the value of thesType
field.VkWriteDescriptorSet
sType(int value)
Sets the specified value to thesType
field.static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(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 aVkWriteDescriptorSet
instance at the current position of the specifiedByteBuffer
container. 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:Struct
Returns thesizeof(struct)
.
-
sType
public int sType()
Returns the value of thesType
field.
-
pNext
public long pNext()
Returns the value of thepNext
field.
-
dstSet
public long dstSet()
Returns the value of thedstSet
field.
-
dstBinding
public int dstBinding()
Returns the value of thedstBinding
field.
-
dstArrayElement
public int dstArrayElement()
Returns the value of thedstArrayElement
field.
-
descriptorCount
public int descriptorCount()
Returns the value of thedescriptorCount
field.
-
descriptorType
public int descriptorType()
Returns the value of thedescriptorType
field.
-
pImageInfo
public VkDescriptorImageInfo.Buffer pImageInfo()
Returns aVkDescriptorImageInfo.Buffer
view of the struct array pointed to by thepImageInfo
field.
-
pBufferInfo
public VkDescriptorBufferInfo.Buffer pBufferInfo()
Returns aVkDescriptorBufferInfo.Buffer
view of the struct array pointed to by thepBufferInfo
field.
-
pTexelBufferView
public java.nio.LongBuffer pTexelBufferView()
Returns aLongBuffer
view of the data pointed to by thepTexelBufferView
field.
-
sType
public VkWriteDescriptorSet sType(int value)
Sets the specified value to thesType
field.
-
pNext
public VkWriteDescriptorSet pNext(long value)
Sets the specified value to thepNext
field.
-
dstSet
public VkWriteDescriptorSet dstSet(long value)
Sets the specified value to thedstSet
field.
-
dstBinding
public VkWriteDescriptorSet dstBinding(int value)
Sets the specified value to thedstBinding
field.
-
dstArrayElement
public VkWriteDescriptorSet dstArrayElement(int value)
Sets the specified value to thedstArrayElement
field.
-
descriptorType
public VkWriteDescriptorSet descriptorType(int value)
Sets the specified value to thedescriptorType
field.
-
pImageInfo
public VkWriteDescriptorSet pImageInfo(VkDescriptorImageInfo.Buffer value)
Sets the address of the specifiedVkDescriptorImageInfo.Buffer
to thepImageInfo
field.
-
pBufferInfo
public VkWriteDescriptorSet pBufferInfo(VkDescriptorBufferInfo.Buffer value)
Sets the address of the specifiedVkDescriptorBufferInfo.Buffer
to thepBufferInfo
field.
-
pTexelBufferView
public VkWriteDescriptorSet pTexelBufferView(java.nio.LongBuffer value)
Sets the address of the specifiedLongBuffer
to thepTexelBufferView
field.
-
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 newVkWriteDescriptorSet
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkWriteDescriptorSet calloc()
Returns a newVkWriteDescriptorSet
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkWriteDescriptorSet create()
Returns a newVkWriteDescriptorSet
instance allocated withBufferUtils
.
-
create
public static VkWriteDescriptorSet create(long address)
Returns a newVkWriteDescriptorSet
instance for the specified memory address ornull
if the address isNULL
.
-
malloc
public static VkWriteDescriptorSet.Buffer malloc(int capacity)
Returns a newVkWriteDescriptorSet.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkWriteDescriptorSet.Buffer calloc(int capacity)
Returns a newVkWriteDescriptorSet.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkWriteDescriptorSet.Buffer create(int capacity)
Returns a newVkWriteDescriptorSet.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkWriteDescriptorSet.Buffer create(long address, int capacity)
Create aVkWriteDescriptorSet.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static VkWriteDescriptorSet mallocStack()
Returns a newVkWriteDescriptorSet
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkWriteDescriptorSet callocStack()
Returns a newVkWriteDescriptorSet
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkWriteDescriptorSet mallocStack(MemoryStack stack)
Returns a newVkWriteDescriptorSet
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkWriteDescriptorSet callocStack(MemoryStack stack)
Returns a newVkWriteDescriptorSet
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkWriteDescriptorSet.Buffer callocStack(int capacity)
Returns a newVkWriteDescriptorSet.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkWriteDescriptorSet.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkWriteDescriptorSet.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and 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
-
-