Top Description Inners Fields Constructors Methods
org.lwjgl.vulkan

public Class VkWriteDescriptorSet

extends Struct<VkWriteDescriptorSet>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Structure specifying the parameters of a descriptor set write operation.
Description

Only one of pImageInfo, pBufferInfo, or pTexelBufferView members is used according to the descriptor type specified in the descriptorType member of the containing VkWriteDescriptorSet structure, or none of them in case descriptorType is DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, in which case the source data for the descriptor writes is taken from the VkWriteDescriptorSetInlineUniformBlock structure included in the pNext chain of VkWriteDescriptorSet, or if descriptorType is DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, in which case the source data for the descriptor writes is taken from the VkWriteDescriptorSetAccelerationStructureKHR structure in the pNext chain of VkWriteDescriptorSet, or if descriptorType is DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV, in which case the source data for the descriptor writes is taken from the VkWriteDescriptorSetAccelerationStructureNV structure in the pNext chain of VkWriteDescriptorSet, as specified below.

If the nullDescriptor feature is enabled, the buffer, acceleration structure, imageView, or bufferView can be NULL_HANDLE. Loads from a null descriptor return zero values and stores and atomics to a null descriptor are discarded. A null acceleration structure descriptor results in the miss shader being invoked.

If the destination descriptor is a mutable descriptor, the active descriptor type for the destination descriptor becomes descriptorType.

If the dstBinding has fewer than descriptorCount array elements remaining starting from dstArrayElement, then the remainder will be used to update the subsequent binding - dstBinding+1 starting at array element zero. If a binding has a descriptorCount of zero, it is skipped. This behavior applies recursively, with the update affecting consecutive bindings as needed to update all descriptorCount descriptors. Consecutive bindings must have identical VkDescriptorType, VkShaderStageFlags, VkDescriptorBindingFlagBits, and immutable samplers references. In addition, if the VkDescriptorType is DESCRIPTOR_TYPE_MUTABLE_EXT, the supported descriptor types in VkMutableDescriptorTypeCreateInfoEXT must be equally defined.

Note

The same behavior applies to bindings with a descriptor type of DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK where descriptorCount specifies the number of bytes to update while dstArrayElement specifies the starting byte offset, thus in this case if the dstBinding has a smaller byte size than the sum of dstArrayElement and descriptorCount, then the remainder will be used to update the subsequent binding - dstBinding+1 starting at offset zero. This falls out as a special case of the above rule.

Valid Usage
Valid Usage (Implicit)
See Also

VkDescriptorBufferInfo, VkDescriptorImageInfo, CmdPushDescriptorSetKHR, UpdateDescriptorSets

Layout


