76 lines
3.1 KiB
Plaintext
76 lines
3.1 KiB
Plaintext
vkCreateDescriptorSetLayout(3)
|
|
===============================
|
|
|
|
Name
|
|
----
|
|
vkCreateDescriptorSetLayout - Create a new descriptor set layout.
|
|
|
|
C Specification
|
|
---------------
|
|
|
|
include::../protos/vkCreateDescriptorSetLayout.txt[]
|
|
|
|
Parameters
|
|
----------
|
|
|
|
pname:device::
|
|
The device with which to create the layout object.
|
|
|
|
pname:pCreateInfo::
|
|
Pointer to a structure specifying information to be placed in the object
|
|
|
|
pname:pSetLayout::
|
|
Pointer to a variable which will receive the new handle.
|
|
|
|
Description
|
|
-----------
|
|
|
|
fname:vkCreateDescriptorSetLayout creates a new descriptor set layout usable by the device specified in
|
|
pname:device using the information contained in the structure pointed to by pname:pCreateInfo. If successful,
|
|
a handle to the newly created layout object is placed in the variable pointed to by pname:pSetLayout. The
|
|
description of the layout is specified in pname:pCreateInfo, which is a pointer to an instance of the
|
|
slink:VkDescriptorSetLayoutCreateInfo structure, the definition of which is:
|
|
|
|
include::../structs/VkDescriptorSetLayoutCreateInfo.txt[]
|
|
|
|
The pname:bindingCount member of pname:pCreateInfo specifies the number of
|
|
bindings contained in the set. This is the number of elements in the array
|
|
pointed to by pname:pBinding, which is an array of
|
|
slink:VkDescriptorSetLayoutBinding structures. The definition of
|
|
slink:VkDescriptorSetLayoutBinding is:
|
|
|
|
include::../structs/VkDescriptorSetLayoutBinding.txt[]
|
|
|
|
Each element of the ptext:pBinding array specifies a descriptor or an array
|
|
of descriptors to be included in the set layout. pname:descriptorType
|
|
contains the descriptor type and must be one of the elink:VkDescriptorType
|
|
enumerants, the complete list of which is:
|
|
|
|
include::../enums/VkDescriptorType.txt[]
|
|
|
|
The pname:stageFlags member specifies which pipeline shader stages may access the resource. This is a bitwise
|
|
combination of the elink:VkShaderStageFlags enumerant, the list of which is:
|
|
|
|
include::../enums/VkShaderStageFlagBits.txt[]
|
|
|
|
If a shader stage is not included in pname:stageFlags, then the resource may not be accessed from that
|
|
stage within any pipeline using the set layout.
|
|
|
|
If pname:descriptorType member specifies a ename:VK_DESCRIPTOR_TYPE_SAMPLER or ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
|
|
type descriptor, then the pname:pImmutableSamplers member may be used to initialize a set of _immutable samplers_.
|
|
Immutable samplers are permanently bound into the set layout; later binding a sampler into an immutable sampler slot in
|
|
a descriptor set is not allowed. If pname:pImmutableSamplers is not code:NULL, then it is considered to be a pointer to an
|
|
array of pname:arraySize sampler handles that will be consumed by the set layout and used for the corresponding binding.
|
|
If pname:pImmutableSamplers is code:NULL, then the sampler slots are dynamic and sampler handles must be bound into
|
|
descriptor sets using this layout. If pname:descriptorType is not one of these descriptor types, then
|
|
pname:pImmutableSamplers is ignored.
|
|
|
|
include::../validity/protos/vkCreateDescriptorSetLayout.txt[]
|
|
|
|
See Also
|
|
--------
|
|
|
|
flink:vkAllocateDescriptorSets, flink:vkFreeDescriptorSets, flink:vkCreateDescriptorPool
|
|
|
|
include::footer.txt[]
|