Vulkan-Docs/doc/specs/vulkan/man/VkDescriptorSetLayoutBindin...

101 lines
3.8 KiB
Plaintext

// Copyright (c) 2014-2016 Khronos Group. This work is licensed under a
// Creative Commons Attribution 4.0 International License; see
// http://creativecommons.org/licenses/by/4.0/
VkDescriptorSetLayoutBinding(3)
===============================
Name
----
VkDescriptorSetLayoutBinding - Structure specifying a descriptor set layout binding
C Specification
---------------
// refBegin VkDescriptorSetLayoutBinding - Structure specifying a descriptor set layout binding
The sname:VkDescriptorSetLayoutBinding structure is defined as:
include::../api/structs/VkDescriptorSetLayoutBinding.txt[]
Members
-------
* pname:binding is the binding number of this entry and corresponds
to a resource of the same binding number in the shader stages.
* pname:descriptorType is a elink:VkDescriptorType specifying which type
of resource descriptors are used for this binding.
* pname:descriptorCount is the number of descriptors contained in the
binding, accessed in a shader as an array. If pname:descriptorCount is
zero this binding entry is reserved and the resource mustnot: be
accessed from any stage via this binding within any pipeline using the
set layout.
* pname:stageFlags member is a bitmask of elink:VkShaderStageFlagBits
specifying which pipeline shader stages can: access a resource for this
binding. ename:VK_SHADER_STAGE_ALL is a shorthand specifying that all
defined shader stages, including any additional stages defined by
extensions, can: access the resource.
+
--
If a shader stage is not included in pname:stageFlags, then a resource
mustnot: be accessed from that stage via this binding within any pipeline
using the set layout. There are no limitations on what combinations of
stages can: be used by a descriptor binding, and in particular a binding
can: be used by both graphics stages and the compute stage.
--
* pname:pImmutableSamplers affects initialization of samplers. If
pname:descriptorType specifies a ename:VK_DESCRIPTOR_TYPE_SAMPLER or
ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER type descriptor, then
pname:pImmutableSamplers can: 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 `NULL`, then it
is considered to be a pointer to an array of sampler handles that will
be consumed by the set layout and used for the corresponding binding. If
pname:pImmutableSamplers is `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.
Description
-----------
The above layout definition allows the descriptor bindings to be specified
sparsely such that not all binding numbers between 0 and the maximum
binding number need to be specified in the pname:pBindings array. However,
all binding numbers between 0 and the maximum binding number may: consume
memory in the descriptor set layout even if not all descriptor bindings are
used, though it shouldnot:
consume additional memory from the descriptor pool.
[NOTE]
.Note
====
The maximum binding number specified should: be as compact as possible to
avoid wasted memory.
====
include::../validity/structs/VkDescriptorSetLayoutBinding.txt[]
See Also
--------
slink:VkDescriptorSetLayoutCreateInfo, elink:VkDescriptorType, slink:VkSampler, elink:VkShaderStageFlags
Document Notes
--------------
For more information, see the Vulkan Specification at URL
https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html#VkDescriptorSetLayoutBinding
This page is extracted from the Vulkan Specification.
Fixes and changes should be made to the Specification,not directly.
include::footer.txt[]