2016-07-11 01:13:41 +00:00
|
|
|
// 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/
|
|
|
|
|
2016-02-16 09:53:44 +00:00
|
|
|
vkCmdBindDescriptorSets(3)
|
|
|
|
==========================
|
|
|
|
|
|
|
|
Name
|
|
|
|
----
|
|
|
|
vkCmdBindDescriptorSets - Binds descriptor sets to a command buffer.
|
|
|
|
|
|
|
|
C Specification
|
|
|
|
---------------
|
|
|
|
|
2016-07-11 01:13:41 +00:00
|
|
|
// refBegin vkCmdBindDescriptorSets Binds descriptor sets to a command buffer.
|
|
|
|
|
|
|
|
To bind one or more descriptor sets to a command buffer, call:
|
|
|
|
|
Change log for July 22, 2016 Vulkan 1.0.22 spec update:
* Bump API patch number and header version number to 22 for this update.
Github Issues:
* Translate the subpass self-dependency language into concrete
validity statements, and added a validity statement about the
restrictions on layout parameters (public issue 267).
* Add validity requirement that
slink:VkAttachmentDescription::pname:finalLayout and
slink:VkAttachmentReference::pname:layout must not be
ename:VK_IMAGE_LAYOUT_UNDEFINED or
ename:VK_IMAGE_LAYOUT_PREINITIALIZED (public issue 268).
* Clarify that slink:VkSubpassDescription::pname:pResolveAttachments
layouts are used. Make language consistent with other attachment
arrays (public issue 270).
* Changed 64-bit definition for
dname:VK_DEFINE_NON_DISPATCHABLE_HANDLE to work for x32 platform in
+vk.xml+ and the resulting +vulkan.h+ (public issue 282).
* Add missing error return code for
flink:vkEnumerateInstanceExtensionProperties and
flink:vkEnumerateDeviceExtensionProperties (public issue 285)
* Fix several cases of stext::VkStructName.memberName markup to
stext::VkStructName::pname:memberName, to match other usage in the
spec, and describe this markup in the style guide (public issue
286).
* Modified validity language generation script to avoid redundant
common ancestor language if covered by generic parent language, and
used `Both' instead of `Each' when appropriate (public issue 288).
Internal Issues:
* Add language about behavior of flink:vkAllocateDescriptorSets when
allocation fails due to fragmentation, a new error
ename:VK_ERROR_FRAGMENTED_POOL, and a Note explaining the situation
(internal issue 309).
* For the features of code:PointSize, code:ClipDistance, and
code:CullDistance, the SPIR-V capability is required to be declared
on use (read or write) rather than on decoration (internal issue
359).
* Have desktop versions of GLSL respect precision qualification
(code:mediump and code:lowp) when compiling for Vulkan. These will
get translated to SPIR-V's code:RelaxedPrecision decoration as they
do with OpenGL ES versions of GLSL (ESSL). The default precision of
all types is code:highp when using a desktop version (internal issue
360).
* Add validity statement for slink:VkImageCreateInfo specifying that
multisampled images must be two-dimensional, optimally tiled, and
with a single mipmap level (internal issue 369).
* Add validity statements to slink:VkImageViewCreateInfo disallowing
creation of images or image views with no supported features. Made
some slink:VkImageViewCreateInfo validity statements more precise
and consistent. Added a Note to the <<features,features>> chapter
about formats with no features (internal issue 371).
* Remove +manpages+ from default build targets. Nroff outputs
containing imbedded latexmath will not render properly. Fixing this
is a lot of work for limited use cases (internal issue 401).
Other Commits:
* Fix flink:vkRenderPassBeginInfo::pname:clearValueCount validity
statement to be based on attachment indices rather than the number
of cleared attachments
(Vulkan-LoaderAndValidationLayers/issues/601).
* Convert registry documentation from LaTeX to asciidoc source and
rename from +src/spec/readme.tex+ to +src/spec/registry.txt+.
* Fix lack of Oxford commas in validity language.
* Lots of cleanup of generator scripts and Makefiles to move extension
list for generator into the script arguments instead of the body of
genvk.py, and express better dependencies between XML, scripts, and
generated files.
2016-07-23 10:15:48 +00:00
|
|
|
include::../api/protos/vkCmdBindDescriptorSets.txt[]
|
2016-02-16 09:53:44 +00:00
|
|
|
|
2016-07-11 01:13:41 +00:00
|
|
|
|
2016-02-16 09:53:44 +00:00
|
|
|
Parameters
|
|
|
|
----------
|
|
|
|
|
2016-07-11 01:13:41 +00:00
|
|
|
* pname:commandBuffer is the command buffer that the descriptor sets will
|
|
|
|
be bound to.
|
|
|
|
* pname:pipelineBindPoint is a elink:VkPipelineBindPoint indicating
|
|
|
|
whether the descriptors will be used by graphics pipelines or compute
|
|
|
|
pipelines. There is a separate set of bind points for each of graphics
|
|
|
|
and compute, so binding one does not disturb the other.
|
|
|
|
* pname:layout is a sname:VkPipelineLayout object used to program the
|
|
|
|
bindings.
|
|
|
|
* pname:firstSet is the set number of the first descriptor set to be
|
|
|
|
bound.
|
|
|
|
* pname:descriptorSetCount is the number of elements in the
|
|
|
|
pname:pDescriptorSets array.
|
|
|
|
* pname:pDescriptorSets is an array of handles to sname:VkDescriptorSet
|
|
|
|
objects describing the descriptor sets to write to.
|
|
|
|
* pname:dynamicOffsetCount is the number of dynamic offsets
|
|
|
|
in the pname:pDynamicOffsets array.
|
|
|
|
* pname:pDynamicOffsets is a pointer to an array of basetype:uint32_t
|
|
|
|
values specifying dynamic offsets.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
|
2016-07-11 01:13:41 +00:00
|
|
|
Description
|
|
|
|
-----------
|
2016-02-16 09:53:44 +00:00
|
|
|
|
2016-07-11 01:13:41 +00:00
|
|
|
fname:vkCmdBindDescriptorSets causes the sets numbered [pname:firstSet..
|
|
|
|
pname:firstSet+pname:descriptorSetCount-1] to use the bindings stored in
|
|
|
|
pname:pDescriptorSets[0..pname:descriptorSetCount-1] for subsequent
|
|
|
|
rendering commands (either compute or graphics, according to the
|
|
|
|
pname:pipelineBindPoint). Any bindings that were previously applied via
|
|
|
|
these sets are no longer valid.
|
|
|
|
|
|
|
|
Once bound, a descriptor set affects rendering of subsequent graphics or
|
|
|
|
compute commands in the command buffer until a different set is bound to the
|
|
|
|
same set number, or else until the set is disturbed as described in
|
|
|
|
<<descriptorsets-compatibility, Pipeline Layout Compatibility>>.
|
|
|
|
|
|
|
|
A compatible descriptor set must: be bound for all set numbers that any
|
|
|
|
shaders in a pipeline access, at the time that a draw or dispatch command is
|
|
|
|
recorded to execute using that pipeline. However, if none of the shaders in
|
|
|
|
a pipeline statically use any bindings with a particular set number, then no
|
|
|
|
descriptor set need be bound for that set number, even if the pipeline
|
|
|
|
layout includes a non-trivial descriptor set layout for that set number.
|
|
|
|
|
|
|
|
If any of the sets being bound include dynamic uniform or storage buffers,
|
|
|
|
then pname:pDynamicOffsets includes one element for each array element
|
|
|
|
in each dynamic descriptor type binding in each set. Values are taken from
|
|
|
|
pname:pDynamicOffsets in an order such that all entries for set N come
|
|
|
|
before set N+1; within a set, entries are ordered by the binding numbers in
|
|
|
|
the descriptor set layouts; and within a binding array, elements are in
|
|
|
|
order. pname:dynamicOffsetCount must: equal the total number of dynamic
|
|
|
|
descriptors in the sets being bound.
|
|
|
|
|
|
|
|
The effective offset used for dynamic uniform and storage buffer bindings is
|
|
|
|
the sum of the relative offset taken from pname:pDynamicOffsets, and the
|
|
|
|
base address of the buffer plus base offset in the descriptor set. The
|
|
|
|
length of the dynamic uniform and storage buffer bindings is the buffer
|
|
|
|
range as specified in the descriptor set.
|
|
|
|
|
|
|
|
Each of the pname:pDescriptorSets must: be compatible with the pipeline
|
|
|
|
layout specified by pname:layout. The layout used to program the bindings
|
|
|
|
must: also be compatible with the pipeline used in subsequent graphics or
|
|
|
|
compute commands, as defined in the <<descriptorsets-compatibility, Pipeline
|
|
|
|
Layout Compatibility>> section.
|
|
|
|
|
|
|
|
The descriptor set contents bound by a call to fname:vkCmdBindDescriptorSets
|
|
|
|
may: be consumed during host execution of the command, or during
|
|
|
|
shader execution of the resulting draws, or any time in between. Thus, the
|
|
|
|
contents mustnot: be altered (overwritten by an update command, or freed)
|
|
|
|
between when the command is recorded and when the command completes
|
|
|
|
executing on the queue. The contents of pname:pDynamicOffsets are consumed
|
|
|
|
immediately during execution of fname:vkCmdBindDescriptorSets. Once all
|
|
|
|
pending uses have completed, it is legal to update and reuse a descriptor
|
|
|
|
set.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
2016-07-11 01:13:41 +00:00
|
|
|
include::../validity/protos/vkCmdBindDescriptorSets.txt[]
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
|
2016-07-11 01:13:41 +00:00
|
|
|
See Also
|
|
|
|
--------
|
2016-02-16 09:53:44 +00:00
|
|
|
|
2016-07-11 01:13:41 +00:00
|
|
|
slink:VkCommandBuffer, slink:VkDescriptorSet, elink:VkPipelineBindPoint, slink:VkPipelineLayout
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
|
2016-07-11 01:13:41 +00:00
|
|
|
Document Notes
|
|
|
|
--------------
|
2016-02-16 09:53:44 +00:00
|
|
|
|
2016-07-11 01:13:41 +00:00
|
|
|
For more information, see the Vulkan Specification at URL
|
2016-02-16 09:53:44 +00:00
|
|
|
|
2016-07-11 01:13:41 +00:00
|
|
|
https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html#vkCmdBindDescriptorSets
|
2016-02-16 09:53:44 +00:00
|
|
|
|
2016-07-11 01:13:41 +00:00
|
|
|
This page is extracted from the Vulkan Specification.
|
|
|
|
Fixes and changes should be made to the Specification,not directly.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
include::footer.txt[]
|
2016-07-11 01:13:41 +00:00
|
|
|
|