struct VkWriteDescriptorSet {
    VkStructureType sType;
    void const * pNext;
    VkDescriptorSet dstSet;
    uint32_t dstBinding;
    uint32_t dstArrayElement;
    uint32_t descriptorCount;
    VkDescriptorType descriptorType;
    VkDescriptorImageInfo const * pImageInfo;
    VkDescriptorBufferInfo const * pBufferInfo;
    VkBufferView const * pTexelBufferView;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
DESCRIPTORCOUNT

The struct member offsets.

public static final int
DESCRIPTORTYPE

The struct member offsets.

public static final int
DSTARRAYELEMENT

The struct member offsets.

public static final int
DSTBINDING

The struct member offsets.

public static final int
DSTSET

The struct member offsets.

public static final int
PBUFFERINFO

The struct member offsets.

public static final int
PIMAGEINFO

The struct member offsets.

public static final int
PNEXT

The struct member offsets.

public static final int
PTEXELBUFFERVIEW

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
STYPE

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
VkWriteDescriptorSet(long address, ByteBuffer container)

public
VkWriteDescriptorSet(ByteBuffer container)

Creates a VkWriteDescriptorSet instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public static VkWriteDescriptorSet
calloc()

Returns a new VkWriteDescriptorSet instance allocated with memCalloc.

public static VkWriteDescriptorSet.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new VkWriteDescriptorSet.Buffer instance allocated with memCalloc.

public static VkWriteDescriptorSet
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new VkWriteDescriptorSet instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static VkWriteDescriptorSet.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new VkWriteDescriptorSet.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static VkWriteDescriptorSet
callocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static VkWriteDescriptorSet
callocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static VkWriteDescriptorSet.Buffer
callocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static VkWriteDescriptorSet.Buffer
callocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
protected VkWriteDescriptorSet
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static VkWriteDescriptorSet
create()

Returns a new VkWriteDescriptorSet instance allocated with BufferUtils.

public static VkWriteDescriptorSet
create(long address)

Returns a new VkWriteDescriptorSet instance for the specified memory address.

public static VkWriteDescriptorSet.Buffer
create(int
the buffer capacity
capacity
)

Returns a new VkWriteDescriptorSet.Buffer instance allocated with BufferUtils.

public static VkWriteDescriptorSet.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a VkWriteDescriptorSet.Buffer instance at the specified memory.

public static VkWriteDescriptorSet
createSafe(long address)

Like create, but returns null if address is NULL.

public static VkWriteDescriptorSet.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public int
descriptorCount()

the number of descriptors to update.

public VkWriteDescriptorSet
descriptorCount(int value)

Sets the specified value to the descriptorCount field.

public int
descriptorType()

a VkDescriptorType specifying the type of each descriptor in pImageInfo, pBufferInfo, or pTexelBufferView, as described below.

public VkWriteDescriptorSet
descriptorType(int value)

Sets the specified value to the descriptorType field.

public int
dstArrayElement()

the starting element in that array.

public VkWriteDescriptorSet
dstArrayElement(int value)

Sets the specified value to the dstArrayElement field.

public int
dstBinding()

the descriptor binding within that set.

public VkWriteDescriptorSet
dstBinding(int value)

Sets the specified value to the dstBinding field.

public long
dstSet()

the destination descriptor set to update.

public VkWriteDescriptorSet
dstSet(long value)

Sets the specified value to the dstSet field.

public static VkWriteDescriptorSet
malloc()

Returns a new VkWriteDescriptorSet instance allocated with memAlloc.

public static VkWriteDescriptorSet.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new VkWriteDescriptorSet.Buffer instance allocated with memAlloc.

public static VkWriteDescriptorSet
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new VkWriteDescriptorSet instance allocated on the specified MemoryStack.

public static VkWriteDescriptorSet.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new VkWriteDescriptorSet.Buffer instance allocated on the specified MemoryStack.

public static VkWriteDescriptorSet
mallocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static VkWriteDescriptorSet
mallocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static VkWriteDescriptorSet.Buffer
mallocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static VkWriteDescriptorSet.Buffer
mallocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static int
ndescriptorCount(long struct)

Unsafe version of descriptorCount.

public static void
ndescriptorCount(long struct, int value)

Sets the specified value to the descriptorCount field of the specified struct.

public static int
ndescriptorType(long struct)

Unsafe version of descriptorType.

public static void
ndescriptorType(long struct, int value)

Unsafe version of descriptorType.

public static int
ndstArrayElement(long struct)

Unsafe version of dstArrayElement.

public static void
ndstArrayElement(long struct, int value)

Unsafe version of dstArrayElement.

public static int
ndstBinding(long struct)

Unsafe version of dstBinding.

public static void
ndstBinding(long struct, int value)

Unsafe version of dstBinding.

public static long
ndstSet(long struct)

Unsafe version of dstSet.

public static void
ndstSet(long struct, long value)

Unsafe version of dstSet.

public static VkDescriptorBufferInfo.Buffer
npBufferInfo(long struct)

Unsafe version of pBufferInfo.

public static void
npBufferInfo(long struct, VkDescriptorBufferInfo.Buffer value)

Unsafe version of pBufferInfo.

public static VkDescriptorImageInfo.Buffer
npImageInfo(long struct)

Unsafe version of pImageInfo.

public static void
npImageInfo(long struct, VkDescriptorImageInfo.Buffer value)

Unsafe version of pImageInfo.

public static long
npNext(long struct)

Unsafe version of pNext.

public static void
npNext(long struct, long value)

Unsafe version of pNext.

public static LongBuffer
npTexelBufferView(long struct)

Unsafe version of pTexelBufferView.

public static void
npTexelBufferView(long struct, LongBuffer value)

Unsafe version of pTexelBufferView.

public static int
nsType(long struct)

Unsafe version of sType.

public static void
nsType(long struct, int value)

Unsafe version of sType.

public VkDescriptorBufferInfo.Buffer
pBufferInfo()

a pointer to an array of VkDescriptorBufferInfo structures or is ignored, as described below.

public VkWriteDescriptorSet
pBufferInfo(VkDescriptorBufferInfo.Buffer value)

Sets the address of the specified VkDescriptorBufferInfo.Buffer to the pBufferInfo field.

public VkDescriptorImageInfo.Buffer
pImageInfo()

a pointer to an array of VkDescriptorImageInfo structures or is ignored, as described below.

public VkWriteDescriptorSet
pImageInfo(VkDescriptorImageInfo.Buffer value)

Sets the address of the specified VkDescriptorImageInfo.Buffer to the pImageInfo field.

public long
pNext()

NULL or a pointer to a structure extending this structure.

public VkWriteDescriptorSet
pNext(long value)

Sets the specified value to the pNext field.

public VkWriteDescriptorSet
public VkWriteDescriptorSet
public VkWriteDescriptorSet
pNext(VkWriteDescriptorSetInlineUniformBlock value)

Prepends the specified VkWriteDescriptorSetInlineUniformBlock value to the pNext chain.

public VkWriteDescriptorSet
pNext(VkWriteDescriptorSetInlineUniformBlockEXT value)

Prepends the specified VkWriteDescriptorSetInlineUniformBlockEXT value to the pNext chain.

public LongBuffer
pTexelBufferView()

a pointer to an array of VkBufferView handles as described in the Buffer Views section or is ignored, as described below.

public VkWriteDescriptorSet
pTexelBufferView(LongBuffer value)

Sets the address of the specified LongBuffer to the pTexelBufferView field.

public VkWriteDescriptorSet
set(int sType, long pNext, long dstSet, int dstBinding, int dstArrayElement, int descriptorCount, int descriptorType, VkDescriptorImageInfo.Buffer pImageInfo, VkDescriptorBufferInfo.Buffer pBufferInfo, LongBuffer pTexelBufferView)

Initializes this struct with the specified values.

public VkWriteDescriptorSet

Returns:

this struct
set
(VkWriteDescriptorSet
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public int
sType()

a VkStructureType value identifying this structure.

public VkWriteDescriptorSet
sType(int value)

Sets the specified value to the sType field.

public VkWriteDescriptorSet
Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate