1e5c31af7Sopenharmony_ci// Copyright 2015-2024 The Khronos Group Inc.
2e5c31af7Sopenharmony_ci//
3e5c31af7Sopenharmony_ci// SPDX-License-Identifier: CC-BY-4.0
4e5c31af7Sopenharmony_ci
5e5c31af7Sopenharmony_ci[[descriptorsets]]
6e5c31af7Sopenharmony_ci= Resource Descriptors
7e5c31af7Sopenharmony_ci
8e5c31af7Sopenharmony_ciA _descriptor_ is an opaque data structure representing a shader resource
9e5c31af7Sopenharmony_cisuch as a buffer, buffer view, image view, sampler, or combined image
10e5c31af7Sopenharmony_cisampler.
11e5c31af7Sopenharmony_ciDescriptors are organized into _descriptor sets_, which are bound during
12e5c31af7Sopenharmony_cicommand recording for use in subsequent drawing commands.
13e5c31af7Sopenharmony_ciThe arrangement of content in each descriptor set is determined by a
14e5c31af7Sopenharmony_ci_descriptor set layout_, which determines what descriptors can be stored
15e5c31af7Sopenharmony_ciwithin it.
16e5c31af7Sopenharmony_ciThe sequence of descriptor set layouts that can: be used by a pipeline is
17e5c31af7Sopenharmony_cispecified in a _pipeline layout_.
18e5c31af7Sopenharmony_ciEach pipeline object can: use up to pname:maxBoundDescriptorSets (see
19e5c31af7Sopenharmony_ci<<limits, Limits>>) descriptor sets.
20e5c31af7Sopenharmony_ci
21e5c31af7Sopenharmony_ciifdef::VK_EXT_descriptor_buffer[]
22e5c31af7Sopenharmony_ciIf the <<features-descriptorBuffer, pname:descriptorBuffer>> feature is
23e5c31af7Sopenharmony_cienabled, the implementation supports placing descriptors into
24e5c31af7Sopenharmony_ci<<descriptorbuffers,descriptor buffers>> which are bound during command
25e5c31af7Sopenharmony_cirecording in a similar way to descriptor sets.
26e5c31af7Sopenharmony_ciendif::VK_EXT_descriptor_buffer[]
27e5c31af7Sopenharmony_ci
28e5c31af7Sopenharmony_ciShaders access resources via variables decorated with a descriptor set and
29e5c31af7Sopenharmony_cibinding number that link them to a descriptor in a descriptor set.
30e5c31af7Sopenharmony_ciThe shader interface mapping to bound descriptor sets is described in the
31e5c31af7Sopenharmony_ci<<interfaces-resources, Shader Resource Interface>> section.
32e5c31af7Sopenharmony_ci
33e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_buffer_device_address,VK_KHR_buffer_device_address[]
34e5c31af7Sopenharmony_ciShaders can: also access buffers without going through descriptors by using
35e5c31af7Sopenharmony_ci<<descriptorsets-physical-storage-buffer,Physical Storage Buffer Access>> to
36e5c31af7Sopenharmony_ciaccess them through 64-bit addresses.
37e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_buffer_device_address,VK_KHR_buffer_device_address[]
38e5c31af7Sopenharmony_ci
39e5c31af7Sopenharmony_ci
40e5c31af7Sopenharmony_ci[[descriptorsets-types]]
41e5c31af7Sopenharmony_ci== Descriptor Types
42e5c31af7Sopenharmony_ci
43e5c31af7Sopenharmony_ciThere are a number of different types of descriptor supported by Vulkan,
44e5c31af7Sopenharmony_cicorresponding to different resources or usage.
45e5c31af7Sopenharmony_ciThe following sections describe the API definitions of each descriptor type.
46e5c31af7Sopenharmony_ciThe mapping of each type to SPIR-V is listed in the
47e5c31af7Sopenharmony_ci<<interfaces-resources-correspondence, Shader Resource and Descriptor Type
48e5c31af7Sopenharmony_ciCorrespondence>> and <<interfaces-resources-storage-class-correspondence,
49e5c31af7Sopenharmony_ciShader Resource and Storage Class Correspondence>> tables in the
50e5c31af7Sopenharmony_ci<<interfaces, Shader Interfaces>> chapter.
51e5c31af7Sopenharmony_ci
52e5c31af7Sopenharmony_ci
53e5c31af7Sopenharmony_ci[[descriptorsets-storageimage]]
54e5c31af7Sopenharmony_ci=== Storage Image
55e5c31af7Sopenharmony_ci
56e5c31af7Sopenharmony_ciA _storage image_ (ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE) is a descriptor
57e5c31af7Sopenharmony_citype associated with an <<resources-images, image resource>> via an
58e5c31af7Sopenharmony_ci<<resources-image-views, image view>> that load, store, and atomic
59e5c31af7Sopenharmony_cioperations can: be performed on.
60e5c31af7Sopenharmony_ci
61e5c31af7Sopenharmony_ciStorage image loads are supported in all shader stages for image views whose
62e5c31af7Sopenharmony_ci<<resources-image-view-format-features,format features>> contain
63e5c31af7Sopenharmony_ci<<formats-properties,ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT>>.
64e5c31af7Sopenharmony_ci
65e5c31af7Sopenharmony_ciStores to storage images are supported in
66e5c31af7Sopenharmony_ciifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[task, mesh and]
67e5c31af7Sopenharmony_cicompute shaders for image views whose
68e5c31af7Sopenharmony_ci<<resources-image-view-format-features,format features>> contain
69e5c31af7Sopenharmony_ci<<formats-properties,ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT>>.
70e5c31af7Sopenharmony_ci
71e5c31af7Sopenharmony_ciAtomic operations on storage images are supported in
72e5c31af7Sopenharmony_ciifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[task, mesh and]
73e5c31af7Sopenharmony_cicompute shaders for image views whose
74e5c31af7Sopenharmony_ci<<resources-image-view-format-features,format features>> contain
75e5c31af7Sopenharmony_ci<<formats-properties,ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT>>.
76e5c31af7Sopenharmony_ci
77e5c31af7Sopenharmony_ciWhen the <<features-fragmentStoresAndAtomics,
78e5c31af7Sopenharmony_cipname:fragmentStoresAndAtomics>> feature is enabled, stores and atomic
79e5c31af7Sopenharmony_cioperations are also supported for storage images in fragment shaders with
80e5c31af7Sopenharmony_cithe same set of image formats as supported in compute shaders.
81e5c31af7Sopenharmony_ciWhen the <<features-vertexPipelineStoresAndAtomics,
82e5c31af7Sopenharmony_cipname:vertexPipelineStoresAndAtomics>> feature is enabled, stores and atomic
83e5c31af7Sopenharmony_cioperations are also supported in vertex, tessellation, and geometry shaders
84e5c31af7Sopenharmony_ciwith the same set of image formats as supported in compute shaders.
85e5c31af7Sopenharmony_ci
86e5c31af7Sopenharmony_ciThe image subresources for a storage image must: be in the
87e5c31af7Sopenharmony_ciifdef::VK_KHR_shared_presentable_image[]
88e5c31af7Sopenharmony_ciename:VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR or
89e5c31af7Sopenharmony_ciendif::VK_KHR_shared_presentable_image[]
90e5c31af7Sopenharmony_ciename:VK_IMAGE_LAYOUT_GENERAL layout in order to access its data in a
91e5c31af7Sopenharmony_cishader.
92e5c31af7Sopenharmony_ci
93e5c31af7Sopenharmony_ci
94e5c31af7Sopenharmony_ci[[descriptorsets-sampler]]
95e5c31af7Sopenharmony_ci=== Sampler
96e5c31af7Sopenharmony_ci
97e5c31af7Sopenharmony_ciA _sampler descriptor_ (ename:VK_DESCRIPTOR_TYPE_SAMPLER) is a descriptor
98e5c31af7Sopenharmony_citype associated with a <<samplers,sampler>> object, used to control the
99e5c31af7Sopenharmony_cibehavior of <<textures,sampling operations>> performed on a
100e5c31af7Sopenharmony_ci<<descriptorsets-sampledimage, sampled image>>.
101e5c31af7Sopenharmony_ci
102e5c31af7Sopenharmony_ci
103e5c31af7Sopenharmony_ci[[descriptorsets-sampledimage]]
104e5c31af7Sopenharmony_ci=== Sampled Image
105e5c31af7Sopenharmony_ci
106e5c31af7Sopenharmony_ciA _sampled image_ (ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE) is a descriptor
107e5c31af7Sopenharmony_citype associated with an <<resources-images, image resource>> via an
108e5c31af7Sopenharmony_ci<<resources-image-views, image view>> that <<textures,sampling operations>>
109e5c31af7Sopenharmony_cican: be performed on.
110e5c31af7Sopenharmony_ci
111e5c31af7Sopenharmony_ciShaders combine a sampled image variable and a sampler variable to perform
112e5c31af7Sopenharmony_cisampling operations.
113e5c31af7Sopenharmony_ci
114e5c31af7Sopenharmony_ciSampled images are supported in all shader stages for image views whose
115e5c31af7Sopenharmony_ci<<resources-image-view-format-features,format features>> contain
116e5c31af7Sopenharmony_ci<<formats-properties,ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT>>.
117e5c31af7Sopenharmony_ci
118e5c31af7Sopenharmony_ciAn image subresources for a sampled image must: be in one of the following
119e5c31af7Sopenharmony_cilayouts:
120e5c31af7Sopenharmony_ci
121e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL
122e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
123e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_GENERAL
124e5c31af7Sopenharmony_ciifdef::VK_KHR_shared_presentable_image[]
125e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR
126e5c31af7Sopenharmony_ciendif::VK_KHR_shared_presentable_image[]
127e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance2[]
128e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL
129e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL
130e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
131e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
132e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL
133e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
134e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
135e5c31af7Sopenharmony_ciifdef::VK_KHR_synchronization2[]
136e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR
137e5c31af7Sopenharmony_ciendif::VK_KHR_synchronization2[]
138e5c31af7Sopenharmony_ciifdef::VK_EXT_attachment_feedback_loop_layout[]
139e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT
140e5c31af7Sopenharmony_ciendif::VK_EXT_attachment_feedback_loop_layout[]
141e5c31af7Sopenharmony_ci
142e5c31af7Sopenharmony_ci
143e5c31af7Sopenharmony_ci[[descriptorsets-combinedimagesampler]]
144e5c31af7Sopenharmony_ci=== Combined Image Sampler
145e5c31af7Sopenharmony_ci
146e5c31af7Sopenharmony_ciA _combined image sampler_ (ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER)
147e5c31af7Sopenharmony_ciis a single descriptor type associated with both a <<samplers,sampler>> and
148e5c31af7Sopenharmony_cian <<resources-images,image resource>>, combining both a
149e5c31af7Sopenharmony_ci<<descriptorsets-sampler,sampler>> and <<descriptorsets-sampledimage,
150e5c31af7Sopenharmony_cisampled image>> descriptor into a single descriptor.
151e5c31af7Sopenharmony_ci
152e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
153e5c31af7Sopenharmony_ciIf the descriptor refers to a sampler that performs
154e5c31af7Sopenharmony_ciifndef::VK_EXT_fragment_density_map[]
155e5c31af7Sopenharmony_ci<<samplers-YCbCr-conversion,{YCbCr} conversion>>,
156e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map[]
157e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map[]
158e5c31af7Sopenharmony_ci<<samplers-YCbCr-conversion,{YCbCr} conversion>> or samples a
159e5c31af7Sopenharmony_ci<<samplers-subsamplesampler,subsampled image>>,
160e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map[]
161e5c31af7Sopenharmony_cithe sampler must: only be used to sample the image in the same descriptor.
162e5c31af7Sopenharmony_ciOtherwise, the
163e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
164e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
165e5c31af7Sopenharmony_ciifndef::VK_EXT_fragment_density_map[]
166e5c31af7Sopenharmony_ciThe
167e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map[]
168e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map[]
169e5c31af7Sopenharmony_ciIf the descriptor refers to a sampler that samples a
170e5c31af7Sopenharmony_ci<<samplers-subsamplesampler,subsampled image>>, the sampler must: only be
171e5c31af7Sopenharmony_ciused to sample the image in the same descriptor.
172e5c31af7Sopenharmony_ciOtherwise, the
173e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map[]
174e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
175e5c31af7Sopenharmony_cisampler and image in this type of descriptor can: be used freely with any
176e5c31af7Sopenharmony_ciother samplers and images.
177e5c31af7Sopenharmony_ci
178e5c31af7Sopenharmony_ciAn image subresources for a combined image sampler must: be in one of the
179e5c31af7Sopenharmony_cifollowing layouts:
180e5c31af7Sopenharmony_ci
181e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL
182e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
183e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_GENERAL
184e5c31af7Sopenharmony_ciifdef::VK_KHR_shared_presentable_image[]
185e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR
186e5c31af7Sopenharmony_ciendif::VK_KHR_shared_presentable_image[]
187e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance2[]
188e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL
189e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL
190e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
191e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
192e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL
193e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
194e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
195e5c31af7Sopenharmony_ciifdef::VK_KHR_synchronization2[]
196e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR
197e5c31af7Sopenharmony_ciendif::VK_KHR_synchronization2[]
198e5c31af7Sopenharmony_ciifdef::VK_EXT_attachment_feedback_loop_layout[]
199e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT
200e5c31af7Sopenharmony_ciendif::VK_EXT_attachment_feedback_loop_layout[]
201e5c31af7Sopenharmony_ci
202e5c31af7Sopenharmony_ci
203e5c31af7Sopenharmony_ci[NOTE]
204e5c31af7Sopenharmony_ci.Note
205e5c31af7Sopenharmony_ci====
206e5c31af7Sopenharmony_ciOn some implementations, it may: be more efficient to sample from an image
207e5c31af7Sopenharmony_ciusing a combination of sampler and sampled image that are stored together in
208e5c31af7Sopenharmony_cithe descriptor set in a combined descriptor.
209e5c31af7Sopenharmony_ci====
210e5c31af7Sopenharmony_ci
211e5c31af7Sopenharmony_ci
212e5c31af7Sopenharmony_ci[[descriptorsets-uniformtexelbuffer]]
213e5c31af7Sopenharmony_ci=== Uniform Texel Buffer
214e5c31af7Sopenharmony_ci
215e5c31af7Sopenharmony_ciA _uniform texel buffer_ (ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER) is
216e5c31af7Sopenharmony_cia descriptor type associated with a <<resources-buffers,buffer resource>>
217e5c31af7Sopenharmony_civia a <<resources-buffer-views, buffer view>> that <<textures,image sampling
218e5c31af7Sopenharmony_cioperations>> can: be performed on.
219e5c31af7Sopenharmony_ci
220e5c31af7Sopenharmony_ciUniform texel buffers define a tightly-packed 1-dimensional linear array of
221e5c31af7Sopenharmony_citexels, with texels going through format conversion when read in a shader in
222e5c31af7Sopenharmony_cithe same way as they are for an image.
223e5c31af7Sopenharmony_ci
224e5c31af7Sopenharmony_ciLoad operations from uniform texel buffers are supported in all shader
225e5c31af7Sopenharmony_cistages for buffer view formats which report
226e5c31af7Sopenharmony_ci<<resources-buffer-view-format-features,format features>> support for
227e5c31af7Sopenharmony_ciename:VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT
228e5c31af7Sopenharmony_ci
229e5c31af7Sopenharmony_ci
230e5c31af7Sopenharmony_ci[[descriptorsets-storagetexelbuffer]]
231e5c31af7Sopenharmony_ci=== Storage Texel Buffer
232e5c31af7Sopenharmony_ci
233e5c31af7Sopenharmony_ciA _storage texel buffer_ (ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER) is
234e5c31af7Sopenharmony_cia descriptor type associated with a <<resources-buffers,buffer resource>>
235e5c31af7Sopenharmony_civia a <<resources-buffer-views, buffer view>> that <<textures,image load,
236e5c31af7Sopenharmony_cistore, and atomic operations>> can: be performed on.
237e5c31af7Sopenharmony_ci
238e5c31af7Sopenharmony_ciStorage texel buffers define a tightly-packed 1-dimensional linear array of
239e5c31af7Sopenharmony_citexels, with texels going through format conversion when read in a shader in
240e5c31af7Sopenharmony_cithe same way as they are for an image.
241e5c31af7Sopenharmony_ciUnlike <<descriptorsets-uniformtexelbuffer,uniform texel buffers>>, these
242e5c31af7Sopenharmony_cibuffers can also be written to in the same way as for
243e5c31af7Sopenharmony_ci<<descriptorsets-storageimage, storage images>>.
244e5c31af7Sopenharmony_ci
245e5c31af7Sopenharmony_ciStorage texel buffer loads are supported in all shader stages for texel
246e5c31af7Sopenharmony_cibuffer view formats which report
247e5c31af7Sopenharmony_ci<<resources-buffer-view-format-features,format features>> support for
248e5c31af7Sopenharmony_ciename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT
249e5c31af7Sopenharmony_ci
250e5c31af7Sopenharmony_ciStores to storage texel buffers are supported in
251e5c31af7Sopenharmony_ciifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[task, mesh and]
252e5c31af7Sopenharmony_cicompute shaders for texel buffer formats which report
253e5c31af7Sopenharmony_ci<<resources-buffer-view-format-features,format features>> support for
254e5c31af7Sopenharmony_ciename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT
255e5c31af7Sopenharmony_ci
256e5c31af7Sopenharmony_ciAtomic operations on storage texel buffers are supported in
257e5c31af7Sopenharmony_ciifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[task, mesh and]
258e5c31af7Sopenharmony_cicompute shaders for texel buffer formats which report
259e5c31af7Sopenharmony_ci<<resources-buffer-view-format-features,format features>> support for
260e5c31af7Sopenharmony_ciename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT
261e5c31af7Sopenharmony_ci
262e5c31af7Sopenharmony_ciWhen the <<features-fragmentStoresAndAtomics,
263e5c31af7Sopenharmony_cipname:fragmentStoresAndAtomics>> feature is enabled, stores and atomic
264e5c31af7Sopenharmony_cioperations are also supported for storage texel buffers in fragment shaders
265e5c31af7Sopenharmony_ciwith the same set of texel buffer formats as supported in compute shaders.
266e5c31af7Sopenharmony_ciWhen the <<features-vertexPipelineStoresAndAtomics,
267e5c31af7Sopenharmony_cipname:vertexPipelineStoresAndAtomics>> feature is enabled, stores and atomic
268e5c31af7Sopenharmony_cioperations are also supported in vertex, tessellation, and geometry shaders
269e5c31af7Sopenharmony_ciwith the same set of texel buffer formats as supported in compute shaders.
270e5c31af7Sopenharmony_ci
271e5c31af7Sopenharmony_ci
272e5c31af7Sopenharmony_ci[[descriptorsets-storagebuffer]]
273e5c31af7Sopenharmony_ci=== Storage Buffer
274e5c31af7Sopenharmony_ci
275e5c31af7Sopenharmony_ciA _storage buffer_ (ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER) is a descriptor
276e5c31af7Sopenharmony_citype associated with a <<resources-buffers,buffer resource>> directly,
277e5c31af7Sopenharmony_cidescribed in a shader as a structure with various members that load, store,
278e5c31af7Sopenharmony_ciand atomic operations can: be performed on.
279e5c31af7Sopenharmony_ci
280e5c31af7Sopenharmony_ci[NOTE]
281e5c31af7Sopenharmony_ci.Note
282e5c31af7Sopenharmony_ci====
283e5c31af7Sopenharmony_ciAtomic operations can: only be performed on members of certain types as
284e5c31af7Sopenharmony_cidefined in the <<spirvenv, SPIR-V environment appendix>>.
285e5c31af7Sopenharmony_ci====
286e5c31af7Sopenharmony_ci
287e5c31af7Sopenharmony_ci
288e5c31af7Sopenharmony_ci[[descriptorsets-uniformbuffer]]
289e5c31af7Sopenharmony_ci=== Uniform Buffer
290e5c31af7Sopenharmony_ci
291e5c31af7Sopenharmony_ciA _uniform buffer_ (ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER) is a descriptor
292e5c31af7Sopenharmony_citype associated with a <<resources-buffers,buffer resource>> directly,
293e5c31af7Sopenharmony_cidescribed in a shader as a structure with various members that load
294e5c31af7Sopenharmony_cioperations can: be performed on.
295e5c31af7Sopenharmony_ci
296e5c31af7Sopenharmony_ci
297e5c31af7Sopenharmony_ci[[descriptorsets-uniformbufferdynamic]]
298e5c31af7Sopenharmony_ci=== Dynamic Uniform Buffer
299e5c31af7Sopenharmony_ci
300e5c31af7Sopenharmony_ciA _dynamic uniform buffer_ (ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC)
301e5c31af7Sopenharmony_ciis almost identical to a <<descriptorsets-uniformbuffer, uniform buffer>>,
302e5c31af7Sopenharmony_ciand differs only in how the offset into the buffer is specified.
303e5c31af7Sopenharmony_ciThe base offset calculated by the slink:VkDescriptorBufferInfo when
304e5c31af7Sopenharmony_ciinitially <<descriptorsets-updates, updating the descriptor set>> is added
305e5c31af7Sopenharmony_cito a <<descriptorsets-binding-dynamicoffsets, dynamic offset>> when binding
306e5c31af7Sopenharmony_cithe descriptor set.
307e5c31af7Sopenharmony_ci
308e5c31af7Sopenharmony_ci
309e5c31af7Sopenharmony_ci[[descriptorsets-storagebufferdynamic]]
310e5c31af7Sopenharmony_ci=== Dynamic Storage Buffer
311e5c31af7Sopenharmony_ci
312e5c31af7Sopenharmony_ciA _dynamic storage buffer_ (ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC)
313e5c31af7Sopenharmony_ciis almost identical to a <<descriptorsets-storagebuffer, storage buffer>>,
314e5c31af7Sopenharmony_ciand differs only in how the offset into the buffer is specified.
315e5c31af7Sopenharmony_ciThe base offset calculated by the slink:VkDescriptorBufferInfo when
316e5c31af7Sopenharmony_ciinitially <<descriptorsets-updates, updating the descriptor set>> is added
317e5c31af7Sopenharmony_cito a <<descriptorsets-binding-dynamicoffsets, dynamic offset>> when binding
318e5c31af7Sopenharmony_cithe descriptor set.
319e5c31af7Sopenharmony_ci
320e5c31af7Sopenharmony_ci
321e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
322e5c31af7Sopenharmony_ci[[descriptorsets-inlineuniformblock]]
323e5c31af7Sopenharmony_ci=== Inline Uniform Block
324e5c31af7Sopenharmony_ci
325e5c31af7Sopenharmony_ciAn _inline uniform block_ (ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK) is
326e5c31af7Sopenharmony_cialmost identical to a <<descriptorsets-uniformbuffer, uniform buffer>>, and
327e5c31af7Sopenharmony_cidiffers only in taking its storage directly from the encompassing descriptor
328e5c31af7Sopenharmony_ciset instead of being backed by buffer memory.
329e5c31af7Sopenharmony_ciIt is typically used to access a small set of constant data that does not
330e5c31af7Sopenharmony_cirequire the additional flexibility provided by the indirection enabled when
331e5c31af7Sopenharmony_ciusing a uniform buffer where the descriptor and the referenced buffer memory
332e5c31af7Sopenharmony_ciare decoupled.
333e5c31af7Sopenharmony_ciCompared to push constants, they allow reusing the same set of constant data
334e5c31af7Sopenharmony_ciacross multiple disjoint sets of drawing and dispatching commands.
335e5c31af7Sopenharmony_ci
336e5c31af7Sopenharmony_ciInline uniform block descriptors cannot: be aggregated into arrays.
337e5c31af7Sopenharmony_ciInstead, the array size specified for an inline uniform block descriptor
338e5c31af7Sopenharmony_cibinding specifies the binding's capacity in bytes.
339e5c31af7Sopenharmony_ci
340e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
341e5c31af7Sopenharmony_ci
342e5c31af7Sopenharmony_ci
343e5c31af7Sopenharmony_ciifdef::VK_QCOM_image_processing[]
344e5c31af7Sopenharmony_ci[[descriptorsets-weightimage]]
345e5c31af7Sopenharmony_ci=== Sample Weight Image
346e5c31af7Sopenharmony_ci
347e5c31af7Sopenharmony_ciA _sample weight image_ (ename:VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM)
348e5c31af7Sopenharmony_ciis a descriptor type associated with an <<resources-images, image resource>>
349e5c31af7Sopenharmony_civia an <<resources-image-views, image view>> that can: be used in
350e5c31af7Sopenharmony_ci<<textures-weightimage, weight image sampling>>.
351e5c31af7Sopenharmony_ciThe image view must have been created with
352e5c31af7Sopenharmony_cislink:VkImageViewSampleWeightCreateInfoQCOM.
353e5c31af7Sopenharmony_ci
354e5c31af7Sopenharmony_ciShaders can: combine a weight image variable, a sampled image variable, and
355e5c31af7Sopenharmony_cia sampler variable to perform <<textures-weightimage, weight image
356e5c31af7Sopenharmony_cisampling>>.
357e5c31af7Sopenharmony_ci
358e5c31af7Sopenharmony_ciWeight image sampling is supported in all shader stages if the weight image
359e5c31af7Sopenharmony_ciview specifies a format that supports
360e5c31af7Sopenharmony_ci<<resources-image-view-format-features,format feature>>
361e5c31af7Sopenharmony_ci<<formats-properties,ename:VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM>> and
362e5c31af7Sopenharmony_cithe sampled image view specifies a format that supports
363e5c31af7Sopenharmony_ci<<resources-image-view-format-features,format feature>>
364e5c31af7Sopenharmony_ci<<formats-properties,ename:VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM>>
365e5c31af7Sopenharmony_ci
366e5c31af7Sopenharmony_ciThe image subresources for the weight image must: be in the
367e5c31af7Sopenharmony_ciename:VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, or
368e5c31af7Sopenharmony_ciename:VK_IMAGE_LAYOUT_GENERAL layout in order to access its data in a
369e5c31af7Sopenharmony_cishader.
370e5c31af7Sopenharmony_ci
371e5c31af7Sopenharmony_ci
372e5c31af7Sopenharmony_ci[[descriptorsets-blockmatch]]
373e5c31af7Sopenharmony_ci=== Block Matching Image
374e5c31af7Sopenharmony_ci
375e5c31af7Sopenharmony_ciA _block matching image_ (ename:VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM)
376e5c31af7Sopenharmony_ciis a descriptor type associated with an <<resources-images, image resource>>
377e5c31af7Sopenharmony_civia an <<resources-image-views, image view>> that can: be used in
378e5c31af7Sopenharmony_ci<<textures-blockmatch, block matching>>.
379e5c31af7Sopenharmony_ci
380e5c31af7Sopenharmony_ciShaders can: combine a target image variable, a reference image variable,
381e5c31af7Sopenharmony_ciand a sampler variable to perform <<textures-blockmatch, block matching>>.
382e5c31af7Sopenharmony_ci
383e5c31af7Sopenharmony_ciBlock matching is supported in all shader stages for if both the target view
384e5c31af7Sopenharmony_ciand reference view specifies a format that supports
385e5c31af7Sopenharmony_ci<<resources-image-view-format-features,format feature>>
386e5c31af7Sopenharmony_ci<<formats-properties,ename:VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM>>
387e5c31af7Sopenharmony_ci
388e5c31af7Sopenharmony_ci
389e5c31af7Sopenharmony_ciThe image subresources for block matching must: be in the
390e5c31af7Sopenharmony_ciename:VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, or
391e5c31af7Sopenharmony_ciename:VK_IMAGE_LAYOUT_GENERAL layout in order to access its data in a
392e5c31af7Sopenharmony_cishader.
393e5c31af7Sopenharmony_ciendif::VK_QCOM_image_processing[]
394e5c31af7Sopenharmony_ci
395e5c31af7Sopenharmony_ci
396e5c31af7Sopenharmony_ci[[descriptorsets-inputattachment]]
397e5c31af7Sopenharmony_ci=== Input Attachment
398e5c31af7Sopenharmony_ci
399e5c31af7Sopenharmony_ciAn _input attachment_ (ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT) is a
400e5c31af7Sopenharmony_cidescriptor type associated with an <<resources-images, image resource>> via
401e5c31af7Sopenharmony_cian <<resources-image-views, image view>> that can: be used for
402e5c31af7Sopenharmony_ci<<synchronization-framebuffer-regions,framebuffer local>> load operations in
403e5c31af7Sopenharmony_cifragment shaders.
404e5c31af7Sopenharmony_ci
405e5c31af7Sopenharmony_ciAll image formats that are supported for color attachments
406e5c31af7Sopenharmony_ci(ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT
407e5c31af7Sopenharmony_ciifdef::VK_NV_linear_color_attachment[]
408e5c31af7Sopenharmony_cior ename:VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV
409e5c31af7Sopenharmony_ciendif::VK_NV_linear_color_attachment[]
410e5c31af7Sopenharmony_ci) or depth/stencil attachments
411e5c31af7Sopenharmony_ci(ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT) for a given image
412e5c31af7Sopenharmony_citiling mode are also supported for input attachments.
413e5c31af7Sopenharmony_ci
414e5c31af7Sopenharmony_ciAn image view used as an input attachment must: be in one of the following
415e5c31af7Sopenharmony_cilayouts:
416e5c31af7Sopenharmony_ci
417e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL
418e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
419e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_GENERAL
420e5c31af7Sopenharmony_ciifdef::VK_KHR_shared_presentable_image[]
421e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR
422e5c31af7Sopenharmony_ciendif::VK_KHR_shared_presentable_image[]
423e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance2[]
424e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL
425e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL
426e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
427e5c31af7Sopenharmony_ciifdef::VK_KHR_synchronization2[]
428e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR
429e5c31af7Sopenharmony_ciendif::VK_KHR_synchronization2[]
430e5c31af7Sopenharmony_ciifdef::VK_EXT_attachment_feedback_loop_layout[]
431e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT
432e5c31af7Sopenharmony_ciendif::VK_EXT_attachment_feedback_loop_layout[]
433e5c31af7Sopenharmony_ci
434e5c31af7Sopenharmony_ci
435e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing,VK_KHR_acceleration_structure[]
436e5c31af7Sopenharmony_ci[[descriptorsets-accelerationstructure]]
437e5c31af7Sopenharmony_ci=== Acceleration Structure
438e5c31af7Sopenharmony_ci
439e5c31af7Sopenharmony_ciAn _acceleration structure_ (
440e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure[ename:VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR]
441e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure+VK_NV_ray_tracing[or]
442e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing[ename:VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV]
443e5c31af7Sopenharmony_ci) is a descriptor type that is used to retrieve scene geometry from within
444e5c31af7Sopenharmony_cishaders that are used for ray traversal.
445e5c31af7Sopenharmony_ciShaders have read-only access to the memory.
446e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing,VK_KHR_acceleration_structure[]
447e5c31af7Sopenharmony_ci
448e5c31af7Sopenharmony_ci
449e5c31af7Sopenharmony_ciifdef::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
450e5c31af7Sopenharmony_ci[[descriptorsets-mutable]]
451e5c31af7Sopenharmony_ci=== Mutable
452e5c31af7Sopenharmony_ci
453e5c31af7Sopenharmony_ciA descriptor of _mutable_ (ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT) type
454e5c31af7Sopenharmony_ciindicates that this descriptor can: mutate to any of the descriptor types
455e5c31af7Sopenharmony_cigiven in the
456e5c31af7Sopenharmony_cislink:VkMutableDescriptorTypeCreateInfoEXT::pname:pDescriptorTypes list of
457e5c31af7Sopenharmony_cidescriptor types in the pname:pNext chain of
458e5c31af7Sopenharmony_cislink:VkDescriptorSetLayoutCreateInfo for this binding.
459e5c31af7Sopenharmony_ciAt any point, each individual descriptor of mutable type has an active
460e5c31af7Sopenharmony_cidescriptor type.
461e5c31af7Sopenharmony_ciThe active descriptor type can: be any one of the declared types in
462e5c31af7Sopenharmony_cipname:pDescriptorTypes.
463e5c31af7Sopenharmony_ciAdditionally, a mutable descriptor's active descriptor type can: be of the
464e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT type, which is the initial active
465e5c31af7Sopenharmony_cidescriptor type.
466e5c31af7Sopenharmony_ciThe active descriptor type can: change when the descriptor is updated.
467e5c31af7Sopenharmony_ciWhen a descriptor is consumed by binding a descriptor set, the active
468e5c31af7Sopenharmony_cidescriptor type is considered, not ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT.
469e5c31af7Sopenharmony_ci
470e5c31af7Sopenharmony_ciAn active descriptor type of ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT is
471e5c31af7Sopenharmony_ciconsidered an undefined: descriptor.
472e5c31af7Sopenharmony_ciIf a descriptor is consumed where the active descriptor type does not match
473e5c31af7Sopenharmony_ciwhat the shader expects, the descriptor is considered an undefined:
474e5c31af7Sopenharmony_cidescriptor.
475e5c31af7Sopenharmony_ci
476e5c31af7Sopenharmony_ci[NOTE]
477e5c31af7Sopenharmony_ci.Note
478e5c31af7Sopenharmony_ci====
479e5c31af7Sopenharmony_ciTo find which descriptor types are supported as
480e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT, the application can: use
481e5c31af7Sopenharmony_ciflink:vkGetDescriptorSetLayoutSupport with an
482e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT binding, with the list of descriptor
483e5c31af7Sopenharmony_citypes to query in the
484e5c31af7Sopenharmony_cislink:VkMutableDescriptorTypeCreateInfoEXT::pname:pDescriptorTypes array for
485e5c31af7Sopenharmony_cithat binding.
486e5c31af7Sopenharmony_ci====
487e5c31af7Sopenharmony_ci
488e5c31af7Sopenharmony_ci[NOTE]
489e5c31af7Sopenharmony_ci.Note
490e5c31af7Sopenharmony_ci====
491e5c31af7Sopenharmony_ciThe intention of a mutable descriptor type is that implementations allocate
492e5c31af7Sopenharmony_ciN bytes per descriptor, where N is determined by the maximum descriptor size
493e5c31af7Sopenharmony_cifor a given descriptor binding.
494e5c31af7Sopenharmony_ciImplementations are not expected to keep track of the active descriptor
495e5c31af7Sopenharmony_citype, and it should be considered a C-like union type.
496e5c31af7Sopenharmony_ci
497e5c31af7Sopenharmony_ciA mutable descriptor type is not considered as efficient in terms of runtime
498e5c31af7Sopenharmony_ciperformance as using a non-mutable descriptor type, and applications are not
499e5c31af7Sopenharmony_ciencouraged to use them outside API layering efforts.
500e5c31af7Sopenharmony_ciMutable descriptor types can be more efficient if the alternative is using
501e5c31af7Sopenharmony_cimany different descriptors to emulate mutable descriptor types.
502e5c31af7Sopenharmony_ci====
503e5c31af7Sopenharmony_ciendif::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
504e5c31af7Sopenharmony_ci
505e5c31af7Sopenharmony_ci
506e5c31af7Sopenharmony_ci[[descriptorsets-sets]]
507e5c31af7Sopenharmony_ci== Descriptor Sets
508e5c31af7Sopenharmony_ci
509e5c31af7Sopenharmony_ciDescriptors are grouped together into descriptor set objects.
510e5c31af7Sopenharmony_ciA descriptor set object is an opaque object containing storage for a set of
511e5c31af7Sopenharmony_cidescriptors, where the types and number of descriptors is defined by a
512e5c31af7Sopenharmony_cidescriptor set layout.
513e5c31af7Sopenharmony_ciThe layout object may: be used to define the association of each descriptor
514e5c31af7Sopenharmony_cibinding with memory or other implementation resources.
515e5c31af7Sopenharmony_ciThe layout is used both for determining the resources that need to be
516e5c31af7Sopenharmony_ciassociated with the descriptor set, and determining the interface between
517e5c31af7Sopenharmony_cishader stages and shader resources.
518e5c31af7Sopenharmony_ci
519e5c31af7Sopenharmony_ci
520e5c31af7Sopenharmony_ci[[descriptorsets-setlayout]]
521e5c31af7Sopenharmony_ci=== Descriptor Set Layout
522e5c31af7Sopenharmony_ci
523e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorSetLayout',desc='Opaque handle to a descriptor set layout object',type='handles']
524e5c31af7Sopenharmony_ci--
525e5c31af7Sopenharmony_ciA descriptor set layout object is defined by an array of zero or more
526e5c31af7Sopenharmony_cidescriptor bindings.
527e5c31af7Sopenharmony_ciEach individual descriptor binding is specified by a descriptor type, a
528e5c31af7Sopenharmony_cicount (array size) of the number of descriptors in the binding, a set of
529e5c31af7Sopenharmony_cishader stages that can: access the binding, and (if using immutable
530e5c31af7Sopenharmony_cisamplers) an array of sampler descriptors.
531e5c31af7Sopenharmony_ci
532e5c31af7Sopenharmony_ciDescriptor set layout objects are represented by sname:VkDescriptorSetLayout
533e5c31af7Sopenharmony_cihandles:
534e5c31af7Sopenharmony_ci
535e5c31af7Sopenharmony_ciinclude::{generated}/api/handles/VkDescriptorSetLayout.adoc[]
536e5c31af7Sopenharmony_ci--
537e5c31af7Sopenharmony_ci
538e5c31af7Sopenharmony_ci[open,refpage='vkCreateDescriptorSetLayout',desc='Create a new descriptor set layout',type='protos']
539e5c31af7Sopenharmony_ci--
540e5c31af7Sopenharmony_ci:refpage: vkCreateDescriptorSetLayout
541e5c31af7Sopenharmony_ci:objectnameplural: descriptor set layouts
542e5c31af7Sopenharmony_ci:objectnamecamelcase: descriptorSetLayout
543e5c31af7Sopenharmony_ci:objectcount: 1
544e5c31af7Sopenharmony_ci
545e5c31af7Sopenharmony_ciTo create descriptor set layout objects, call:
546e5c31af7Sopenharmony_ci
547e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCreateDescriptorSetLayout.adoc[]
548e5c31af7Sopenharmony_ci
549e5c31af7Sopenharmony_ci  * pname:device is the logical device that creates the descriptor set
550e5c31af7Sopenharmony_ci    layout.
551e5c31af7Sopenharmony_ci  * pname:pCreateInfo is a pointer to a
552e5c31af7Sopenharmony_ci    slink:VkDescriptorSetLayoutCreateInfo structure specifying the state of
553e5c31af7Sopenharmony_ci    the descriptor set layout object.
554e5c31af7Sopenharmony_ci  * pname:pAllocator controls host memory allocation as described in the
555e5c31af7Sopenharmony_ci    <<memory-allocation, Memory Allocation>> chapter.
556e5c31af7Sopenharmony_ci  * pname:pSetLayout is a pointer to a slink:VkDescriptorSetLayout handle in
557e5c31af7Sopenharmony_ci    which the resulting descriptor set layout object is returned.
558e5c31af7Sopenharmony_ci
559e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/no_dynamic_allocations_common.adoc[]
560e5c31af7Sopenharmony_ci
561e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
562e5c31af7Sopenharmony_ci.Valid Usage
563e5c31af7Sopenharmony_ci****
564e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/memory_reservation_request_count_common.adoc[]
565e5c31af7Sopenharmony_ci
566e5c31af7Sopenharmony_ci:uniqifier: layoutbindings
567e5c31af7Sopenharmony_ci:combinedobjectnameplural: descriptor set layout bindings
568e5c31af7Sopenharmony_ci:combinedparentobject: VkDescriptorSetLayout
569e5c31af7Sopenharmony_ci:combinedobjectcount: pname:pCreateInfo->bindingCount
570e5c31af7Sopenharmony_ci:combinedobjectnamecamelcase: descriptorSetLayoutBinding
571e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/memory_reservation_request_count_combined_common.adoc[]
572e5c31af7Sopenharmony_ci****
573e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
574e5c31af7Sopenharmony_ci
575e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCreateDescriptorSetLayout.adoc[]
576e5c31af7Sopenharmony_ci--
577e5c31af7Sopenharmony_ci
578e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorSetLayoutCreateInfo',desc='Structure specifying parameters of a newly created descriptor set layout',type='structs']
579e5c31af7Sopenharmony_ci--
580e5c31af7Sopenharmony_ciInformation about the descriptor set layout is passed in a
581e5c31af7Sopenharmony_cisname:VkDescriptorSetLayoutCreateInfo structure:
582e5c31af7Sopenharmony_ci
583e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDescriptorSetLayoutCreateInfo.adoc[]
584e5c31af7Sopenharmony_ci
585e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
586e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
587e5c31af7Sopenharmony_ci    structure.
588e5c31af7Sopenharmony_ci  * pname:flags is a bitmask
589e5c31af7Sopenharmony_ciifdef::VK_KHR_push_descriptor[]
590e5c31af7Sopenharmony_ci    of elink:VkDescriptorSetLayoutCreateFlagBits
591e5c31af7Sopenharmony_ciendif::VK_KHR_push_descriptor[]
592e5c31af7Sopenharmony_ci    specifying options for descriptor set layout creation.
593e5c31af7Sopenharmony_ci  * pname:bindingCount is the number of elements in pname:pBindings.
594e5c31af7Sopenharmony_ci  * pname:pBindings is a pointer to an array of
595e5c31af7Sopenharmony_ci    slink:VkDescriptorSetLayoutBinding structures.
596e5c31af7Sopenharmony_ci
597e5c31af7Sopenharmony_ci.Valid Usage
598e5c31af7Sopenharmony_ci****
599e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutCreateInfo-binding-00279]]
600e5c31af7Sopenharmony_ciifdef::VK_NV_per_stage_descriptor_set[]
601e5c31af7Sopenharmony_ci    If the <<features-perStageDescriptorSet, pname:perStageDescriptorSet>>
602e5c31af7Sopenharmony_ci    feature is not enabled, or pname:flags does not contain
603e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_PER_STAGE_BIT_NV, then the
604e5c31af7Sopenharmony_ciendif::VK_NV_per_stage_descriptor_set[]
605e5c31af7Sopenharmony_ciifndef::VK_NV_per_stage_descriptor_set[]
606e5c31af7Sopenharmony_ci    The
607e5c31af7Sopenharmony_ciendif::VK_NV_per_stage_descriptor_set[]
608e5c31af7Sopenharmony_ci    slink:VkDescriptorSetLayoutBinding::pname:binding members of the
609e5c31af7Sopenharmony_ci    elements of the pname:pBindings array must: each have different values
610e5c31af7Sopenharmony_ciifdef::VK_KHR_push_descriptor[]
611e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutCreateInfo-flags-00280]]
612e5c31af7Sopenharmony_ci    If pname:flags contains
613e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR, then all
614e5c31af7Sopenharmony_ci    elements of pname:pBindings must: not have a pname:descriptorType of
615e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC or
616e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
617e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
618e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutCreateInfo-flags-02208]]
619e5c31af7Sopenharmony_ci    If pname:flags contains
620e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR, then all
621e5c31af7Sopenharmony_ci    elements of pname:pBindings must: not have a pname:descriptorType of
622e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK
623e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
624e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutCreateInfo-flags-00281]]
625e5c31af7Sopenharmony_ci    If pname:flags contains
626e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR, then the
627e5c31af7Sopenharmony_ci    total number of elements of all bindings must: be less than or equal to
628e5c31af7Sopenharmony_ci    slink:VkPhysicalDevicePushDescriptorPropertiesKHR::pname:maxPushDescriptors
629e5c31af7Sopenharmony_ciifdef::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
630e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutCreateInfo-flags-04590]]
631e5c31af7Sopenharmony_ci    If pname:flags contains
632e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR,
633e5c31af7Sopenharmony_ci    pname:flags must: not contain
634e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXT
635e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutCreateInfo-flags-04591]]
636e5c31af7Sopenharmony_ci    If pname:flags contains
637e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR,
638e5c31af7Sopenharmony_ci    pname:pBindings must: not have a pname:descriptorType of
639e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT
640e5c31af7Sopenharmony_ciendif::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
641e5c31af7Sopenharmony_ciendif::VK_KHR_push_descriptor[]
642e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
643e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutCreateInfo-flags-03000]]
644e5c31af7Sopenharmony_ci    If any binding has the ename:VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT
645e5c31af7Sopenharmony_ci    bit set, pname:flags must: include
646e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT
647e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutCreateInfo-descriptorType-03001]]
648e5c31af7Sopenharmony_ci    If any binding has the ename:VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT
649e5c31af7Sopenharmony_ci    bit set, then all bindings must: not have pname:descriptorType of
650e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC or
651e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
652e5c31af7Sopenharmony_ciifdef::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
653e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutCreateInfo-flags-04592]]
654e5c31af7Sopenharmony_ci    If pname:flags contains
655e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT,
656e5c31af7Sopenharmony_ci    pname:flags must: not contain
657e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXT
658e5c31af7Sopenharmony_ciendif::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
659e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
660e5c31af7Sopenharmony_ciifdef::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
661e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutCreateInfo-pBindings-07303]]
662e5c31af7Sopenharmony_ci    If any element pname:pBindings[i] has a pname:descriptorType of
663e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT, then a
664e5c31af7Sopenharmony_ci    slink:VkMutableDescriptorTypeCreateInfoEXT must: be present in the
665e5c31af7Sopenharmony_ci    pname:pNext chain, and pname:mutableDescriptorTypeListCount must: be
666e5c31af7Sopenharmony_ci    greater than i
667e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutCreateInfo-descriptorType-04594]]
668e5c31af7Sopenharmony_ci    If a binding has a pname:descriptorType value of
669e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT, then sname:pImmutableSamplers
670e5c31af7Sopenharmony_ci    must: be `NULL`
671e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutCreateInfo-mutableDescriptorType-04595]]
672e5c31af7Sopenharmony_ci    If
673e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT::pname:mutableDescriptorType
674e5c31af7Sopenharmony_ci    is not enabled, pname:pBindings must: not contain a pname:descriptorType
675e5c31af7Sopenharmony_ci    of ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT
676e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutCreateInfo-flags-04596]]
677e5c31af7Sopenharmony_ci    If pname:flags contains
678e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXT,
679e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT::pname:mutableDescriptorType
680e5c31af7Sopenharmony_ci    must: be enabled
681e5c31af7Sopenharmony_ciendif::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
682e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
683e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutCreateInfo-bindingCount-05011]]
684e5c31af7Sopenharmony_ci    pname:bindingCount must: be less than or equal to
685e5c31af7Sopenharmony_ci    <<limits-maxDescriptorSetLayoutBindings,maxDescriptorSetLayoutBindings>>
686e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutCreateInfo-descriptorCount-05071]]
687e5c31af7Sopenharmony_ci    The sum of pname:descriptorCount over all bindings in pname:pBindings
688e5c31af7Sopenharmony_ci    that have pname:descriptorType of ename:VK_DESCRIPTOR_TYPE_SAMPLER or
689e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER and
690e5c31af7Sopenharmony_ci    sname:pImmutableSamplers not equal to `NULL` must: be less than or equal
691e5c31af7Sopenharmony_ci    to
692e5c31af7Sopenharmony_ci    slink:VkDeviceObjectReservationCreateInfo::pname:maxImmutableSamplersPerDescriptorSetLayout
693e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
694e5c31af7Sopenharmony_ciifdef::VK_EXT_descriptor_buffer[]
695e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutCreateInfo-flags-08000]]
696e5c31af7Sopenharmony_ci    If pname:flags contains
697e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, then
698e5c31af7Sopenharmony_ci    all elements of pname:pBindings must: not have a pname:descriptorType of
699e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC or
700e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
701e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutCreateInfo-flags-08001]]
702e5c31af7Sopenharmony_ci    If pname:flags contains
703e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT,
704e5c31af7Sopenharmony_ci    pname:flags must: also contain
705e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT
706e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
707e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutCreateInfo-flags-08002]]
708e5c31af7Sopenharmony_ci    If pname:flags contains
709e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, then
710e5c31af7Sopenharmony_ci    pname:flags must: not contain
711e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT
712e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
713e5c31af7Sopenharmony_ciifdef::VK_VALVE_mutable_descriptor_type[]
714e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutCreateInfo-flags-08003]]
715e5c31af7Sopenharmony_ci    If pname:flags contains
716e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, then
717e5c31af7Sopenharmony_ci    pname:flags must: not contain
718e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_VALVE
719e5c31af7Sopenharmony_ciendif::VK_VALVE_mutable_descriptor_type[]
720e5c31af7Sopenharmony_ciendif::VK_EXT_descriptor_buffer[]
721e5c31af7Sopenharmony_ciifdef::VK_NV_per_stage_descriptor_set[]
722e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutCreateInfo-flags-09463]]
723e5c31af7Sopenharmony_ci    If pname:flags contains
724e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_PER_STAGE_BIT_NV, then
725e5c31af7Sopenharmony_ci    <<features-perStageDescriptorSet, pname:perStageDescriptorSet>> must: be
726e5c31af7Sopenharmony_ci    enabled
727e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutCreateInfo-flags-09464]]
728e5c31af7Sopenharmony_ci    If pname:flags contains
729e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_PER_STAGE_BIT_NV, then there must:
730e5c31af7Sopenharmony_ci    not be any two elements of the pname:pBindings array with the same
731e5c31af7Sopenharmony_ci    slink:VkDescriptorSetLayoutBinding::pname:binding value and their
732e5c31af7Sopenharmony_ci    slink:VkDescriptorSetLayoutBinding::pname:stageFlags containing the same
733e5c31af7Sopenharmony_ci    bit
734e5c31af7Sopenharmony_ciendif::VK_NV_per_stage_descriptor_set[]
735e5c31af7Sopenharmony_ci****
736e5c31af7Sopenharmony_ci
737e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDescriptorSetLayoutCreateInfo.adoc[]
738e5c31af7Sopenharmony_ci--
739e5c31af7Sopenharmony_ci
740e5c31af7Sopenharmony_ciifdef::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
741e5c31af7Sopenharmony_ci[open,refpage='VkMutableDescriptorTypeCreateInfoEXT',desc='Structure describing the list of possible active descriptor types for mutable type descriptors',type='structs',alias='VkMutableDescriptorTypeCreateInfoVALVE']
742e5c31af7Sopenharmony_ci--
743e5c31af7Sopenharmony_ciIf the pname:pNext chain of a slink:VkDescriptorSetLayoutCreateInfo or
744e5c31af7Sopenharmony_cislink:VkDescriptorPoolCreateInfo structure includes a
745e5c31af7Sopenharmony_cislink:VkMutableDescriptorTypeCreateInfoEXT structure, then that structure
746e5c31af7Sopenharmony_cispecifies Information about the possible descriptor types for mutable
747e5c31af7Sopenharmony_cidescriptor types.
748e5c31af7Sopenharmony_ci
749e5c31af7Sopenharmony_ciThe sname:VkMutableDescriptorTypeCreateInfoEXT structure is defined as:
750e5c31af7Sopenharmony_ci
751e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkMutableDescriptorTypeCreateInfoEXT.adoc[]
752e5c31af7Sopenharmony_ci
753e5c31af7Sopenharmony_ciifdef::VK_VALVE_mutable_descriptor_type[]
754e5c31af7Sopenharmony_cior the equivalent
755e5c31af7Sopenharmony_ci
756e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkMutableDescriptorTypeCreateInfoVALVE.adoc[]
757e5c31af7Sopenharmony_ciendif::VK_VALVE_mutable_descriptor_type[]
758e5c31af7Sopenharmony_ci
759e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
760e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
761e5c31af7Sopenharmony_ci    structure.
762e5c31af7Sopenharmony_ci  * pname:mutableDescriptorTypeListCount is the number of elements in
763e5c31af7Sopenharmony_ci    pname:pMutableDescriptorTypeLists.
764e5c31af7Sopenharmony_ci  * pname:pMutableDescriptorTypeLists is a pointer to an array of
765e5c31af7Sopenharmony_ci    sname:VkMutableDescriptorTypeListEXT structures.
766e5c31af7Sopenharmony_ci
767e5c31af7Sopenharmony_ciIf pname:mutableDescriptorTypeListCount is zero or if this structure is not
768e5c31af7Sopenharmony_ciincluded in the pname:pNext chain, the slink:VkMutableDescriptorTypeListEXT
769e5c31af7Sopenharmony_cifor each element is considered to be zero or `NULL` for each member.
770e5c31af7Sopenharmony_ciOtherwise, the descriptor set layout binding at
771e5c31af7Sopenharmony_cislink:VkDescriptorSetLayoutCreateInfo::pname:pBindings[i] uses the
772e5c31af7Sopenharmony_cidescriptor type lists in
773e5c31af7Sopenharmony_cislink:VkMutableDescriptorTypeCreateInfoEXT::pname:pMutableDescriptorTypeLists[i].
774e5c31af7Sopenharmony_ci
775e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkMutableDescriptorTypeCreateInfoEXT.adoc[]
776e5c31af7Sopenharmony_ci--
777e5c31af7Sopenharmony_ci
778e5c31af7Sopenharmony_ci[open,refpage='VkMutableDescriptorTypeListEXT',desc='Structure describing descriptor types that a given descriptor may mutate to',type='structs',alias='VkMutableDescriptorTypeListVALVE']
779e5c31af7Sopenharmony_ci--
780e5c31af7Sopenharmony_ciThe list of potential descriptor types a given mutable descriptor can:
781e5c31af7Sopenharmony_cimutate to is passed in a sname:VkMutableDescriptorTypeListEXT structure.
782e5c31af7Sopenharmony_ci
783e5c31af7Sopenharmony_ciThe sname:VkMutableDescriptorTypeListEXT structure is defined as:
784e5c31af7Sopenharmony_ci
785e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkMutableDescriptorTypeListEXT.adoc[]
786e5c31af7Sopenharmony_ci
787e5c31af7Sopenharmony_ciifdef::VK_VALVE_mutable_descriptor_type[]
788e5c31af7Sopenharmony_cior the equivalent
789e5c31af7Sopenharmony_ci
790e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkMutableDescriptorTypeListVALVE.adoc[]
791e5c31af7Sopenharmony_ciendif::VK_VALVE_mutable_descriptor_type[]
792e5c31af7Sopenharmony_ci
793e5c31af7Sopenharmony_ci  * pname:descriptorTypeCount is the number of elements in
794e5c31af7Sopenharmony_ci    pname:pDescriptorTypes.
795e5c31af7Sopenharmony_ci  * pname:pDescriptorTypes is `NULL` or a pointer to an array of
796e5c31af7Sopenharmony_ci    pname:descriptorTypeCount elink:VkDescriptorType values defining which
797e5c31af7Sopenharmony_ci    descriptor types a given binding may mutate to.
798e5c31af7Sopenharmony_ci
799e5c31af7Sopenharmony_ci.Valid Usage
800e5c31af7Sopenharmony_ci****
801e5c31af7Sopenharmony_ci  * [[VUID-VkMutableDescriptorTypeListEXT-descriptorTypeCount-04597]]
802e5c31af7Sopenharmony_ci    pname:descriptorTypeCount must: not be `0` if the corresponding binding
803e5c31af7Sopenharmony_ci    is of ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT
804e5c31af7Sopenharmony_ci  * [[VUID-VkMutableDescriptorTypeListEXT-pDescriptorTypes-04598]]
805e5c31af7Sopenharmony_ci    pname:pDescriptorTypes must: be a valid pointer to an array of
806e5c31af7Sopenharmony_ci    pname:descriptorTypeCount valid, unique elink:VkDescriptorType values if
807e5c31af7Sopenharmony_ci    the given binding is of ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT type
808e5c31af7Sopenharmony_ci  * [[VUID-VkMutableDescriptorTypeListEXT-descriptorTypeCount-04599]]
809e5c31af7Sopenharmony_ci    pname:descriptorTypeCount must: be `0` if the corresponding binding is
810e5c31af7Sopenharmony_ci    not of ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT
811e5c31af7Sopenharmony_ci  * [[VUID-VkMutableDescriptorTypeListEXT-pDescriptorTypes-04600]]
812e5c31af7Sopenharmony_ci    pname:pDescriptorTypes must: not contain
813e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT
814e5c31af7Sopenharmony_ci  * [[VUID-VkMutableDescriptorTypeListEXT-pDescriptorTypes-04601]]
815e5c31af7Sopenharmony_ci    pname:pDescriptorTypes must: not contain
816e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
817e5c31af7Sopenharmony_ci  * [[VUID-VkMutableDescriptorTypeListEXT-pDescriptorTypes-04602]]
818e5c31af7Sopenharmony_ci    pname:pDescriptorTypes must: not contain
819e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
820e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
821e5c31af7Sopenharmony_ci  * [[VUID-VkMutableDescriptorTypeListEXT-pDescriptorTypes-04603]]
822e5c31af7Sopenharmony_ci    pname:pDescriptorTypes must: not contain
823e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK
824e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
825e5c31af7Sopenharmony_ci****
826e5c31af7Sopenharmony_ci
827e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkMutableDescriptorTypeListEXT.adoc[]
828e5c31af7Sopenharmony_ci--
829e5c31af7Sopenharmony_ciendif::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
830e5c31af7Sopenharmony_ci
831e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorSetLayoutCreateFlagBits',desc='Bitmask specifying descriptor set layout properties',type='enums']
832e5c31af7Sopenharmony_ci--
833e5c31af7Sopenharmony_ciBits which can: be set in
834e5c31af7Sopenharmony_cislink:VkDescriptorSetLayoutCreateInfo::pname:flags, specifying options for
835e5c31af7Sopenharmony_cidescriptor set layout, are:
836e5c31af7Sopenharmony_ci
837e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkDescriptorSetLayoutCreateFlagBits.adoc[]
838e5c31af7Sopenharmony_ci
839e5c31af7Sopenharmony_ciifdef::VK_KHR_push_descriptor[]
840e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR specifies
841e5c31af7Sopenharmony_ci    that descriptor sets must: not be allocated using this layout, and
842e5c31af7Sopenharmony_ci    descriptors are instead pushed by flink:vkCmdPushDescriptorSetKHR.
843e5c31af7Sopenharmony_ciendif::VK_KHR_push_descriptor[]
844e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
845e5c31af7Sopenharmony_ci// Jon: "UpdateAfterBind" is a vague reference, should be more precise /
846e5c31af7Sopenharmony_ci// link to the right specification area
847e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT
848e5c31af7Sopenharmony_ci    specifies that descriptor sets using this layout must: be allocated from
849e5c31af7Sopenharmony_ci    a descriptor pool created with the
850e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT bit set.
851e5c31af7Sopenharmony_ci    Descriptor set layouts created with this bit set have alternate limits
852e5c31af7Sopenharmony_ci    for the maximum number of descriptors per-stage and per-pipeline layout.
853e5c31af7Sopenharmony_ci    The non-UpdateAfterBind limits only count descriptors in sets created
854e5c31af7Sopenharmony_ci    without this flag.
855e5c31af7Sopenharmony_ci    The UpdateAfterBind limits count all descriptors, but the limits may: be
856e5c31af7Sopenharmony_ci    higher than the non-UpdateAfterBind limits.
857e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
858e5c31af7Sopenharmony_ciifdef::VK_NV_device_generated_commands_compute[]
859e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_INDIRECT_BINDABLE_BIT_NV specifies
860e5c31af7Sopenharmony_ci    that descriptor sets using this layout allows them to be bound with
861e5c31af7Sopenharmony_ci    compute pipelines that are created with
862e5c31af7Sopenharmony_ci    ename:VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV flag set to be used in
863e5c31af7Sopenharmony_ci    <<device-generated-commands,Device-Generated Commands>>.
864e5c31af7Sopenharmony_ciendif::VK_NV_device_generated_commands_compute[]
865e5c31af7Sopenharmony_ciifdef::VK_EXT_descriptor_buffer[]
866e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT
867e5c31af7Sopenharmony_ci    specifies that this layout must: only be used with descriptor buffers.
868e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT
869e5c31af7Sopenharmony_ci    specifies that this is a layout only containing immutable samplers that
870e5c31af7Sopenharmony_ci    can: be bound by flink:vkCmdBindDescriptorBufferEmbeddedSamplersEXT.
871e5c31af7Sopenharmony_ci    Unlike normal immutable samplers, embedded immutable samplers do not
872e5c31af7Sopenharmony_ci    require the application to provide them in a descriptor buffer.
873e5c31af7Sopenharmony_ciendif::VK_EXT_descriptor_buffer[]
874e5c31af7Sopenharmony_ciifdef::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
875e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXT specifies
876e5c31af7Sopenharmony_ci    that descriptor sets using this layout must: be allocated from a
877e5c31af7Sopenharmony_ci    descriptor pool created with the
878e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT bit set.
879e5c31af7Sopenharmony_ci    Descriptor set layouts created with this bit have no expressible limit
880e5c31af7Sopenharmony_ci    for maximum number of descriptors per-stage.
881e5c31af7Sopenharmony_ci    Host descriptor sets are limited only by available host memory, but may:
882e5c31af7Sopenharmony_ci    be limited for implementation specific reasons.
883e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
884e5c31af7Sopenharmony_ci    Implementations may: limit the number of supported descriptors to
885e5c31af7Sopenharmony_ci    UpdateAfterBind limits or non-UpdateAfterBind limits, whichever is
886e5c31af7Sopenharmony_ci    larger.
887e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
888e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
889e5c31af7Sopenharmony_ci    Implementations may: limit the number of supported descriptors to
890e5c31af7Sopenharmony_ci    non-UpdateAfterBind limits.
891e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
892e5c31af7Sopenharmony_ciendif::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
893e5c31af7Sopenharmony_ciifdef::VK_NV_per_stage_descriptor_set[]
894e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_PER_STAGE_BIT_NV specifies that
895e5c31af7Sopenharmony_ci    binding numbers in descriptor sets using this layout may: represent
896e5c31af7Sopenharmony_ci    different resources and/or types of resources in each stage.
897e5c31af7Sopenharmony_ciendif::VK_NV_per_stage_descriptor_set[]
898e5c31af7Sopenharmony_ci
899e5c31af7Sopenharmony_ciifndef::VK_KHR_push_descriptor[]
900e5c31af7Sopenharmony_ci[NOTE]
901e5c31af7Sopenharmony_ci.Note
902e5c31af7Sopenharmony_ci====
903e5c31af7Sopenharmony_ciAll bits for this type are defined by extensions, and none of those
904e5c31af7Sopenharmony_ciextensions are enabled in this build of the specification.
905e5c31af7Sopenharmony_ci====
906e5c31af7Sopenharmony_ciendif::VK_KHR_push_descriptor[]
907e5c31af7Sopenharmony_ci--
908e5c31af7Sopenharmony_ci
909e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorSetLayoutCreateFlags',desc='Bitmask of VkDescriptorSetLayoutCreateFlagBits',type='flags']
910e5c31af7Sopenharmony_ci--
911e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkDescriptorSetLayoutCreateFlags.adoc[]
912e5c31af7Sopenharmony_ci
913e5c31af7Sopenharmony_citname:VkDescriptorSetLayoutCreateFlags is a bitmask type for setting a mask
914e5c31af7Sopenharmony_ciof zero or more elink:VkDescriptorSetLayoutCreateFlagBits.
915e5c31af7Sopenharmony_ci--
916e5c31af7Sopenharmony_ci
917e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorSetLayoutBinding',desc='Structure specifying a descriptor set layout binding',type='structs']
918e5c31af7Sopenharmony_ci--
919e5c31af7Sopenharmony_ciThe sname:VkDescriptorSetLayoutBinding structure is defined as:
920e5c31af7Sopenharmony_ci
921e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDescriptorSetLayoutBinding.adoc[]
922e5c31af7Sopenharmony_ci
923e5c31af7Sopenharmony_ci  * pname:binding is the binding number of this entry and corresponds to a
924e5c31af7Sopenharmony_ci    resource of the same binding number in the shader stages.
925e5c31af7Sopenharmony_ci  * pname:descriptorType is a elink:VkDescriptorType specifying which type
926e5c31af7Sopenharmony_ci    of resource descriptors are used for this binding.
927e5c31af7Sopenharmony_ci  * pname:descriptorCount is the number of descriptors contained in the
928e5c31af7Sopenharmony_ci    binding, accessed in a shader as an
929e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[array.]
930e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
931e5c31af7Sopenharmony_ci    array, except if pname:descriptorType is
932e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK in which case
933e5c31af7Sopenharmony_ci    pname:descriptorCount is the size in bytes of the inline uniform block.
934e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
935e5c31af7Sopenharmony_ci    If pname:descriptorCount is zero this binding entry is reserved and the
936e5c31af7Sopenharmony_ci    resource must: not be accessed from any stage via this binding within
937e5c31af7Sopenharmony_ci    any pipeline using the set layout.
938e5c31af7Sopenharmony_ci  * pname:stageFlags member is a bitmask of elink:VkShaderStageFlagBits
939e5c31af7Sopenharmony_ci    specifying which pipeline shader stages can: access a resource for this
940e5c31af7Sopenharmony_ci    binding.
941e5c31af7Sopenharmony_ci    ename:VK_SHADER_STAGE_ALL is a shorthand specifying that all defined
942e5c31af7Sopenharmony_ci    shader stages, including any additional stages defined by extensions,
943e5c31af7Sopenharmony_ci    can: access the resource.
944e5c31af7Sopenharmony_ci+
945e5c31af7Sopenharmony_ciIf a shader stage is not included in pname:stageFlags, then a resource must:
946e5c31af7Sopenharmony_cinot be accessed from that stage via this binding within any pipeline using
947e5c31af7Sopenharmony_cithe set layout.
948e5c31af7Sopenharmony_ciOther than input attachments which are limited to the fragment shader, there
949e5c31af7Sopenharmony_ciare no limitations on what combinations of stages can: use a descriptor
950e5c31af7Sopenharmony_cibinding, and in particular a binding can: be used by both graphics stages
951e5c31af7Sopenharmony_ciand the compute stage.
952e5c31af7Sopenharmony_ci  * pname:pImmutableSamplers affects initialization of samplers.
953e5c31af7Sopenharmony_ci    If pname:descriptorType specifies a ename:VK_DESCRIPTOR_TYPE_SAMPLER or
954e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER type descriptor, then
955e5c31af7Sopenharmony_ci    pname:pImmutableSamplers can: be used to initialize a set of _immutable
956e5c31af7Sopenharmony_ci    samplers_.
957e5c31af7Sopenharmony_ci    Immutable samplers are permanently bound into the set layout and must:
958e5c31af7Sopenharmony_ci    not be changed; updating a ename:VK_DESCRIPTOR_TYPE_SAMPLER descriptor
959e5c31af7Sopenharmony_ci    with immutable samplers is not allowed and updates to a
960e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER descriptor with
961e5c31af7Sopenharmony_ci    immutable samplers does not modify the samplers (the image views are
962e5c31af7Sopenharmony_ci    updated, but the sampler updates are ignored).
963e5c31af7Sopenharmony_ci    If pname:pImmutableSamplers is not `NULL`, then it is a pointer to an
964e5c31af7Sopenharmony_ci    array of sampler handles that will be copied into the set layout and
965e5c31af7Sopenharmony_ci    used for the corresponding binding.
966e5c31af7Sopenharmony_ci    Only the sampler handles are copied; the sampler objects must: not be
967e5c31af7Sopenharmony_ci    destroyed before the final use of the set layout and any descriptor
968e5c31af7Sopenharmony_ci    pools and sets created using it.
969e5c31af7Sopenharmony_ci    If pname:pImmutableSamplers is `NULL`, then the sampler slots are
970e5c31af7Sopenharmony_ci    dynamic and sampler handles must: be bound into descriptor sets using
971e5c31af7Sopenharmony_ci    this layout.
972e5c31af7Sopenharmony_ci    If pname:descriptorType is not one of these descriptor types, then
973e5c31af7Sopenharmony_ci    pname:pImmutableSamplers is ignored.
974e5c31af7Sopenharmony_ci
975e5c31af7Sopenharmony_ciThe above layout definition allows the descriptor bindings to be specified
976e5c31af7Sopenharmony_cisparsely such that not all binding numbers between 0 and the maximum binding
977e5c31af7Sopenharmony_cinumber need to be specified in the pname:pBindings array.
978e5c31af7Sopenharmony_ciBindings that are not specified have a pname:descriptorCount and
979e5c31af7Sopenharmony_cipname:stageFlags of zero, and the value of pname:descriptorType is
980e5c31af7Sopenharmony_ciundefined:.
981e5c31af7Sopenharmony_ciHowever, all binding numbers between 0 and the maximum binding number in the
982e5c31af7Sopenharmony_cislink:VkDescriptorSetLayoutCreateInfo::pname:pBindings array may: consume
983e5c31af7Sopenharmony_cimemory in the descriptor set layout even if not all descriptor bindings are
984e5c31af7Sopenharmony_ciused, though it should: not consume additional memory from the descriptor
985e5c31af7Sopenharmony_cipool.
986e5c31af7Sopenharmony_ci
987e5c31af7Sopenharmony_ci[NOTE]
988e5c31af7Sopenharmony_ci.Note
989e5c31af7Sopenharmony_ci====
990e5c31af7Sopenharmony_ciThe maximum binding number specified should: be as compact as possible to
991e5c31af7Sopenharmony_ciavoid wasted memory.
992e5c31af7Sopenharmony_ci====
993e5c31af7Sopenharmony_ci
994e5c31af7Sopenharmony_ci.Valid Usage
995e5c31af7Sopenharmony_ci****
996e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutBinding-descriptorType-00282]]
997e5c31af7Sopenharmony_ci    If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_SAMPLER or
998e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and
999e5c31af7Sopenharmony_ci    pname:descriptorCount is not `0` and pname:pImmutableSamplers is not
1000e5c31af7Sopenharmony_ci    `NULL`, pname:pImmutableSamplers must: be a valid pointer to an array of
1001e5c31af7Sopenharmony_ci    pname:descriptorCount valid sname:VkSampler handles
1002e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
1003e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutBinding-descriptorType-04604]]
1004e5c31af7Sopenharmony_ci    If the <<features-inlineUniformBlock, pname:inlineUniformBlock>> feature
1005e5c31af7Sopenharmony_ci    is not enabled, pname:descriptorType must: not be
1006e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK
1007e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutBinding-descriptorType-02209]]
1008e5c31af7Sopenharmony_ci    If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK
1009e5c31af7Sopenharmony_ci    then pname:descriptorCount must: be a multiple of `4`
1010e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutBinding-descriptorType-08004]]
1011e5c31af7Sopenharmony_ci    If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK
1012e5c31af7Sopenharmony_ciifdef::VK_EXT_descriptor_buffer[]
1013e5c31af7Sopenharmony_ci    and slink:VkDescriptorSetLayoutCreateInfo::pname:flags does not contain
1014e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT
1015e5c31af7Sopenharmony_ciendif::VK_EXT_descriptor_buffer[]
1016e5c31af7Sopenharmony_ci    then pname:descriptorCount must: be less than or equal to
1017e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceInlineUniformBlockProperties::pname:maxInlineUniformBlockSize
1018e5c31af7Sopenharmony_ciifdef::VK_EXT_descriptor_buffer[]
1019e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutBinding-flags-08005]]
1020e5c31af7Sopenharmony_ci    If slink:VkDescriptorSetLayoutCreateInfo::pname:flags contains
1021e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT,
1022e5c31af7Sopenharmony_ci    pname:descriptorType must: be ename:VK_DESCRIPTOR_TYPE_SAMPLER
1023e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutBinding-flags-08006]]
1024e5c31af7Sopenharmony_ci    If slink:VkDescriptorSetLayoutCreateInfo::pname:flags contains
1025e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT,
1026e5c31af7Sopenharmony_ci    pname:descriptorCount must: less than or equal to `1`
1027e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutBinding-flags-08007]]
1028e5c31af7Sopenharmony_ci    If slink:VkDescriptorSetLayoutCreateInfo::pname:flags contains
1029e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT,
1030e5c31af7Sopenharmony_ci    and pname:descriptorCount is equal to `1`, pname:pImmutableSamplers
1031e5c31af7Sopenharmony_ci    must: not be `NULL`
1032e5c31af7Sopenharmony_ciendif::VK_EXT_descriptor_buffer[]
1033e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
1034e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutBinding-descriptorCount-09465]]
1035e5c31af7Sopenharmony_ci    If pname:descriptorCount is not `0`, pname:stageFlags must: be
1036e5c31af7Sopenharmony_ci    ename:VK_SHADER_STAGE_ALL or a valid combination of other
1037e5c31af7Sopenharmony_ci    elink:VkShaderStageFlagBits values
1038e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutBinding-descriptorType-01510]]
1039e5c31af7Sopenharmony_ci    If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT and
1040e5c31af7Sopenharmony_ci    pname:descriptorCount is not `0`, then pname:stageFlags must: be `0` or
1041e5c31af7Sopenharmony_ci    ename:VK_SHADER_STAGE_FRAGMENT_BIT
1042e5c31af7Sopenharmony_ciifdef::VK_EXT_custom_border_color[]
1043e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutBinding-pImmutableSamplers-04009]]
1044e5c31af7Sopenharmony_ci    The sampler objects indicated by pname:pImmutableSamplers must: not have
1045e5c31af7Sopenharmony_ci    a pname:borderColor with one of the values
1046e5c31af7Sopenharmony_ci    ename:VK_BORDER_COLOR_FLOAT_CUSTOM_EXT or
1047e5c31af7Sopenharmony_ci    ename:VK_BORDER_COLOR_INT_CUSTOM_EXT
1048e5c31af7Sopenharmony_ciendif::VK_EXT_custom_border_color[]
1049e5c31af7Sopenharmony_ciifdef::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
1050e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutBinding-descriptorType-04605]]
1051e5c31af7Sopenharmony_ci    If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT, then
1052e5c31af7Sopenharmony_ci    sname:pImmutableSamplers must: be `NULL`
1053e5c31af7Sopenharmony_ciendif::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
1054e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
1055e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutBinding-binding-05012]]
1056e5c31af7Sopenharmony_ci    pname:binding must: be less than the value of
1057e5c31af7Sopenharmony_ci    slink:VkDeviceObjectReservationCreateInfo::pname:descriptorSetLayoutBindingLimit
1058e5c31af7Sopenharmony_ci    provided when the device was created
1059e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
1060e5c31af7Sopenharmony_ciifdef::VK_NV_per_stage_descriptor_set[]
1061e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutBinding-flags-09466]]
1062e5c31af7Sopenharmony_ci    If slink:VkDescriptorSetLayoutCreateInfo::pname:flags contains
1063e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_PER_STAGE_BIT_NV, and
1064e5c31af7Sopenharmony_ci    pname:descriptorCount is not `0`, then pname:stageFlags must: be a valid
1065e5c31af7Sopenharmony_ci    combination of ename:VK_SHADER_STAGE_VERTEX_BIT,
1066e5c31af7Sopenharmony_ci    ename:VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT,
1067e5c31af7Sopenharmony_ci    ename:VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT,
1068e5c31af7Sopenharmony_ci    ename:VK_SHADER_STAGE_GEOMETRY_BIT, ename:VK_SHADER_STAGE_FRAGMENT_BIT
1069e5c31af7Sopenharmony_ci    and ename:VK_SHADER_STAGE_COMPUTE_BIT values
1070e5c31af7Sopenharmony_ciendif::VK_NV_per_stage_descriptor_set[]
1071e5c31af7Sopenharmony_ci****
1072e5c31af7Sopenharmony_ci
1073e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDescriptorSetLayoutBinding.adoc[]
1074e5c31af7Sopenharmony_ci--
1075e5c31af7Sopenharmony_ci
1076e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1077e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorSetLayoutBindingFlagsCreateInfo',desc='Structure specifying creation flags for descriptor set layout bindings',type='structs',alias='VkDescriptorSetLayoutBindingFlagsCreateInfoEXT']
1078e5c31af7Sopenharmony_ci--
1079e5c31af7Sopenharmony_ciIf the pname:pNext chain of a slink:VkDescriptorSetLayoutCreateInfo
1080e5c31af7Sopenharmony_cistructure includes a slink:VkDescriptorSetLayoutBindingFlagsCreateInfo
1081e5c31af7Sopenharmony_cistructure, then that structure includes an array of flags, one for each
1082e5c31af7Sopenharmony_cidescriptor set layout binding.
1083e5c31af7Sopenharmony_ci
1084e5c31af7Sopenharmony_ciThe slink:VkDescriptorSetLayoutBindingFlagsCreateInfo structure is defined
1085e5c31af7Sopenharmony_cias:
1086e5c31af7Sopenharmony_ci
1087e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDescriptorSetLayoutBindingFlagsCreateInfo.adoc[]
1088e5c31af7Sopenharmony_ci
1089e5c31af7Sopenharmony_ciifdef::VK_EXT_descriptor_indexing[]
1090e5c31af7Sopenharmony_cior the equivalent
1091e5c31af7Sopenharmony_ci
1092e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDescriptorSetLayoutBindingFlagsCreateInfoEXT.adoc[]
1093e5c31af7Sopenharmony_ciendif::VK_EXT_descriptor_indexing[]
1094e5c31af7Sopenharmony_ci
1095e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
1096e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
1097e5c31af7Sopenharmony_ci    structure.
1098e5c31af7Sopenharmony_ci  * pname:bindingCount is zero or the number of elements in
1099e5c31af7Sopenharmony_ci    pname:pBindingFlags.
1100e5c31af7Sopenharmony_ci  * pname:pBindingFlags is a pointer to an array of
1101e5c31af7Sopenharmony_ci    tlink:VkDescriptorBindingFlags bitfields, one for each descriptor set
1102e5c31af7Sopenharmony_ci    layout binding.
1103e5c31af7Sopenharmony_ci
1104e5c31af7Sopenharmony_ciIf pname:bindingCount is zero or if this structure is not included in the
1105e5c31af7Sopenharmony_cipname:pNext chain, the tlink:VkDescriptorBindingFlags for each descriptor
1106e5c31af7Sopenharmony_ciset layout binding is considered to be zero.
1107e5c31af7Sopenharmony_ciOtherwise, the descriptor set layout binding at
1108e5c31af7Sopenharmony_cislink:VkDescriptorSetLayoutCreateInfo::pname:pBindings[i] uses the flags in
1109e5c31af7Sopenharmony_cipname:pBindingFlags[i].
1110e5c31af7Sopenharmony_ci
1111e5c31af7Sopenharmony_ci.Valid Usage
1112e5c31af7Sopenharmony_ci****
1113e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-bindingCount-03002]]
1114e5c31af7Sopenharmony_ci    If pname:bindingCount is not zero, pname:bindingCount must: equal
1115e5c31af7Sopenharmony_ci    slink:VkDescriptorSetLayoutCreateInfo::pname:bindingCount
1116e5c31af7Sopenharmony_ciifdef::VK_KHR_push_descriptor[]
1117e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-flags-03003]]
1118e5c31af7Sopenharmony_ci    If slink:VkDescriptorSetLayoutCreateInfo::pname:flags includes
1119e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR, then all
1120e5c31af7Sopenharmony_ci    elements of pname:pBindingFlags must: not include
1121e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT,
1122e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT, or
1123e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT
1124e5c31af7Sopenharmony_ciendif::VK_KHR_push_descriptor[]
1125e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-pBindingFlags-03004]]
1126e5c31af7Sopenharmony_ci    If an element of pname:pBindingFlags includes
1127e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT, then all
1128e5c31af7Sopenharmony_ci    other elements of slink:VkDescriptorSetLayoutCreateInfo::pname:pBindings
1129e5c31af7Sopenharmony_ci    must: have a smaller value of pname:binding
1130e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-pBindingFlags-09379]]
1131e5c31af7Sopenharmony_ci    If an element of pname:pBindingFlags includes
1132e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT, then it must:
1133e5c31af7Sopenharmony_ci    be the element with the highest pname:binding number
1134e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingUniformBufferUpdateAfterBind-03005]]
1135e5c31af7Sopenharmony_ci    If
1136e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDescriptorIndexingFeatures::pname:descriptorBindingUniformBufferUpdateAfterBind
1137e5c31af7Sopenharmony_ci    is not enabled, all bindings with descriptor type
1138e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER must: not use
1139e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT
1140e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingSampledImageUpdateAfterBind-03006]]
1141e5c31af7Sopenharmony_ci    If
1142e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDescriptorIndexingFeatures::pname:descriptorBindingSampledImageUpdateAfterBind
1143e5c31af7Sopenharmony_ci    is not enabled, all bindings with descriptor type
1144e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_SAMPLER,
1145e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, or
1146e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE must: not use
1147e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT
1148e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingStorageImageUpdateAfterBind-03007]]
1149e5c31af7Sopenharmony_ci    If
1150e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDescriptorIndexingFeatures::pname:descriptorBindingStorageImageUpdateAfterBind
1151e5c31af7Sopenharmony_ci    is not enabled, all bindings with descriptor type
1152e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE must: not use
1153e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT
1154e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingStorageBufferUpdateAfterBind-03008]]
1155e5c31af7Sopenharmony_ci    If
1156e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDescriptorIndexingFeatures::pname:descriptorBindingStorageBufferUpdateAfterBind
1157e5c31af7Sopenharmony_ci    is not enabled, all bindings with descriptor type
1158e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER must: not use
1159e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT
1160e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingUniformTexelBufferUpdateAfterBind-03009]]
1161e5c31af7Sopenharmony_ci    If
1162e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDescriptorIndexingFeatures::pname:descriptorBindingUniformTexelBufferUpdateAfterBind
1163e5c31af7Sopenharmony_ci    is not enabled, all bindings with descriptor type
1164e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER must: not use
1165e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT
1166e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingStorageTexelBufferUpdateAfterBind-03010]]
1167e5c31af7Sopenharmony_ci    If
1168e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDescriptorIndexingFeatures::pname:descriptorBindingStorageTexelBufferUpdateAfterBind
1169e5c31af7Sopenharmony_ci    is not enabled, all bindings with descriptor type
1170e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER must: not use
1171e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT
1172e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
1173e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingInlineUniformBlockUpdateAfterBind-02211]]
1174e5c31af7Sopenharmony_ci    If
1175e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceInlineUniformBlockFeatures::pname:descriptorBindingInlineUniformBlockUpdateAfterBind
1176e5c31af7Sopenharmony_ci    is not enabled, all bindings with descriptor type
1177e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK must: not use
1178e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT
1179e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
1180e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure[]
1181e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingAccelerationStructureUpdateAfterBind-03570]]
1182e5c31af7Sopenharmony_ci    If
1183e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceAccelerationStructureFeaturesKHR::pname:descriptorBindingAccelerationStructureUpdateAfterBind
1184e5c31af7Sopenharmony_ci    is not enabled, all bindings with descriptor type
1185e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR or
1186e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV must: not use
1187e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT
1188e5c31af7Sopenharmony_ciendif::VK_KHR_acceleration_structure[]
1189e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-None-03011]]
1190e5c31af7Sopenharmony_ci    All bindings with descriptor type
1191e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT,
1192e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, or
1193e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC must: not use
1194e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT
1195e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingUpdateUnusedWhilePending-03012]]
1196e5c31af7Sopenharmony_ci    If
1197e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDescriptorIndexingFeatures::pname:descriptorBindingUpdateUnusedWhilePending
1198e5c31af7Sopenharmony_ci    is not enabled, all elements of pname:pBindingFlags must: not include
1199e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT
1200e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingPartiallyBound-03013]]
1201e5c31af7Sopenharmony_ci    If
1202e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDescriptorIndexingFeatures::pname:descriptorBindingPartiallyBound
1203e5c31af7Sopenharmony_ci    is not enabled, all elements of pname:pBindingFlags must: not include
1204e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT
1205e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingVariableDescriptorCount-03014]]
1206e5c31af7Sopenharmony_ci    If
1207e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDescriptorIndexingFeatures::pname:descriptorBindingVariableDescriptorCount
1208e5c31af7Sopenharmony_ci    is not enabled, all elements of pname:pBindingFlags must: not include
1209e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT
1210e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-pBindingFlags-03015]]
1211e5c31af7Sopenharmony_ci    If an element of pname:pBindingFlags includes
1212e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT, that
1213e5c31af7Sopenharmony_ci    element's pname:descriptorType must: not be
1214e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC or
1215e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
1216e5c31af7Sopenharmony_ci****
1217e5c31af7Sopenharmony_ci
1218e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDescriptorSetLayoutBindingFlagsCreateInfo.adoc[]
1219e5c31af7Sopenharmony_ci--
1220e5c31af7Sopenharmony_ci
1221e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorBindingFlagBits',desc='Bitmask specifying descriptor set layout binding properties',type='enums',alias='VkDescriptorBindingFlagBitsEXT']
1222e5c31af7Sopenharmony_ci--
1223e5c31af7Sopenharmony_ciBits which can: be set in each element of
1224e5c31af7Sopenharmony_cislink:VkDescriptorSetLayoutBindingFlagsCreateInfo::pname:pBindingFlags,
1225e5c31af7Sopenharmony_cispecifying options for the corresponding descriptor set layout binding, are:
1226e5c31af7Sopenharmony_ci
1227e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkDescriptorBindingFlagBits.adoc[]
1228e5c31af7Sopenharmony_ci
1229e5c31af7Sopenharmony_ciifdef::VK_EXT_descriptor_indexing[]
1230e5c31af7Sopenharmony_cior the equivalent
1231e5c31af7Sopenharmony_ci
1232e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkDescriptorBindingFlagBitsEXT.adoc[]
1233e5c31af7Sopenharmony_ciendif::VK_EXT_descriptor_indexing[]
1234e5c31af7Sopenharmony_ci
1235e5c31af7Sopenharmony_ci// Used below for VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK
1236e5c31af7Sopenharmony_ci:maxBlockSize: <<limits-maxInlineUniformBlockSize, pname:maxInlineUniformBlockSize>>
1237e5c31af7Sopenharmony_ci:maxTotalSize: <<limits-maxInlineUniformTotalSize, pname:maxInlineUniformTotalSize>>
1238e5c31af7Sopenharmony_ci
1239e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT indicates that if
1240e5c31af7Sopenharmony_ci    descriptors in this binding are updated between when the descriptor set
1241e5c31af7Sopenharmony_ci    is bound in a command buffer and when that command buffer is submitted
1242e5c31af7Sopenharmony_ci    to a queue, then the submission will use the most recently set
1243e5c31af7Sopenharmony_ci    descriptors for this binding and the updates do not invalidate the
1244e5c31af7Sopenharmony_ci    command buffer.
1245e5c31af7Sopenharmony_ci    Descriptor bindings created with this flag are also partially exempt
1246e5c31af7Sopenharmony_ci    from the external synchronization requirement in
1247e5c31af7Sopenharmony_ciifdef::VK_KHR_descriptor_update_template[]
1248e5c31af7Sopenharmony_ci    flink:vkUpdateDescriptorSetWithTemplateKHR and
1249e5c31af7Sopenharmony_ciendif::VK_KHR_descriptor_update_template[]
1250e5c31af7Sopenharmony_ci    flink:vkUpdateDescriptorSets.
1251e5c31af7Sopenharmony_ci    Multiple descriptors with this flag set can: be updated concurrently in
1252e5c31af7Sopenharmony_ci    different threads, though the same descriptor must: not be updated
1253e5c31af7Sopenharmony_ci    concurrently by two threads.
1254e5c31af7Sopenharmony_ci    Descriptors with this flag set can: be updated concurrently with the set
1255e5c31af7Sopenharmony_ci    being bound to a command buffer in another thread, but not concurrently
1256e5c31af7Sopenharmony_ci    with the set being reset or freed.
1257e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT indicates that
1258e5c31af7Sopenharmony_ci    descriptors in this binding that are not _dynamically used_ need not
1259e5c31af7Sopenharmony_ci    contain valid descriptors at the time the descriptors are consumed.
1260e5c31af7Sopenharmony_ci    A descriptor is dynamically used if any shader invocation executes an
1261e5c31af7Sopenharmony_ci    instruction that performs any memory access using the descriptor.
1262e5c31af7Sopenharmony_ci    If a descriptor is not dynamically used, any resource referenced by the
1263e5c31af7Sopenharmony_ci    descriptor is not considered to be referenced during command execution.
1264e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT indicates
1265e5c31af7Sopenharmony_ci    that descriptors in this binding can: be updated after a command buffer
1266e5c31af7Sopenharmony_ci    has bound this descriptor set, or while a command buffer that uses this
1267e5c31af7Sopenharmony_ci    descriptor set is pending execution, as long as the descriptors that are
1268e5c31af7Sopenharmony_ci    updated are not used by those command buffers.
1269e5c31af7Sopenharmony_ci    Descriptor bindings created with this flag are also partially exempt
1270e5c31af7Sopenharmony_ci    from the external synchronization requirement in
1271e5c31af7Sopenharmony_ci    flink:vkUpdateDescriptorSetWithTemplateKHR and
1272e5c31af7Sopenharmony_ci    flink:vkUpdateDescriptorSets in the same way as for
1273e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT.
1274e5c31af7Sopenharmony_ci    If ename:VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT is also set, then
1275e5c31af7Sopenharmony_ci    descriptors can: be updated as long as they are not dynamically used by
1276e5c31af7Sopenharmony_ci    any shader invocations.
1277e5c31af7Sopenharmony_ci    If ename:VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT is not set, then
1278e5c31af7Sopenharmony_ci    descriptors can: be updated as long as they are not statically used by
1279e5c31af7Sopenharmony_ci    any shader invocations.
1280e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT indicates that
1281e5c31af7Sopenharmony_ci    this is a _variable-sized descriptor binding_ whose size will be
1282e5c31af7Sopenharmony_ci    specified when a descriptor set is allocated using this layout.
1283e5c31af7Sopenharmony_ci    The value of pname:descriptorCount is treated as an upper bound on the
1284e5c31af7Sopenharmony_ci    size of the binding.
1285e5c31af7Sopenharmony_ci    This must: only be used for the last binding in the descriptor set
1286e5c31af7Sopenharmony_ci    layout (i.e. the binding with the largest value of pname:binding).
1287e5c31af7Sopenharmony_ci    For the purposes of counting against limits such as
1288e5c31af7Sopenharmony_ci    pname:maxDescriptorSet* and pname:maxPerStageDescriptor*, the full value
1289e5c31af7Sopenharmony_ci    of pname:descriptorCount is
1290e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[counted.]
1291e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
1292e5c31af7Sopenharmony_ci    counted, except for descriptor bindings with a descriptor type of
1293e5c31af7Sopenharmony_ciifndef::VK_EXT_descriptor_buffer[]
1294e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK.
1295e5c31af7Sopenharmony_ciendif::VK_EXT_descriptor_buffer[]
1296e5c31af7Sopenharmony_ciifdef::VK_EXT_descriptor_buffer[]
1297e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, when
1298e5c31af7Sopenharmony_ci    slink:VkDescriptorSetLayoutCreateInfo::pname:flags does not contain
1299e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT.
1300e5c31af7Sopenharmony_ciendif::VK_EXT_descriptor_buffer[]
1301e5c31af7Sopenharmony_ci    In this case, pname:descriptorCount specifies the upper bound on the
1302e5c31af7Sopenharmony_ci    byte size of the binding; thus it counts against the
1303e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3+VK_EXT_inline_uniform_block[{maxBlockSize} and {maxTotalSize} limits]
1304e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_3[{maxBlockSize} limit]
1305e5c31af7Sopenharmony_ciifndef::VK_EXT_inline_uniform_block[{maxTotalSize} limit]
1306e5c31af7Sopenharmony_ciinstead.
1307e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
1308e5c31af7Sopenharmony_ci
1309e5c31af7Sopenharmony_ci[NOTE]
1310e5c31af7Sopenharmony_ci.Note
1311e5c31af7Sopenharmony_ci====
1312e5c31af7Sopenharmony_ciNote that while ename:VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT and
1313e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT both involve
1314e5c31af7Sopenharmony_ciupdates to descriptor sets after they are bound,
1315e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT is a weaker
1316e5c31af7Sopenharmony_cirequirement since it is only about descriptors that are not used, whereas
1317e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT requires the
1318e5c31af7Sopenharmony_ciimplementation to observe updates to descriptors that are used.
1319e5c31af7Sopenharmony_ci====
1320e5c31af7Sopenharmony_ci--
1321e5c31af7Sopenharmony_ci
1322e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorBindingFlags',desc='Bitmask of VkDescriptorBindingFlagBits',type='flags',alias='VkDescriptorBindingFlagsEXT']
1323e5c31af7Sopenharmony_ci--
1324e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkDescriptorBindingFlags.adoc[]
1325e5c31af7Sopenharmony_ci
1326e5c31af7Sopenharmony_ciifdef::VK_EXT_descriptor_indexing[]
1327e5c31af7Sopenharmony_cior the equivalent
1328e5c31af7Sopenharmony_ci
1329e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkDescriptorBindingFlagsEXT.adoc[]
1330e5c31af7Sopenharmony_ciendif::VK_EXT_descriptor_indexing[]
1331e5c31af7Sopenharmony_ci
1332e5c31af7Sopenharmony_citname:VkDescriptorBindingFlags is a bitmask type for setting a mask of zero
1333e5c31af7Sopenharmony_cior more elink:VkDescriptorBindingFlagBits.
1334e5c31af7Sopenharmony_ci--
1335e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1336e5c31af7Sopenharmony_ci
1337e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance3[]
1338e5c31af7Sopenharmony_ci[open,refpage='vkGetDescriptorSetLayoutSupport',desc='Query whether a descriptor set layout can be created',type='protos']
1339e5c31af7Sopenharmony_ci--
1340e5c31af7Sopenharmony_ciTo query information about whether a descriptor set layout can: be created,
1341e5c31af7Sopenharmony_cicall:
1342e5c31af7Sopenharmony_ci
1343e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[]
1344e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetDescriptorSetLayoutSupport.adoc[]
1345e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[]
1346e5c31af7Sopenharmony_ci
1347e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1+VK_KHR_maintenance3[or the equivalent command]
1348e5c31af7Sopenharmony_ci
1349e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance3[]
1350e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetDescriptorSetLayoutSupportKHR.adoc[]
1351e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance3[]
1352e5c31af7Sopenharmony_ci
1353e5c31af7Sopenharmony_ci  * pname:device is the logical device that would create the descriptor set
1354e5c31af7Sopenharmony_ci    layout.
1355e5c31af7Sopenharmony_ci  * pname:pCreateInfo is a pointer to a
1356e5c31af7Sopenharmony_ci    slink:VkDescriptorSetLayoutCreateInfo structure specifying the state of
1357e5c31af7Sopenharmony_ci    the descriptor set layout object.
1358e5c31af7Sopenharmony_ci  * pname:pSupport is a pointer to a slink:VkDescriptorSetLayoutSupport
1359e5c31af7Sopenharmony_ci    structure, in which information about support for the descriptor set
1360e5c31af7Sopenharmony_ci    layout object is returned.
1361e5c31af7Sopenharmony_ci
1362e5c31af7Sopenharmony_ciSome implementations have limitations on what fits in a descriptor set which
1363e5c31af7Sopenharmony_ciare not easily expressible in terms of existing limits like
1364e5c31af7Sopenharmony_cipname:maxDescriptorSet*, for example if all descriptor types share a limited
1365e5c31af7Sopenharmony_cispace in memory but each descriptor is a different size or alignment.
1366e5c31af7Sopenharmony_ciThis command returns information about whether a descriptor set satisfies
1367e5c31af7Sopenharmony_cithis limit.
1368e5c31af7Sopenharmony_ciIf the descriptor set layout satisfies the
1369e5c31af7Sopenharmony_cislink:VkPhysicalDeviceMaintenance3Properties::pname:maxPerSetDescriptors
1370e5c31af7Sopenharmony_cilimit, this command is guaranteed to return ename:VK_TRUE in
1371e5c31af7Sopenharmony_cislink:VkDescriptorSetLayoutSupport::pname:supported.
1372e5c31af7Sopenharmony_ciIf the descriptor set layout exceeds the
1373e5c31af7Sopenharmony_cislink:VkPhysicalDeviceMaintenance3Properties::pname:maxPerSetDescriptors
1374e5c31af7Sopenharmony_cilimit, whether the descriptor set layout is supported is
1375e5c31af7Sopenharmony_ciimplementation-dependent and may: depend on whether the descriptor sizes and
1376e5c31af7Sopenharmony_cialignments cause the layout to exceed an internal limit.
1377e5c31af7Sopenharmony_ci
1378e5c31af7Sopenharmony_ciThis command does not consider other limits such as
1379e5c31af7Sopenharmony_cipname:maxPerStageDescriptor*, and so a descriptor set layout that is
1380e5c31af7Sopenharmony_cisupported according to this command must: still satisfy the pipeline layout
1381e5c31af7Sopenharmony_cilimits such as pname:maxPerStageDescriptor* in order to be used in a
1382e5c31af7Sopenharmony_cipipeline layout.
1383e5c31af7Sopenharmony_ci
1384e5c31af7Sopenharmony_ci[NOTE]
1385e5c31af7Sopenharmony_ci.Note
1386e5c31af7Sopenharmony_ci====
1387e5c31af7Sopenharmony_ciThis is a sname:VkDevice query rather than sname:VkPhysicalDevice because
1388e5c31af7Sopenharmony_cithe answer may: depend on enabled features.
1389e5c31af7Sopenharmony_ci====
1390e5c31af7Sopenharmony_ci
1391e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetDescriptorSetLayoutSupport.adoc[]
1392e5c31af7Sopenharmony_ci--
1393e5c31af7Sopenharmony_ci
1394e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorSetLayoutSupport',desc='Structure returning information about whether a descriptor set layout can be supported',type='structs']
1395e5c31af7Sopenharmony_ci--
1396e5c31af7Sopenharmony_ciInformation about support for the descriptor set layout is returned in a
1397e5c31af7Sopenharmony_cisname:VkDescriptorSetLayoutSupport structure:
1398e5c31af7Sopenharmony_ci
1399e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDescriptorSetLayoutSupport.adoc[]
1400e5c31af7Sopenharmony_ci
1401e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance3[]
1402e5c31af7Sopenharmony_cior the equivalent
1403e5c31af7Sopenharmony_ci
1404e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDescriptorSetLayoutSupportKHR.adoc[]
1405e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance3[]
1406e5c31af7Sopenharmony_ci
1407e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
1408e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
1409e5c31af7Sopenharmony_ci    structure.
1410e5c31af7Sopenharmony_ci  * pname:supported specifies whether the descriptor set layout can: be
1411e5c31af7Sopenharmony_ci    created.
1412e5c31af7Sopenharmony_ci
1413e5c31af7Sopenharmony_cipname:supported is set to ename:VK_TRUE if the descriptor set can: be
1414e5c31af7Sopenharmony_cicreated, or else is set to ename:VK_FALSE.
1415e5c31af7Sopenharmony_ci
1416e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDescriptorSetLayoutSupport.adoc[]
1417e5c31af7Sopenharmony_ci--
1418e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance3[]
1419e5c31af7Sopenharmony_ci
1420e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1421e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorSetVariableDescriptorCountLayoutSupport',desc='Structure returning information about whether a descriptor set layout can be supported',type='structs',alias='VkDescriptorSetVariableDescriptorCountLayoutSupportEXT']
1422e5c31af7Sopenharmony_ci--
1423e5c31af7Sopenharmony_ciIf the pname:pNext chain of a slink:VkDescriptorSetLayoutSupport structure
1424e5c31af7Sopenharmony_ciincludes a sname:VkDescriptorSetVariableDescriptorCountLayoutSupport
1425e5c31af7Sopenharmony_cistructure, then that structure returns additional information about whether
1426e5c31af7Sopenharmony_cithe descriptor set layout is supported.
1427e5c31af7Sopenharmony_ci
1428e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDescriptorSetVariableDescriptorCountLayoutSupport.adoc[]
1429e5c31af7Sopenharmony_ci
1430e5c31af7Sopenharmony_ciifdef::VK_EXT_descriptor_indexing[]
1431e5c31af7Sopenharmony_cior the equivalent
1432e5c31af7Sopenharmony_ci
1433e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDescriptorSetVariableDescriptorCountLayoutSupportEXT.adoc[]
1434e5c31af7Sopenharmony_ciendif::VK_EXT_descriptor_indexing[]
1435e5c31af7Sopenharmony_ci
1436e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
1437e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
1438e5c31af7Sopenharmony_ci    structure.
1439e5c31af7Sopenharmony_ci  * pname:maxVariableDescriptorCount indicates the maximum number of
1440e5c31af7Sopenharmony_ci    descriptors supported in the highest numbered binding of the layout, if
1441e5c31af7Sopenharmony_ci    that binding is variable-sized.
1442e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
1443e5c31af7Sopenharmony_ci    If the highest numbered binding of the layout has a descriptor type of
1444e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK then
1445e5c31af7Sopenharmony_ci    pname:maxVariableDescriptorCount indicates the maximum byte size
1446e5c31af7Sopenharmony_ci    supported for the binding, if that binding is variable-sized.
1447e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
1448e5c31af7Sopenharmony_ci
1449e5c31af7Sopenharmony_ciIf the slink:VkDescriptorSetLayoutCreateInfo structure specified in
1450e5c31af7Sopenharmony_ciflink:vkGetDescriptorSetLayoutSupport::pname:pCreateInfo includes a
1451e5c31af7Sopenharmony_civariable-sized descriptor, then pname:supported is determined assuming the
1452e5c31af7Sopenharmony_cirequested size of the variable-sized descriptor, and
1453e5c31af7Sopenharmony_cipname:maxVariableDescriptorCount is set to the maximum size of that
1454e5c31af7Sopenharmony_cidescriptor that can: be successfully created (which is greater than or equal
1455e5c31af7Sopenharmony_cito the requested size passed in).
1456e5c31af7Sopenharmony_ciIf the slink:VkDescriptorSetLayoutCreateInfo structure does not include a
1457e5c31af7Sopenharmony_civariable-sized descriptor, or if the
1458e5c31af7Sopenharmony_cislink:VkPhysicalDeviceDescriptorIndexingFeatures::pname:descriptorBindingVariableDescriptorCount
1459e5c31af7Sopenharmony_cifeature is not enabled, then pname:maxVariableDescriptorCount is set to
1460e5c31af7Sopenharmony_cizero.
1461e5c31af7Sopenharmony_ciFor the purposes of this command, a variable-sized descriptor binding with a
1462e5c31af7Sopenharmony_cipname:descriptorCount of zero is treated as having a pname:descriptorCount
1463e5c31af7Sopenharmony_ciof
1464e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[one,]
1465e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
1466e5c31af7Sopenharmony_cifour if pname:descriptorType is
1467e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, or one otherwise,
1468e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
1469e5c31af7Sopenharmony_ciand thus the binding is not ignored and the maximum descriptor count will be
1470e5c31af7Sopenharmony_cireturned.
1471e5c31af7Sopenharmony_ciIf the layout is not supported, then the value written to
1472e5c31af7Sopenharmony_cipname:maxVariableDescriptorCount is undefined:.
1473e5c31af7Sopenharmony_ci
1474e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDescriptorSetVariableDescriptorCountLayoutSupport.adoc[]
1475e5c31af7Sopenharmony_ci--
1476e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1477e5c31af7Sopenharmony_ci
1478e5c31af7Sopenharmony_ciThe following examples show a shader snippet using two descriptor sets, and
1479e5c31af7Sopenharmony_ciapplication code that creates corresponding descriptor set layouts.
1480e5c31af7Sopenharmony_ci
1481e5c31af7Sopenharmony_ci.GLSL example
1482e5c31af7Sopenharmony_ci[source,glsl]
1483e5c31af7Sopenharmony_ci----
1484e5c31af7Sopenharmony_ci//
1485e5c31af7Sopenharmony_ci// binding to a single sampled image descriptor in set 0
1486e5c31af7Sopenharmony_ci//
1487e5c31af7Sopenharmony_cilayout (set=0, binding=0) uniform texture2D mySampledImage;
1488e5c31af7Sopenharmony_ci
1489e5c31af7Sopenharmony_ci//
1490e5c31af7Sopenharmony_ci// binding to an array of sampled image descriptors in set 0
1491e5c31af7Sopenharmony_ci//
1492e5c31af7Sopenharmony_cilayout (set=0, binding=1) uniform texture2D myArrayOfSampledImages[12];
1493e5c31af7Sopenharmony_ci
1494e5c31af7Sopenharmony_ci//
1495e5c31af7Sopenharmony_ci// binding to a single uniform buffer descriptor in set 1
1496e5c31af7Sopenharmony_ci//
1497e5c31af7Sopenharmony_cilayout (set=1, binding=0) uniform myUniformBuffer
1498e5c31af7Sopenharmony_ci{
1499e5c31af7Sopenharmony_ci    vec4 myElement[32];
1500e5c31af7Sopenharmony_ci};
1501e5c31af7Sopenharmony_ci----
1502e5c31af7Sopenharmony_ci
1503e5c31af7Sopenharmony_ci.SPIR-V example
1504e5c31af7Sopenharmony_ci[source,spirv]
1505e5c31af7Sopenharmony_ci----
1506e5c31af7Sopenharmony_ci               ...
1507e5c31af7Sopenharmony_ci          %1 = OpExtInstImport "GLSL.std.450"
1508e5c31af7Sopenharmony_ci               ...
1509e5c31af7Sopenharmony_ci               OpName %9 "mySampledImage"
1510e5c31af7Sopenharmony_ci               OpName %14 "myArrayOfSampledImages"
1511e5c31af7Sopenharmony_ci               OpName %18 "myUniformBuffer"
1512e5c31af7Sopenharmony_ci               OpMemberName %18 0 "myElement"
1513e5c31af7Sopenharmony_ci               OpName %20 ""
1514e5c31af7Sopenharmony_ci               OpDecorate %9 DescriptorSet 0
1515e5c31af7Sopenharmony_ci               OpDecorate %9 Binding 0
1516e5c31af7Sopenharmony_ci               OpDecorate %14 DescriptorSet 0
1517e5c31af7Sopenharmony_ci               OpDecorate %14 Binding 1
1518e5c31af7Sopenharmony_ci               OpDecorate %17 ArrayStride 16
1519e5c31af7Sopenharmony_ci               OpMemberDecorate %18 0 Offset 0
1520e5c31af7Sopenharmony_ci               OpDecorate %18 Block
1521e5c31af7Sopenharmony_ci               OpDecorate %20 DescriptorSet 1
1522e5c31af7Sopenharmony_ci               OpDecorate %20 Binding 0
1523e5c31af7Sopenharmony_ci          %2 = OpTypeVoid
1524e5c31af7Sopenharmony_ci          %3 = OpTypeFunction %2
1525e5c31af7Sopenharmony_ci          %6 = OpTypeFloat 32
1526e5c31af7Sopenharmony_ci          %7 = OpTypeImage %6 2D 0 0 0 1 Unknown
1527e5c31af7Sopenharmony_ci          %8 = OpTypePointer UniformConstant %7
1528e5c31af7Sopenharmony_ci          %9 = OpVariable %8 UniformConstant
1529e5c31af7Sopenharmony_ci         %10 = OpTypeInt 32 0
1530e5c31af7Sopenharmony_ci         %11 = OpConstant %10 12
1531e5c31af7Sopenharmony_ci         %12 = OpTypeArray %7 %11
1532e5c31af7Sopenharmony_ci         %13 = OpTypePointer UniformConstant %12
1533e5c31af7Sopenharmony_ci         %14 = OpVariable %13 UniformConstant
1534e5c31af7Sopenharmony_ci         %15 = OpTypeVector %6 4
1535e5c31af7Sopenharmony_ci         %16 = OpConstant %10 32
1536e5c31af7Sopenharmony_ci         %17 = OpTypeArray %15 %16
1537e5c31af7Sopenharmony_ci         %18 = OpTypeStruct %17
1538e5c31af7Sopenharmony_ci         %19 = OpTypePointer Uniform %18
1539e5c31af7Sopenharmony_ci         %20 = OpVariable %19 Uniform
1540e5c31af7Sopenharmony_ci               ...
1541e5c31af7Sopenharmony_ci----
1542e5c31af7Sopenharmony_ci
1543e5c31af7Sopenharmony_ci.API example
1544e5c31af7Sopenharmony_ci[source,c++]
1545e5c31af7Sopenharmony_ci----
1546e5c31af7Sopenharmony_ciVkResult myResult;
1547e5c31af7Sopenharmony_ci
1548e5c31af7Sopenharmony_ciconst VkDescriptorSetLayoutBinding myDescriptorSetLayoutBinding[] =
1549e5c31af7Sopenharmony_ci{
1550e5c31af7Sopenharmony_ci    // binding to a single image descriptor
1551e5c31af7Sopenharmony_ci    {
1552e5c31af7Sopenharmony_ci        .binding = 0,
1553e5c31af7Sopenharmony_ci        .descriptorType = VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE,
1554e5c31af7Sopenharmony_ci        .descriptorCount = 1,
1555e5c31af7Sopenharmony_ci        .stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT,
1556e5c31af7Sopenharmony_ci        .pImmutableSamplers = NULL
1557e5c31af7Sopenharmony_ci    },
1558e5c31af7Sopenharmony_ci
1559e5c31af7Sopenharmony_ci    // binding to an array of image descriptors
1560e5c31af7Sopenharmony_ci    {
1561e5c31af7Sopenharmony_ci        .binding = 1,
1562e5c31af7Sopenharmony_ci        .descriptorType = VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE,
1563e5c31af7Sopenharmony_ci        .descriptorCount = 12,
1564e5c31af7Sopenharmony_ci        .stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT,
1565e5c31af7Sopenharmony_ci        .pImmutableSamplers = NULL
1566e5c31af7Sopenharmony_ci    },
1567e5c31af7Sopenharmony_ci
1568e5c31af7Sopenharmony_ci    // binding to a single uniform buffer descriptor
1569e5c31af7Sopenharmony_ci    {
1570e5c31af7Sopenharmony_ci        .binding = 0,
1571e5c31af7Sopenharmony_ci        .descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
1572e5c31af7Sopenharmony_ci        .descriptorCount = 1,
1573e5c31af7Sopenharmony_ci        .stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT,
1574e5c31af7Sopenharmony_ci        .pImmutableSamplers = NULL
1575e5c31af7Sopenharmony_ci    }
1576e5c31af7Sopenharmony_ci};
1577e5c31af7Sopenharmony_ci
1578e5c31af7Sopenharmony_ciconst VkDescriptorSetLayoutCreateInfo myDescriptorSetLayoutCreateInfo[] =
1579e5c31af7Sopenharmony_ci{
1580e5c31af7Sopenharmony_ci    // Information for first descriptor set with two descriptor bindings
1581e5c31af7Sopenharmony_ci    {
1582e5c31af7Sopenharmony_ci        .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO,
1583e5c31af7Sopenharmony_ci        .pNext = NULL,
1584e5c31af7Sopenharmony_ci        .flags = 0,
1585e5c31af7Sopenharmony_ci        .bindingCount = 2,
1586e5c31af7Sopenharmony_ci        .pBindings = &myDescriptorSetLayoutBinding[0]
1587e5c31af7Sopenharmony_ci    },
1588e5c31af7Sopenharmony_ci
1589e5c31af7Sopenharmony_ci    // Information for second descriptor set with one descriptor binding
1590e5c31af7Sopenharmony_ci    {
1591e5c31af7Sopenharmony_ci        .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO,
1592e5c31af7Sopenharmony_ci        .pNext = NULL,
1593e5c31af7Sopenharmony_ci        .flags = 0,
1594e5c31af7Sopenharmony_ci        .bindingCount = 1,
1595e5c31af7Sopenharmony_ci        .pBindings = &myDescriptorSetLayoutBinding[2]
1596e5c31af7Sopenharmony_ci    }
1597e5c31af7Sopenharmony_ci};
1598e5c31af7Sopenharmony_ci
1599e5c31af7Sopenharmony_ciVkDescriptorSetLayout myDescriptorSetLayout[2];
1600e5c31af7Sopenharmony_ci
1601e5c31af7Sopenharmony_ci//
1602e5c31af7Sopenharmony_ci// Create first descriptor set layout
1603e5c31af7Sopenharmony_ci//
1604e5c31af7Sopenharmony_cimyResult = vkCreateDescriptorSetLayout(
1605e5c31af7Sopenharmony_ci    myDevice,
1606e5c31af7Sopenharmony_ci    &myDescriptorSetLayoutCreateInfo[0],
1607e5c31af7Sopenharmony_ci    NULL,
1608e5c31af7Sopenharmony_ci    &myDescriptorSetLayout[0]);
1609e5c31af7Sopenharmony_ci
1610e5c31af7Sopenharmony_ci//
1611e5c31af7Sopenharmony_ci// Create second descriptor set layout
1612e5c31af7Sopenharmony_ci//
1613e5c31af7Sopenharmony_cimyResult = vkCreateDescriptorSetLayout(
1614e5c31af7Sopenharmony_ci    myDevice,
1615e5c31af7Sopenharmony_ci    &myDescriptorSetLayoutCreateInfo[1],
1616e5c31af7Sopenharmony_ci    NULL,
1617e5c31af7Sopenharmony_ci    &myDescriptorSetLayout[1]);
1618e5c31af7Sopenharmony_ci----
1619e5c31af7Sopenharmony_ci
1620e5c31af7Sopenharmony_ci[open,refpage='vkDestroyDescriptorSetLayout',desc='Destroy a descriptor set layout object',type='protos']
1621e5c31af7Sopenharmony_ci--
1622e5c31af7Sopenharmony_ciTo destroy a descriptor set layout, call:
1623e5c31af7Sopenharmony_ci
1624e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkDestroyDescriptorSetLayout.adoc[]
1625e5c31af7Sopenharmony_ci
1626e5c31af7Sopenharmony_ci  * pname:device is the logical device that destroys the descriptor set
1627e5c31af7Sopenharmony_ci    layout.
1628e5c31af7Sopenharmony_ci  * pname:descriptorSetLayout is the descriptor set layout to destroy.
1629e5c31af7Sopenharmony_ci  * pname:pAllocator controls host memory allocation as described in the
1630e5c31af7Sopenharmony_ci    <<memory-allocation, Memory Allocation>> chapter.
1631e5c31af7Sopenharmony_ci
1632e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
1633e5c31af7Sopenharmony_ci.Valid Usage
1634e5c31af7Sopenharmony_ci****
1635e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyDescriptorSetLayout-descriptorSetLayout-00284]]
1636e5c31af7Sopenharmony_ci    If sname:VkAllocationCallbacks were provided when
1637e5c31af7Sopenharmony_ci    pname:descriptorSetLayout was created, a compatible set of callbacks
1638e5c31af7Sopenharmony_ci    must: be provided here
1639e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyDescriptorSetLayout-descriptorSetLayout-00285]]
1640e5c31af7Sopenharmony_ci    If no sname:VkAllocationCallbacks were provided when
1641e5c31af7Sopenharmony_ci    pname:descriptorSetLayout was created, pname:pAllocator must: be `NULL`
1642e5c31af7Sopenharmony_ci****
1643e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
1644e5c31af7Sopenharmony_ci
1645e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkDestroyDescriptorSetLayout.adoc[]
1646e5c31af7Sopenharmony_ci--
1647e5c31af7Sopenharmony_ci
1648e5c31af7Sopenharmony_ci
1649e5c31af7Sopenharmony_ci[[descriptorsets-pipelinelayout]]
1650e5c31af7Sopenharmony_ci=== Pipeline Layouts
1651e5c31af7Sopenharmony_ci
1652e5c31af7Sopenharmony_ci[open,refpage='VkPipelineLayout',desc='Opaque handle to a pipeline layout object',type='handles']
1653e5c31af7Sopenharmony_ci--
1654e5c31af7Sopenharmony_ciAccess to descriptor sets from a pipeline is accomplished through a
1655e5c31af7Sopenharmony_ci_pipeline layout_.
1656e5c31af7Sopenharmony_ciZero or more descriptor set layouts and zero or more push constant ranges
1657e5c31af7Sopenharmony_ciare combined to form a pipeline layout object describing the complete set of
1658e5c31af7Sopenharmony_ciresources that can: be accessed by a pipeline.
1659e5c31af7Sopenharmony_ciThe pipeline layout represents a sequence of descriptor sets with each
1660e5c31af7Sopenharmony_cihaving a specific layout.
1661e5c31af7Sopenharmony_ciThis sequence of layouts is used to determine the interface between shader
1662e5c31af7Sopenharmony_cistages and shader resources.
1663e5c31af7Sopenharmony_ciEach pipeline is created using a pipeline layout.
1664e5c31af7Sopenharmony_ci
1665e5c31af7Sopenharmony_ciPipeline layout objects are represented by sname:VkPipelineLayout handles:
1666e5c31af7Sopenharmony_ci
1667e5c31af7Sopenharmony_ciinclude::{generated}/api/handles/VkPipelineLayout.adoc[]
1668e5c31af7Sopenharmony_ci--
1669e5c31af7Sopenharmony_ci
1670e5c31af7Sopenharmony_ci[open,refpage='vkCreatePipelineLayout',desc='Creates a new pipeline layout object',type='protos']
1671e5c31af7Sopenharmony_ci--
1672e5c31af7Sopenharmony_ci:refpage: vkCreatePipelineLayout
1673e5c31af7Sopenharmony_ci:objectnameplural: pipeline layouts
1674e5c31af7Sopenharmony_ci:objectnamecamelcase: pipelineLayout
1675e5c31af7Sopenharmony_ci:objectcount: 1
1676e5c31af7Sopenharmony_ci
1677e5c31af7Sopenharmony_ciTo create a pipeline layout, call:
1678e5c31af7Sopenharmony_ci
1679e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCreatePipelineLayout.adoc[]
1680e5c31af7Sopenharmony_ci
1681e5c31af7Sopenharmony_ci  * pname:device is the logical device that creates the pipeline layout.
1682e5c31af7Sopenharmony_ci  * pname:pCreateInfo is a pointer to a slink:VkPipelineLayoutCreateInfo
1683e5c31af7Sopenharmony_ci    structure specifying the state of the pipeline layout object.
1684e5c31af7Sopenharmony_ci  * pname:pAllocator controls host memory allocation as described in the
1685e5c31af7Sopenharmony_ci    <<memory-allocation, Memory Allocation>> chapter.
1686e5c31af7Sopenharmony_ci  * pname:pPipelineLayout is a pointer to a slink:VkPipelineLayout handle in
1687e5c31af7Sopenharmony_ci    which the resulting pipeline layout object is returned.
1688e5c31af7Sopenharmony_ci
1689e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/no_dynamic_allocations_common.adoc[]
1690e5c31af7Sopenharmony_ci
1691e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
1692e5c31af7Sopenharmony_ci.Valid Usage
1693e5c31af7Sopenharmony_ci****
1694e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/memory_reservation_request_count_common.adoc[]
1695e5c31af7Sopenharmony_ci****
1696e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
1697e5c31af7Sopenharmony_ci
1698e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCreatePipelineLayout.adoc[]
1699e5c31af7Sopenharmony_ci--
1700e5c31af7Sopenharmony_ci
1701e5c31af7Sopenharmony_ci[open,refpage='VkPipelineLayoutCreateInfo',desc='Structure specifying the parameters of a newly created pipeline layout object',type='structs']
1702e5c31af7Sopenharmony_ci--
1703e5c31af7Sopenharmony_ciThe slink:VkPipelineLayoutCreateInfo structure is defined as:
1704e5c31af7Sopenharmony_ci
1705e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPipelineLayoutCreateInfo.adoc[]
1706e5c31af7Sopenharmony_ci
1707e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
1708e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
1709e5c31af7Sopenharmony_ci    structure.
1710e5c31af7Sopenharmony_ci  * pname:flags is a bitmask of elink:VkPipelineLayoutCreateFlagBits
1711e5c31af7Sopenharmony_ci    specifying options for pipeline layout creation.
1712e5c31af7Sopenharmony_ci  * pname:setLayoutCount is the number of descriptor sets included in the
1713e5c31af7Sopenharmony_ci    pipeline layout.
1714e5c31af7Sopenharmony_ci  * pname:pSetLayouts is a pointer to an array of
1715e5c31af7Sopenharmony_ci    sname:VkDescriptorSetLayout objects.
1716e5c31af7Sopenharmony_ci  * pname:pushConstantRangeCount is the number of push constant ranges
1717e5c31af7Sopenharmony_ci    included in the pipeline layout.
1718e5c31af7Sopenharmony_ci  * pname:pPushConstantRanges is a pointer to an array of
1719e5c31af7Sopenharmony_ci    sname:VkPushConstantRange structures defining a set of push constant
1720e5c31af7Sopenharmony_ci    ranges for use in a single pipeline layout.
1721e5c31af7Sopenharmony_ci    In addition to descriptor set layouts, a pipeline layout also describes
1722e5c31af7Sopenharmony_ci    how many push constants can: be accessed by each stage of the pipeline.
1723e5c31af7Sopenharmony_ci+
1724e5c31af7Sopenharmony_ci[NOTE]
1725e5c31af7Sopenharmony_ci.Note
1726e5c31af7Sopenharmony_ci====
1727e5c31af7Sopenharmony_ciPush constants represent a high speed path to modify constant data in
1728e5c31af7Sopenharmony_cipipelines that is expected to outperform memory-backed resource updates.
1729e5c31af7Sopenharmony_ci====
1730e5c31af7Sopenharmony_ci
1731e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
1732e5c31af7Sopenharmony_ciIn Vulkan SC, the pipeline compilation process occurs
1733e5c31af7Sopenharmony_ci<<pipelines-offline-compilation,offline>>, but the application must: still
1734e5c31af7Sopenharmony_ciprovide values to sname:VkPipelineLayoutCreateInfo that match the values
1735e5c31af7Sopenharmony_ciused for offline compilation of pipelines using this slink:VkPipelineLayout.
1736e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
1737e5c31af7Sopenharmony_ci
1738e5c31af7Sopenharmony_ci.Valid Usage
1739e5c31af7Sopenharmony_ci****
1740e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-setLayoutCount-00286]]
1741e5c31af7Sopenharmony_ci    pname:setLayoutCount must: be less than or equal to
1742e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:maxBoundDescriptorSets
1743e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-descriptorType-03016]]
1744e5c31af7Sopenharmony_ci    The total number of descriptors in descriptor set layouts
1745e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1746e5c31af7Sopenharmony_ci    created without the
1747e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set
1748e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1749e5c31af7Sopenharmony_ci    with a pname:descriptorType of ename:VK_DESCRIPTOR_TYPE_SAMPLER and
1750e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER accessible to any given
1751e5c31af7Sopenharmony_ci    shader stage across all elements of pname:pSetLayouts must: be less than
1752e5c31af7Sopenharmony_ci    or equal to
1753e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:maxPerStageDescriptorSamplers
1754e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-descriptorType-03017]]
1755e5c31af7Sopenharmony_ci    The total number of descriptors in descriptor set layouts
1756e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1757e5c31af7Sopenharmony_ci    created without the
1758e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set
1759e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1760e5c31af7Sopenharmony_ci    with a pname:descriptorType of ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER
1761e5c31af7Sopenharmony_ci    and ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC accessible to any
1762e5c31af7Sopenharmony_ci    given shader stage across all elements of pname:pSetLayouts must: be
1763e5c31af7Sopenharmony_ci    less than or equal to
1764e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:maxPerStageDescriptorUniformBuffers
1765e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-descriptorType-03018]]
1766e5c31af7Sopenharmony_ci    The total number of descriptors in descriptor set layouts
1767e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1768e5c31af7Sopenharmony_ci    created without the
1769e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set
1770e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1771e5c31af7Sopenharmony_ci    with a pname:descriptorType of ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
1772e5c31af7Sopenharmony_ci    and ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC accessible to any
1773e5c31af7Sopenharmony_ci    given shader stage across all elements of pname:pSetLayouts must: be
1774e5c31af7Sopenharmony_ci    less than or equal to
1775e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:maxPerStageDescriptorStorageBuffers
1776e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-descriptorType-06939]]
1777e5c31af7Sopenharmony_ci    The total number of descriptors in descriptor set layouts
1778e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1779e5c31af7Sopenharmony_ci    created without the
1780e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set
1781e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1782e5c31af7Sopenharmony_ci    with a pname:descriptorType of
1783e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
1784e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE,
1785e5c31af7Sopenharmony_ciifdef::VK_QCOM_image_processing[]
1786e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM,
1787e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM,
1788e5c31af7Sopenharmony_ciendif::VK_QCOM_image_processing[]
1789e5c31af7Sopenharmony_ci    and ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, accessible to any
1790e5c31af7Sopenharmony_ci    given shader stage across all elements of pname:pSetLayouts must: be
1791e5c31af7Sopenharmony_ci    less than or equal to
1792e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:maxPerStageDescriptorSampledImages
1793e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-descriptorType-03020]]
1794e5c31af7Sopenharmony_ci    The total number of descriptors in descriptor set layouts
1795e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1796e5c31af7Sopenharmony_ci    created without the
1797e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set
1798e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1799e5c31af7Sopenharmony_ci    with a pname:descriptorType of ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE,
1800e5c31af7Sopenharmony_ci    and ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER accessible to any
1801e5c31af7Sopenharmony_ci    given shader stage across all elements of pname:pSetLayouts must: be
1802e5c31af7Sopenharmony_ci    less than or equal to
1803e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:maxPerStageDescriptorStorageImages
1804e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-descriptorType-03021]]
1805e5c31af7Sopenharmony_ci    The total number of descriptors in descriptor set layouts
1806e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1807e5c31af7Sopenharmony_ci    created without the
1808e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set
1809e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1810e5c31af7Sopenharmony_ci    with a pname:descriptorType of ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT
1811e5c31af7Sopenharmony_ci    accessible to any given shader stage across all elements of
1812e5c31af7Sopenharmony_ci    pname:pSetLayouts must: be less than or equal to
1813e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:maxPerStageDescriptorInputAttachments
1814e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
1815e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-descriptorType-02214]]
1816e5c31af7Sopenharmony_ci    The total number of bindings in descriptor set layouts
1817e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1818e5c31af7Sopenharmony_ci    created without the
1819e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set
1820e5c31af7Sopenharmony_ci    and
1821e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1822e5c31af7Sopenharmony_ci    with a pname:descriptorType of
1823e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK accessible to any given
1824e5c31af7Sopenharmony_ci    shader stage across all elements of pname:pSetLayouts, must: be less
1825e5c31af7Sopenharmony_ci    than or equal to
1826e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceInlineUniformBlockProperties::pname:maxPerStageDescriptorInlineUniformBlocks
1827e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
1828e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1829e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-descriptorType-03022]]
1830e5c31af7Sopenharmony_ci    The total number of descriptors with a pname:descriptorType of
1831e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_SAMPLER and
1832e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER accessible to any given
1833e5c31af7Sopenharmony_ci    shader stage across all elements of pname:pSetLayouts must: be less than
1834e5c31af7Sopenharmony_ci    or equal to
1835e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceDescriptorIndexingProperties::pname:maxPerStageDescriptorUpdateAfterBindSamplers
1836e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-descriptorType-03023]]
1837e5c31af7Sopenharmony_ci    The total number of descriptors with a pname:descriptorType of
1838e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER and
1839e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC accessible to any given
1840e5c31af7Sopenharmony_ci    shader stage across all elements of pname:pSetLayouts must: be less than
1841e5c31af7Sopenharmony_ci    or equal to
1842e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceDescriptorIndexingProperties::pname:maxPerStageDescriptorUpdateAfterBindUniformBuffers
1843e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-descriptorType-03024]]
1844e5c31af7Sopenharmony_ci    The total number of descriptors with a pname:descriptorType of
1845e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER and
1846e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC accessible to any given
1847e5c31af7Sopenharmony_ci    shader stage across all elements of pname:pSetLayouts must: be less than
1848e5c31af7Sopenharmony_ci    or equal to
1849e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceDescriptorIndexingProperties::pname:maxPerStageDescriptorUpdateAfterBindStorageBuffers
1850e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-descriptorType-03025]]
1851e5c31af7Sopenharmony_ci    The total number of descriptors with a pname:descriptorType of
1852e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
1853e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, and
1854e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER accessible to any given
1855e5c31af7Sopenharmony_ci    shader stage across all elements of pname:pSetLayouts must: be less than
1856e5c31af7Sopenharmony_ci    or equal to
1857e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceDescriptorIndexingProperties::pname:maxPerStageDescriptorUpdateAfterBindSampledImages
1858e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-descriptorType-03026]]
1859e5c31af7Sopenharmony_ci    The total number of descriptors with a pname:descriptorType of
1860e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, and
1861e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER accessible to any given
1862e5c31af7Sopenharmony_ci    shader stage across all elements of pname:pSetLayouts must: be less than
1863e5c31af7Sopenharmony_ci    or equal to
1864e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceDescriptorIndexingProperties::pname:maxPerStageDescriptorUpdateAfterBindStorageImages
1865e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-descriptorType-03027]]
1866e5c31af7Sopenharmony_ci    The total number of descriptors with a pname:descriptorType of
1867e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT accessible to any given shader
1868e5c31af7Sopenharmony_ci    stage across all elements of pname:pSetLayouts must: be less than or
1869e5c31af7Sopenharmony_ci    equal to
1870e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceDescriptorIndexingProperties::pname:maxPerStageDescriptorUpdateAfterBindInputAttachments
1871e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
1872e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-descriptorType-02215]]
1873e5c31af7Sopenharmony_ci    The total number of bindings with a pname:descriptorType of
1874e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK accessible to any given
1875e5c31af7Sopenharmony_ci    shader stage across all elements of pname:pSetLayouts must: be less than
1876e5c31af7Sopenharmony_ci    or equal to
1877e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceInlineUniformBlockProperties::pname:maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks
1878e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
1879e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1880e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-descriptorType-03028]]
1881e5c31af7Sopenharmony_ci    The total number of descriptors in descriptor set layouts
1882e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1883e5c31af7Sopenharmony_ci    created without the
1884e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set
1885e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1886e5c31af7Sopenharmony_ci    with a pname:descriptorType of ename:VK_DESCRIPTOR_TYPE_SAMPLER and
1887e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER accessible across all
1888e5c31af7Sopenharmony_ci    shader stages and across all elements of pname:pSetLayouts must: be less
1889e5c31af7Sopenharmony_ci    than or equal to
1890e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:maxDescriptorSetSamplers
1891e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-descriptorType-03029]]
1892e5c31af7Sopenharmony_ci    The total number of descriptors in descriptor set layouts
1893e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1894e5c31af7Sopenharmony_ci    created without the
1895e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set
1896e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1897e5c31af7Sopenharmony_ci    with a pname:descriptorType of ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER
1898e5c31af7Sopenharmony_ci    accessible across all shader stages and across all elements of
1899e5c31af7Sopenharmony_ci    pname:pSetLayouts must: be less than or equal to
1900e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:maxDescriptorSetUniformBuffers
1901e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-descriptorType-03030]]
1902e5c31af7Sopenharmony_ci    The total number of descriptors in descriptor set layouts
1903e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1904e5c31af7Sopenharmony_ci    created without the
1905e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set
1906e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1907e5c31af7Sopenharmony_ci    with a pname:descriptorType of
1908e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC accessible across all
1909e5c31af7Sopenharmony_ci    shader stages and across all elements of pname:pSetLayouts must: be less
1910e5c31af7Sopenharmony_ci    than or equal to
1911e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:maxDescriptorSetUniformBuffersDynamic
1912e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-descriptorType-03031]]
1913e5c31af7Sopenharmony_ci    The total number of descriptors in descriptor set layouts
1914e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1915e5c31af7Sopenharmony_ci    created without the
1916e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set
1917e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1918e5c31af7Sopenharmony_ci    with a pname:descriptorType of ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
1919e5c31af7Sopenharmony_ci    accessible across all shader stages and across all elements of
1920e5c31af7Sopenharmony_ci    pname:pSetLayouts must: be less than or equal to
1921e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:maxDescriptorSetStorageBuffers
1922e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-descriptorType-03032]]
1923e5c31af7Sopenharmony_ci    The total number of descriptors in descriptor set layouts
1924e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1925e5c31af7Sopenharmony_ci    created without the
1926e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set
1927e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1928e5c31af7Sopenharmony_ci    with a pname:descriptorType of
1929e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC accessible across all
1930e5c31af7Sopenharmony_ci    shader stages and across all elements of pname:pSetLayouts must: be less
1931e5c31af7Sopenharmony_ci    than or equal to
1932e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:maxDescriptorSetStorageBuffersDynamic
1933e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-descriptorType-03033]]
1934e5c31af7Sopenharmony_ci    The total number of descriptors in descriptor set layouts
1935e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1936e5c31af7Sopenharmony_ci    created without the
1937e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set
1938e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1939e5c31af7Sopenharmony_ci    with a pname:descriptorType of
1940e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
1941e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, and
1942e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER accessible across all
1943e5c31af7Sopenharmony_ci    shader stages and across all elements of pname:pSetLayouts must: be less
1944e5c31af7Sopenharmony_ci    than or equal to
1945e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:maxDescriptorSetSampledImages
1946e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-descriptorType-03034]]
1947e5c31af7Sopenharmony_ci    The total number of descriptors in descriptor set layouts
1948e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1949e5c31af7Sopenharmony_ci    created without the
1950e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set
1951e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1952e5c31af7Sopenharmony_ci    with a pname:descriptorType of ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE,
1953e5c31af7Sopenharmony_ci    and ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER accessible across all
1954e5c31af7Sopenharmony_ci    shader stages and across all elements of pname:pSetLayouts must: be less
1955e5c31af7Sopenharmony_ci    than or equal to
1956e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:maxDescriptorSetStorageImages
1957e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-descriptorType-03035]]
1958e5c31af7Sopenharmony_ci    The total number of descriptors in descriptor set layouts
1959e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1960e5c31af7Sopenharmony_ci    created without the
1961e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set
1962e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1963e5c31af7Sopenharmony_ci    with a pname:descriptorType of ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT
1964e5c31af7Sopenharmony_ci    accessible across all shader stages and across all elements of
1965e5c31af7Sopenharmony_ci    pname:pSetLayouts must: be less than or equal to
1966e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:maxDescriptorSetInputAttachments
1967e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
1968e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-descriptorType-02216]]
1969e5c31af7Sopenharmony_ci    The total number of bindings in descriptor set layouts
1970e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1971e5c31af7Sopenharmony_ci    created without the
1972e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set
1973e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1974e5c31af7Sopenharmony_ci    with a pname:descriptorType of
1975e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK accessible across all
1976e5c31af7Sopenharmony_ci    shader stages and across all elements of pname:pSetLayouts must: be less
1977e5c31af7Sopenharmony_ci    than or equal to
1978e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceInlineUniformBlockProperties::pname:maxDescriptorSetInlineUniformBlocks
1979e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
1980e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
1981e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-pSetLayouts-03036]]
1982e5c31af7Sopenharmony_ci    The total number of descriptors of the type
1983e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_SAMPLER and
1984e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER accessible across all
1985e5c31af7Sopenharmony_ci    shader stages and across all elements of pname:pSetLayouts must: be less
1986e5c31af7Sopenharmony_ci    than or equal to
1987e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceDescriptorIndexingProperties::pname:maxDescriptorSetUpdateAfterBindSamplers
1988e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-pSetLayouts-03037]]
1989e5c31af7Sopenharmony_ci    The total number of descriptors of the type
1990e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER accessible across all shader
1991e5c31af7Sopenharmony_ci    stages and across all elements of pname:pSetLayouts must: be less than
1992e5c31af7Sopenharmony_ci    or equal to
1993e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceDescriptorIndexingProperties::pname:maxDescriptorSetUpdateAfterBindUniformBuffers
1994e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-pSetLayouts-03038]]
1995e5c31af7Sopenharmony_ci    The total number of descriptors of the type
1996e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC accessible across all
1997e5c31af7Sopenharmony_ci    shader stages and across all elements of pname:pSetLayouts must: be less
1998e5c31af7Sopenharmony_ci    than or equal to
1999e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceDescriptorIndexingProperties::pname:maxDescriptorSetUpdateAfterBindUniformBuffersDynamic
2000e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-pSetLayouts-03039]]
2001e5c31af7Sopenharmony_ci    The total number of descriptors of the type
2002e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER accessible across all shader
2003e5c31af7Sopenharmony_ci    stages and across all elements of pname:pSetLayouts must: be less than
2004e5c31af7Sopenharmony_ci    or equal to
2005e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceDescriptorIndexingProperties::pname:maxDescriptorSetUpdateAfterBindStorageBuffers
2006e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-pSetLayouts-03040]]
2007e5c31af7Sopenharmony_ci    The total number of descriptors of the type
2008e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC accessible across all
2009e5c31af7Sopenharmony_ci    shader stages and across all elements of pname:pSetLayouts must: be less
2010e5c31af7Sopenharmony_ci    than or equal to
2011e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceDescriptorIndexingProperties::pname:maxDescriptorSetUpdateAfterBindStorageBuffersDynamic
2012e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-pSetLayouts-03041]]
2013e5c31af7Sopenharmony_ci    The total number of descriptors of the type
2014e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
2015e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, and
2016e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER accessible across all
2017e5c31af7Sopenharmony_ci    shader stages and across all elements of pname:pSetLayouts must: be less
2018e5c31af7Sopenharmony_ci    than or equal to
2019e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceDescriptorIndexingProperties::pname:maxDescriptorSetUpdateAfterBindSampledImages
2020e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-pSetLayouts-03042]]
2021e5c31af7Sopenharmony_ci    The total number of descriptors of the type
2022e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, and
2023e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER accessible across all
2024e5c31af7Sopenharmony_ci    shader stages and across all elements of pname:pSetLayouts must: be less
2025e5c31af7Sopenharmony_ci    than or equal to
2026e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceDescriptorIndexingProperties::pname:maxDescriptorSetUpdateAfterBindStorageImages
2027e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-pSetLayouts-03043]]
2028e5c31af7Sopenharmony_ci    The total number of descriptors of the type
2029e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT accessible across all shader
2030e5c31af7Sopenharmony_ci    stages and across all elements of pname:pSetLayouts must: be less than
2031e5c31af7Sopenharmony_ci    or equal to
2032e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceDescriptorIndexingProperties::pname:maxDescriptorSetUpdateAfterBindInputAttachments
2033e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
2034e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-descriptorType-02217]]
2035e5c31af7Sopenharmony_ci    The total number of bindings with a pname:descriptorType of
2036e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK accessible across all
2037e5c31af7Sopenharmony_ci    shader stages and across all elements of pname:pSetLayouts must: be less
2038e5c31af7Sopenharmony_ci    than or equal to
2039e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceInlineUniformBlockProperties::pname:maxDescriptorSetUpdateAfterBindInlineUniformBlocks
2040e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
2041e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
2042e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3[]
2043e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-descriptorType-06531]]
2044e5c31af7Sopenharmony_ci    The total number of descriptors with a pname:descriptorType of
2045e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK accessible across all
2046e5c31af7Sopenharmony_ci    shader stages and across all elements of pname:pSetLayouts must: be less
2047e5c31af7Sopenharmony_ci    than or equal to
2048e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceVulkan13Properties::pname:maxInlineUniformTotalSize
2049e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3[]
2050e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-pPushConstantRanges-00292]]
2051e5c31af7Sopenharmony_ci    Any two elements of pname:pPushConstantRanges must: not include the same
2052e5c31af7Sopenharmony_ci    stage in pname:stageFlags
2053e5c31af7Sopenharmony_ciifdef::VK_KHR_push_descriptor[]
2054e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-pSetLayouts-00293]]
2055e5c31af7Sopenharmony_ci    pname:pSetLayouts must: not contain more than one descriptor set layout
2056e5c31af7Sopenharmony_ci    that was created with
2057e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR set
2058e5c31af7Sopenharmony_ciendif::VK_KHR_push_descriptor[]
2059e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure[]
2060e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-descriptorType-03571]]
2061e5c31af7Sopenharmony_ci    The total number of bindings in descriptor set layouts created without
2062e5c31af7Sopenharmony_ci    the ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit
2063e5c31af7Sopenharmony_ci    set with a pname:descriptorType of
2064e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR accessible to any
2065e5c31af7Sopenharmony_ci    given shader stage across all elements of pname:pSetLayouts must: be
2066e5c31af7Sopenharmony_ci    less than or equal to
2067e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceAccelerationStructurePropertiesKHR::pname:maxPerStageDescriptorAccelerationStructures
2068e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-descriptorType-03572]]
2069e5c31af7Sopenharmony_ci    The total number of bindings with a pname:descriptorType of
2070e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR accessible to any
2071e5c31af7Sopenharmony_ci    given shader stage across all elements of pname:pSetLayouts must: be
2072e5c31af7Sopenharmony_ci    less than or equal to
2073e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceAccelerationStructurePropertiesKHR::pname:maxPerStageDescriptorUpdateAfterBindAccelerationStructures
2074e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-descriptorType-03573]]
2075e5c31af7Sopenharmony_ci    The total number of bindings in descriptor set layouts created without
2076e5c31af7Sopenharmony_ci    the ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit
2077e5c31af7Sopenharmony_ci    set with a pname:descriptorType of
2078e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR accessible across
2079e5c31af7Sopenharmony_ci    all shader stages and across all elements of pname:pSetLayouts must: be
2080e5c31af7Sopenharmony_ci    less than or equal to
2081e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceAccelerationStructurePropertiesKHR::pname:maxDescriptorSetAccelerationStructures
2082e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-descriptorType-03574]]
2083e5c31af7Sopenharmony_ci    The total number of bindings with a pname:descriptorType of
2084e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR accessible across
2085e5c31af7Sopenharmony_ci    all shader stages and across all elements of pname:pSetLayouts must: be
2086e5c31af7Sopenharmony_ci    less than or equal to
2087e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceAccelerationStructurePropertiesKHR::pname:maxDescriptorSetUpdateAfterBindAccelerationStructures
2088e5c31af7Sopenharmony_ciendif::VK_KHR_acceleration_structure[]
2089e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing[]
2090e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-descriptorType-02381]]
2091e5c31af7Sopenharmony_ci    The total number of bindings with a pname:descriptorType of
2092e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV accessible across all
2093e5c31af7Sopenharmony_ci    shader stages and across all elements of pname:pSetLayouts must: be less
2094e5c31af7Sopenharmony_ci    than or equal to
2095e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceRayTracingPropertiesNV::pname:maxDescriptorSetAccelerationStructures
2096e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing[]
2097e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map2[]
2098e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-pImmutableSamplers-03566]]
2099e5c31af7Sopenharmony_ci    The total number of pname:pImmutableSamplers created with pname:flags
2100e5c31af7Sopenharmony_ci    containing ename:VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT or
2101e5c31af7Sopenharmony_ci    ename:VK_SAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT across
2102e5c31af7Sopenharmony_ci    all shader stages and across all elements of pname:pSetLayouts must: be
2103e5c31af7Sopenharmony_ci    less than or equal to <<limits-maxDescriptorSetSubsampledSamplers,
2104e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceFragmentDensityMap2PropertiesEXT::pname:maxDescriptorSetSubsampledSamplers>>
2105e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map2[]
2106e5c31af7Sopenharmony_ciifdef::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
2107e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-pSetLayouts-04606]]
2108e5c31af7Sopenharmony_ci    Any element of pname:pSetLayouts must: not have been created with the
2109e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXT bit set
2110e5c31af7Sopenharmony_ciendif::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
2111e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-graphicsPipelineLibrary-06753]]
2112e5c31af7Sopenharmony_ciifdef::VK_EXT_graphics_pipeline_library[]
2113e5c31af7Sopenharmony_ci    If <<features-graphicsPipelineLibrary, pname:graphicsPipelineLibrary>>
2114e5c31af7Sopenharmony_ci    is not enabled, elements
2115e5c31af7Sopenharmony_ciendif::VK_EXT_graphics_pipeline_library[]
2116e5c31af7Sopenharmony_ciifndef::VK_EXT_graphics_pipeline_library[Elements]
2117e5c31af7Sopenharmony_ci    of pname:pSetLayouts must: be valid slink:VkDescriptorSetLayout objects
2118e5c31af7Sopenharmony_ciifdef::VK_EXT_descriptor_buffer[]
2119e5c31af7Sopenharmony_ci  * [[VUID-VkPipelineLayoutCreateInfo-pSetLayouts-08008]]
2120e5c31af7Sopenharmony_ci    If any element of pname:pSetLayouts was created with the
2121e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT bit set,
2122e5c31af7Sopenharmony_ci    all elements of pname:pSetLayouts must: have been created with the
2123e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT bit set
2124e5c31af7Sopenharmony_ciendif::VK_EXT_descriptor_buffer[]
2125e5c31af7Sopenharmony_ci****
2126e5c31af7Sopenharmony_ci
2127e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkPipelineLayoutCreateInfo.adoc[]
2128e5c31af7Sopenharmony_ci--
2129e5c31af7Sopenharmony_ci
2130e5c31af7Sopenharmony_ci[open,refpage='VkPipelineLayoutCreateFlagBits',desc='Pipeline layout creation flag bits',type='enums']
2131e5c31af7Sopenharmony_ci--
2132e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkPipelineLayoutCreateFlagBits.adoc[]
2133e5c31af7Sopenharmony_ci
2134e5c31af7Sopenharmony_ciifndef::VK_EXT_graphics_pipeline_library[]
2135e5c31af7Sopenharmony_ciAll values for this enum are defined by extensions.
2136e5c31af7Sopenharmony_ciendif::VK_EXT_graphics_pipeline_library[]
2137e5c31af7Sopenharmony_ciifdef::VK_EXT_graphics_pipeline_library[]
2138e5c31af7Sopenharmony_ci  * ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT specifies that
2139e5c31af7Sopenharmony_ci    implementations must: ensure that the properties and/or absence of a
2140e5c31af7Sopenharmony_ci    particular descriptor set do not influence any other properties of the
2141e5c31af7Sopenharmony_ci    pipeline layout.
2142e5c31af7Sopenharmony_ci    This allows pipelines libraries linked without
2143e5c31af7Sopenharmony_ci    ename:VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT to be created
2144e5c31af7Sopenharmony_ci    with a subset of the total descriptor sets.
2145e5c31af7Sopenharmony_ciendif::VK_EXT_graphics_pipeline_library[]
2146e5c31af7Sopenharmony_ci--
2147e5c31af7Sopenharmony_ci
2148e5c31af7Sopenharmony_ci[open,refpage='VkPipelineLayoutCreateFlags',desc='Bitmask of pipeline layout creation flag bits',type='flags']
2149e5c31af7Sopenharmony_ci--
2150e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkPipelineLayoutCreateFlags.adoc[]
2151e5c31af7Sopenharmony_ci
2152e5c31af7Sopenharmony_citname:VkPipelineLayoutCreateFlags is a bitmask type for setting a mask of
2153e5c31af7Sopenharmony_cielink:VkPipelineLayoutCreateFlagBits.
2154e5c31af7Sopenharmony_ci--
2155e5c31af7Sopenharmony_ci
2156e5c31af7Sopenharmony_ci[open,refpage='VkPushConstantRange',desc='Structure specifying a push constant range',type='structs']
2157e5c31af7Sopenharmony_ci--
2158e5c31af7Sopenharmony_ciThe sname:VkPushConstantRange structure is defined as:
2159e5c31af7Sopenharmony_ci
2160e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPushConstantRange.adoc[]
2161e5c31af7Sopenharmony_ci
2162e5c31af7Sopenharmony_ci  * pname:stageFlags is a set of stage flags describing the shader stages
2163e5c31af7Sopenharmony_ci    that will access a range of push constants.
2164e5c31af7Sopenharmony_ci    If a particular stage is not included in the range, then accessing
2165e5c31af7Sopenharmony_ci    members of that range of push constants from the corresponding shader
2166e5c31af7Sopenharmony_ci    stage will return undefined: values.
2167e5c31af7Sopenharmony_ci  * pname:offset and pname:size are the start offset and size, respectively,
2168e5c31af7Sopenharmony_ci    consumed by the range.
2169e5c31af7Sopenharmony_ci    Both pname:offset and pname:size are in units of bytes and must: be a
2170e5c31af7Sopenharmony_ci    multiple of 4.
2171e5c31af7Sopenharmony_ci    The layout of the push constant variables is specified in the shader.
2172e5c31af7Sopenharmony_ci
2173e5c31af7Sopenharmony_ci.Valid Usage
2174e5c31af7Sopenharmony_ci****
2175e5c31af7Sopenharmony_ci  * [[VUID-VkPushConstantRange-offset-00294]]
2176e5c31af7Sopenharmony_ci    pname:offset must: be less than
2177e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:maxPushConstantsSize
2178e5c31af7Sopenharmony_ci  * [[VUID-VkPushConstantRange-offset-00295]]
2179e5c31af7Sopenharmony_ci    pname:offset must: be a multiple of `4`
2180e5c31af7Sopenharmony_ci  * [[VUID-VkPushConstantRange-size-00296]]
2181e5c31af7Sopenharmony_ci    pname:size must: be greater than `0`
2182e5c31af7Sopenharmony_ci  * [[VUID-VkPushConstantRange-size-00297]]
2183e5c31af7Sopenharmony_ci    pname:size must: be a multiple of `4`
2184e5c31af7Sopenharmony_ci  * [[VUID-VkPushConstantRange-size-00298]]
2185e5c31af7Sopenharmony_ci    pname:size must: be less than or equal to
2186e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:maxPushConstantsSize minus
2187e5c31af7Sopenharmony_ci    pname:offset
2188e5c31af7Sopenharmony_ci****
2189e5c31af7Sopenharmony_ci
2190e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkPushConstantRange.adoc[]
2191e5c31af7Sopenharmony_ci--
2192e5c31af7Sopenharmony_ci
2193e5c31af7Sopenharmony_ciOnce created, pipeline layouts are used as part of pipeline creation (see
2194e5c31af7Sopenharmony_ci<<pipelines, Pipelines>>), as part of binding descriptor sets (see
2195e5c31af7Sopenharmony_ci<<descriptorsets-binding, Descriptor Set Binding>>), and as part of setting
2196e5c31af7Sopenharmony_cipush constants (see <<descriptorsets-push-constants, Push Constant
2197e5c31af7Sopenharmony_ciUpdates>>).
2198e5c31af7Sopenharmony_ciPipeline creation accepts a pipeline layout as input, and the layout may: be
2199e5c31af7Sopenharmony_ciused to map (set, binding, arrayElement) tuples to implementation resources
2200e5c31af7Sopenharmony_cior memory locations within a descriptor set.
2201e5c31af7Sopenharmony_ciThe assignment of implementation resources depends only on the bindings
2202e5c31af7Sopenharmony_cidefined in the descriptor sets that comprise the pipeline layout, and not on
2203e5c31af7Sopenharmony_ciany shader source.
2204e5c31af7Sopenharmony_ci
2205e5c31af7Sopenharmony_ci[[descriptorsets-pipelinelayout-consistency]]
2206e5c31af7Sopenharmony_ciAll resource variables <<shaders-staticuse,statically used>> in all shaders
2207e5c31af7Sopenharmony_ciin a pipeline must: be declared with a (set, binding, arrayElement) that
2208e5c31af7Sopenharmony_ciexists in the corresponding descriptor set layout and is of an appropriate
2209e5c31af7Sopenharmony_cidescriptor type and includes the set of shader stages it is used by in
2210e5c31af7Sopenharmony_cipname:stageFlags.
2211e5c31af7Sopenharmony_ciThe pipeline layout can: include entries that are not used by a particular
2212e5c31af7Sopenharmony_cipipeline.
2213e5c31af7Sopenharmony_ciThe pipeline layout allows the application to provide a consistent set of
2214e5c31af7Sopenharmony_cibindings across multiple pipeline compiles, which enables those pipelines to
2215e5c31af7Sopenharmony_cibe compiled in a way that the implementation may: cheaply switch pipelines
2216e5c31af7Sopenharmony_ciwithout reprogramming the bindings.
2217e5c31af7Sopenharmony_ci
2218e5c31af7Sopenharmony_ciSimilarly, the push constant block declared in each shader (if present)
2219e5c31af7Sopenharmony_cimust: only place variables at offsets that are each included in a push
2220e5c31af7Sopenharmony_ciconstant range with pname:stageFlags including the bit corresponding to the
2221e5c31af7Sopenharmony_cishader stage that uses it.
2222e5c31af7Sopenharmony_ciThe pipeline layout can: include ranges or portions of ranges that are not
2223e5c31af7Sopenharmony_ciused by a particular pipeline.
2224e5c31af7Sopenharmony_ci
2225e5c31af7Sopenharmony_ciThere is a limit on the total number of resources of each type that can: be
2226e5c31af7Sopenharmony_ciincluded in bindings in all descriptor set layouts in a pipeline layout as
2227e5c31af7Sopenharmony_cishown in <<descriptorsets-pipelinelayout-limits,Pipeline Layout Resource
2228e5c31af7Sopenharmony_ciLimits>>.
2229e5c31af7Sopenharmony_ciThe "`Total Resources Available`" column gives the limit on the number of
2230e5c31af7Sopenharmony_cieach type of resource that can: be included in bindings in all descriptor
2231e5c31af7Sopenharmony_cisets in the pipeline layout.
2232e5c31af7Sopenharmony_ciSome resource types count against multiple limits.
2233e5c31af7Sopenharmony_ciAdditionally, there are limits on the total number of each type of resource
2234e5c31af7Sopenharmony_cithat can: be used in any pipeline stage as described in
2235e5c31af7Sopenharmony_ci<<interfaces-resources-limits,Shader Resource Limits>>.
2236e5c31af7Sopenharmony_ci
2237e5c31af7Sopenharmony_ci[[descriptorsets-pipelinelayout-limits]]
2238e5c31af7Sopenharmony_ci.Pipeline Layout Resource Limits
2239e5c31af7Sopenharmony_ci[width="80%",cols="<37,<22",options="header"]
2240e5c31af7Sopenharmony_ci|====
2241e5c31af7Sopenharmony_ci| Total Resources Available | Resource Types
2242e5c31af7Sopenharmony_ci.2+<.^| pname:maxDescriptorSetSamplers
2243e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
2244e5c31af7Sopenharmony_cior pname:maxDescriptorSetUpdateAfterBindSamplers
2245e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
2246e5c31af7Sopenharmony_ci            | sampler           | combined image sampler
2247e5c31af7Sopenharmony_ci.3+<.^| pname:maxDescriptorSetSampledImages
2248e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
2249e5c31af7Sopenharmony_cior pname:maxDescriptorSetUpdateAfterBindSampledImages
2250e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
2251e5c31af7Sopenharmony_ci            | sampled image     | combined image sampler | uniform texel buffer
2252e5c31af7Sopenharmony_ci.2+<.^| pname:maxDescriptorSetStorageImages
2253e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
2254e5c31af7Sopenharmony_cior pname:maxDescriptorSetUpdateAfterBindStorageImages
2255e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
2256e5c31af7Sopenharmony_ci            | storage image     | storage texel buffer
2257e5c31af7Sopenharmony_ci.2+<.^| pname:maxDescriptorSetUniformBuffers
2258e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
2259e5c31af7Sopenharmony_cior pname:maxDescriptorSetUpdateAfterBindUniformBuffers
2260e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
2261e5c31af7Sopenharmony_ci            | uniform buffer    | uniform buffer dynamic
2262e5c31af7Sopenharmony_ci| pname:maxDescriptorSetUniformBuffersDynamic
2263e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
2264e5c31af7Sopenharmony_cior pname:maxDescriptorSetUpdateAfterBindUniformBuffersDynamic
2265e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
2266e5c31af7Sopenharmony_ci            | uniform buffer dynamic
2267e5c31af7Sopenharmony_ci.2+<.^| pname:maxDescriptorSetStorageBuffers
2268e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
2269e5c31af7Sopenharmony_cior pname:maxDescriptorSetUpdateAfterBindStorageBuffers
2270e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
2271e5c31af7Sopenharmony_ci            | storage buffer    | storage buffer dynamic
2272e5c31af7Sopenharmony_ci| pname:maxDescriptorSetStorageBuffersDynamic
2273e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
2274e5c31af7Sopenharmony_cior pname:maxDescriptorSetUpdateAfterBindStorageBuffersDynamic
2275e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
2276e5c31af7Sopenharmony_ci            | storage buffer dynamic
2277e5c31af7Sopenharmony_ci| pname:maxDescriptorSetInputAttachments
2278e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
2279e5c31af7Sopenharmony_cior pname:maxDescriptorSetUpdateAfterBindInputAttachments
2280e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
2281e5c31af7Sopenharmony_ci            | input attachment
2282e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
2283e5c31af7Sopenharmony_ci| pname:maxDescriptorSetInlineUniformBlocks
2284e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
2285e5c31af7Sopenharmony_cior pname:maxDescriptorSetUpdateAfterBindInlineUniformBlocks
2286e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
2287e5c31af7Sopenharmony_ci            | inline uniform block
2288e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
2289e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing,VK_KHR_acceleration_structure[]
2290e5c31af7Sopenharmony_ci| pname:maxDescriptorSetAccelerationStructures
2291e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure[]
2292e5c31af7Sopenharmony_cior pname:maxDescriptorSetUpdateAfterBindAccelerationStructures
2293e5c31af7Sopenharmony_ciendif::VK_KHR_acceleration_structure[]
2294e5c31af7Sopenharmony_ci            | acceleration structure
2295e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing,VK_KHR_acceleration_structure[]
2296e5c31af7Sopenharmony_ci|====
2297e5c31af7Sopenharmony_ci
2298e5c31af7Sopenharmony_ci
2299e5c31af7Sopenharmony_ci[open,refpage='vkDestroyPipelineLayout',desc='Destroy a pipeline layout object',type='protos']
2300e5c31af7Sopenharmony_ci--
2301e5c31af7Sopenharmony_ciTo destroy a pipeline layout, call:
2302e5c31af7Sopenharmony_ci
2303e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkDestroyPipelineLayout.adoc[]
2304e5c31af7Sopenharmony_ci
2305e5c31af7Sopenharmony_ci  * pname:device is the logical device that destroys the pipeline layout.
2306e5c31af7Sopenharmony_ci  * pname:pipelineLayout is the pipeline layout to destroy.
2307e5c31af7Sopenharmony_ci  * pname:pAllocator controls host memory allocation as described in the
2308e5c31af7Sopenharmony_ci    <<memory-allocation, Memory Allocation>> chapter.
2309e5c31af7Sopenharmony_ci
2310e5c31af7Sopenharmony_ci.Valid Usage
2311e5c31af7Sopenharmony_ci****
2312e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
2313e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyPipelineLayout-pipelineLayout-00299]]
2314e5c31af7Sopenharmony_ci    If sname:VkAllocationCallbacks were provided when pname:pipelineLayout
2315e5c31af7Sopenharmony_ci    was created, a compatible set of callbacks must: be provided here
2316e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyPipelineLayout-pipelineLayout-00300]]
2317e5c31af7Sopenharmony_ci    If no sname:VkAllocationCallbacks were provided when
2318e5c31af7Sopenharmony_ci    pname:pipelineLayout was created, pname:pAllocator must: be `NULL`
2319e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
2320e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyPipelineLayout-pipelineLayout-02004]]
2321e5c31af7Sopenharmony_ci    pname:pipelineLayout must: not have been passed to any ftext:vkCmd*
2322e5c31af7Sopenharmony_ci    command for any command buffers that are still in the
2323e5c31af7Sopenharmony_ci    <<commandbuffers-lifecycle, recording state>> when
2324e5c31af7Sopenharmony_ci    fname:vkDestroyPipelineLayout is called
2325e5c31af7Sopenharmony_ci****
2326e5c31af7Sopenharmony_ci
2327e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkDestroyPipelineLayout.adoc[]
2328e5c31af7Sopenharmony_ci--
2329e5c31af7Sopenharmony_ci
2330e5c31af7Sopenharmony_ci
2331e5c31af7Sopenharmony_ci[[descriptorsets-compatibility]]
2332e5c31af7Sopenharmony_ci==== Pipeline Layout Compatibility
2333e5c31af7Sopenharmony_ci
2334e5c31af7Sopenharmony_ciTwo pipeline layouts are defined to be "`compatible for
2335e5c31af7Sopenharmony_ci<<descriptorsets-push-constants, push constants>>`" if they were created
2336e5c31af7Sopenharmony_ciwith identical push constant ranges.
2337e5c31af7Sopenharmony_ciTwo pipeline layouts are defined to be "`compatible for set N`" if they were
2338e5c31af7Sopenharmony_cicreated with _identically defined_ descriptor set layouts for sets zero
2339e5c31af7Sopenharmony_cithrough N,
2340e5c31af7Sopenharmony_ciifdef::VK_EXT_graphics_pipeline_library[]
2341e5c31af7Sopenharmony_ciif both of them either were or were not created with
2342e5c31af7Sopenharmony_ciename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT,
2343e5c31af7Sopenharmony_ciendif::VK_EXT_graphics_pipeline_library[]
2344e5c31af7Sopenharmony_ciand if they were created with identical push constant ranges.
2345e5c31af7Sopenharmony_ci
2346e5c31af7Sopenharmony_ciWhen binding a descriptor set (see <<descriptorsets-binding, Descriptor Set
2347e5c31af7Sopenharmony_ciBinding>>) to set number N, a previously bound descriptor set bound with
2348e5c31af7Sopenharmony_cilower index M than N is disturbed if the pipeline layouts for set M and N
2349e5c31af7Sopenharmony_ciare not compatible for set M. Otherwise, the bound descriptor set in M is
2350e5c31af7Sopenharmony_cinot disturbed.
2351e5c31af7Sopenharmony_ci
2352e5c31af7Sopenharmony_ciIf, additionally, the previously bound descriptor set for set N was bound
2353e5c31af7Sopenharmony_ciusing a pipeline layout not compatible for set N, then all bindings in sets
2354e5c31af7Sopenharmony_cinumbered greater than N are disturbed.
2355e5c31af7Sopenharmony_ci
2356e5c31af7Sopenharmony_ciWhen binding a pipeline, the pipeline can: correctly access any previously
2357e5c31af7Sopenharmony_cibound descriptor set N if it was bound with compatible pipeline layout for
2358e5c31af7Sopenharmony_ciset N, and it was not disturbed.
2359e5c31af7Sopenharmony_ci
2360e5c31af7Sopenharmony_ciLayout compatibility means that descriptor sets can: be bound to a command
2361e5c31af7Sopenharmony_cibuffer for use by any pipeline created with a compatible pipeline layout,
2362e5c31af7Sopenharmony_ciand without having bound a particular pipeline first.
2363e5c31af7Sopenharmony_ciIt also means that descriptor sets can: remain valid across a pipeline
2364e5c31af7Sopenharmony_cichange, and the same resources will be accessible to the newly bound
2365e5c31af7Sopenharmony_cipipeline.
2366e5c31af7Sopenharmony_ci
2367e5c31af7Sopenharmony_ciWhen a descriptor set is disturbed by binding descriptor sets, the disturbed
2368e5c31af7Sopenharmony_ciset is considered to contain undefined: descriptors bound with the same
2369e5c31af7Sopenharmony_cipipeline layout as the disturbing descriptor set.
2370e5c31af7Sopenharmony_ci
2371e5c31af7Sopenharmony_ciifdef::implementation-guide[]
2372e5c31af7Sopenharmony_ci.Implementor's Note
2373e5c31af7Sopenharmony_ci****
2374e5c31af7Sopenharmony_ciA consequence of layout compatibility is that when the implementation
2375e5c31af7Sopenharmony_cicompiles a pipeline layout and maps pipeline resources to implementation
2376e5c31af7Sopenharmony_ciresources, the mechanism for set N should: only be a function of sets
2377e5c31af7Sopenharmony_ci[0..N].
2378e5c31af7Sopenharmony_ci****
2379e5c31af7Sopenharmony_ciendif::implementation-guide[]
2380e5c31af7Sopenharmony_ci
2381e5c31af7Sopenharmony_ci
2382e5c31af7Sopenharmony_ci[NOTE]
2383e5c31af7Sopenharmony_ci.Note
2384e5c31af7Sopenharmony_ci====
2385e5c31af7Sopenharmony_ciPlace the least frequently changing descriptor sets near the start of the
2386e5c31af7Sopenharmony_cipipeline layout, and place the descriptor sets representing the most
2387e5c31af7Sopenharmony_cifrequently changing resources near the end.
2388e5c31af7Sopenharmony_ciWhen pipelines are switched, only the descriptor set bindings that have been
2389e5c31af7Sopenharmony_ciinvalidated will need to be updated and the remainder of the descriptor set
2390e5c31af7Sopenharmony_cibindings will remain in place.
2391e5c31af7Sopenharmony_ci====
2392e5c31af7Sopenharmony_ci
2393e5c31af7Sopenharmony_ciThe maximum number of descriptor sets that can: be bound to a pipeline
2394e5c31af7Sopenharmony_cilayout is queried from physical device properties (see
2395e5c31af7Sopenharmony_cipname:maxBoundDescriptorSets in <<limits, Limits>>).
2396e5c31af7Sopenharmony_ci
2397e5c31af7Sopenharmony_ci.API example
2398e5c31af7Sopenharmony_ci[source,c++]
2399e5c31af7Sopenharmony_ci----
2400e5c31af7Sopenharmony_ciconst VkDescriptorSetLayout layouts[] = { layout1, layout2 };
2401e5c31af7Sopenharmony_ci
2402e5c31af7Sopenharmony_ciconst VkPushConstantRange ranges[] =
2403e5c31af7Sopenharmony_ci{
2404e5c31af7Sopenharmony_ci    {
2405e5c31af7Sopenharmony_ci        .stageFlags = VK_SHADER_STAGE_VERTEX_BIT,
2406e5c31af7Sopenharmony_ci        .offset = 0,
2407e5c31af7Sopenharmony_ci        .size = 4
2408e5c31af7Sopenharmony_ci    },
2409e5c31af7Sopenharmony_ci    {
2410e5c31af7Sopenharmony_ci        .stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT,
2411e5c31af7Sopenharmony_ci        .offset = 4,
2412e5c31af7Sopenharmony_ci        .size = 4
2413e5c31af7Sopenharmony_ci    },
2414e5c31af7Sopenharmony_ci};
2415e5c31af7Sopenharmony_ci
2416e5c31af7Sopenharmony_ciconst VkPipelineLayoutCreateInfo createInfo =
2417e5c31af7Sopenharmony_ci{
2418e5c31af7Sopenharmony_ci    .sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO,
2419e5c31af7Sopenharmony_ci    .pNext = NULL,
2420e5c31af7Sopenharmony_ci    .flags = 0,
2421e5c31af7Sopenharmony_ci    .setLayoutCount = 2,
2422e5c31af7Sopenharmony_ci    .pSetLayouts = layouts,
2423e5c31af7Sopenharmony_ci    .pushConstantRangeCount = 2,
2424e5c31af7Sopenharmony_ci    .pPushConstantRanges = ranges
2425e5c31af7Sopenharmony_ci};
2426e5c31af7Sopenharmony_ci
2427e5c31af7Sopenharmony_ciVkPipelineLayout myPipelineLayout;
2428e5c31af7Sopenharmony_cimyResult = vkCreatePipelineLayout(
2429e5c31af7Sopenharmony_ci    myDevice,
2430e5c31af7Sopenharmony_ci    &createInfo,
2431e5c31af7Sopenharmony_ci    NULL,
2432e5c31af7Sopenharmony_ci    &myPipelineLayout);
2433e5c31af7Sopenharmony_ci----
2434e5c31af7Sopenharmony_ci
2435e5c31af7Sopenharmony_ci
2436e5c31af7Sopenharmony_ci[[descriptorsets-allocation]]
2437e5c31af7Sopenharmony_ci=== Allocation of Descriptor Sets
2438e5c31af7Sopenharmony_ci
2439e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorPool',desc='Opaque handle to a descriptor pool object',type='handles']
2440e5c31af7Sopenharmony_ci--
2441e5c31af7Sopenharmony_ciA _descriptor pool_ maintains a pool of descriptors, from which descriptor
2442e5c31af7Sopenharmony_cisets are allocated.
2443e5c31af7Sopenharmony_ciDescriptor pools are externally synchronized, meaning that the application
2444e5c31af7Sopenharmony_cimust: not allocate and/or free descriptor sets from the same pool in
2445e5c31af7Sopenharmony_cimultiple threads simultaneously.
2446e5c31af7Sopenharmony_ci
2447e5c31af7Sopenharmony_ciDescriptor pools are represented by sname:VkDescriptorPool handles:
2448e5c31af7Sopenharmony_ci
2449e5c31af7Sopenharmony_ciinclude::{generated}/api/handles/VkDescriptorPool.adoc[]
2450e5c31af7Sopenharmony_ci--
2451e5c31af7Sopenharmony_ci
2452e5c31af7Sopenharmony_ci[open,refpage='vkCreateDescriptorPool',desc='Creates a descriptor pool object',type='protos']
2453e5c31af7Sopenharmony_ci--
2454e5c31af7Sopenharmony_ci:refpage: vkCreateDescriptorPool
2455e5c31af7Sopenharmony_ci:objectnameplural: descriptor pools
2456e5c31af7Sopenharmony_ci:objectnamecamelcase: descriptorPool
2457e5c31af7Sopenharmony_ci:objectcount: 1
2458e5c31af7Sopenharmony_ci
2459e5c31af7Sopenharmony_ciTo create a descriptor pool object, call:
2460e5c31af7Sopenharmony_ci
2461e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCreateDescriptorPool.adoc[]
2462e5c31af7Sopenharmony_ci
2463e5c31af7Sopenharmony_ci  * pname:device is the logical device that creates the descriptor pool.
2464e5c31af7Sopenharmony_ci  * pname:pCreateInfo is a pointer to a slink:VkDescriptorPoolCreateInfo
2465e5c31af7Sopenharmony_ci    structure specifying the state of the descriptor pool object.
2466e5c31af7Sopenharmony_ci  * pname:pAllocator controls host memory allocation as described in the
2467e5c31af7Sopenharmony_ci    <<memory-allocation, Memory Allocation>> chapter.
2468e5c31af7Sopenharmony_ci  * pname:pDescriptorPool is a pointer to a slink:VkDescriptorPool handle in
2469e5c31af7Sopenharmony_ci    which the resulting descriptor pool object is returned.
2470e5c31af7Sopenharmony_ci
2471e5c31af7Sopenharmony_ciThe created descriptor pool is returned in pname:pDescriptorPool.
2472e5c31af7Sopenharmony_ci
2473e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/no_dynamic_allocations_common.adoc[]
2474e5c31af7Sopenharmony_ci
2475e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
2476e5c31af7Sopenharmony_ci.Valid Usage
2477e5c31af7Sopenharmony_ci****
2478e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/memory_reservation_request_count_common.adoc[]
2479e5c31af7Sopenharmony_ci****
2480e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
2481e5c31af7Sopenharmony_ci
2482e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCreateDescriptorPool.adoc[]
2483e5c31af7Sopenharmony_ci--
2484e5c31af7Sopenharmony_ci
2485e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorPoolCreateInfo',desc='Structure specifying parameters of a newly created descriptor pool',type='structs']
2486e5c31af7Sopenharmony_ci--
2487e5c31af7Sopenharmony_ciAdditional information about the pool is passed in a
2488e5c31af7Sopenharmony_cisname:VkDescriptorPoolCreateInfo structure:
2489e5c31af7Sopenharmony_ci
2490e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDescriptorPoolCreateInfo.adoc[]
2491e5c31af7Sopenharmony_ci
2492e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
2493e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
2494e5c31af7Sopenharmony_ci    structure.
2495e5c31af7Sopenharmony_ci  * pname:flags is a bitmask of elink:VkDescriptorPoolCreateFlagBits
2496e5c31af7Sopenharmony_ci    specifying certain supported operations on the pool.
2497e5c31af7Sopenharmony_ci  * pname:maxSets is the maximum number of descriptor sets that can: be
2498e5c31af7Sopenharmony_ci    allocated from the pool.
2499e5c31af7Sopenharmony_ci  * pname:poolSizeCount is the number of elements in pname:pPoolSizes.
2500e5c31af7Sopenharmony_ci  * pname:pPoolSizes is a pointer to an array of slink:VkDescriptorPoolSize
2501e5c31af7Sopenharmony_ci    structures, each containing a descriptor type and number of descriptors
2502e5c31af7Sopenharmony_ci    of that type to be allocated in the pool.
2503e5c31af7Sopenharmony_ci
2504e5c31af7Sopenharmony_ciIf multiple sname:VkDescriptorPoolSize structures containing the same
2505e5c31af7Sopenharmony_cidescriptor type appear in the pname:pPoolSizes array then the pool will be
2506e5c31af7Sopenharmony_cicreated with enough storage for the total number of descriptors of each
2507e5c31af7Sopenharmony_citype.
2508e5c31af7Sopenharmony_ci
2509e5c31af7Sopenharmony_ciFragmentation of a descriptor pool is possible and may: lead to descriptor
2510e5c31af7Sopenharmony_ciset allocation failures.
2511e5c31af7Sopenharmony_ciA failure due to fragmentation is defined as failing a descriptor set
2512e5c31af7Sopenharmony_ciallocation despite the sum of all outstanding descriptor set allocations
2513e5c31af7Sopenharmony_cifrom the pool plus the requested allocation requiring no more than the total
2514e5c31af7Sopenharmony_cinumber of descriptors requested at pool creation.
2515e5c31af7Sopenharmony_ciImplementations provide certain guarantees of when fragmentation must: not
2516e5c31af7Sopenharmony_cicause allocation failure, as described below.
2517e5c31af7Sopenharmony_ci
2518e5c31af7Sopenharmony_ciIf a descriptor pool has not had any descriptor sets freed since it was
2519e5c31af7Sopenharmony_cicreated or most recently reset then fragmentation must: not cause an
2520e5c31af7Sopenharmony_ciallocation failure (note that this is always the case for a pool created
2521e5c31af7Sopenharmony_ciwithout the ename:VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT bit
2522e5c31af7Sopenharmony_ciset).
2523e5c31af7Sopenharmony_ciAdditionally, if all sets allocated from the pool since it was created or
2524e5c31af7Sopenharmony_cimost recently reset use the same number of descriptors (of each type) and
2525e5c31af7Sopenharmony_cithe requested allocation also uses that same number of descriptors (of each
2526e5c31af7Sopenharmony_citype), then fragmentation must: not cause an allocation failure.
2527e5c31af7Sopenharmony_ci
2528e5c31af7Sopenharmony_ciIf an allocation failure occurs due to fragmentation, an application can:
2529e5c31af7Sopenharmony_cicreate an additional descriptor pool to perform further descriptor set
2530e5c31af7Sopenharmony_ciallocations.
2531e5c31af7Sopenharmony_ci
2532e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
2533e5c31af7Sopenharmony_ciIf pname:flags has the ename:VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT
2534e5c31af7Sopenharmony_cibit set, descriptor pool creation may: fail with the error
2535e5c31af7Sopenharmony_ciename:VK_ERROR_FRAGMENTATION if the total number of descriptors across all
2536e5c31af7Sopenharmony_cipools (including this one) created with this bit set exceeds
2537e5c31af7Sopenharmony_cipname:maxUpdateAfterBindDescriptorsInAllPools, or if fragmentation of the
2538e5c31af7Sopenharmony_ciunderlying hardware resources occurs.
2539e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
2540e5c31af7Sopenharmony_ci
2541e5c31af7Sopenharmony_ciifdef::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
2542e5c31af7Sopenharmony_ciIf a pname:pPoolSizes[i]::pname:type is
2543e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT, a
2544e5c31af7Sopenharmony_cislink:VkMutableDescriptorTypeCreateInfoEXT struct in the pname:pNext chain
2545e5c31af7Sopenharmony_cican: be used to specify which mutable descriptor types can: be allocated
2546e5c31af7Sopenharmony_cifrom the pool.
2547e5c31af7Sopenharmony_ciIf included in the pname:pNext chain,
2548e5c31af7Sopenharmony_cislink:VkMutableDescriptorTypeCreateInfoEXT::pname:pMutableDescriptorTypeLists[i]
2549e5c31af7Sopenharmony_cispecifies which kind of ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT descriptors
2550e5c31af7Sopenharmony_cican: be allocated from this pool entry.
2551e5c31af7Sopenharmony_ciIf slink:VkMutableDescriptorTypeCreateInfoEXT does not exist in the
2552e5c31af7Sopenharmony_cipname:pNext chain, or
2553e5c31af7Sopenharmony_cislink:VkMutableDescriptorTypeCreateInfoEXT::pname:pMutableDescriptorTypeLists[i]
2554e5c31af7Sopenharmony_ciis out of range, the descriptor pool allocates enough memory to be able to
2555e5c31af7Sopenharmony_ciallocate a ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT descriptor with any
2556e5c31af7Sopenharmony_cisupported elink:VkDescriptorType as a mutable descriptor.
2557e5c31af7Sopenharmony_ciA mutable descriptor can: be allocated from a pool entry if the type list in
2558e5c31af7Sopenharmony_cislink:VkDescriptorSetLayoutCreateInfo is a subset of the type list declared
2559e5c31af7Sopenharmony_ciin the descriptor pool, or if the pool entry is created without a descriptor
2560e5c31af7Sopenharmony_citype list.
2561e5c31af7Sopenharmony_ciMultiple pname:pPoolSizes entries with ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT
2562e5c31af7Sopenharmony_cican: be declared.
2563e5c31af7Sopenharmony_ciWhen multiple such pool entries are present in pname:pPoolSizes, they
2564e5c31af7Sopenharmony_cispecify sets of supported descriptor types which either fully overlap,
2565e5c31af7Sopenharmony_cipartially overlap, or are disjoint.
2566e5c31af7Sopenharmony_ciTwo sets fully overlap if the sets of supported descriptor types are equal.
2567e5c31af7Sopenharmony_ciIf the sets are not disjoint they partially overlap.
2568e5c31af7Sopenharmony_ciA pool entry without a sname:VkMutableDescriptorTypeListEXT assigned to it
2569e5c31af7Sopenharmony_ciis considered to partially overlap any other pool entry which has a
2570e5c31af7Sopenharmony_cisname:VkMutableDescriptorTypeListEXT assigned to it.
2571e5c31af7Sopenharmony_ciThe application must: ensure that partial overlap does not exist in
2572e5c31af7Sopenharmony_cipname:pPoolSizes.
2573e5c31af7Sopenharmony_ci
2574e5c31af7Sopenharmony_ci[NOTE]
2575e5c31af7Sopenharmony_ci.Note
2576e5c31af7Sopenharmony_ci====
2577e5c31af7Sopenharmony_ciThe requirement of no partial overlap is intended to resolve ambiguity for
2578e5c31af7Sopenharmony_civalidation as there is no confusion which pname:pPoolSizes entries will be
2579e5c31af7Sopenharmony_ciallocated from.
2580e5c31af7Sopenharmony_ciAn implementation is not expected to depend on this requirement.
2581e5c31af7Sopenharmony_ci====
2582e5c31af7Sopenharmony_ciendif::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
2583e5c31af7Sopenharmony_ci
2584e5c31af7Sopenharmony_ci.Valid Usage
2585e5c31af7Sopenharmony_ci****
2586e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorPoolCreateInfo-descriptorPoolOverallocation-09227]]
2587e5c31af7Sopenharmony_ciifdef::VK_NV_descriptor_pool_overallocation[]
2588e5c31af7Sopenharmony_ci    If the <<features-descriptorPoolOverallocation,
2589e5c31af7Sopenharmony_ci    pname:descriptorPoolOverallocation>> feature is not enabled, or
2590e5c31af7Sopenharmony_ci    pname:flags does not have
2591e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_POOL_CREATE_ALLOW_OVERALLOCATION_SETS_BIT_NV set,
2592e5c31af7Sopenharmony_ciendif::VK_NV_descriptor_pool_overallocation[]
2593e5c31af7Sopenharmony_ci    pname:maxSets must: be greater than `0`
2594e5c31af7Sopenharmony_ciifdef::VK_NV_descriptor_pool_overallocation[]
2595e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorPoolCreateInfo-flags-09228]]
2596e5c31af7Sopenharmony_ci    If pname:flags has the
2597e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_POOL_CREATE_ALLOW_OVERALLOCATION_SETS_BIT_NV or
2598e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_POOL_CREATE_ALLOW_OVERALLOCATION_POOLS_BIT_NV bits
2599e5c31af7Sopenharmony_ci    set, then <<features-descriptorPoolOverallocation,
2600e5c31af7Sopenharmony_ci    pname:descriptorPoolOverallocation>> must: be enabled
2601e5c31af7Sopenharmony_ciendif::VK_NV_descriptor_pool_overallocation[]
2602e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
2603e5c31af7Sopenharmony_ciifdef::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
2604e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorPoolCreateInfo-flags-04607]]
2605e5c31af7Sopenharmony_ci    If pname:flags has the ename:VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT
2606e5c31af7Sopenharmony_ci    bit set, then the ename:VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT
2607e5c31af7Sopenharmony_ci    bit must: not be set
2608e5c31af7Sopenharmony_ciendif::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
2609e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
2610e5c31af7Sopenharmony_ciifdef::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
2611e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorPoolCreateInfo-mutableDescriptorType-04608]]
2612e5c31af7Sopenharmony_ci    If
2613e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT::pname:mutableDescriptorType
2614e5c31af7Sopenharmony_ci    is not enabled, pname:pPoolSizes must: not contain a
2615e5c31af7Sopenharmony_ci    pname:descriptorType of ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT
2616e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorPoolCreateInfo-flags-04609]]
2617e5c31af7Sopenharmony_ci    If pname:flags has the ename:VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT
2618e5c31af7Sopenharmony_ci    bit set,
2619e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT::pname:mutableDescriptorType
2620e5c31af7Sopenharmony_ci    must: be enabled
2621e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorPoolCreateInfo-pPoolSizes-04787]]
2622e5c31af7Sopenharmony_ci    If pname:pPoolSizes contains a pname:descriptorType of
2623e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT, any other
2624e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT element in pname:pPoolSizes must:
2625e5c31af7Sopenharmony_ci    not have sets of supported descriptor types which partially overlap
2626e5c31af7Sopenharmony_ciendif::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
2627e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
2628e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorPoolCreateInfo-pPoolSizes-09424]]
2629e5c31af7Sopenharmony_ci    If pname:pPoolSizes contains a pname:descriptorType of
2630e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, the pname:pNext chain
2631e5c31af7Sopenharmony_ci    must: include a slink:VkDescriptorPoolInlineUniformBlockCreateInfo
2632e5c31af7Sopenharmony_ci    structure whose pname:maxInlineUniformBlockBindings member is not zero
2633e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
2634e5c31af7Sopenharmony_ci****
2635e5c31af7Sopenharmony_ci
2636e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDescriptorPoolCreateInfo.adoc[]
2637e5c31af7Sopenharmony_ci--
2638e5c31af7Sopenharmony_ci
2639e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
2640e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorPoolInlineUniformBlockCreateInfo',desc='Structure specifying the maximum number of inline uniform block bindings of a newly created descriptor pool',type='structs',alias='VkDescriptorPoolInlineUniformBlockCreateInfoEXT']
2641e5c31af7Sopenharmony_ci--
2642e5c31af7Sopenharmony_ciIn order to be able to allocate descriptor sets having
2643e5c31af7Sopenharmony_ci<<descriptorsets-inlineuniformblock, inline uniform block>> bindings the
2644e5c31af7Sopenharmony_cidescriptor pool must: be created with specifying the inline uniform block
2645e5c31af7Sopenharmony_cibinding capacity of the descriptor pool, in addition to the total inline
2646e5c31af7Sopenharmony_ciuniform data capacity in bytes which is specified through a
2647e5c31af7Sopenharmony_cislink:VkDescriptorPoolSize structure with a pname:descriptorType value of
2648e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK.
2649e5c31af7Sopenharmony_ciThis can: be done by adding a
2650e5c31af7Sopenharmony_cisname:VkDescriptorPoolInlineUniformBlockCreateInfo structure to the
2651e5c31af7Sopenharmony_cipname:pNext chain of slink:VkDescriptorPoolCreateInfo.
2652e5c31af7Sopenharmony_ci
2653e5c31af7Sopenharmony_ciThe sname:VkDescriptorPoolInlineUniformBlockCreateInfo structure is defined
2654e5c31af7Sopenharmony_cias:
2655e5c31af7Sopenharmony_ci
2656e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDescriptorPoolInlineUniformBlockCreateInfo.adoc[]
2657e5c31af7Sopenharmony_ci
2658e5c31af7Sopenharmony_ciifdef::VK_EXT_inline_uniform_block[]
2659e5c31af7Sopenharmony_cior the equivalent
2660e5c31af7Sopenharmony_ci
2661e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDescriptorPoolInlineUniformBlockCreateInfoEXT.adoc[]
2662e5c31af7Sopenharmony_ciendif::VK_EXT_inline_uniform_block[]
2663e5c31af7Sopenharmony_ci
2664e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
2665e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
2666e5c31af7Sopenharmony_ci    structure.
2667e5c31af7Sopenharmony_ci  * pname:maxInlineUniformBlockBindings is the number of inline uniform
2668e5c31af7Sopenharmony_ci    block bindings to allocate.
2669e5c31af7Sopenharmony_ci
2670e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDescriptorPoolInlineUniformBlockCreateInfo.adoc[]
2671e5c31af7Sopenharmony_ci--
2672e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
2673e5c31af7Sopenharmony_ci
2674e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorPoolCreateFlagBits',desc='Bitmask specifying certain supported operations on a descriptor pool',type='enums']
2675e5c31af7Sopenharmony_ci--
2676e5c31af7Sopenharmony_ciBits which can: be set in slink:VkDescriptorPoolCreateInfo::pname:flags,
2677e5c31af7Sopenharmony_cienabling operations on a descriptor pool, are:
2678e5c31af7Sopenharmony_ci
2679e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkDescriptorPoolCreateFlagBits.adoc[]
2680e5c31af7Sopenharmony_ci
2681e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT specifies that
2682e5c31af7Sopenharmony_ci    descriptor sets can: return their individual allocations to the pool,
2683e5c31af7Sopenharmony_ci    i.e. all of flink:vkAllocateDescriptorSets, flink:vkFreeDescriptorSets,
2684e5c31af7Sopenharmony_ci    and flink:vkResetDescriptorPool are allowed.
2685e5c31af7Sopenharmony_ci    Otherwise, descriptor sets allocated from the pool must: not be
2686e5c31af7Sopenharmony_ci    individually freed back to the pool, i.e. only
2687e5c31af7Sopenharmony_ci    flink:vkAllocateDescriptorSets and flink:vkResetDescriptorPool are
2688e5c31af7Sopenharmony_ci    allowed.
2689e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
2690e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT specifies that
2691e5c31af7Sopenharmony_ci    descriptor sets allocated from this pool can: include bindings with the
2692e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT bit set.
2693e5c31af7Sopenharmony_ci    It is valid to allocate descriptor sets that have bindings that do not
2694e5c31af7Sopenharmony_ci    set the ename:VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT bit from a
2695e5c31af7Sopenharmony_ci    pool that has ename:VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT set.
2696e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
2697e5c31af7Sopenharmony_ciifdef::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
2698e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT specifies that this
2699e5c31af7Sopenharmony_ci    descriptor pool and the descriptor sets allocated from it reside
2700e5c31af7Sopenharmony_ci    entirely in host memory and cannot be bound.
2701e5c31af7Sopenharmony_ci    Similar to descriptor sets allocated without this flag, applications
2702e5c31af7Sopenharmony_ci    can: copy-from and copy-to descriptors sets allocated from this
2703e5c31af7Sopenharmony_ci    descriptor pool.
2704e5c31af7Sopenharmony_ci    Descriptor sets allocated from this pool are partially exempt from the
2705e5c31af7Sopenharmony_ci    external synchronization requirement in
2706e5c31af7Sopenharmony_ciifdef::VK_KHR_descriptor_update_template[]
2707e5c31af7Sopenharmony_ci    flink:vkUpdateDescriptorSetWithTemplateKHR and
2708e5c31af7Sopenharmony_ciendif::VK_KHR_descriptor_update_template[]
2709e5c31af7Sopenharmony_ci    flink:vkUpdateDescriptorSets.
2710e5c31af7Sopenharmony_ci    Descriptor sets and their descriptors can be updated concurrently in
2711e5c31af7Sopenharmony_ci    different threads, though the same descriptor must: not be updated
2712e5c31af7Sopenharmony_ci    concurrently by two threads.
2713e5c31af7Sopenharmony_ciendif::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
2714e5c31af7Sopenharmony_ciifdef::VK_NV_descriptor_pool_overallocation[]
2715e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_POOL_CREATE_ALLOW_OVERALLOCATION_SETS_BIT_NV
2716e5c31af7Sopenharmony_ci    specifies that the implementation should allow the application to
2717e5c31af7Sopenharmony_ci    allocate more than slink:VkDescriptorPoolCreateInfo::pname:maxSets
2718e5c31af7Sopenharmony_ci    descriptor set objects from the descriptor pool as available resources
2719e5c31af7Sopenharmony_ci    allow.
2720e5c31af7Sopenharmony_ci    The implementation may: use the pname:maxSets value to allocate the
2721e5c31af7Sopenharmony_ci    initial available sets, but using zero is permitted.
2722e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_POOL_CREATE_ALLOW_OVERALLOCATION_POOLS_BIT_NV
2723e5c31af7Sopenharmony_ci    specifies that the implementation should allow the application to
2724e5c31af7Sopenharmony_ci    allocate more descriptors from the pool than was specified by the
2725e5c31af7Sopenharmony_ci    slink:VkDescriptorPoolSize::pname:descriptorCount for any descriptor
2726e5c31af7Sopenharmony_ci    type as specified by
2727e5c31af7Sopenharmony_ci    slink:VkDescriptorPoolCreateInfo::pname:poolSizeCount and
2728e5c31af7Sopenharmony_ci    slink:VkDescriptorPoolCreateInfo::pname:pPoolSizes, as available
2729e5c31af7Sopenharmony_ci    resources allow.
2730e5c31af7Sopenharmony_ci    The implementation may: use the pname:descriptorCount for each
2731e5c31af7Sopenharmony_ci    descriptor type to allocate the initial pool, but the application is
2732e5c31af7Sopenharmony_ci    allowed to set the pname:poolSizeCount to zero, or any of the
2733e5c31af7Sopenharmony_ci    pname:descriptorCount values in the pname:pPoolSizes array to zero.
2734e5c31af7Sopenharmony_ciendif::VK_NV_descriptor_pool_overallocation[]
2735e5c31af7Sopenharmony_ci--
2736e5c31af7Sopenharmony_ci
2737e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorPoolCreateFlags',desc='Bitmask of VkDescriptorPoolCreateFlagBits',type='flags']
2738e5c31af7Sopenharmony_ci--
2739e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkDescriptorPoolCreateFlags.adoc[]
2740e5c31af7Sopenharmony_ci
2741e5c31af7Sopenharmony_citname:VkDescriptorPoolCreateFlags is a bitmask type for setting a mask of
2742e5c31af7Sopenharmony_cizero or more elink:VkDescriptorPoolCreateFlagBits.
2743e5c31af7Sopenharmony_ci--
2744e5c31af7Sopenharmony_ci
2745e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorPoolSize',desc='Structure specifying descriptor pool size',type='structs']
2746e5c31af7Sopenharmony_ci--
2747e5c31af7Sopenharmony_ciThe sname:VkDescriptorPoolSize structure is defined as:
2748e5c31af7Sopenharmony_ci
2749e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDescriptorPoolSize.adoc[]
2750e5c31af7Sopenharmony_ci
2751e5c31af7Sopenharmony_ci  * pname:type is the type of descriptor.
2752e5c31af7Sopenharmony_ci  * pname:descriptorCount is the number of descriptors of that type to
2753e5c31af7Sopenharmony_ci    allocate.
2754e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
2755e5c31af7Sopenharmony_ci    If pname:type is ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK then
2756e5c31af7Sopenharmony_ci    pname:descriptorCount is the number of bytes to allocate for descriptors
2757e5c31af7Sopenharmony_ci    of this type.
2758e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
2759e5c31af7Sopenharmony_ci
2760e5c31af7Sopenharmony_ciifdef::VK_VULKAN_1_1,VK_KHR_sampler_ycbcr_conversion[]
2761e5c31af7Sopenharmony_ci[NOTE]
2762e5c31af7Sopenharmony_ci.Note
2763e5c31af7Sopenharmony_ci====
2764e5c31af7Sopenharmony_ciWhen creating a descriptor pool that will contain descriptors for combined
2765e5c31af7Sopenharmony_ciimage samplers of multi-planar formats, an application needs to account for
2766e5c31af7Sopenharmony_cinon-trivial descriptor consumption when choosing the pname:descriptorCount
2767e5c31af7Sopenharmony_civalue, as indicated by
2768e5c31af7Sopenharmony_cislink:VkSamplerYcbcrConversionImageFormatProperties::pname:combinedImageSamplerDescriptorCount.
2769e5c31af7Sopenharmony_ci
2770e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance6[]
2771e5c31af7Sopenharmony_ciFor simplicity the application can: use the
2772e5c31af7Sopenharmony_cislink:VkPhysicalDeviceMaintenance6PropertiesKHR::pname:maxCombinedImageSamplerDescriptorCount
2773e5c31af7Sopenharmony_ciproperty, which is sized to accommodate any and all
2774e5c31af7Sopenharmony_ci<<formats-requiring-sampler-ycbcr-conversion, formats that require a sampler
2775e5c31af7Sopenharmony_ci{YCbCr} conversion>> supported by the implementation.
2776e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance6[]
2777e5c31af7Sopenharmony_ci====
2778e5c31af7Sopenharmony_ciendif::VK_VULKAN_1_1,VK_KHR_sampler_ycbcr_conversion[]
2779e5c31af7Sopenharmony_ci
2780e5c31af7Sopenharmony_ci.Valid Usage
2781e5c31af7Sopenharmony_ci****
2782e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorPoolSize-descriptorCount-00302]]
2783e5c31af7Sopenharmony_ci    pname:descriptorCount must: be greater than `0`
2784e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
2785e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorPoolSize-type-02218]]
2786e5c31af7Sopenharmony_ci    If pname:type is ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK then
2787e5c31af7Sopenharmony_ci    pname:descriptorCount must: be a multiple of `4`
2788e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
2789e5c31af7Sopenharmony_ci****
2790e5c31af7Sopenharmony_ci
2791e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDescriptorPoolSize.adoc[]
2792e5c31af7Sopenharmony_ci--
2793e5c31af7Sopenharmony_ci
2794e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
2795e5c31af7Sopenharmony_ciifdef::hidden[]
2796e5c31af7Sopenharmony_ci// tag::scremoved[]
2797e5c31af7Sopenharmony_ci  * fname:vkDestroyDescriptorPool <<SCID-4>>
2798e5c31af7Sopenharmony_ci// end::scremoved[]
2799e5c31af7Sopenharmony_ciendif::hidden[]
2800e5c31af7Sopenharmony_ci
2801e5c31af7Sopenharmony_ciDescriptor pools cannot: be destroyed <<SCID-4>>.
2802e5c31af7Sopenharmony_ciIf
2803e5c31af7Sopenharmony_cislink:VkPhysicalDeviceVulkanSC10Properties::<<limits-deviceDestroyFreesMemory,pname:deviceDestroyFreesMemory>>
2804e5c31af7Sopenharmony_ciis ename:VK_TRUE, the memory is returned to the system when the device is
2805e5c31af7Sopenharmony_cidestroyed.
2806e5c31af7Sopenharmony_ci
2807e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
2808e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
2809e5c31af7Sopenharmony_ci
2810e5c31af7Sopenharmony_ci[open,refpage='vkDestroyDescriptorPool',desc='Destroy a descriptor pool object',type='protos']
2811e5c31af7Sopenharmony_ci--
2812e5c31af7Sopenharmony_ciTo destroy a descriptor pool, call:
2813e5c31af7Sopenharmony_ci
2814e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkDestroyDescriptorPool.adoc[]
2815e5c31af7Sopenharmony_ci
2816e5c31af7Sopenharmony_ci  * pname:device is the logical device that destroys the descriptor pool.
2817e5c31af7Sopenharmony_ci  * pname:descriptorPool is the descriptor pool to destroy.
2818e5c31af7Sopenharmony_ci  * pname:pAllocator controls host memory allocation as described in the
2819e5c31af7Sopenharmony_ci    <<memory-allocation, Memory Allocation>> chapter.
2820e5c31af7Sopenharmony_ci
2821e5c31af7Sopenharmony_ciWhen a pool is destroyed, all descriptor sets allocated from the pool are
2822e5c31af7Sopenharmony_ciimplicitly freed and become invalid.
2823e5c31af7Sopenharmony_ciDescriptor sets allocated from a given pool do not need to be freed before
2824e5c31af7Sopenharmony_cidestroying that descriptor pool.
2825e5c31af7Sopenharmony_ci
2826e5c31af7Sopenharmony_ci.Valid Usage
2827e5c31af7Sopenharmony_ci****
2828e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyDescriptorPool-descriptorPool-00303]]
2829e5c31af7Sopenharmony_ci    All submitted commands that refer to pname:descriptorPool (via any
2830e5c31af7Sopenharmony_ci    allocated descriptor sets) must: have completed execution
2831e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyDescriptorPool-descriptorPool-00304]]
2832e5c31af7Sopenharmony_ci    If sname:VkAllocationCallbacks were provided when pname:descriptorPool
2833e5c31af7Sopenharmony_ci    was created, a compatible set of callbacks must: be provided here
2834e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyDescriptorPool-descriptorPool-00305]]
2835e5c31af7Sopenharmony_ci    If no sname:VkAllocationCallbacks were provided when
2836e5c31af7Sopenharmony_ci    pname:descriptorPool was created, pname:pAllocator must: be `NULL`
2837e5c31af7Sopenharmony_ci****
2838e5c31af7Sopenharmony_ci
2839e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkDestroyDescriptorPool.adoc[]
2840e5c31af7Sopenharmony_ci--
2841e5c31af7Sopenharmony_ci
2842e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
2843e5c31af7Sopenharmony_ci
2844e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorSet',desc='Opaque handle to a descriptor set object',type='handles']
2845e5c31af7Sopenharmony_ci--
2846e5c31af7Sopenharmony_ciDescriptor sets are allocated from descriptor pool objects, and are
2847e5c31af7Sopenharmony_cirepresented by sname:VkDescriptorSet handles:
2848e5c31af7Sopenharmony_ci
2849e5c31af7Sopenharmony_ciinclude::{generated}/api/handles/VkDescriptorSet.adoc[]
2850e5c31af7Sopenharmony_ci--
2851e5c31af7Sopenharmony_ci
2852e5c31af7Sopenharmony_ci[open,refpage='vkAllocateDescriptorSets',desc='Allocate one or more descriptor sets',type='protos']
2853e5c31af7Sopenharmony_ci--
2854e5c31af7Sopenharmony_ci:refpage: vkAllocateDescriptorSets
2855e5c31af7Sopenharmony_ci:objectnameplural: descriptor sets
2856e5c31af7Sopenharmony_ci:objectnamecamelcase: descriptorSet
2857e5c31af7Sopenharmony_ci:objectcount: slink:VkDescriptorSetAllocateInfo::pname:descriptorSetCount
2858e5c31af7Sopenharmony_ci
2859e5c31af7Sopenharmony_ciTo allocate descriptor sets from a descriptor pool, call:
2860e5c31af7Sopenharmony_ci
2861e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkAllocateDescriptorSets.adoc[]
2862e5c31af7Sopenharmony_ci
2863e5c31af7Sopenharmony_ci  * pname:device is the logical device that owns the descriptor pool.
2864e5c31af7Sopenharmony_ci  * pname:pAllocateInfo is a pointer to a slink:VkDescriptorSetAllocateInfo
2865e5c31af7Sopenharmony_ci    structure describing parameters of the allocation.
2866e5c31af7Sopenharmony_ci  * pname:pDescriptorSets is a pointer to an array of slink:VkDescriptorSet
2867e5c31af7Sopenharmony_ci    handles in which the resulting descriptor set objects are returned.
2868e5c31af7Sopenharmony_ci
2869e5c31af7Sopenharmony_ciThe allocated descriptor sets are returned in pname:pDescriptorSets.
2870e5c31af7Sopenharmony_ci
2871e5c31af7Sopenharmony_ci[[descriptor-set-initial-state]]
2872e5c31af7Sopenharmony_ciWhen a descriptor set is allocated, the initial state is largely
2873e5c31af7Sopenharmony_ciuninitialized and all descriptors are undefined:, with the exception that
2874e5c31af7Sopenharmony_cisamplers with a non-null pname:pImmutableSamplers are initialized on
2875e5c31af7Sopenharmony_ciallocation.
2876e5c31af7Sopenharmony_ciDescriptors also become undefined: if the underlying resource or view object
2877e5c31af7Sopenharmony_ciis destroyed.
2878e5c31af7Sopenharmony_ciDescriptor sets containing undefined: descriptors can: still be bound and
2879e5c31af7Sopenharmony_ciused, subject to the following conditions:
2880e5c31af7Sopenharmony_ci
2881e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
2882e5c31af7Sopenharmony_ci  * For descriptor set bindings created with the
2883e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT bit set, all descriptors
2884e5c31af7Sopenharmony_ci    in that binding that are dynamically used must: have been populated
2885e5c31af7Sopenharmony_ci    before the descriptor set is <<descriptorsets-binding,consumed>>.
2886e5c31af7Sopenharmony_ci  * For descriptor set bindings created without the
2887e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT bit set, all descriptors
2888e5c31af7Sopenharmony_ci    in that binding that are statically used must: have been populated
2889e5c31af7Sopenharmony_ci    before the descriptor set is <<descriptorsets-binding,consumed>>.
2890e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
2891e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
2892e5c31af7Sopenharmony_ci  * Descriptors that are <<shaders-staticuse,statically used>> must: have
2893e5c31af7Sopenharmony_ci    been populated before the descriptor set is
2894e5c31af7Sopenharmony_ci    <<descriptorsets-binding,consumed>>.
2895e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
2896e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
2897e5c31af7Sopenharmony_ci  * Descriptor bindings with descriptor type of
2898e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK can: be undefined: when
2899e5c31af7Sopenharmony_ci    the descriptor set is <<descriptorsets-binding,consumed>>; though values
2900e5c31af7Sopenharmony_ci    in that block will be undefined:.
2901e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
2902e5c31af7Sopenharmony_ci  * Entries that are not used by a pipeline can: have undefined:
2903e5c31af7Sopenharmony_ci    descriptors.
2904e5c31af7Sopenharmony_ci
2905e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance1[]
2906e5c31af7Sopenharmony_ciIf a call to fname:vkAllocateDescriptorSets would cause the total number of
2907e5c31af7Sopenharmony_cidescriptor sets allocated from the pool to exceed the value of
2908e5c31af7Sopenharmony_cislink:VkDescriptorPoolCreateInfo::pname:maxSets used to create
2909e5c31af7Sopenharmony_cipname:pAllocateInfo->descriptorPool, then the allocation may: fail due to
2910e5c31af7Sopenharmony_cilack of space in the descriptor pool.
2911e5c31af7Sopenharmony_ciSimilarly, the allocation may: fail due to lack of space if the call to
2912e5c31af7Sopenharmony_cifname:vkAllocateDescriptorSets would cause the number of any given
2913e5c31af7Sopenharmony_cidescriptor type to exceed the sum of all the pname:descriptorCount members
2914e5c31af7Sopenharmony_ciof each element of slink:VkDescriptorPoolCreateInfo::pname:pPoolSizes with a
2915e5c31af7Sopenharmony_cipname:type equal to that type.
2916e5c31af7Sopenharmony_ci
2917e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
2918e5c31af7Sopenharmony_ciAdditionally, the allocation may: also fail if a call to
2919e5c31af7Sopenharmony_cifname:vkAllocateDescriptorSets would cause the total number of inline
2920e5c31af7Sopenharmony_ciuniform block bindings allocated from the pool to exceed the value of
2921e5c31af7Sopenharmony_cislink:VkDescriptorPoolInlineUniformBlockCreateInfo::pname:maxInlineUniformBlockBindings
2922e5c31af7Sopenharmony_ciused to create the descriptor pool.
2923e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
2924e5c31af7Sopenharmony_ci
2925e5c31af7Sopenharmony_ciIf the allocation fails due to no more space in the descriptor pool, and not
2926e5c31af7Sopenharmony_cibecause of system or device memory exhaustion, then
2927e5c31af7Sopenharmony_ciename:VK_ERROR_OUT_OF_POOL_MEMORY must: be returned.
2928e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance1[]
2929e5c31af7Sopenharmony_ci
2930e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_maintenance2[]
2931e5c31af7Sopenharmony_ciIf an allocation fails due to fragmentation, an indeterminate error is
2932e5c31af7Sopenharmony_cireturned with an unspecified error code.
2933e5c31af7Sopenharmony_ciAny returned error other than
2934e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance1[]
2935e5c31af7Sopenharmony_ciename:VK_ERROR_OUT_OF_POOL_MEMORY or
2936e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance1[]
2937e5c31af7Sopenharmony_ciename:VK_ERROR_FRAGMENTED_POOL does not imply its usual meaning:
2938e5c31af7Sopenharmony_ciapplications should: assume that the allocation failed due to fragmentation,
2939e5c31af7Sopenharmony_ciand create a new descriptor pool.
2940e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
2941e5c31af7Sopenharmony_ci
2942e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance1[]
2943e5c31af7Sopenharmony_cifname:vkAllocateDescriptorSets can: be used to create multiple descriptor
2944e5c31af7Sopenharmony_cisets.
2945e5c31af7Sopenharmony_ciIf the creation of any of those descriptor sets fails, then the
2946e5c31af7Sopenharmony_ciimplementation must: destroy all successfully created descriptor set objects
2947e5c31af7Sopenharmony_cifrom this command, set all entries of the pname:pDescriptorSets array to
2948e5c31af7Sopenharmony_cidlink:VK_NULL_HANDLE and return the error.
2949e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance1[]
2950e5c31af7Sopenharmony_ci
2951e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_maintenance2[]
2952e5c31af7Sopenharmony_ci[NOTE]
2953e5c31af7Sopenharmony_ci.Note
2954e5c31af7Sopenharmony_ci====
2955e5c31af7Sopenharmony_ciApplications should: check for a negative return value when allocating new
2956e5c31af7Sopenharmony_cidescriptor sets, assume that any error
2957e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance1[]
2958e5c31af7Sopenharmony_ciother than ename:VK_ERROR_OUT_OF_POOL_MEMORY
2959e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance1[]
2960e5c31af7Sopenharmony_cieffectively means ename:VK_ERROR_FRAGMENTED_POOL, and try to create a new
2961e5c31af7Sopenharmony_cidescriptor pool.
2962e5c31af7Sopenharmony_ciIf ename:VK_ERROR_FRAGMENTED_POOL is the actual return value, it adds
2963e5c31af7Sopenharmony_cicertainty to that decision.
2964e5c31af7Sopenharmony_ci
2965e5c31af7Sopenharmony_ciThe reason for this is that ename:VK_ERROR_FRAGMENTED_POOL was only added in
2966e5c31af7Sopenharmony_cia later version of the 1.0 specification, and so drivers may: return other
2967e5c31af7Sopenharmony_cierrors if they were written against earlier versions.
2968e5c31af7Sopenharmony_ciTo ensure full compatibility with earlier patch versions, these other errors
2969e5c31af7Sopenharmony_ciare allowed.
2970e5c31af7Sopenharmony_ci====
2971e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
2972e5c31af7Sopenharmony_ci
2973e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/no_dynamic_allocations_common.adoc[]
2974e5c31af7Sopenharmony_ci
2975e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
2976e5c31af7Sopenharmony_ci.Valid Usage
2977e5c31af7Sopenharmony_ci****
2978e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/memory_reservation_request_count_common.adoc[]
2979e5c31af7Sopenharmony_ci****
2980e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
2981e5c31af7Sopenharmony_ci
2982e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkAllocateDescriptorSets.adoc[]
2983e5c31af7Sopenharmony_ci--
2984e5c31af7Sopenharmony_ci
2985e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorSetAllocateInfo',desc='Structure specifying the allocation parameters for descriptor sets',type='structs']
2986e5c31af7Sopenharmony_ci--
2987e5c31af7Sopenharmony_ciThe sname:VkDescriptorSetAllocateInfo structure is defined as:
2988e5c31af7Sopenharmony_ci
2989e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDescriptorSetAllocateInfo.adoc[]
2990e5c31af7Sopenharmony_ci
2991e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
2992e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
2993e5c31af7Sopenharmony_ci    structure.
2994e5c31af7Sopenharmony_ci  * pname:descriptorPool is the pool which the sets will be allocated from.
2995e5c31af7Sopenharmony_ci  * pname:descriptorSetCount determines the number of descriptor sets to be
2996e5c31af7Sopenharmony_ci    allocated from the pool.
2997e5c31af7Sopenharmony_ci  * pname:pSetLayouts is a pointer to an array of descriptor set layouts,
2998e5c31af7Sopenharmony_ci    with each member specifying how the corresponding descriptor set is
2999e5c31af7Sopenharmony_ci    allocated.
3000e5c31af7Sopenharmony_ci
3001e5c31af7Sopenharmony_ci.Valid Usage
3002e5c31af7Sopenharmony_ci****
3003e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
3004e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetAllocateInfo-apiVersion-07895]]
3005e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance1[]
3006e5c31af7Sopenharmony_ci    If the apiext:VK_KHR_maintenance1 extension is not enabled and
3007e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceProperties::pname:apiVersion is less than Vulkan
3008e5c31af7Sopenharmony_ci    1.1,
3009e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance1[]
3010e5c31af7Sopenharmony_ci    pname:descriptorSetCount must: not be greater than the number of sets
3011e5c31af7Sopenharmony_ci    that are currently available for allocation in pname:descriptorPool
3012e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetAllocateInfo-apiVersion-07896]]
3013e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance1[]
3014e5c31af7Sopenharmony_ci    If the apiext:VK_KHR_maintenance1 extension is not enabled and
3015e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceProperties::pname:apiVersion is less than Vulkan
3016e5c31af7Sopenharmony_ci    1.1,
3017e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance1[]
3018e5c31af7Sopenharmony_ci    pname:descriptorPool must: have enough free descriptor capacity
3019e5c31af7Sopenharmony_ci    remaining to allocate the descriptor sets of the specified layouts
3020e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
3021e5c31af7Sopenharmony_ciifdef::VK_KHR_push_descriptor[]
3022e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetAllocateInfo-pSetLayouts-00308]]
3023e5c31af7Sopenharmony_ci    Each element of pname:pSetLayouts must: not have been created with
3024e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR set
3025e5c31af7Sopenharmony_ciendif::VK_KHR_push_descriptor[]
3026e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
3027e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetAllocateInfo-pSetLayouts-03044]]
3028e5c31af7Sopenharmony_ci    If any element of pname:pSetLayouts was created with the
3029e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit
3030e5c31af7Sopenharmony_ci    set, pname:descriptorPool must: have been created with the
3031e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT flag set
3032e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetAllocateInfo-pSetLayouts-09380]]
3033e5c31af7Sopenharmony_ci    If pname:pSetLayouts[i] was created with an element of
3034e5c31af7Sopenharmony_ci    pname:pBindingFlags that includes
3035e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT, and
3036e5c31af7Sopenharmony_ci    slink:VkDescriptorSetVariableDescriptorCountAllocateInfo is included in
3037e5c31af7Sopenharmony_ci    the pname:pNext chain, and
3038e5c31af7Sopenharmony_ci    sname:VkDescriptorSetVariableDescriptorCountAllocateInfo::pname:descriptorSetCount
3039e5c31af7Sopenharmony_ci    is not zero, then
3040e5c31af7Sopenharmony_ci    slink:VkDescriptorSetVariableDescriptorCountAllocateInfo::pname:pDescriptorCounts[i]
3041e5c31af7Sopenharmony_ci    must: be less than or equal to
3042e5c31af7Sopenharmony_ci    slink:VkDescriptorSetLayoutBinding::pname:descriptorCount for the
3043e5c31af7Sopenharmony_ci    corresponding binding used to create pname:pSetLayouts[i]
3044e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
3045e5c31af7Sopenharmony_ciifdef::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
3046e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetAllocateInfo-pSetLayouts-04610]]
3047e5c31af7Sopenharmony_ci    If any element of pname:pSetLayouts was created with the
3048e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXT bit set,
3049e5c31af7Sopenharmony_ci    pname:descriptorPool must: have been created with the
3050e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT flag set
3051e5c31af7Sopenharmony_ciendif::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
3052e5c31af7Sopenharmony_ciifdef::VK_EXT_descriptor_buffer[]
3053e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetAllocateInfo-pSetLayouts-08009]]
3054e5c31af7Sopenharmony_ci    Each element of pname:pSetLayouts must: not have been created with the
3055e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT bit set
3056e5c31af7Sopenharmony_ciendif::VK_EXT_descriptor_buffer[]
3057e5c31af7Sopenharmony_ci****
3058e5c31af7Sopenharmony_ci
3059e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDescriptorSetAllocateInfo.adoc[]
3060e5c31af7Sopenharmony_ci--
3061e5c31af7Sopenharmony_ci
3062e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
3063e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorSetVariableDescriptorCountAllocateInfo',desc='Structure specifying additional allocation parameters for descriptor sets',type='structs',alias='VkDescriptorSetVariableDescriptorCountAllocateInfoEXT']
3064e5c31af7Sopenharmony_ci--
3065e5c31af7Sopenharmony_ciIf the pname:pNext chain of a slink:VkDescriptorSetAllocateInfo structure
3066e5c31af7Sopenharmony_ciincludes a sname:VkDescriptorSetVariableDescriptorCountAllocateInfo
3067e5c31af7Sopenharmony_cistructure, then that structure includes an array of descriptor counts for
3068e5c31af7Sopenharmony_civariable-sized descriptor bindings, one for each descriptor set being
3069e5c31af7Sopenharmony_ciallocated.
3070e5c31af7Sopenharmony_ci
3071e5c31af7Sopenharmony_ciThe sname:VkDescriptorSetVariableDescriptorCountAllocateInfo structure is
3072e5c31af7Sopenharmony_cidefined as:
3073e5c31af7Sopenharmony_ci
3074e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDescriptorSetVariableDescriptorCountAllocateInfo.adoc[]
3075e5c31af7Sopenharmony_ci
3076e5c31af7Sopenharmony_ciifdef::VK_EXT_descriptor_indexing[]
3077e5c31af7Sopenharmony_cior the equivalent
3078e5c31af7Sopenharmony_ci
3079e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDescriptorSetVariableDescriptorCountAllocateInfoEXT.adoc[]
3080e5c31af7Sopenharmony_ciendif::VK_EXT_descriptor_indexing[]
3081e5c31af7Sopenharmony_ci
3082e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
3083e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
3084e5c31af7Sopenharmony_ci    structure.
3085e5c31af7Sopenharmony_ci  * pname:descriptorSetCount is zero or the number of elements in
3086e5c31af7Sopenharmony_ci    pname:pDescriptorCounts.
3087e5c31af7Sopenharmony_ci  * pname:pDescriptorCounts is a pointer to an array of descriptor counts,
3088e5c31af7Sopenharmony_ci    with each member specifying the number of descriptors in a
3089e5c31af7Sopenharmony_ci    variable-sized descriptor binding in the corresponding descriptor set
3090e5c31af7Sopenharmony_ci    being allocated.
3091e5c31af7Sopenharmony_ci
3092e5c31af7Sopenharmony_ciIf pname:descriptorSetCount is zero or this structure is not included in the
3093e5c31af7Sopenharmony_cipname:pNext chain, then the variable lengths are considered to be zero.
3094e5c31af7Sopenharmony_ciOtherwise, pname:pDescriptorCounts[i] is the number of descriptors in the
3095e5c31af7Sopenharmony_civariable-sized descriptor binding in the corresponding descriptor set
3096e5c31af7Sopenharmony_cilayout.
3097e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
3098e5c31af7Sopenharmony_ciIf the variable-sized descriptor binding in the corresponding descriptor set
3099e5c31af7Sopenharmony_cilayout has a descriptor type of
3100e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK then
3101e5c31af7Sopenharmony_cipname:pDescriptorCounts[i] specifies the binding's capacity in bytes.
3102e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
3103e5c31af7Sopenharmony_ciIf slink:VkDescriptorSetAllocateInfo::pname:pSetLayouts[i] does not include
3104e5c31af7Sopenharmony_cia variable-sized descriptor binding, then pname:pDescriptorCounts[i] is
3105e5c31af7Sopenharmony_ciignored.
3106e5c31af7Sopenharmony_ci
3107e5c31af7Sopenharmony_ci.Valid Usage
3108e5c31af7Sopenharmony_ci****
3109e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetVariableDescriptorCountAllocateInfo-descriptorSetCount-03045]]
3110e5c31af7Sopenharmony_ci    If pname:descriptorSetCount is not zero, pname:descriptorSetCount must:
3111e5c31af7Sopenharmony_ci    equal slink:VkDescriptorSetAllocateInfo::pname:descriptorSetCount
3112e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorSetVariableDescriptorCountAllocateInfo-pSetLayouts-03046]]
3113e5c31af7Sopenharmony_ci    If slink:VkDescriptorSetAllocateInfo::pname:pSetLayouts[i] has a
3114e5c31af7Sopenharmony_ci    variable-sized descriptor binding, then pname:pDescriptorCounts[i] must:
3115e5c31af7Sopenharmony_ci    be less than or equal to the descriptor count specified for that binding
3116e5c31af7Sopenharmony_ci    when the descriptor set layout was created
3117e5c31af7Sopenharmony_ci****
3118e5c31af7Sopenharmony_ci
3119e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDescriptorSetVariableDescriptorCountAllocateInfo.adoc[]
3120e5c31af7Sopenharmony_ci--
3121e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
3122e5c31af7Sopenharmony_ci
3123e5c31af7Sopenharmony_ci[open,refpage='vkFreeDescriptorSets',desc='Free one or more descriptor sets',type='protos']
3124e5c31af7Sopenharmony_ci--
3125e5c31af7Sopenharmony_ciTo free allocated descriptor sets, call:
3126e5c31af7Sopenharmony_ci
3127e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkFreeDescriptorSets.adoc[]
3128e5c31af7Sopenharmony_ci
3129e5c31af7Sopenharmony_ci  * pname:device is the logical device that owns the descriptor pool.
3130e5c31af7Sopenharmony_ci  * pname:descriptorPool is the descriptor pool from which the descriptor
3131e5c31af7Sopenharmony_ci    sets were allocated.
3132e5c31af7Sopenharmony_ci  * pname:descriptorSetCount is the number of elements in the
3133e5c31af7Sopenharmony_ci    pname:pDescriptorSets array.
3134e5c31af7Sopenharmony_ci  * pname:pDescriptorSets is a pointer to an array of handles to
3135e5c31af7Sopenharmony_ci    slink:VkDescriptorSet objects.
3136e5c31af7Sopenharmony_ci
3137e5c31af7Sopenharmony_ciAfter calling fname:vkFreeDescriptorSets, all descriptor sets in
3138e5c31af7Sopenharmony_cipname:pDescriptorSets are invalid.
3139e5c31af7Sopenharmony_ci
3140e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
3141e5c31af7Sopenharmony_ciIf <<limits-recycleDescriptorSetMemory,recycleDescriptorSetMemory>> is
3142e5c31af7Sopenharmony_ciename:VK_FALSE, then freeing a descriptor set does not make the pool memory
3143e5c31af7Sopenharmony_ciit used available to be reallocated until the descriptor pool is reset.
3144e5c31af7Sopenharmony_ciIf <<limits-recycleDescriptorSetMemory,recycleDescriptorSetMemory>> is
3145e5c31af7Sopenharmony_ciename:VK_TRUE, then the memory is available to be reallocated immediately
3146e5c31af7Sopenharmony_ciafter freeing the descriptor set.
3147e5c31af7Sopenharmony_ciifdef::hidden[]
3148e5c31af7Sopenharmony_ci// tag::scdeviation[]
3149e5c31af7Sopenharmony_ci  * If <<limits-recycleDescriptorSetMemory,recycleDescriptorSetMemory>> is
3150e5c31af7Sopenharmony_ci    ename:VK_FALSE, then freeing a descriptor set does not make the pool
3151e5c31af7Sopenharmony_ci    memory it used available to be reallocated until the descriptor pool is
3152e5c31af7Sopenharmony_ci    reset <<SCID-4>>.
3153e5c31af7Sopenharmony_ci// end::scdeviation[]
3154e5c31af7Sopenharmony_ciendif::hidden[]
3155e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
3156e5c31af7Sopenharmony_ci
3157e5c31af7Sopenharmony_ci.Valid Usage
3158e5c31af7Sopenharmony_ci****
3159e5c31af7Sopenharmony_ci  * [[VUID-vkFreeDescriptorSets-pDescriptorSets-00309]]
3160e5c31af7Sopenharmony_ci    All submitted commands that refer to any element of
3161e5c31af7Sopenharmony_ci    pname:pDescriptorSets must: have completed execution
3162e5c31af7Sopenharmony_ci  * [[VUID-vkFreeDescriptorSets-pDescriptorSets-00310]]
3163e5c31af7Sopenharmony_ci    pname:pDescriptorSets must: be a valid pointer to an array of
3164e5c31af7Sopenharmony_ci    pname:descriptorSetCount sname:VkDescriptorSet handles, each element of
3165e5c31af7Sopenharmony_ci    which must: either be a valid handle or dlink:VK_NULL_HANDLE
3166e5c31af7Sopenharmony_ci  * [[VUID-vkFreeDescriptorSets-descriptorPool-00312]]
3167e5c31af7Sopenharmony_ci    pname:descriptorPool must: have been created with the
3168e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT flag
3169e5c31af7Sopenharmony_ci****
3170e5c31af7Sopenharmony_ci
3171e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkFreeDescriptorSets.adoc[]
3172e5c31af7Sopenharmony_ci--
3173e5c31af7Sopenharmony_ci
3174e5c31af7Sopenharmony_ci[open,refpage='vkResetDescriptorPool',desc='Resets a descriptor pool object',type='protos']
3175e5c31af7Sopenharmony_ci--
3176e5c31af7Sopenharmony_ciTo return all descriptor sets allocated from a given pool to the pool,
3177e5c31af7Sopenharmony_cirather than freeing individual descriptor sets, call:
3178e5c31af7Sopenharmony_ci
3179e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkResetDescriptorPool.adoc[]
3180e5c31af7Sopenharmony_ci
3181e5c31af7Sopenharmony_ci  * pname:device is the logical device that owns the descriptor pool.
3182e5c31af7Sopenharmony_ci  * pname:descriptorPool is the descriptor pool to be reset.
3183e5c31af7Sopenharmony_ci  * pname:flags is reserved for future use.
3184e5c31af7Sopenharmony_ci
3185e5c31af7Sopenharmony_ciResetting a descriptor pool recycles all of the resources from all of the
3186e5c31af7Sopenharmony_cidescriptor sets allocated from the descriptor pool back to the descriptor
3187e5c31af7Sopenharmony_cipool, and the descriptor sets are implicitly freed.
3188e5c31af7Sopenharmony_ci
3189e5c31af7Sopenharmony_ci.Valid Usage
3190e5c31af7Sopenharmony_ci****
3191e5c31af7Sopenharmony_ci  * [[VUID-vkResetDescriptorPool-descriptorPool-00313]]
3192e5c31af7Sopenharmony_ci    All uses of pname:descriptorPool (via any allocated descriptor sets)
3193e5c31af7Sopenharmony_ci    must: have completed execution
3194e5c31af7Sopenharmony_ci****
3195e5c31af7Sopenharmony_ci
3196e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkResetDescriptorPool.adoc[]
3197e5c31af7Sopenharmony_ci--
3198e5c31af7Sopenharmony_ci
3199e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorPoolResetFlags',desc='Reserved for future use',type='flags']
3200e5c31af7Sopenharmony_ci--
3201e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkDescriptorPoolResetFlags.adoc[]
3202e5c31af7Sopenharmony_ci
3203e5c31af7Sopenharmony_citname:VkDescriptorPoolResetFlags is a bitmask type for setting a mask, but
3204e5c31af7Sopenharmony_ciis currently reserved for future use.
3205e5c31af7Sopenharmony_ci--
3206e5c31af7Sopenharmony_ci
3207e5c31af7Sopenharmony_ci
3208e5c31af7Sopenharmony_ci[[descriptorsets-updates]]
3209e5c31af7Sopenharmony_ci=== Descriptor Set Updates
3210e5c31af7Sopenharmony_ci
3211e5c31af7Sopenharmony_ci[open,refpage='vkUpdateDescriptorSets',desc='Update the contents of a descriptor set object',type='protos']
3212e5c31af7Sopenharmony_ci--
3213e5c31af7Sopenharmony_ciOnce allocated, descriptor sets can: be updated with a combination of write
3214e5c31af7Sopenharmony_ciand copy operations.
3215e5c31af7Sopenharmony_ciTo update descriptor sets, call:
3216e5c31af7Sopenharmony_ci
3217e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkUpdateDescriptorSets.adoc[]
3218e5c31af7Sopenharmony_ci
3219e5c31af7Sopenharmony_ci  * pname:device is the logical device that updates the descriptor sets.
3220e5c31af7Sopenharmony_ci  * pname:descriptorWriteCount is the number of elements in the
3221e5c31af7Sopenharmony_ci    pname:pDescriptorWrites array.
3222e5c31af7Sopenharmony_ci  * pname:pDescriptorWrites is a pointer to an array of
3223e5c31af7Sopenharmony_ci    slink:VkWriteDescriptorSet structures describing the descriptor sets to
3224e5c31af7Sopenharmony_ci    write to.
3225e5c31af7Sopenharmony_ci  * pname:descriptorCopyCount is the number of elements in the
3226e5c31af7Sopenharmony_ci    pname:pDescriptorCopies array.
3227e5c31af7Sopenharmony_ci  * pname:pDescriptorCopies is a pointer to an array of
3228e5c31af7Sopenharmony_ci    slink:VkCopyDescriptorSet structures describing the descriptor sets to
3229e5c31af7Sopenharmony_ci    copy between.
3230e5c31af7Sopenharmony_ci
3231e5c31af7Sopenharmony_ciThe operations described by pname:pDescriptorWrites are performed first,
3232e5c31af7Sopenharmony_cifollowed by the operations described by pname:pDescriptorCopies.
3233e5c31af7Sopenharmony_ciWithin each array, the operations are performed in the order they appear in
3234e5c31af7Sopenharmony_cithe array.
3235e5c31af7Sopenharmony_ci
3236e5c31af7Sopenharmony_ciEach element in the pname:pDescriptorWrites array describes an operation
3237e5c31af7Sopenharmony_ciupdating the descriptor set using descriptors for resources specified in the
3238e5c31af7Sopenharmony_cistructure.
3239e5c31af7Sopenharmony_ci
3240e5c31af7Sopenharmony_ciEach element in the pname:pDescriptorCopies array is a
3241e5c31af7Sopenharmony_cislink:VkCopyDescriptorSet structure describing an operation copying
3242e5c31af7Sopenharmony_cidescriptors between sets.
3243e5c31af7Sopenharmony_ci
3244e5c31af7Sopenharmony_ciIf the pname:dstSet member of any element of pname:pDescriptorWrites or
3245e5c31af7Sopenharmony_cipname:pDescriptorCopies is bound, accessed, or modified by any command that
3246e5c31af7Sopenharmony_ciwas recorded to a command buffer which is currently in the
3247e5c31af7Sopenharmony_ci<<commandbuffers-lifecycle, recording or executable state>>,
3248e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
3249e5c31af7Sopenharmony_ciand any of the descriptor bindings that are updated were not created with
3250e5c31af7Sopenharmony_cithe ename:VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT or
3251e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT bits set,
3252e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
3253e5c31af7Sopenharmony_cithat command buffer becomes <<commandbuffers-lifecycle, invalid>>.
3254e5c31af7Sopenharmony_ci
3255e5c31af7Sopenharmony_ci.Valid Usage
3256e5c31af7Sopenharmony_ci****
3257e5c31af7Sopenharmony_ci  * [[VUID-vkUpdateDescriptorSets-pDescriptorWrites-06236]]
3258e5c31af7Sopenharmony_ci    For each element [eq]#i# where
3259e5c31af7Sopenharmony_ci    pname:pDescriptorWrites[i].pname:descriptorType is
3260e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER or
3261e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, elements of the
3262e5c31af7Sopenharmony_ci    pname:pTexelBufferView member of pname:pDescriptorWrites[i] must: have
3263e5c31af7Sopenharmony_ci    been created on pname:device
3264e5c31af7Sopenharmony_ci  * [[VUID-vkUpdateDescriptorSets-pDescriptorWrites-06237]]
3265e5c31af7Sopenharmony_ci    For each element [eq]#i# where
3266e5c31af7Sopenharmony_ci    pname:pDescriptorWrites[i].pname:descriptorType is
3267e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
3268e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
3269e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, or
3270e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, the pname:buffer member
3271e5c31af7Sopenharmony_ci    of any element of the pname:pBufferInfo member of
3272e5c31af7Sopenharmony_ci    pname:pDescriptorWrites[i] must: have been created on pname:device
3273e5c31af7Sopenharmony_ci  * [[VUID-vkUpdateDescriptorSets-pDescriptorWrites-06238]]
3274e5c31af7Sopenharmony_ci    For each element [eq]#i# where
3275e5c31af7Sopenharmony_ci    pname:pDescriptorWrites[i].pname:descriptorType is
3276e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_SAMPLER or
3277e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and pname:dstSet was
3278e5c31af7Sopenharmony_ci    not allocated with a layout that included immutable samplers for
3279e5c31af7Sopenharmony_ci    pname:dstBinding with pname:descriptorType, the pname:sampler member of
3280e5c31af7Sopenharmony_ci    any element of the pname:pImageInfo member of pname:pDescriptorWrites[i]
3281e5c31af7Sopenharmony_ci    must: have been created on pname:device
3282e5c31af7Sopenharmony_ci  * [[VUID-vkUpdateDescriptorSets-pDescriptorWrites-06239]]
3283e5c31af7Sopenharmony_ci    For each element [eq]#i# where
3284e5c31af7Sopenharmony_ci    pname:pDescriptorWrites[i].pname:descriptorType is
3285e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE,
3286e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE,
3287e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, or
3288e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER the pname:imageView
3289e5c31af7Sopenharmony_ci    member of any element of pname:pDescriptorWrites[i] must: have been
3290e5c31af7Sopenharmony_ci    created on pname:device
3291e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure[]
3292e5c31af7Sopenharmony_ci  * [[VUID-vkUpdateDescriptorSets-pDescriptorWrites-06240]]
3293e5c31af7Sopenharmony_ci    For each element [eq]#i# where
3294e5c31af7Sopenharmony_ci    pname:pDescriptorWrites[i].pname:descriptorType is
3295e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, elements of the
3296e5c31af7Sopenharmony_ci    pname:pAccelerationStructures member of a
3297e5c31af7Sopenharmony_ci    slink:VkWriteDescriptorSetAccelerationStructureKHR structure in the
3298e5c31af7Sopenharmony_ci    pname:pNext chain of pname:pDescriptorWrites[i] must: have been created
3299e5c31af7Sopenharmony_ci    on pname:device
3300e5c31af7Sopenharmony_ciendif::VK_KHR_acceleration_structure[]
3301e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing[]
3302e5c31af7Sopenharmony_ci  * [[VUID-vkUpdateDescriptorSets-pDescriptorWrites-06241]]
3303e5c31af7Sopenharmony_ci    For each element [eq]#i# where
3304e5c31af7Sopenharmony_ci    pname:pDescriptorWrites[i].pname:descriptorType is
3305e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV, elements of the
3306e5c31af7Sopenharmony_ci    pname:pAccelerationStructures member of a
3307e5c31af7Sopenharmony_ci    slink:VkWriteDescriptorSetAccelerationStructureNV structure in the
3308e5c31af7Sopenharmony_ci    pname:pNext chain of pname:pDescriptorWrites[i] must: have been created
3309e5c31af7Sopenharmony_ci    on pname:device
3310e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing[]
3311e5c31af7Sopenharmony_ciifdef::VK_QCOM_image_processing[]
3312e5c31af7Sopenharmony_ci  * [[VUID-vkUpdateDescriptorSets-pDescriptorWrites-06940]]
3313e5c31af7Sopenharmony_ci    For each element [eq]#i# where
3314e5c31af7Sopenharmony_ci    pname:pDescriptorWrites[i].pname:descriptorType is
3315e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM or
3316e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, the pname:imageView
3317e5c31af7Sopenharmony_ci    member of any element of pname:pDescriptorWrites[i] must: have been
3318e5c31af7Sopenharmony_ci    created on pname:device
3319e5c31af7Sopenharmony_ciendif::VK_QCOM_image_processing[]
3320e5c31af7Sopenharmony_ci  * [[VUID-vkUpdateDescriptorSets-pDescriptorWrites-06493]]
3321e5c31af7Sopenharmony_ci    For each element [eq]#i# where
3322e5c31af7Sopenharmony_ci    pname:pDescriptorWrites[i].pname:descriptorType is
3323e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_SAMPLER,
3324e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
3325e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE,
3326e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or
3327e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT,
3328e5c31af7Sopenharmony_ci    pname:pDescriptorWrites[i].pname:pImageInfo must: be a valid pointer to
3329e5c31af7Sopenharmony_ci    an array of pname:pDescriptorWrites[i].pname:descriptorCount valid
3330e5c31af7Sopenharmony_ci    sname:VkDescriptorImageInfo structures
3331e5c31af7Sopenharmony_ciifdef::VK_QCOM_image_processing[]
3332e5c31af7Sopenharmony_ci  * [[VUID-vkUpdateDescriptorSets-pDescriptorWrites-06941]]
3333e5c31af7Sopenharmony_ci    For each element [eq]#i# where
3334e5c31af7Sopenharmony_ci    pname:pDescriptorWrites[i].pname:descriptorType is
3335e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM or
3336e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM,
3337e5c31af7Sopenharmony_ci    pname:pDescriptorWrites[i].pname:pImageInfo must: be a valid pointer to
3338e5c31af7Sopenharmony_ci    an array of pname:pDescriptorWrites[i].pname:descriptorCount valid
3339e5c31af7Sopenharmony_ci    sname:VkDescriptorImageInfo structures
3340e5c31af7Sopenharmony_ciendif::VK_QCOM_image_processing[]
3341e5c31af7Sopenharmony_ci  * [[VUID-vkUpdateDescriptorSets-None-03047]]
3342e5c31af7Sopenharmony_ci    The pname:dstSet member of each element of pname:pDescriptorWrites or
3343e5c31af7Sopenharmony_ci    pname:pDescriptorCopies
3344e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
3345e5c31af7Sopenharmony_ci    for bindings which were created without the
3346e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT or
3347e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT bits set
3348e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
3349e5c31af7Sopenharmony_ci    must: not be used by any command that was recorded to a command buffer
3350e5c31af7Sopenharmony_ci    which is in the <<commandbuffers-lifecycle,pending state>>
3351e5c31af7Sopenharmony_ci  * [[VUID-vkUpdateDescriptorSets-pDescriptorWrites-06993]]
3352e5c31af7Sopenharmony_ci    Host access to pname:pDescriptorWrites[i].pname:dstSet and
3353e5c31af7Sopenharmony_ci    pname:pDescriptorCopies[i].pname:dstSet must: be
3354e5c31af7Sopenharmony_ci    <<fundamentals-threadingbehavior,externally synchronized>>
3355e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
3356e5c31af7Sopenharmony_ci    unless explicitly denoted otherwise for specific flags
3357e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
3358e5c31af7Sopenharmony_ci****
3359e5c31af7Sopenharmony_ci
3360e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkUpdateDescriptorSets.adoc[]
3361e5c31af7Sopenharmony_ci--
3362e5c31af7Sopenharmony_ci
3363e5c31af7Sopenharmony_ci[open,refpage='VkWriteDescriptorSet',desc='Structure specifying the parameters of a descriptor set write operation',type='structs']
3364e5c31af7Sopenharmony_ci--
3365e5c31af7Sopenharmony_ciThe sname:VkWriteDescriptorSet structure is defined as:
3366e5c31af7Sopenharmony_ci
3367e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkWriteDescriptorSet.adoc[]
3368e5c31af7Sopenharmony_ci
3369e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
3370e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
3371e5c31af7Sopenharmony_ci    structure.
3372e5c31af7Sopenharmony_ci  * pname:dstSet is the destination descriptor set to update.
3373e5c31af7Sopenharmony_ci  * pname:dstBinding is the descriptor binding within that set.
3374e5c31af7Sopenharmony_ci  * pname:dstArrayElement is the starting element in that array.
3375e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
3376e5c31af7Sopenharmony_ci    If the descriptor binding identified by pname:dstSet and
3377e5c31af7Sopenharmony_ci    pname:dstBinding has a descriptor type of
3378e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK then pname:dstArrayElement
3379e5c31af7Sopenharmony_ci    specifies the starting byte offset within the binding.
3380e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
3381e5c31af7Sopenharmony_ci  * pname:descriptorCount is the number of descriptors to update.
3382e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
3383e5c31af7Sopenharmony_ci    If the descriptor binding identified by pname:dstSet and
3384e5c31af7Sopenharmony_ci    pname:dstBinding has a descriptor type of
3385e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, then
3386e5c31af7Sopenharmony_ci    pname:descriptorCount specifies the number of bytes to update.
3387e5c31af7Sopenharmony_ci    Otherwise,
3388e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
3389e5c31af7Sopenharmony_ci    pname:descriptorCount is one of
3390e5c31af7Sopenharmony_ci  ** the number of elements in pname:pImageInfo
3391e5c31af7Sopenharmony_ci  ** the number of elements in pname:pBufferInfo
3392e5c31af7Sopenharmony_ci  ** the number of elements in pname:pTexelBufferView
3393e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
3394e5c31af7Sopenharmony_ci  ** a value matching the pname:dataSize member of a
3395e5c31af7Sopenharmony_ci     slink:VkWriteDescriptorSetInlineUniformBlock structure in the
3396e5c31af7Sopenharmony_ci     pname:pNext chain
3397e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
3398e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing,VK_KHR_acceleration_structure[]
3399e5c31af7Sopenharmony_ci  ** a value matching the pname:accelerationStructureCount of a
3400e5c31af7Sopenharmony_ci     slink:VkWriteDescriptorSetAccelerationStructureKHR structure in the
3401e5c31af7Sopenharmony_ci     pname:pNext chain
3402e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing,VK_KHR_acceleration_structure[]
3403e5c31af7Sopenharmony_ci  * pname:descriptorType is a elink:VkDescriptorType specifying the type of
3404e5c31af7Sopenharmony_ci    each descriptor in pname:pImageInfo, pname:pBufferInfo, or
3405e5c31af7Sopenharmony_ci    pname:pTexelBufferView, as described below.
3406e5c31af7Sopenharmony_ciifdef::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
3407e5c31af7Sopenharmony_ci    If sname:VkDescriptorSetLayoutBinding for pname:dstSet at
3408e5c31af7Sopenharmony_ci    pname:dstBinding is not equal to ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT,
3409e5c31af7Sopenharmony_ci    pname:descriptorType must:
3410e5c31af7Sopenharmony_ciendif::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
3411e5c31af7Sopenharmony_ciifndef::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
3412e5c31af7Sopenharmony_ci    It must:
3413e5c31af7Sopenharmony_ciendif::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
3414e5c31af7Sopenharmony_ci    be the same type as the pname:descriptorType specified in
3415e5c31af7Sopenharmony_ci    sname:VkDescriptorSetLayoutBinding for pname:dstSet at pname:dstBinding.
3416e5c31af7Sopenharmony_ci    The type of the descriptor also controls which array the descriptors are
3417e5c31af7Sopenharmony_ci    taken from.
3418e5c31af7Sopenharmony_ci  * pname:pImageInfo is a pointer to an array of slink:VkDescriptorImageInfo
3419e5c31af7Sopenharmony_ci    structures or is ignored, as described below.
3420e5c31af7Sopenharmony_ci  * pname:pBufferInfo is a pointer to an array of
3421e5c31af7Sopenharmony_ci    slink:VkDescriptorBufferInfo structures or is ignored, as described
3422e5c31af7Sopenharmony_ci    below.
3423e5c31af7Sopenharmony_ci  * pname:pTexelBufferView is a pointer to an array of slink:VkBufferView
3424e5c31af7Sopenharmony_ci    handles as described in the <<resources-buffer-views,Buffer Views>>
3425e5c31af7Sopenharmony_ci    section or is ignored, as described below.
3426e5c31af7Sopenharmony_ci
3427e5c31af7Sopenharmony_ciOnly one of pname:pImageInfo, pname:pBufferInfo, or pname:pTexelBufferView
3428e5c31af7Sopenharmony_cimembers is used according to the descriptor type specified in the
3429e5c31af7Sopenharmony_cipname:descriptorType member of the containing sname:VkWriteDescriptorSet
3430e5c31af7Sopenharmony_cistructure,
3431e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
3432e5c31af7Sopenharmony_cior none of them in case pname:descriptorType is
3433e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, in which case the source data
3434e5c31af7Sopenharmony_cifor the descriptor writes is taken from the
3435e5c31af7Sopenharmony_cislink:VkWriteDescriptorSetInlineUniformBlock structure included in the
3436e5c31af7Sopenharmony_cipname:pNext chain of sname:VkWriteDescriptorSet,
3437e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
3438e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure[]
3439e5c31af7Sopenharmony_cior if pname:descriptorType is
3440e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, in which case the
3441e5c31af7Sopenharmony_cisource data for the descriptor writes is taken from the
3442e5c31af7Sopenharmony_cislink:VkWriteDescriptorSetAccelerationStructureKHR structure in the
3443e5c31af7Sopenharmony_cipname:pNext chain of sname:VkWriteDescriptorSet,
3444e5c31af7Sopenharmony_ciendif::VK_KHR_acceleration_structure[]
3445e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing[]
3446e5c31af7Sopenharmony_cior if pname:descriptorType is
3447e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV, in which case the source
3448e5c31af7Sopenharmony_cidata for the descriptor writes is taken from the
3449e5c31af7Sopenharmony_cislink:VkWriteDescriptorSetAccelerationStructureNV structure in the
3450e5c31af7Sopenharmony_cipname:pNext chain of sname:VkWriteDescriptorSet,
3451e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing[]
3452e5c31af7Sopenharmony_cias specified below.
3453e5c31af7Sopenharmony_ci
3454e5c31af7Sopenharmony_ciifdef::VK_EXT_robustness2[]
3455e5c31af7Sopenharmony_ciIf the <<features-nullDescriptor, pname:nullDescriptor>> feature is enabled,
3456e5c31af7Sopenharmony_cithe buffer,
3457e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure[]
3458e5c31af7Sopenharmony_ciacceleration structure,
3459e5c31af7Sopenharmony_ciendif::VK_KHR_acceleration_structure[]
3460e5c31af7Sopenharmony_ciimageView, or bufferView can: be dlink:VK_NULL_HANDLE.
3461e5c31af7Sopenharmony_ciLoads from a null descriptor return zero values and stores and atomics to a
3462e5c31af7Sopenharmony_cinull descriptor are discarded.
3463e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure[]
3464e5c31af7Sopenharmony_ciA null acceleration structure descriptor results in the miss shader being
3465e5c31af7Sopenharmony_ciinvoked.
3466e5c31af7Sopenharmony_ciendif::VK_KHR_acceleration_structure[]
3467e5c31af7Sopenharmony_ciendif::VK_EXT_robustness2[]
3468e5c31af7Sopenharmony_ci
3469e5c31af7Sopenharmony_ciifdef::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
3470e5c31af7Sopenharmony_ciIf the destination descriptor is a mutable descriptor, the active descriptor
3471e5c31af7Sopenharmony_citype for the destination descriptor becomes pname:descriptorType.
3472e5c31af7Sopenharmony_ciendif::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
3473e5c31af7Sopenharmony_ci
3474e5c31af7Sopenharmony_ci[[descriptorsets-updates-consecutive, consecutive binding updates]]
3475e5c31af7Sopenharmony_ciIf the pname:dstBinding has fewer than pname:descriptorCount array elements
3476e5c31af7Sopenharmony_ciremaining starting from pname:dstArrayElement, then the remainder will be
3477e5c31af7Sopenharmony_ciused to update the subsequent binding - [eq]#pname:dstBinding+1# starting at
3478e5c31af7Sopenharmony_ciarray element zero.
3479e5c31af7Sopenharmony_ciIf a binding has a pname:descriptorCount of zero, it is skipped.
3480e5c31af7Sopenharmony_ciThis behavior applies recursively, with the update affecting consecutive
3481e5c31af7Sopenharmony_cibindings as needed to update all pname:descriptorCount descriptors.
3482e5c31af7Sopenharmony_ciConsecutive bindings must: have identical elink:VkDescriptorType,
3483e5c31af7Sopenharmony_citlink:VkShaderStageFlags,
3484e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
3485e5c31af7Sopenharmony_cielink:VkDescriptorBindingFlagBits,
3486e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
3487e5c31af7Sopenharmony_ciand immutable samplers references.
3488e5c31af7Sopenharmony_ciifdef::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
3489e5c31af7Sopenharmony_ciIn addition, if the elink:VkDescriptorType is
3490e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT, the supported descriptor types in
3491e5c31af7Sopenharmony_cislink:VkMutableDescriptorTypeCreateInfoEXT must: be equally defined.
3492e5c31af7Sopenharmony_ciendif::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
3493e5c31af7Sopenharmony_ci
3494e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
3495e5c31af7Sopenharmony_ci[NOTE]
3496e5c31af7Sopenharmony_ci.Note
3497e5c31af7Sopenharmony_ci====
3498e5c31af7Sopenharmony_ciThe same behavior applies to bindings with a descriptor type of
3499e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK where pname:descriptorCount
3500e5c31af7Sopenharmony_cispecifies the number of bytes to update while pname:dstArrayElement
3501e5c31af7Sopenharmony_cispecifies the starting byte offset, thus in this case if the
3502e5c31af7Sopenharmony_cipname:dstBinding has a smaller byte size than the sum of
3503e5c31af7Sopenharmony_cipname:dstArrayElement and pname:descriptorCount, then the remainder will be
3504e5c31af7Sopenharmony_ciused to update the subsequent binding - [eq]#pname:dstBinding+1# starting at
3505e5c31af7Sopenharmony_cioffset zero.
3506e5c31af7Sopenharmony_ciThis falls out as a special case of the above rule.
3507e5c31af7Sopenharmony_ci====
3508e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
3509e5c31af7Sopenharmony_ci
3510e5c31af7Sopenharmony_ci.Valid Usage
3511e5c31af7Sopenharmony_ci****
3512e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-dstBinding-00315]]
3513e5c31af7Sopenharmony_ci    pname:dstBinding must: be less than or equal to the maximum value of
3514e5c31af7Sopenharmony_ci    pname:binding of all slink:VkDescriptorSetLayoutBinding structures
3515e5c31af7Sopenharmony_ci    specified when pname:dstSet's descriptor set layout was created
3516e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-dstBinding-00316]]
3517e5c31af7Sopenharmony_ci    pname:dstBinding must: be a binding with a non-zero
3518e5c31af7Sopenharmony_ci    pname:descriptorCount
3519e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorCount-00317]]
3520e5c31af7Sopenharmony_ci    All consecutive bindings updated via a single sname:VkWriteDescriptorSet
3521e5c31af7Sopenharmony_ci    structure, except those with a pname:descriptorCount of zero, must: have
3522e5c31af7Sopenharmony_ci    identical pname:descriptorType and pname:stageFlags
3523e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorCount-00318]]
3524e5c31af7Sopenharmony_ci    All consecutive bindings updated via a single sname:VkWriteDescriptorSet
3525e5c31af7Sopenharmony_ci    structure, except those with a pname:descriptorCount of zero, must: all
3526e5c31af7Sopenharmony_ci    either use immutable samplers or must: all not use immutable samplers
3527e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-00319]]
3528e5c31af7Sopenharmony_ci    pname:descriptorType must: match the type of pname:dstBinding within
3529e5c31af7Sopenharmony_ci    pname:dstSet
3530e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-dstSet-00320]]
3531e5c31af7Sopenharmony_ci    pname:dstSet must: be a valid slink:VkDescriptorSet handle
3532e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-dstArrayElement-00321]]
3533e5c31af7Sopenharmony_ci    The sum of pname:dstArrayElement and pname:descriptorCount must: be less
3534e5c31af7Sopenharmony_ci    than or equal to the number of array elements in the descriptor set
3535e5c31af7Sopenharmony_ci    binding specified by pname:dstBinding, and all applicable consecutive
3536e5c31af7Sopenharmony_ci    bindings, as described by <<descriptorsets-updates-consecutive>>
3537e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
3538e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-02219]]
3539e5c31af7Sopenharmony_ci    If pname:descriptorType is
3540e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, pname:dstArrayElement
3541e5c31af7Sopenharmony_ci    must: be an integer multiple of `4`
3542e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-02220]]
3543e5c31af7Sopenharmony_ci    If pname:descriptorType is
3544e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, pname:descriptorCount
3545e5c31af7Sopenharmony_ci    must: be an integer multiple of `4`
3546e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
3547e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-02994]]
3548e5c31af7Sopenharmony_ci    If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER
3549e5c31af7Sopenharmony_ci    or ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, each element of
3550e5c31af7Sopenharmony_ci    pname:pTexelBufferView must: be either a valid sname:VkBufferView handle
3551e5c31af7Sopenharmony_ci    or dlink:VK_NULL_HANDLE
3552e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-02995]]
3553e5c31af7Sopenharmony_ci    If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER
3554e5c31af7Sopenharmony_ci    or ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER and the
3555e5c31af7Sopenharmony_ci    <<features-nullDescriptor, pname:nullDescriptor>> feature is not
3556e5c31af7Sopenharmony_ci    enabled, each element of pname:pTexelBufferView must: not be
3557e5c31af7Sopenharmony_ci    dlink:VK_NULL_HANDLE
3558e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-00324]]
3559e5c31af7Sopenharmony_ci    If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
3560e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
3561e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, or
3562e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, pname:pBufferInfo must:
3563e5c31af7Sopenharmony_ci    be a valid pointer to an array of pname:descriptorCount valid
3564e5c31af7Sopenharmony_ci    sname:VkDescriptorBufferInfo structures
3565e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-00325]]
3566e5c31af7Sopenharmony_ci    If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_SAMPLER or
3567e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and pname:dstSet was
3568e5c31af7Sopenharmony_ci    not allocated with a layout that included immutable samplers for
3569e5c31af7Sopenharmony_ci    pname:dstBinding with pname:descriptorType, the pname:sampler member of
3570e5c31af7Sopenharmony_ci    each element of pname:pImageInfo must: be a valid sname:VkSampler object
3571e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-02996]]
3572e5c31af7Sopenharmony_ci    If pname:descriptorType is
3573e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
3574e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, or
3575e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, the pname:imageView member of
3576e5c31af7Sopenharmony_ci    each element of pname:pImageInfo must: be either a valid
3577e5c31af7Sopenharmony_ci    sname:VkImageView handle or dlink:VK_NULL_HANDLE
3578e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-02997]]
3579e5c31af7Sopenharmony_ci    If pname:descriptorType is
3580e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
3581e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, or
3582e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, and the
3583e5c31af7Sopenharmony_ci    <<features-nullDescriptor, pname:nullDescriptor>> feature is not
3584e5c31af7Sopenharmony_ci    enabled, the pname:imageView member of each element of pname:pImageInfo
3585e5c31af7Sopenharmony_ci    must: not be dlink:VK_NULL_HANDLE
3586e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-07683]]
3587e5c31af7Sopenharmony_ci    If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT,
3588e5c31af7Sopenharmony_ci    the pname:imageView member of each element of pname:pImageInfo must: not
3589e5c31af7Sopenharmony_ci    be dlink:VK_NULL_HANDLE
3590e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
3591e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-02221]]
3592e5c31af7Sopenharmony_ci    If pname:descriptorType is
3593e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, the pname:pNext chain
3594e5c31af7Sopenharmony_ci    must: include a slink:VkWriteDescriptorSetInlineUniformBlock structure
3595e5c31af7Sopenharmony_ci    whose pname:dataSize member equals pname:descriptorCount
3596e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
3597e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure[]
3598e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-02382]]
3599e5c31af7Sopenharmony_ci    If pname:descriptorType is
3600e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, the pname:pNext
3601e5c31af7Sopenharmony_ci    chain must: include a slink:VkWriteDescriptorSetAccelerationStructureKHR
3602e5c31af7Sopenharmony_ci    structure whose pname:accelerationStructureCount member equals
3603e5c31af7Sopenharmony_ci    pname:descriptorCount
3604e5c31af7Sopenharmony_ciendif::VK_KHR_acceleration_structure[]
3605e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing[]
3606e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-03817]]
3607e5c31af7Sopenharmony_ci    If pname:descriptorType is
3608e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV, the pname:pNext
3609e5c31af7Sopenharmony_ci    chain must: include a slink:VkWriteDescriptorSetAccelerationStructureNV
3610e5c31af7Sopenharmony_ci    structure whose pname:accelerationStructureCount member equals
3611e5c31af7Sopenharmony_ci    pname:descriptorCount
3612e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing[]
3613e5c31af7Sopenharmony_ciifdef::VK_VULKAN_1_1,VK_KHR_sampler_ycbcr_conversion[]
3614e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-01946]]
3615e5c31af7Sopenharmony_ci    If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, then
3616e5c31af7Sopenharmony_ci    the pname:imageView member of each pname:pImageInfo element must: have
3617e5c31af7Sopenharmony_ci    been created without a sname:VkSamplerYcbcrConversionInfo structure in
3618e5c31af7Sopenharmony_ci    its pname:pNext chain
3619e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-02738]]
3620e5c31af7Sopenharmony_ci    If pname:descriptorType is
3621e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and if any element of
3622e5c31af7Sopenharmony_ci    pname:pImageInfo has a pname:imageView member that was created with a
3623e5c31af7Sopenharmony_ci    sname:VkSamplerYcbcrConversionInfo structure in its pname:pNext chain,
3624e5c31af7Sopenharmony_ci    then pname:dstSet must: have been allocated with a layout that included
3625e5c31af7Sopenharmony_ci    immutable samplers for pname:dstBinding, and the corresponding immutable
3626e5c31af7Sopenharmony_ci    sampler must: have been created with an _identically defined_
3627e5c31af7Sopenharmony_ci    sname:VkSamplerYcbcrConversionInfo object
3628e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-01948]]
3629e5c31af7Sopenharmony_ci    If pname:descriptorType is
3630e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and pname:dstSet was
3631e5c31af7Sopenharmony_ci    allocated with a layout that included immutable samplers for
3632e5c31af7Sopenharmony_ci    pname:dstBinding, then the pname:imageView member of each element of
3633e5c31af7Sopenharmony_ci    pname:pImageInfo which corresponds to an immutable sampler that enables
3634e5c31af7Sopenharmony_ci    <<samplers-YCbCr-conversion,sampler {YCbCr} conversion>> must: have been
3635e5c31af7Sopenharmony_ci    created with a sname:VkSamplerYcbcrConversionInfo structure in its
3636e5c31af7Sopenharmony_ci    pname:pNext chain with an _identically defined_
3637e5c31af7Sopenharmony_ci    sname:VkSamplerYcbcrConversionInfo to the corresponding immutable
3638e5c31af7Sopenharmony_ci    sampler
3639e5c31af7Sopenharmony_ciendif::VK_VULKAN_1_1,VK_KHR_sampler_ycbcr_conversion[]
3640e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-00327]]
3641e5c31af7Sopenharmony_ci    If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or
3642e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, the pname:offset member
3643e5c31af7Sopenharmony_ci    of each element of pname:pBufferInfo must: be a multiple of
3644e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:minUniformBufferOffsetAlignment
3645e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-00328]]
3646e5c31af7Sopenharmony_ci    If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or
3647e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, the pname:offset member
3648e5c31af7Sopenharmony_ci    of each element of pname:pBufferInfo must: be a multiple of
3649e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:minStorageBufferOffsetAlignment
3650e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-00329]]
3651e5c31af7Sopenharmony_ci    If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
3652e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC,
3653e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, or
3654e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, and the pname:buffer
3655e5c31af7Sopenharmony_ci    member of any element of pname:pBufferInfo is the handle of a non-sparse
3656e5c31af7Sopenharmony_ci    buffer, then that buffer must: be bound completely and contiguously to a
3657e5c31af7Sopenharmony_ci    single sname:VkDeviceMemory object
3658e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-00330]]
3659e5c31af7Sopenharmony_ci    If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or
3660e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, the pname:buffer member
3661e5c31af7Sopenharmony_ci    of each element of pname:pBufferInfo must: have been created with
3662e5c31af7Sopenharmony_ci    ename:VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT set
3663e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-00331]]
3664e5c31af7Sopenharmony_ci    If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or
3665e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, the pname:buffer member
3666e5c31af7Sopenharmony_ci    of each element of pname:pBufferInfo must: have been created with
3667e5c31af7Sopenharmony_ci    ename:VK_BUFFER_USAGE_STORAGE_BUFFER_BIT set
3668e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-00332]]
3669e5c31af7Sopenharmony_ci    If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or
3670e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, the pname:range member
3671e5c31af7Sopenharmony_ci    of each element of pname:pBufferInfo, or the
3672e5c31af7Sopenharmony_ci    <<buffer-info-effective-range,effective range>> if pname:range is
3673e5c31af7Sopenharmony_ci    ename:VK_WHOLE_SIZE, must: be less than or equal to
3674e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:maxUniformBufferRange
3675e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-00333]]
3676e5c31af7Sopenharmony_ci    If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or
3677e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, the pname:range member
3678e5c31af7Sopenharmony_ci    of each element of pname:pBufferInfo, or the
3679e5c31af7Sopenharmony_ci    <<buffer-info-effective-range,effective range>> if pname:range is
3680e5c31af7Sopenharmony_ci    ename:VK_WHOLE_SIZE, must: be less than or equal to
3681e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:maxStorageBufferRange
3682e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-08765]]
3683e5c31af7Sopenharmony_ci    If pname:descriptorType is
3684e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, the
3685e5c31af7Sopenharmony_ci    pname:pTexelBufferView <<resources-buffer-views-usage, buffer view
3686e5c31af7Sopenharmony_ci    usage>> must: include ename:VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT
3687e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-08766]]
3688e5c31af7Sopenharmony_ci    If pname:descriptorType is
3689e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, the
3690e5c31af7Sopenharmony_ci    pname:pTexelBufferView <<resources-buffer-views-usage, buffer view
3691e5c31af7Sopenharmony_ci    usage>> must: include ename:VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT
3692e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-00336]]
3693e5c31af7Sopenharmony_ci    If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE or
3694e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, the pname:imageView member of
3695e5c31af7Sopenharmony_ci    each element of pname:pImageInfo must: have been created with the
3696e5c31af7Sopenharmony_ci    <<resources-image-views-identity-mappings,identity swizzle>>
3697e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-00337]]
3698e5c31af7Sopenharmony_ci    If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE or
3699e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, the pname:imageView
3700e5c31af7Sopenharmony_ci    member of each element of pname:pImageInfo must: have been created with
3701e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_SAMPLED_BIT set
3702e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-04149]]
3703e5c31af7Sopenharmony_ci    If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE the
3704e5c31af7Sopenharmony_ci    pname:imageLayout member of each element of pname:pImageInfo must: be a
3705e5c31af7Sopenharmony_ci    member of the list given in <<descriptorsets-sampledimage, Sampled
3706e5c31af7Sopenharmony_ci    Image>>
3707e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-04150]]
3708e5c31af7Sopenharmony_ci    If pname:descriptorType is
3709e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER the pname:imageLayout
3710e5c31af7Sopenharmony_ci    member of each element of pname:pImageInfo must: be a member of the list
3711e5c31af7Sopenharmony_ci    given in <<descriptorsets-combinedimagesampler, Combined Image Sampler>>
3712e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-04151]]
3713e5c31af7Sopenharmony_ci    If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT the
3714e5c31af7Sopenharmony_ci    pname:imageLayout member of each element of pname:pImageInfo must: be a
3715e5c31af7Sopenharmony_ci    member of the list given in <<descriptorsets-inputattachment, Input
3716e5c31af7Sopenharmony_ci    Attachment>>
3717e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-04152]]
3718e5c31af7Sopenharmony_ci    If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE the
3719e5c31af7Sopenharmony_ci    pname:imageLayout member of each element of pname:pImageInfo must: be a
3720e5c31af7Sopenharmony_ci    member of the list given in <<descriptorsets-storageimage, Storage
3721e5c31af7Sopenharmony_ci    Image>>
3722e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-00338]]
3723e5c31af7Sopenharmony_ci    If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT,
3724e5c31af7Sopenharmony_ci    the pname:imageView member of each element of pname:pImageInfo must:
3725e5c31af7Sopenharmony_ci    have been created with ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT set
3726e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-00339]]
3727e5c31af7Sopenharmony_ci    If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, the
3728e5c31af7Sopenharmony_ci    pname:imageView member of each element of pname:pImageInfo must: have
3729e5c31af7Sopenharmony_ci    been created with ename:VK_IMAGE_USAGE_STORAGE_BIT set
3730e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-02752]]
3731e5c31af7Sopenharmony_ci    If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_SAMPLER, then
3732e5c31af7Sopenharmony_ci    pname:dstSet must: not have been allocated with a layout that included
3733e5c31af7Sopenharmony_ci    immutable samplers for pname:dstBinding
3734e5c31af7Sopenharmony_ciifdef::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
3735e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-dstSet-04611]]
3736e5c31af7Sopenharmony_ci    If the sname:VkDescriptorSetLayoutBinding for pname:dstSet at
3737e5c31af7Sopenharmony_ci    pname:dstBinding is ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT, the new active
3738e5c31af7Sopenharmony_ci    descriptor type pname:descriptorType must: exist in the corresponding
3739e5c31af7Sopenharmony_ci    pname:pMutableDescriptorTypeLists list for pname:dstBinding
3740e5c31af7Sopenharmony_ciendif::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
3741e5c31af7Sopenharmony_ciifdef::VK_EXT_image_view_min_lod[]
3742e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-06450]]
3743e5c31af7Sopenharmony_ci    If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT,
3744e5c31af7Sopenharmony_ci    the pname:imageView member of each element of pname:pImageInfo must:
3745e5c31af7Sopenharmony_ci    have either been created without a slink:VkImageViewMinLodCreateInfoEXT
3746e5c31af7Sopenharmony_ci    included in the pname:pNext chain or with a
3747e5c31af7Sopenharmony_ci    slink:VkImageViewMinLodCreateInfoEXT::pname:minLod of `0.0`
3748e5c31af7Sopenharmony_ciendif::VK_EXT_image_view_min_lod[]
3749e5c31af7Sopenharmony_ciifdef::VK_QCOM_image_processing[]
3750e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-06942]]
3751e5c31af7Sopenharmony_ci    If pname:descriptorType is
3752e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, the pname:imageView
3753e5c31af7Sopenharmony_ci    member of each element of pname:pImageInfo must: have been created with
3754e5c31af7Sopenharmony_ci    a view created with an pname:image created with
3755e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_SAMPLE_WEIGHT_BIT_QCOM
3756e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSet-descriptorType-06943]]
3757e5c31af7Sopenharmony_ci    If pname:descriptorType is
3758e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, the pname:imageView
3759e5c31af7Sopenharmony_ci    member of each element of pname:pImageInfo must: have been created with
3760e5c31af7Sopenharmony_ci    a view created with an pname:image created with
3761e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_SAMPLE_BLOCK_MATCH_BIT_QCOM
3762e5c31af7Sopenharmony_ciendif::VK_QCOM_image_processing[]
3763e5c31af7Sopenharmony_ci
3764e5c31af7Sopenharmony_ci
3765e5c31af7Sopenharmony_ci****
3766e5c31af7Sopenharmony_ci
3767e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkWriteDescriptorSet.adoc[]
3768e5c31af7Sopenharmony_ci--
3769e5c31af7Sopenharmony_ci
3770e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorType',desc='Specifies the type of a descriptor in a descriptor set',type='enums']
3771e5c31af7Sopenharmony_ci--
3772e5c31af7Sopenharmony_ciThe type of descriptors in a descriptor set is specified by
3773e5c31af7Sopenharmony_cislink:VkWriteDescriptorSet::pname:descriptorType, which must: be one of the
3774e5c31af7Sopenharmony_civalues:
3775e5c31af7Sopenharmony_ci
3776e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkDescriptorType.adoc[]
3777e5c31af7Sopenharmony_ci
3778e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_TYPE_SAMPLER specifies a <<descriptorsets-sampler,
3779e5c31af7Sopenharmony_ci    sampler descriptor>>.
3780e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER specifies a
3781e5c31af7Sopenharmony_ci    <<descriptorsets-combinedimagesampler, combined image sampler
3782e5c31af7Sopenharmony_ci    descriptor>>.
3783e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE specifies a
3784e5c31af7Sopenharmony_ci    <<descriptorsets-sampledimage, sampled image descriptor>>.
3785e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE specifies a
3786e5c31af7Sopenharmony_ci    <<descriptorsets-storageimage, storage image descriptor>>.
3787e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER specifies a
3788e5c31af7Sopenharmony_ci    <<descriptorsets-uniformtexelbuffer, uniform texel buffer descriptor>>.
3789e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER specifies a
3790e5c31af7Sopenharmony_ci    <<descriptorsets-storagetexelbuffer, storage texel buffer descriptor>>.
3791e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER specifies a
3792e5c31af7Sopenharmony_ci    <<descriptorsets-uniformbuffer, uniform buffer descriptor>>.
3793e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER specifies a
3794e5c31af7Sopenharmony_ci    <<descriptorsets-storagebuffer, storage buffer descriptor>>.
3795e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC specifies a
3796e5c31af7Sopenharmony_ci    <<descriptorsets-uniformbufferdynamic, dynamic uniform buffer
3797e5c31af7Sopenharmony_ci    descriptor>>.
3798e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC specifies a
3799e5c31af7Sopenharmony_ci    <<descriptorsets-storagebufferdynamic, dynamic storage buffer
3800e5c31af7Sopenharmony_ci    descriptor>>.
3801e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT specifies an
3802e5c31af7Sopenharmony_ci    <<descriptorsets-inputattachment, input attachment descriptor>>.
3803e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
3804e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK specifies an
3805e5c31af7Sopenharmony_ci    <<descriptorsets-inlineuniformblock, inline uniform block>>.
3806e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
3807e5c31af7Sopenharmony_ciifdef::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
3808e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT specifies a
3809e5c31af7Sopenharmony_ci    <<descriptorsets-mutable, descriptor of mutable type>>.
3810e5c31af7Sopenharmony_ciendif::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
3811e5c31af7Sopenharmony_ciifdef::VK_QCOM_image_processing[]
3812e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM specifies a
3813e5c31af7Sopenharmony_ci    <<descriptorsets-weightimage, sampled weight image descriptor>>.
3814e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM specifies a
3815e5c31af7Sopenharmony_ci    <<descriptorsets-blockmatch, block matching image descriptor>>.
3816e5c31af7Sopenharmony_ci
3817e5c31af7Sopenharmony_ciendif::VK_QCOM_image_processing[]
3818e5c31af7Sopenharmony_ci
3819e5c31af7Sopenharmony_ciWhen a descriptor set is updated via elements of slink:VkWriteDescriptorSet,
3820e5c31af7Sopenharmony_cimembers of pname:pImageInfo, pname:pBufferInfo and pname:pTexelBufferView
3821e5c31af7Sopenharmony_ciare only accessed by the implementation when they correspond to descriptor
3822e5c31af7Sopenharmony_citype being defined - otherwise they are ignored.
3823e5c31af7Sopenharmony_ciThe members accessed are as follows for each descriptor type:
3824e5c31af7Sopenharmony_ci
3825e5c31af7Sopenharmony_ci  * For ename:VK_DESCRIPTOR_TYPE_SAMPLER, only the pname:sampler member of
3826e5c31af7Sopenharmony_ci    each element of slink:VkWriteDescriptorSet::pname:pImageInfo is
3827e5c31af7Sopenharmony_ci    accessed.
3828e5c31af7Sopenharmony_ci  * For ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE,
3829e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or
3830e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, only the pname:imageView and
3831e5c31af7Sopenharmony_ci    pname:imageLayout members of each element of
3832e5c31af7Sopenharmony_ci    slink:VkWriteDescriptorSet::pname:pImageInfo are accessed.
3833e5c31af7Sopenharmony_ci  * For ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, all members of each
3834e5c31af7Sopenharmony_ci    element of slink:VkWriteDescriptorSet::pname:pImageInfo are accessed.
3835e5c31af7Sopenharmony_ci  * For ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
3836e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
3837e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, or
3838e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, all members of each
3839e5c31af7Sopenharmony_ci    element of slink:VkWriteDescriptorSet::pname:pBufferInfo are accessed.
3840e5c31af7Sopenharmony_ci  * For ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER or
3841e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, each element of
3842e5c31af7Sopenharmony_ci    slink:VkWriteDescriptorSet::pname:pTexelBufferView is accessed.
3843e5c31af7Sopenharmony_ci
3844e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
3845e5c31af7Sopenharmony_ciWhen updating descriptors with a pname:descriptorType of
3846e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, none of the pname:pImageInfo,
3847e5c31af7Sopenharmony_cipname:pBufferInfo, or pname:pTexelBufferView members are accessed, instead
3848e5c31af7Sopenharmony_cithe source data of the descriptor update operation is taken from the
3849e5c31af7Sopenharmony_cislink:VkWriteDescriptorSetInlineUniformBlock structure in the pname:pNext
3850e5c31af7Sopenharmony_cichain of sname:VkWriteDescriptorSet.
3851e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
3852e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure[]
3853e5c31af7Sopenharmony_ciWhen updating descriptors with a pname:descriptorType of
3854e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, none of the
3855e5c31af7Sopenharmony_cipname:pImageInfo, pname:pBufferInfo, or pname:pTexelBufferView members are
3856e5c31af7Sopenharmony_ciaccessed, instead the source data of the descriptor update operation is
3857e5c31af7Sopenharmony_citaken from the slink:VkWriteDescriptorSetAccelerationStructureKHR structure
3858e5c31af7Sopenharmony_ciin the pname:pNext chain of sname:VkWriteDescriptorSet.
3859e5c31af7Sopenharmony_ciendif::VK_KHR_acceleration_structure[]
3860e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing[]
3861e5c31af7Sopenharmony_ciWhen updating descriptors with a pname:descriptorType of
3862e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV, none of the
3863e5c31af7Sopenharmony_cipname:pImageInfo, pname:pBufferInfo, or pname:pTexelBufferView members are
3864e5c31af7Sopenharmony_ciaccessed, instead the source data of the descriptor update operation is
3865e5c31af7Sopenharmony_citaken from the slink:VkWriteDescriptorSetAccelerationStructureNV structure
3866e5c31af7Sopenharmony_ciin the pname:pNext chain of sname:VkWriteDescriptorSet.
3867e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing[]
3868e5c31af7Sopenharmony_ci--
3869e5c31af7Sopenharmony_ci
3870e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorBufferInfo',desc='Structure specifying descriptor buffer information',type='structs']
3871e5c31af7Sopenharmony_ci--
3872e5c31af7Sopenharmony_ciThe sname:VkDescriptorBufferInfo structure is defined as:
3873e5c31af7Sopenharmony_ci
3874e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDescriptorBufferInfo.adoc[]
3875e5c31af7Sopenharmony_ci
3876e5c31af7Sopenharmony_ci  * pname:buffer is
3877e5c31af7Sopenharmony_ciifdef::VK_EXT_robustness2[]
3878e5c31af7Sopenharmony_cidlink:VK_NULL_HANDLE or
3879e5c31af7Sopenharmony_ciendif::VK_EXT_robustness2[]
3880e5c31af7Sopenharmony_cithe buffer resource.
3881e5c31af7Sopenharmony_ci  * pname:offset is the offset in bytes from the start of pname:buffer.
3882e5c31af7Sopenharmony_ci    Access to buffer memory via this descriptor uses addressing that is
3883e5c31af7Sopenharmony_ci    relative to this starting offset.
3884e5c31af7Sopenharmony_ci  * pname:range is the size in bytes that is used for this descriptor
3885e5c31af7Sopenharmony_ci    update, or ename:VK_WHOLE_SIZE to use the range from pname:offset to the
3886e5c31af7Sopenharmony_ci    end of the buffer.
3887e5c31af7Sopenharmony_ci+
3888e5c31af7Sopenharmony_ci[NOTE]
3889e5c31af7Sopenharmony_ci.Note
3890e5c31af7Sopenharmony_ci====
3891e5c31af7Sopenharmony_ciWhen setting pname:range to ename:VK_WHOLE_SIZE, the
3892e5c31af7Sopenharmony_ci<<buffer-info-effective-range, effective range>> must: not be larger than
3893e5c31af7Sopenharmony_cithe maximum range for the descriptor type (<<limits-maxUniformBufferRange,
3894e5c31af7Sopenharmony_cipname:maxUniformBufferRange>> or <<limits-maxStorageBufferRange,
3895e5c31af7Sopenharmony_cipname:maxStorageBufferRange>>).
3896e5c31af7Sopenharmony_ciThis means that ename:VK_WHOLE_SIZE is not typically useful in the common
3897e5c31af7Sopenharmony_cicase where uniform buffer descriptors are suballocated from a buffer that is
3898e5c31af7Sopenharmony_cimuch larger than pname:maxUniformBufferRange.
3899e5c31af7Sopenharmony_ci====
3900e5c31af7Sopenharmony_ci
3901e5c31af7Sopenharmony_ciFor ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC and
3902e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC descriptor types,
3903e5c31af7Sopenharmony_cipname:offset is the base offset from which the dynamic offset is applied and
3904e5c31af7Sopenharmony_cipname:range is the static size used for all dynamic offsets.
3905e5c31af7Sopenharmony_ci
3906e5c31af7Sopenharmony_ci[[buffer-info-effective-range]]
3907e5c31af7Sopenharmony_ciWhen pname:range is ename:VK_WHOLE_SIZE the effective range is calculated at
3908e5c31af7Sopenharmony_ciflink:vkUpdateDescriptorSets is by taking the size of pname:buffer minus the
3909e5c31af7Sopenharmony_cipname:offset.
3910e5c31af7Sopenharmony_ci
3911e5c31af7Sopenharmony_ci.Valid Usage
3912e5c31af7Sopenharmony_ci****
3913e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorBufferInfo-offset-00340]]
3914e5c31af7Sopenharmony_ci    pname:offset must: be less than the size of pname:buffer
3915e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorBufferInfo-range-00341]]
3916e5c31af7Sopenharmony_ci    If pname:range is not equal to ename:VK_WHOLE_SIZE, pname:range must: be
3917e5c31af7Sopenharmony_ci    greater than `0`
3918e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorBufferInfo-range-00342]]
3919e5c31af7Sopenharmony_ci    If pname:range is not equal to ename:VK_WHOLE_SIZE, pname:range must: be
3920e5c31af7Sopenharmony_ci    less than or equal to the size of pname:buffer minus pname:offset
3921e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorBufferInfo-buffer-02998]]
3922e5c31af7Sopenharmony_ci    If the <<features-nullDescriptor, pname:nullDescriptor>> feature is not
3923e5c31af7Sopenharmony_ci    enabled, pname:buffer must: not be dlink:VK_NULL_HANDLE
3924e5c31af7Sopenharmony_ciifdef::VK_EXT_robustness2[]
3925e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorBufferInfo-buffer-02999]]
3926e5c31af7Sopenharmony_ci    If pname:buffer is dlink:VK_NULL_HANDLE, pname:offset must: be zero and
3927e5c31af7Sopenharmony_ci    pname:range must: be ename:VK_WHOLE_SIZE
3928e5c31af7Sopenharmony_ciendif::VK_EXT_robustness2[]
3929e5c31af7Sopenharmony_ci****
3930e5c31af7Sopenharmony_ci
3931e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDescriptorBufferInfo.adoc[]
3932e5c31af7Sopenharmony_ci--
3933e5c31af7Sopenharmony_ci
3934e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorImageInfo',desc='Structure specifying descriptor image information',type='structs']
3935e5c31af7Sopenharmony_ci--
3936e5c31af7Sopenharmony_ciThe sname:VkDescriptorImageInfo structure is defined as:
3937e5c31af7Sopenharmony_ci
3938e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDescriptorImageInfo.adoc[]
3939e5c31af7Sopenharmony_ci
3940e5c31af7Sopenharmony_ci  * pname:sampler is a sampler handle, and is used in descriptor updates for
3941e5c31af7Sopenharmony_ci    types ename:VK_DESCRIPTOR_TYPE_SAMPLER and
3942e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER if the binding being
3943e5c31af7Sopenharmony_ci    updated does not use immutable samplers.
3944e5c31af7Sopenharmony_ci  * pname:imageView is
3945e5c31af7Sopenharmony_ciifdef::VK_EXT_robustness2[]
3946e5c31af7Sopenharmony_ci    dlink:VK_NULL_HANDLE or
3947e5c31af7Sopenharmony_ciendif::VK_EXT_robustness2[]
3948e5c31af7Sopenharmony_ci    an image view handle, and is used in descriptor updates for types
3949e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE,
3950e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE,
3951e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and
3952e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT.
3953e5c31af7Sopenharmony_ci  * pname:imageLayout is the layout that the image subresources accessible
3954e5c31af7Sopenharmony_ci    from pname:imageView will be in at the time this descriptor is accessed.
3955e5c31af7Sopenharmony_ci    pname:imageLayout is used in descriptor updates for types
3956e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE,
3957e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE,
3958e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and
3959e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT.
3960e5c31af7Sopenharmony_ci
3961e5c31af7Sopenharmony_ciMembers of sname:VkDescriptorImageInfo that are not used in an update (as
3962e5c31af7Sopenharmony_cidescribed above) are ignored.
3963e5c31af7Sopenharmony_ci
3964e5c31af7Sopenharmony_ci.Valid Usage
3965e5c31af7Sopenharmony_ci****
3966e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance1[]
3967e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorImageInfo-imageView-06712]]
3968e5c31af7Sopenharmony_ci    pname:imageView must: not be a 2D array image view created from a 3D
3969e5c31af7Sopenharmony_ci    image
3970e5c31af7Sopenharmony_ciifdef::VK_EXT_image_2d_view_of_3d[]
3971e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorImageInfo-imageView-07795]]
3972e5c31af7Sopenharmony_ci    If pname:imageView is a 2D view created from a 3D image, then
3973e5c31af7Sopenharmony_ci    pname:descriptorType must: be ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE,
3974e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, or
3975e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
3976e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorImageInfo-imageView-07796]]
3977e5c31af7Sopenharmony_ci    If pname:imageView is a 2D view created from a 3D image, then the image
3978e5c31af7Sopenharmony_ci    must: have been created with
3979e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT set
3980e5c31af7Sopenharmony_ciendif::VK_EXT_image_2d_view_of_3d[]
3981e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorImageInfo-descriptorType-06713]]
3982e5c31af7Sopenharmony_ciifdef::VK_EXT_image_2d_view_of_3d[]
3983e5c31af7Sopenharmony_ci    If the <<features-image2DViewOf3D, pname:image2DViewOf3D>> feature is
3984e5c31af7Sopenharmony_ci    not enabled or pname:descriptorType is not
3985e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE then
3986e5c31af7Sopenharmony_ciendif::VK_EXT_image_2d_view_of_3d[]
3987e5c31af7Sopenharmony_ci    pname:imageView must: not be a 2D view created from a 3D image
3988e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorImageInfo-descriptorType-06714]]
3989e5c31af7Sopenharmony_ciifdef::VK_EXT_image_2d_view_of_3d[]
3990e5c31af7Sopenharmony_ci    If the <<features-sampler2DViewOf3D, pname:sampler2DViewOf3D>> feature
3991e5c31af7Sopenharmony_ci    is not enabled or pname:descriptorType is not
3992e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE or
3993e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER then
3994e5c31af7Sopenharmony_ciendif::VK_EXT_image_2d_view_of_3d[]
3995e5c31af7Sopenharmony_ci    pname:imageView must: not be a 2D view created from a 3D image
3996e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance1[]
3997e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorImageInfo-imageView-01976]]
3998e5c31af7Sopenharmony_ci    If pname:imageView is created from a depth/stencil image, the
3999e5c31af7Sopenharmony_ci    pname:aspectMask used to create the pname:imageView must: include either
4000e5c31af7Sopenharmony_ci    ename:VK_IMAGE_ASPECT_DEPTH_BIT or ename:VK_IMAGE_ASPECT_STENCIL_BIT but
4001e5c31af7Sopenharmony_ci    not both
4002e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorImageInfo-imageLayout-09425]]
4003e5c31af7Sopenharmony_ci    If pname:imageLayout is ename:VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
4004e5c31af7Sopenharmony_ci    then the pname:aspectMask used to create pname:imageView must: not
4005e5c31af7Sopenharmony_ci    include either ename:VK_IMAGE_ASPECT_DEPTH_BIT or
4006e5c31af7Sopenharmony_ci    ename:VK_IMAGE_ASPECT_STENCIL_BIT
4007e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorImageInfo-imageLayout-09426]]
4008e5c31af7Sopenharmony_ci    If pname:imageLayout is
4009e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance2[]
4010e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL,
4011e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL,
4012e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
4013e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
4014e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,
4015e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,
4016e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL,
4017e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL,
4018e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
4019e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL or
4020e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, then the
4021e5c31af7Sopenharmony_ci    pname:aspectMask used to create pname:imageView must: not include
4022e5c31af7Sopenharmony_ci    ename:VK_IMAGE_ASPECT_COLOR_BIT
4023e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorImageInfo-imageLayout-00344]]
4024e5c31af7Sopenharmony_ci    pname:imageLayout must: match the actual elink:VkImageLayout of each
4025e5c31af7Sopenharmony_ci    subresource accessible from pname:imageView at the time this descriptor
4026e5c31af7Sopenharmony_ci    is accessed as defined by the <<resources-image-layouts-matching-rule,
4027e5c31af7Sopenharmony_ci    image layout matching rules>>
4028e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
4029e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorImageInfo-sampler-01564]]
4030e5c31af7Sopenharmony_ci    If pname:sampler is used and the elink:VkFormat of the image is a
4031e5c31af7Sopenharmony_ci    <<formats-requiring-sampler-ycbcr-conversion,multi-planar format>>, the
4032e5c31af7Sopenharmony_ci    image must: have been created with
4033e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, and the pname:aspectMask of
4034e5c31af7Sopenharmony_ci    the pname:imageView must: be a valid
4035e5c31af7Sopenharmony_ci    <<formats-planes-image-aspect,multi-planar aspect mask>> bit
4036e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
4037e5c31af7Sopenharmony_ciifdef::VK_KHR_portability_subset[]
4038e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorImageInfo-mutableComparisonSamplers-04450]]
4039e5c31af7Sopenharmony_ci    If the `apiext:VK_KHR_portability_subset` extension is enabled, and
4040e5c31af7Sopenharmony_ci    slink:VkPhysicalDevicePortabilitySubsetFeaturesKHR::pname:mutableComparisonSamplers
4041e5c31af7Sopenharmony_ci    is ename:VK_FALSE, then pname:sampler must: have been created with
4042e5c31af7Sopenharmony_ci    slink:VkSamplerCreateInfo::pname:compareEnable set to ename:VK_FALSE
4043e5c31af7Sopenharmony_ciendif::VK_KHR_portability_subset[]
4044e5c31af7Sopenharmony_ci****
4045e5c31af7Sopenharmony_ci
4046e5c31af7Sopenharmony_ci
4047e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDescriptorImageInfo.adoc[]
4048e5c31af7Sopenharmony_ci--
4049e5c31af7Sopenharmony_ci
4050e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
4051e5c31af7Sopenharmony_ci[open,refpage='VkWriteDescriptorSetInlineUniformBlock',desc='Structure specifying inline uniform block data',type='structs',alias='VkWriteDescriptorSetInlineUniformBlockEXT']
4052e5c31af7Sopenharmony_ci--
4053e5c31af7Sopenharmony_ciIf the pname:descriptorType member of slink:VkWriteDescriptorSet is
4054e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK then the data to write to the
4055e5c31af7Sopenharmony_cidescriptor set is specified through a
4056e5c31af7Sopenharmony_cisname:VkWriteDescriptorSetInlineUniformBlock structure included in the
4057e5c31af7Sopenharmony_cipname:pNext chain of sname:VkWriteDescriptorSet.
4058e5c31af7Sopenharmony_ci
4059e5c31af7Sopenharmony_ciThe sname:VkWriteDescriptorSetInlineUniformBlock structure is defined as:
4060e5c31af7Sopenharmony_ci
4061e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkWriteDescriptorSetInlineUniformBlock.adoc[]
4062e5c31af7Sopenharmony_ci
4063e5c31af7Sopenharmony_ciifdef::VK_EXT_inline_uniform_block[]
4064e5c31af7Sopenharmony_cior the equivalent
4065e5c31af7Sopenharmony_ci
4066e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkWriteDescriptorSetInlineUniformBlockEXT.adoc[]
4067e5c31af7Sopenharmony_ciendif::VK_EXT_inline_uniform_block[]
4068e5c31af7Sopenharmony_ci
4069e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
4070e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
4071e5c31af7Sopenharmony_ci    structure.
4072e5c31af7Sopenharmony_ci  * pname:dataSize is the number of bytes of inline uniform block data
4073e5c31af7Sopenharmony_ci    pointed to by pname:pData.
4074e5c31af7Sopenharmony_ci  * pname:pData is a pointer to pname:dataSize number of bytes of data to
4075e5c31af7Sopenharmony_ci    write to the inline uniform block.
4076e5c31af7Sopenharmony_ci
4077e5c31af7Sopenharmony_ci.Valid Usage
4078e5c31af7Sopenharmony_ci****
4079e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSetInlineUniformBlock-dataSize-02222]]
4080e5c31af7Sopenharmony_ci    pname:dataSize must: be an integer multiple of `4`
4081e5c31af7Sopenharmony_ci****
4082e5c31af7Sopenharmony_ci
4083e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkWriteDescriptorSetInlineUniformBlock.adoc[]
4084e5c31af7Sopenharmony_ci--
4085e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
4086e5c31af7Sopenharmony_ci
4087e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure[]
4088e5c31af7Sopenharmony_ci[open,refpage='VkWriteDescriptorSetAccelerationStructureKHR',desc='Structure specifying acceleration structure descriptor information',type='structs']
4089e5c31af7Sopenharmony_ci--
4090e5c31af7Sopenharmony_ci:refpage: VkWriteDescriptorSetAccelerationStructureKHR
4091e5c31af7Sopenharmony_ci
4092e5c31af7Sopenharmony_ciThe sname:VkWriteDescriptorSetAccelerationStructureKHR structure is defined
4093e5c31af7Sopenharmony_cias:
4094e5c31af7Sopenharmony_ci
4095e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkWriteDescriptorSetAccelerationStructureKHR.adoc[]
4096e5c31af7Sopenharmony_ci
4097e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
4098e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
4099e5c31af7Sopenharmony_ci    structure.
4100e5c31af7Sopenharmony_ci  * pname:accelerationStructureCount is the number of elements in
4101e5c31af7Sopenharmony_ci    pname:pAccelerationStructures.
4102e5c31af7Sopenharmony_ci  * pname:pAccelerationStructures is a pointer to an array of
4103e5c31af7Sopenharmony_ci    slink:VkAccelerationStructureKHR structures specifying the acceleration
4104e5c31af7Sopenharmony_ci    structures to update.
4105e5c31af7Sopenharmony_ci
4106e5c31af7Sopenharmony_ci.Valid Usage
4107e5c31af7Sopenharmony_ci****
4108e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSetAccelerationStructureKHR-accelerationStructureCount-02236]]
4109e5c31af7Sopenharmony_ci    pname:accelerationStructureCount must: be equal to pname:descriptorCount
4110e5c31af7Sopenharmony_ci    in the extended structure
4111e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSetAccelerationStructureKHR-pAccelerationStructures-03579]]
4112e5c31af7Sopenharmony_ci    Each acceleration structure in pname:pAccelerationStructures must: have
4113e5c31af7Sopenharmony_ci    been created with a pname:type of
4114e5c31af7Sopenharmony_ci    ename:VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR or
4115e5c31af7Sopenharmony_ci    ename:VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR
4116e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSetAccelerationStructureKHR-pAccelerationStructures-03580]]
4117e5c31af7Sopenharmony_ci    If the <<features-nullDescriptor, pname:nullDescriptor>> feature is not
4118e5c31af7Sopenharmony_ci    enabled, each element of pname:pAccelerationStructures must: not be
4119e5c31af7Sopenharmony_ci    dlink:VK_NULL_HANDLE
4120e5c31af7Sopenharmony_ci****
4121e5c31af7Sopenharmony_ci
4122e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkWriteDescriptorSetAccelerationStructureKHR.adoc[]
4123e5c31af7Sopenharmony_ci--
4124e5c31af7Sopenharmony_ciendif::VK_KHR_acceleration_structure[]
4125e5c31af7Sopenharmony_ci
4126e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing[]
4127e5c31af7Sopenharmony_ci[open,refpage='VkWriteDescriptorSetAccelerationStructureNV',desc='Structure specifying acceleration structure descriptor information',type='structs']
4128e5c31af7Sopenharmony_ci--
4129e5c31af7Sopenharmony_ci:refpage: VkWriteDescriptorSetAccelerationStructureNV
4130e5c31af7Sopenharmony_ci
4131e5c31af7Sopenharmony_ciThe sname:VkWriteDescriptorSetAccelerationStructureNV structure is defined
4132e5c31af7Sopenharmony_cias:
4133e5c31af7Sopenharmony_ci
4134e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkWriteDescriptorSetAccelerationStructureNV.adoc[]
4135e5c31af7Sopenharmony_ci
4136e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
4137e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
4138e5c31af7Sopenharmony_ci    structure.
4139e5c31af7Sopenharmony_ci  * pname:accelerationStructureCount is the number of elements in
4140e5c31af7Sopenharmony_ci    pname:pAccelerationStructures.
4141e5c31af7Sopenharmony_ci  * pname:pAccelerationStructures is a pointer to an array of
4142e5c31af7Sopenharmony_ci    slink:VkAccelerationStructureNV structures specifying the acceleration
4143e5c31af7Sopenharmony_ci    structures to update.
4144e5c31af7Sopenharmony_ci
4145e5c31af7Sopenharmony_ci.Valid Usage
4146e5c31af7Sopenharmony_ci****
4147e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSetAccelerationStructureNV-accelerationStructureCount-03747]]
4148e5c31af7Sopenharmony_ci    pname:accelerationStructureCount must: be equal to pname:descriptorCount
4149e5c31af7Sopenharmony_ci    in the extended structure
4150e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSetAccelerationStructureNV-pAccelerationStructures-03748]]
4151e5c31af7Sopenharmony_ci    Each acceleration structure in pname:pAccelerationStructures must: have
4152e5c31af7Sopenharmony_ci    been created with ename:VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR
4153e5c31af7Sopenharmony_ci  * [[VUID-VkWriteDescriptorSetAccelerationStructureNV-pAccelerationStructures-03749]]
4154e5c31af7Sopenharmony_ci    If the <<features-nullDescriptor, pname:nullDescriptor>> feature is not
4155e5c31af7Sopenharmony_ci    enabled, each member of pname:pAccelerationStructures must: not be
4156e5c31af7Sopenharmony_ci    dlink:VK_NULL_HANDLE
4157e5c31af7Sopenharmony_ci****
4158e5c31af7Sopenharmony_ci
4159e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkWriteDescriptorSetAccelerationStructureNV.adoc[]
4160e5c31af7Sopenharmony_ci--
4161e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing[]
4162e5c31af7Sopenharmony_ci
4163e5c31af7Sopenharmony_ci[open,refpage='VkCopyDescriptorSet',desc='Structure specifying a copy descriptor set operation',type='structs']
4164e5c31af7Sopenharmony_ci--
4165e5c31af7Sopenharmony_ciThe sname:VkCopyDescriptorSet structure is defined as:
4166e5c31af7Sopenharmony_ci
4167e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkCopyDescriptorSet.adoc[]
4168e5c31af7Sopenharmony_ci
4169e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
4170e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
4171e5c31af7Sopenharmony_ci    structure.
4172e5c31af7Sopenharmony_ci  * pname:srcSet, pname:srcBinding, and pname:srcArrayElement are the source
4173e5c31af7Sopenharmony_ci    set, binding, and array element, respectively.
4174e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
4175e5c31af7Sopenharmony_ci    If the descriptor binding identified by pname:srcSet and
4176e5c31af7Sopenharmony_ci    pname:srcBinding has a descriptor type of
4177e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK then pname:srcArrayElement
4178e5c31af7Sopenharmony_ci    specifies the starting byte offset within the binding to copy from.
4179e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
4180e5c31af7Sopenharmony_ci  * pname:dstSet, pname:dstBinding, and pname:dstArrayElement are the
4181e5c31af7Sopenharmony_ci    destination set, binding, and array element, respectively.
4182e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
4183e5c31af7Sopenharmony_ci    If the descriptor binding identified by pname:dstSet and
4184e5c31af7Sopenharmony_ci    pname:dstBinding has a descriptor type of
4185e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK then pname:dstArrayElement
4186e5c31af7Sopenharmony_ci    specifies the starting byte offset within the binding to copy to.
4187e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
4188e5c31af7Sopenharmony_ci  * pname:descriptorCount is the number of descriptors to copy from the
4189e5c31af7Sopenharmony_ci    source to destination.
4190e5c31af7Sopenharmony_ci    If pname:descriptorCount is greater than the number of remaining array
4191e5c31af7Sopenharmony_ci    elements in the source or destination binding, those affect consecutive
4192e5c31af7Sopenharmony_ci    bindings in a manner similar to slink:VkWriteDescriptorSet above.
4193e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
4194e5c31af7Sopenharmony_ci    If the descriptor binding identified by pname:srcSet and
4195e5c31af7Sopenharmony_ci    pname:srcBinding has a descriptor type of
4196e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK then pname:descriptorCount
4197e5c31af7Sopenharmony_ci    specifies the number of bytes to copy and the remaining array elements
4198e5c31af7Sopenharmony_ci    in the source or destination binding refer to the remaining number of
4199e5c31af7Sopenharmony_ci    bytes in those.
4200e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
4201e5c31af7Sopenharmony_ci
4202e5c31af7Sopenharmony_ciifdef::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
4203e5c31af7Sopenharmony_ciIf the sname:VkDescriptorSetLayoutBinding for pname:dstBinding is
4204e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT and pname:srcBinding is not
4205e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT, the new active descriptor type becomes
4206e5c31af7Sopenharmony_cithe descriptor type of pname:srcBinding.
4207e5c31af7Sopenharmony_ciIf both sname:VkDescriptorSetLayoutBinding for pname:srcBinding and
4208e5c31af7Sopenharmony_cipname:dstBinding are ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT, the active
4209e5c31af7Sopenharmony_cidescriptor type in each source descriptor is copied into the corresponding
4210e5c31af7Sopenharmony_cidestination descriptor.
4211e5c31af7Sopenharmony_ciThe active descriptor type can: be different for each source descriptor.
4212e5c31af7Sopenharmony_ci
4213e5c31af7Sopenharmony_ci[NOTE]
4214e5c31af7Sopenharmony_ci.Note
4215e5c31af7Sopenharmony_ci====
4216e5c31af7Sopenharmony_ciThe intention is that copies to and from mutable descriptors is a simple
4217e5c31af7Sopenharmony_cimemcpy.
4218e5c31af7Sopenharmony_ciCopies between non-mutable and mutable descriptors are expected to require
4219e5c31af7Sopenharmony_cione memcpy per descriptor to handle the difference in size, but this use
4220e5c31af7Sopenharmony_cicase with more than one pname:descriptorCount is considered rare.
4221e5c31af7Sopenharmony_ci====
4222e5c31af7Sopenharmony_ciendif::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
4223e5c31af7Sopenharmony_ci
4224e5c31af7Sopenharmony_ci.Valid Usage
4225e5c31af7Sopenharmony_ci****
4226e5c31af7Sopenharmony_ci  * [[VUID-VkCopyDescriptorSet-srcBinding-00345]]
4227e5c31af7Sopenharmony_ci    pname:srcBinding must: be a valid binding within pname:srcSet
4228e5c31af7Sopenharmony_ci  * [[VUID-VkCopyDescriptorSet-srcArrayElement-00346]]
4229e5c31af7Sopenharmony_ci    The sum of pname:srcArrayElement and pname:descriptorCount must: be less
4230e5c31af7Sopenharmony_ci    than or equal to the number of array elements in the descriptor set
4231e5c31af7Sopenharmony_ci    binding specified by pname:srcBinding, and all applicable consecutive
4232e5c31af7Sopenharmony_ci    bindings, as described by <<descriptorsets-updates-consecutive>>
4233e5c31af7Sopenharmony_ci  * [[VUID-VkCopyDescriptorSet-dstBinding-00347]]
4234e5c31af7Sopenharmony_ci    pname:dstBinding must: be a valid binding within pname:dstSet
4235e5c31af7Sopenharmony_ci  * [[VUID-VkCopyDescriptorSet-dstArrayElement-00348]]
4236e5c31af7Sopenharmony_ci    The sum of pname:dstArrayElement and pname:descriptorCount must: be less
4237e5c31af7Sopenharmony_ci    than or equal to the number of array elements in the descriptor set
4238e5c31af7Sopenharmony_ci    binding specified by pname:dstBinding, and all applicable consecutive
4239e5c31af7Sopenharmony_ci    bindings, as described by <<descriptorsets-updates-consecutive>>
4240e5c31af7Sopenharmony_ci  * [[VUID-VkCopyDescriptorSet-dstBinding-02632]]
4241e5c31af7Sopenharmony_ci    The type of pname:dstBinding within pname:dstSet must: be equal to the
4242e5c31af7Sopenharmony_ci    type of pname:srcBinding within pname:srcSet
4243e5c31af7Sopenharmony_ci  * [[VUID-VkCopyDescriptorSet-srcSet-00349]]
4244e5c31af7Sopenharmony_ci    If pname:srcSet is equal to pname:dstSet, then the source and
4245e5c31af7Sopenharmony_ci    destination ranges of descriptors must: not overlap, where the ranges
4246e5c31af7Sopenharmony_ci    may: include array elements from consecutive bindings as described by
4247e5c31af7Sopenharmony_ci    <<descriptorsets-updates-consecutive>>
4248e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
4249e5c31af7Sopenharmony_ci  * [[VUID-VkCopyDescriptorSet-srcBinding-02223]]
4250e5c31af7Sopenharmony_ci    If the descriptor type of the descriptor set binding specified by
4251e5c31af7Sopenharmony_ci    pname:srcBinding is ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK,
4252e5c31af7Sopenharmony_ci    pname:srcArrayElement must: be an integer multiple of `4`
4253e5c31af7Sopenharmony_ci  * [[VUID-VkCopyDescriptorSet-dstBinding-02224]]
4254e5c31af7Sopenharmony_ci    If the descriptor type of the descriptor set binding specified by
4255e5c31af7Sopenharmony_ci    pname:dstBinding is ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK,
4256e5c31af7Sopenharmony_ci    pname:dstArrayElement must: be an integer multiple of `4`
4257e5c31af7Sopenharmony_ci  * [[VUID-VkCopyDescriptorSet-srcBinding-02225]]
4258e5c31af7Sopenharmony_ci    If the descriptor type of the descriptor set binding specified by either
4259e5c31af7Sopenharmony_ci    pname:srcBinding or pname:dstBinding is
4260e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, pname:descriptorCount
4261e5c31af7Sopenharmony_ci    must: be an integer multiple of `4`
4262e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
4263e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
4264e5c31af7Sopenharmony_ci  * [[VUID-VkCopyDescriptorSet-srcSet-01918]]
4265e5c31af7Sopenharmony_ci    If pname:srcSet's layout was created with the
4266e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT flag
4267e5c31af7Sopenharmony_ci    set, then pname:dstSet's layout must: also have been created with the
4268e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT flag
4269e5c31af7Sopenharmony_ci    set
4270e5c31af7Sopenharmony_ci  * [[VUID-VkCopyDescriptorSet-srcSet-04885]]
4271e5c31af7Sopenharmony_ci    If pname:srcSet's layout was created without
4272e5c31af7Sopenharmony_ciifdef::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
4273e5c31af7Sopenharmony_ci    either the ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXT
4274e5c31af7Sopenharmony_ci    flag or
4275e5c31af7Sopenharmony_ciendif::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
4276e5c31af7Sopenharmony_ci    the ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT
4277e5c31af7Sopenharmony_ci    flag set, then pname:dstSet's layout must: have been created without the
4278e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT flag
4279e5c31af7Sopenharmony_ci    set
4280e5c31af7Sopenharmony_ci  * [[VUID-VkCopyDescriptorSet-srcSet-01920]]
4281e5c31af7Sopenharmony_ci    If the descriptor pool from which pname:srcSet was allocated was created
4282e5c31af7Sopenharmony_ci    with the ename:VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT flag set,
4283e5c31af7Sopenharmony_ci    then the descriptor pool from which pname:dstSet was allocated must:
4284e5c31af7Sopenharmony_ci    also have been created with the
4285e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT flag set
4286e5c31af7Sopenharmony_ci  * [[VUID-VkCopyDescriptorSet-srcSet-04887]]
4287e5c31af7Sopenharmony_ci    If the descriptor pool from which pname:srcSet was allocated was created
4288e5c31af7Sopenharmony_ci    without
4289e5c31af7Sopenharmony_ciifdef::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
4290e5c31af7Sopenharmony_ci    either the ename:VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT flag or
4291e5c31af7Sopenharmony_ciendif::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
4292e5c31af7Sopenharmony_ci    the ename:VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT flag set, then
4293e5c31af7Sopenharmony_ci    the descriptor pool from which pname:dstSet was allocated must: have
4294e5c31af7Sopenharmony_ci    been created without the
4295e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT flag set
4296e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
4297e5c31af7Sopenharmony_ci  * [[VUID-VkCopyDescriptorSet-dstBinding-02753]]
4298e5c31af7Sopenharmony_ci    If the descriptor type of the descriptor set binding specified by
4299e5c31af7Sopenharmony_ci    pname:dstBinding is ename:VK_DESCRIPTOR_TYPE_SAMPLER, then pname:dstSet
4300e5c31af7Sopenharmony_ci    must: not have been allocated with a layout that included immutable
4301e5c31af7Sopenharmony_ci    samplers for pname:dstBinding
4302e5c31af7Sopenharmony_ciifdef::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
4303e5c31af7Sopenharmony_ci  * [[VUID-VkCopyDescriptorSet-dstSet-04612]]
4304e5c31af7Sopenharmony_ci    If sname:VkDescriptorSetLayoutBinding for pname:dstSet at
4305e5c31af7Sopenharmony_ci    pname:dstBinding is ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT, the new active
4306e5c31af7Sopenharmony_ci    descriptor type must: exist in the corresponding
4307e5c31af7Sopenharmony_ci    pname:pMutableDescriptorTypeLists list for pname:dstBinding if the new
4308e5c31af7Sopenharmony_ci    active descriptor type is not ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT
4309e5c31af7Sopenharmony_ci  * [[VUID-VkCopyDescriptorSet-srcSet-04613]]
4310e5c31af7Sopenharmony_ci    If sname:VkDescriptorSetLayoutBinding for pname:srcSet at
4311e5c31af7Sopenharmony_ci    pname:srcBinding is ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT and the
4312e5c31af7Sopenharmony_ci    sname:VkDescriptorSetLayoutBinding for pname:dstSet at pname:dstBinding
4313e5c31af7Sopenharmony_ci    is not ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT, the active descriptor type
4314e5c31af7Sopenharmony_ci    for the source descriptor must: match the descriptor type of
4315e5c31af7Sopenharmony_ci    pname:dstBinding
4316e5c31af7Sopenharmony_ci  * [[VUID-VkCopyDescriptorSet-dstSet-04614]]
4317e5c31af7Sopenharmony_ci    If sname:VkDescriptorSetLayoutBinding for pname:dstSet at
4318e5c31af7Sopenharmony_ci    pname:dstBinding is ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT, and the new
4319e5c31af7Sopenharmony_ci    active descriptor type is ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT, the
4320e5c31af7Sopenharmony_ci    pname:pMutableDescriptorTypeLists for pname:srcBinding and
4321e5c31af7Sopenharmony_ci    pname:dstBinding must: match exactly
4322e5c31af7Sopenharmony_ciendif::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
4323e5c31af7Sopenharmony_ci****
4324e5c31af7Sopenharmony_ci
4325e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkCopyDescriptorSet.adoc[]
4326e5c31af7Sopenharmony_ci--
4327e5c31af7Sopenharmony_ci
4328e5c31af7Sopenharmony_ci
4329e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
4330e5c31af7Sopenharmony_ciifdef::hidden[]
4331e5c31af7Sopenharmony_ci// tag::scremoved[]
4332e5c31af7Sopenharmony_ci  * elink:VkStructureType
4333e5c31af7Sopenharmony_ci  ** ename:VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR
4334e5c31af7Sopenharmony_ci     <<SCID-8>>
4335e5c31af7Sopenharmony_ci  * elink:VkObjectType
4336e5c31af7Sopenharmony_ci  ** ename:VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR <<SCID-8>>
4337e5c31af7Sopenharmony_ci  * fname:vkCreateDescriptorUpdateTemplateKHR,
4338e5c31af7Sopenharmony_ci    fname:vkDestroyDescriptorUpdateTemplateKHR,
4339e5c31af7Sopenharmony_ci    fname:vkUpdateDescriptorSetWithTemplateKHR,
4340e5c31af7Sopenharmony_ci    fname:vkCmdPushDescriptorSetWithTemplateKHR <<SCID-8>>
4341e5c31af7Sopenharmony_ci  * sname:VkDescriptorUpdateTemplateKHR,
4342e5c31af7Sopenharmony_ci    sname:VkDescriptorUpdateTemplateEntryKHR,
4343e5c31af7Sopenharmony_ci    sname:VkDescriptorUpdateTemplateCreateInfoKHR <<SCID-8>>
4344e5c31af7Sopenharmony_ci  * ename:VkDescriptorUpdateTemplateTypeKHR <<SCID-8>>
4345e5c31af7Sopenharmony_ci  * tname:VkDescriptorUpdateTemplateCreateFlagsKHR <<SCID-8>>
4346e5c31af7Sopenharmony_ci  * ename:VkDescriptorUpdateTemplateType
4347e5c31af7Sopenharmony_ci  ** ename:VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR <<SCID-8>>
4348e5c31af7Sopenharmony_ci  ** ename:VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR
4349e5c31af7Sopenharmony_ci     <<SCID-8>>
4350e5c31af7Sopenharmony_ci// end::scremoved[]
4351e5c31af7Sopenharmony_ciendif::hidden[]
4352e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
4353e5c31af7Sopenharmony_ci
4354e5c31af7Sopenharmony_ci
4355e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
4356e5c31af7Sopenharmony_ci
4357e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_descriptor_update_template[]
4358e5c31af7Sopenharmony_ci[[descriptorsets-updates-with-template]]
4359e5c31af7Sopenharmony_ci=== Descriptor Update Templates
4360e5c31af7Sopenharmony_ci
4361e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorUpdateTemplate',desc='Opaque handle to a descriptor update template',type='handles']
4362e5c31af7Sopenharmony_ci--
4363e5c31af7Sopenharmony_ciA descriptor update template specifies a mapping from descriptor update
4364e5c31af7Sopenharmony_ciinformation in host memory to descriptors in a descriptor set.
4365e5c31af7Sopenharmony_ciIt is designed to avoid passing redundant information to the driver when
4366e5c31af7Sopenharmony_cifrequently updating the same set of descriptors in descriptor sets.
4367e5c31af7Sopenharmony_ci
4368e5c31af7Sopenharmony_ciDescriptor update template objects are represented by
4369e5c31af7Sopenharmony_cisname:VkDescriptorUpdateTemplate handles:
4370e5c31af7Sopenharmony_ci
4371e5c31af7Sopenharmony_ciinclude::{generated}/api/handles/VkDescriptorUpdateTemplate.adoc[]
4372e5c31af7Sopenharmony_ci
4373e5c31af7Sopenharmony_ciifdef::VK_KHR_descriptor_update_template[]
4374e5c31af7Sopenharmony_cior the equivalent
4375e5c31af7Sopenharmony_ci
4376e5c31af7Sopenharmony_ciinclude::{generated}/api/handles/VkDescriptorUpdateTemplateKHR.adoc[]
4377e5c31af7Sopenharmony_ciendif::VK_KHR_descriptor_update_template[]
4378e5c31af7Sopenharmony_ci--
4379e5c31af7Sopenharmony_ci
4380e5c31af7Sopenharmony_ci
4381e5c31af7Sopenharmony_ci=== Descriptor Set Updates With Templates
4382e5c31af7Sopenharmony_ci
4383e5c31af7Sopenharmony_ci[open,refpage='vkCreateDescriptorUpdateTemplate',desc='Create a new descriptor update template',type='protos']
4384e5c31af7Sopenharmony_ci--
4385e5c31af7Sopenharmony_ciUpdating a large sname:VkDescriptorSet array can: be an expensive operation
4386e5c31af7Sopenharmony_cisince an application must: specify one slink:VkWriteDescriptorSet structure
4387e5c31af7Sopenharmony_cifor each descriptor or descriptor array to update, each of which
4388e5c31af7Sopenharmony_cire-specifies the same state when updating the same descriptor in multiple
4389e5c31af7Sopenharmony_cidescriptor sets.
4390e5c31af7Sopenharmony_ciFor cases when an application wishes to update the same set of descriptors
4391e5c31af7Sopenharmony_ciin multiple descriptor sets allocated using the same
4392e5c31af7Sopenharmony_cisname:VkDescriptorSetLayout, flink:vkUpdateDescriptorSetWithTemplate can: be
4393e5c31af7Sopenharmony_ciused as a replacement for flink:vkUpdateDescriptorSets.
4394e5c31af7Sopenharmony_ci
4395e5c31af7Sopenharmony_cisname:VkDescriptorUpdateTemplate allows implementations to convert a set of
4396e5c31af7Sopenharmony_cidescriptor update operations on a single descriptor set to an internal
4397e5c31af7Sopenharmony_ciformat that, in conjunction with flink:vkUpdateDescriptorSetWithTemplate
4398e5c31af7Sopenharmony_ciifdef::VK_KHR_push_descriptor[]
4399e5c31af7Sopenharmony_cior flink:vkCmdPushDescriptorSetWithTemplateKHR
4400e5c31af7Sopenharmony_ciendif::VK_KHR_push_descriptor[]
4401e5c31af7Sopenharmony_ci, can: be more efficient compared to calling flink:vkUpdateDescriptorSets
4402e5c31af7Sopenharmony_ciifdef::VK_KHR_push_descriptor[]
4403e5c31af7Sopenharmony_cior flink:vkCmdPushDescriptorSetKHR
4404e5c31af7Sopenharmony_ciendif::VK_KHR_push_descriptor[]
4405e5c31af7Sopenharmony_ci.
4406e5c31af7Sopenharmony_ciThe descriptors themselves are not specified in the
4407e5c31af7Sopenharmony_cisname:VkDescriptorUpdateTemplate, rather, offsets into an application
4408e5c31af7Sopenharmony_ciprovided pointer to host memory are specified, which are combined with a
4409e5c31af7Sopenharmony_cipointer passed to flink:vkUpdateDescriptorSetWithTemplate
4410e5c31af7Sopenharmony_ciifdef::VK_KHR_push_descriptor[]
4411e5c31af7Sopenharmony_cior flink:vkCmdPushDescriptorSetWithTemplateKHR
4412e5c31af7Sopenharmony_ciendif::VK_KHR_push_descriptor[]
4413e5c31af7Sopenharmony_ci.
4414e5c31af7Sopenharmony_ciThis allows large batches of updates to be executed without having to
4415e5c31af7Sopenharmony_ciconvert application data structures into a strictly-defined Vulkan data
4416e5c31af7Sopenharmony_cistructure.
4417e5c31af7Sopenharmony_ci
4418e5c31af7Sopenharmony_ciTo create a descriptor update template, call:
4419e5c31af7Sopenharmony_ci
4420e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[]
4421e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCreateDescriptorUpdateTemplate.adoc[]
4422e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[]
4423e5c31af7Sopenharmony_ci
4424e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1+VK_KHR_descriptor_update_template[or the equivalent command]
4425e5c31af7Sopenharmony_ci
4426e5c31af7Sopenharmony_ciifdef::VK_KHR_descriptor_update_template[]
4427e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCreateDescriptorUpdateTemplateKHR.adoc[]
4428e5c31af7Sopenharmony_ciendif::VK_KHR_descriptor_update_template[]
4429e5c31af7Sopenharmony_ci
4430e5c31af7Sopenharmony_ci  * pname:device is the logical device that creates the descriptor update
4431e5c31af7Sopenharmony_ci    template.
4432e5c31af7Sopenharmony_ci  * pname:pCreateInfo is a pointer to a
4433e5c31af7Sopenharmony_ci    slink:VkDescriptorUpdateTemplateCreateInfo structure specifying the set
4434e5c31af7Sopenharmony_ci    of descriptors to update with a single call to
4435e5c31af7Sopenharmony_ciifdef::VK_KHR_push_descriptor[]
4436e5c31af7Sopenharmony_ci    flink:vkCmdPushDescriptorSetWithTemplateKHR or
4437e5c31af7Sopenharmony_ciendif::VK_KHR_push_descriptor[]
4438e5c31af7Sopenharmony_ci    flink:vkUpdateDescriptorSetWithTemplate.
4439e5c31af7Sopenharmony_ci  * pname:pAllocator controls host memory allocation as described in the
4440e5c31af7Sopenharmony_ci    <<memory-allocation, Memory Allocation>> chapter.
4441e5c31af7Sopenharmony_ci  * pname:pDescriptorUpdateTemplate is a pointer to a
4442e5c31af7Sopenharmony_ci    sname:VkDescriptorUpdateTemplate handle in which the resulting
4443e5c31af7Sopenharmony_ci    descriptor update template object is returned.
4444e5c31af7Sopenharmony_ci
4445e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCreateDescriptorUpdateTemplate.adoc[]
4446e5c31af7Sopenharmony_ci--
4447e5c31af7Sopenharmony_ci
4448e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorUpdateTemplateCreateInfo',desc='Structure specifying parameters of a newly created descriptor update template',type='structs']
4449e5c31af7Sopenharmony_ci--
4450e5c31af7Sopenharmony_ciThe slink:VkDescriptorUpdateTemplateCreateInfo structure is defined as:
4451e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDescriptorUpdateTemplateCreateInfo.adoc[]
4452e5c31af7Sopenharmony_ci
4453e5c31af7Sopenharmony_ciifdef::VK_KHR_descriptor_update_template[]
4454e5c31af7Sopenharmony_cior the equivalent
4455e5c31af7Sopenharmony_ci
4456e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDescriptorUpdateTemplateCreateInfoKHR.adoc[]
4457e5c31af7Sopenharmony_ciendif::VK_KHR_descriptor_update_template[]
4458e5c31af7Sopenharmony_ci
4459e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
4460e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
4461e5c31af7Sopenharmony_ci    structure.
4462e5c31af7Sopenharmony_ci  * pname:flags is reserved for future use.
4463e5c31af7Sopenharmony_ci  * pname:descriptorUpdateEntryCount is the number of elements in the
4464e5c31af7Sopenharmony_ci    pname:pDescriptorUpdateEntries array.
4465e5c31af7Sopenharmony_ci  * pname:pDescriptorUpdateEntries is a pointer to an array of
4466e5c31af7Sopenharmony_ci    slink:VkDescriptorUpdateTemplateEntry structures describing the
4467e5c31af7Sopenharmony_ci    descriptors to be updated by the descriptor update template.
4468e5c31af7Sopenharmony_ci  * pname:templateType Specifies the type of the descriptor update template.
4469e5c31af7Sopenharmony_ci    If set to ename:VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET it
4470e5c31af7Sopenharmony_ci    can: only be used to update descriptor sets with a fixed
4471e5c31af7Sopenharmony_ci    pname:descriptorSetLayout.
4472e5c31af7Sopenharmony_ciifdef::VK_KHR_push_descriptor[]
4473e5c31af7Sopenharmony_ci    If set to ename:VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR
4474e5c31af7Sopenharmony_ci    it can: only be used to push descriptor sets using the provided
4475e5c31af7Sopenharmony_ci    pname:pipelineBindPoint, pname:pipelineLayout, and pname:set number.
4476e5c31af7Sopenharmony_ciendif::VK_KHR_push_descriptor[]
4477e5c31af7Sopenharmony_ci  * pname:descriptorSetLayout is the descriptor set layout used to build the
4478e5c31af7Sopenharmony_ci    descriptor update template.
4479e5c31af7Sopenharmony_ci    All descriptor sets which are going to be updated through the newly
4480e5c31af7Sopenharmony_ci    created descriptor update template must: be created with a layout that
4481e5c31af7Sopenharmony_ci    matches (is the same as, or defined identically to) this layout.
4482e5c31af7Sopenharmony_ci    This parameter is ignored if pname:templateType is not
4483e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET.
4484e5c31af7Sopenharmony_ciifdef::VK_KHR_push_descriptor[]
4485e5c31af7Sopenharmony_ci  * pname:pipelineBindPoint is a elink:VkPipelineBindPoint indicating the
4486e5c31af7Sopenharmony_ci    type of the pipeline that will use the descriptors.
4487e5c31af7Sopenharmony_ci    This parameter is ignored if pname:templateType is not
4488e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR
4489e5c31af7Sopenharmony_ci  * pname:pipelineLayout is a slink:VkPipelineLayout object used to program
4490e5c31af7Sopenharmony_ci    the bindings.
4491e5c31af7Sopenharmony_ci    This parameter is ignored if pname:templateType is not
4492e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR
4493e5c31af7Sopenharmony_ci  * pname:set is the set number of the descriptor set in the pipeline layout
4494e5c31af7Sopenharmony_ci    that will be updated.
4495e5c31af7Sopenharmony_ci    This parameter is ignored if pname:templateType is not
4496e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR
4497e5c31af7Sopenharmony_ciendif::VK_KHR_push_descriptor[]
4498e5c31af7Sopenharmony_ciifndef::VK_KHR_push_descriptor[]
4499e5c31af7Sopenharmony_ci  * pname:pipelineBindPoint is reserved for future use and is ignored
4500e5c31af7Sopenharmony_ci  * pname:pipelineLayout is reserved for future use and is ignored
4501e5c31af7Sopenharmony_ci  * pname:set is reserved for future use and is ignored
4502e5c31af7Sopenharmony_ciendif::VK_KHR_push_descriptor[]
4503e5c31af7Sopenharmony_ci
4504e5c31af7Sopenharmony_ci.Valid Usage
4505e5c31af7Sopenharmony_ci****
4506e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorUpdateTemplateCreateInfo-templateType-00350]]
4507e5c31af7Sopenharmony_ci    If pname:templateType is
4508e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET,
4509e5c31af7Sopenharmony_ci    pname:descriptorSetLayout must: be a valid sname:VkDescriptorSetLayout
4510e5c31af7Sopenharmony_ci    handle
4511e5c31af7Sopenharmony_ciifdef::VK_KHR_push_descriptor[]
4512e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorUpdateTemplateCreateInfo-templateType-00351]]
4513e5c31af7Sopenharmony_ci    If pname:templateType is
4514e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR,
4515e5c31af7Sopenharmony_ci    pname:pipelineBindPoint must: be a valid elink:VkPipelineBindPoint value
4516e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorUpdateTemplateCreateInfo-templateType-00352]]
4517e5c31af7Sopenharmony_ci    If pname:templateType is
4518e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR,
4519e5c31af7Sopenharmony_ci    pname:pipelineLayout must: be a valid sname:VkPipelineLayout handle
4520e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorUpdateTemplateCreateInfo-templateType-00353]]
4521e5c31af7Sopenharmony_ci    If pname:templateType is
4522e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR, pname:set
4523e5c31af7Sopenharmony_ci    must: be the unique set number in the pipeline layout that uses a
4524e5c31af7Sopenharmony_ci    descriptor set layout that was created with
4525e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR
4526e5c31af7Sopenharmony_ciendif::VK_KHR_push_descriptor[]
4527e5c31af7Sopenharmony_ciifdef::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
4528e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorUpdateTemplateCreateInfo-templateType-04615]]
4529e5c31af7Sopenharmony_ci    If pname:templateType is
4530e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET,
4531e5c31af7Sopenharmony_ci    pname:descriptorSetLayout must: not contain a binding with type
4532e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT
4533e5c31af7Sopenharmony_ciendif::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
4534e5c31af7Sopenharmony_ci****
4535e5c31af7Sopenharmony_ci
4536e5c31af7Sopenharmony_ci
4537e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDescriptorUpdateTemplateCreateInfo.adoc[]
4538e5c31af7Sopenharmony_ci--
4539e5c31af7Sopenharmony_ci
4540e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorUpdateTemplateCreateFlags',desc='Reserved for future use',type='flags']
4541e5c31af7Sopenharmony_ci--
4542e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkDescriptorUpdateTemplateCreateFlags.adoc[]
4543e5c31af7Sopenharmony_ci
4544e5c31af7Sopenharmony_ciifdef::VK_KHR_descriptor_update_template[]
4545e5c31af7Sopenharmony_cior the equivalent
4546e5c31af7Sopenharmony_ci
4547e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkDescriptorUpdateTemplateCreateFlagsKHR.adoc[]
4548e5c31af7Sopenharmony_ciendif::VK_KHR_descriptor_update_template[]
4549e5c31af7Sopenharmony_ci
4550e5c31af7Sopenharmony_citname:VkDescriptorUpdateTemplateCreateFlags is a bitmask type for setting a
4551e5c31af7Sopenharmony_cimask, but is currently reserved for future use.
4552e5c31af7Sopenharmony_ci--
4553e5c31af7Sopenharmony_ci
4554e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorUpdateTemplateType',desc='Indicates the valid usage of the descriptor update template',type='enums']
4555e5c31af7Sopenharmony_ci--
4556e5c31af7Sopenharmony_ciThe descriptor update template type is determined by the
4557e5c31af7Sopenharmony_cislink:VkDescriptorUpdateTemplateCreateInfo::pname:templateType property,
4558e5c31af7Sopenharmony_ciwhich takes the following values:
4559e5c31af7Sopenharmony_ci
4560e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkDescriptorUpdateTemplateType.adoc[]
4561e5c31af7Sopenharmony_ci
4562e5c31af7Sopenharmony_ciifdef::VK_KHR_descriptor_update_template[]
4563e5c31af7Sopenharmony_cior the equivalent
4564e5c31af7Sopenharmony_ci
4565e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkDescriptorUpdateTemplateTypeKHR.adoc[]
4566e5c31af7Sopenharmony_ciendif::VK_KHR_descriptor_update_template[]
4567e5c31af7Sopenharmony_ci
4568e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET specifies that
4569e5c31af7Sopenharmony_ci    the descriptor update template will be used for descriptor set updates
4570e5c31af7Sopenharmony_ci    only.
4571e5c31af7Sopenharmony_ciifdef::VK_KHR_push_descriptor[]
4572e5c31af7Sopenharmony_ci  * ename:VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR specifies
4573e5c31af7Sopenharmony_ci    that the descriptor update template will be used for push descriptor
4574e5c31af7Sopenharmony_ci    updates only.
4575e5c31af7Sopenharmony_ciendif::VK_KHR_push_descriptor[]
4576e5c31af7Sopenharmony_ci--
4577e5c31af7Sopenharmony_ci
4578e5c31af7Sopenharmony_ci
4579e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorUpdateTemplateEntry',desc='Describes a single descriptor update of the descriptor update template',type='structs']
4580e5c31af7Sopenharmony_ci--
4581e5c31af7Sopenharmony_ciThe sname:VkDescriptorUpdateTemplateEntry structure is defined as:
4582e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDescriptorUpdateTemplateEntry.adoc[]
4583e5c31af7Sopenharmony_ci
4584e5c31af7Sopenharmony_ciifdef::VK_KHR_descriptor_update_template[]
4585e5c31af7Sopenharmony_cior the equivalent
4586e5c31af7Sopenharmony_ci
4587e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDescriptorUpdateTemplateEntryKHR.adoc[]
4588e5c31af7Sopenharmony_ciendif::VK_KHR_descriptor_update_template[]
4589e5c31af7Sopenharmony_ci
4590e5c31af7Sopenharmony_ci  * pname:dstBinding is the descriptor binding to update when using this
4591e5c31af7Sopenharmony_ci    descriptor update template.
4592e5c31af7Sopenharmony_ci  * pname:dstArrayElement is the starting element in the array belonging to
4593e5c31af7Sopenharmony_ci    pname:dstBinding.
4594e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
4595e5c31af7Sopenharmony_ci    If the descriptor binding identified by pname:dstBinding has a
4596e5c31af7Sopenharmony_ci    descriptor type of ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK then
4597e5c31af7Sopenharmony_ci    pname:dstArrayElement specifies the starting byte offset to update.
4598e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
4599e5c31af7Sopenharmony_ci  * pname:descriptorCount is the number of descriptors to update.
4600e5c31af7Sopenharmony_ci    If pname:descriptorCount is greater than the number of remaining array
4601e5c31af7Sopenharmony_ci    elements in the destination binding, those affect consecutive bindings
4602e5c31af7Sopenharmony_ci    in a manner similar to slink:VkWriteDescriptorSet above.
4603e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
4604e5c31af7Sopenharmony_ci    If the descriptor binding identified by pname:dstBinding has a
4605e5c31af7Sopenharmony_ci    descriptor type of ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK then
4606e5c31af7Sopenharmony_ci    pname:descriptorCount specifies the number of bytes to update and the
4607e5c31af7Sopenharmony_ci    remaining array elements in the destination binding refer to the
4608e5c31af7Sopenharmony_ci    remaining number of bytes in it.
4609e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
4610e5c31af7Sopenharmony_ci  * pname:descriptorType is a elink:VkDescriptorType specifying the type of
4611e5c31af7Sopenharmony_ci    the descriptor.
4612e5c31af7Sopenharmony_ci  * pname:offset is the offset in bytes of the first binding in the raw data
4613e5c31af7Sopenharmony_ci    structure.
4614e5c31af7Sopenharmony_ci  * pname:stride is the stride in bytes between two consecutive array
4615e5c31af7Sopenharmony_ci    elements of the descriptor update information in the raw data structure.
4616e5c31af7Sopenharmony_ci    The actual pointer ptr for each array element j of update entry i is
4617e5c31af7Sopenharmony_ci    computed using the following formula:
4618e5c31af7Sopenharmony_ci+
4619e5c31af7Sopenharmony_ci[source,c++]
4620e5c31af7Sopenharmony_ci----
4621e5c31af7Sopenharmony_ci    const char *ptr = (const char *)pData + pDescriptorUpdateEntries[i].offset + j * pDescriptorUpdateEntries[i].stride
4622e5c31af7Sopenharmony_ci----
4623e5c31af7Sopenharmony_ci+
4624e5c31af7Sopenharmony_ciThe stride is useful in case the bindings are stored in structs along with
4625e5c31af7Sopenharmony_ciother data.
4626e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
4627e5c31af7Sopenharmony_ciIf pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK
4628e5c31af7Sopenharmony_cithen the value of pname:stride is ignored and the stride is assumed to be
4629e5c31af7Sopenharmony_ci`1`, i.e. the descriptor update information for them is always specified as
4630e5c31af7Sopenharmony_cia contiguous range.
4631e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
4632e5c31af7Sopenharmony_ci
4633e5c31af7Sopenharmony_ci.Valid Usage
4634e5c31af7Sopenharmony_ci****
4635e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorUpdateTemplateEntry-dstBinding-00354]]
4636e5c31af7Sopenharmony_ci    pname:dstBinding must: be a valid binding in the descriptor set layout
4637e5c31af7Sopenharmony_ci    implicitly specified when using a descriptor update template to update
4638e5c31af7Sopenharmony_ci    descriptors
4639e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorUpdateTemplateEntry-dstArrayElement-00355]]
4640e5c31af7Sopenharmony_ci    pname:dstArrayElement and pname:descriptorCount must: be less than or
4641e5c31af7Sopenharmony_ci    equal to the number of array elements in the descriptor set binding
4642e5c31af7Sopenharmony_ci    implicitly specified when using a descriptor update template to update
4643e5c31af7Sopenharmony_ci    descriptors, and all applicable consecutive bindings, as described by
4644e5c31af7Sopenharmony_ci    <<descriptorsets-updates-consecutive>>
4645e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
4646e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorUpdateTemplateEntry-descriptor-02226]]
4647e5c31af7Sopenharmony_ci    If pname:descriptor type is
4648e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, pname:dstArrayElement
4649e5c31af7Sopenharmony_ci    must: be an integer multiple of `4`
4650e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorUpdateTemplateEntry-descriptor-02227]]
4651e5c31af7Sopenharmony_ci    If pname:descriptor type is
4652e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, pname:descriptorCount
4653e5c31af7Sopenharmony_ci    must: be an integer multiple of `4`
4654e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
4655e5c31af7Sopenharmony_ci****
4656e5c31af7Sopenharmony_ci
4657e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDescriptorUpdateTemplateEntry.adoc[]
4658e5c31af7Sopenharmony_ci--
4659e5c31af7Sopenharmony_ci
4660e5c31af7Sopenharmony_ci[open,refpage='vkDestroyDescriptorUpdateTemplate',desc='Destroy a descriptor update template object',type='protos']
4661e5c31af7Sopenharmony_ci--
4662e5c31af7Sopenharmony_ciTo destroy a descriptor update template, call:
4663e5c31af7Sopenharmony_ci
4664e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[]
4665e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkDestroyDescriptorUpdateTemplate.adoc[]
4666e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[]
4667e5c31af7Sopenharmony_ci
4668e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1+VK_KHR_descriptor_update_template[or the equivalent command]
4669e5c31af7Sopenharmony_ci
4670e5c31af7Sopenharmony_ciifdef::VK_KHR_descriptor_update_template[]
4671e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkDestroyDescriptorUpdateTemplateKHR.adoc[]
4672e5c31af7Sopenharmony_ciendif::VK_KHR_descriptor_update_template[]
4673e5c31af7Sopenharmony_ci
4674e5c31af7Sopenharmony_ci  * pname:device is the logical device that has been used to create the
4675e5c31af7Sopenharmony_ci    descriptor update template
4676e5c31af7Sopenharmony_ci  * pname:descriptorUpdateTemplate is the descriptor update template to
4677e5c31af7Sopenharmony_ci    destroy.
4678e5c31af7Sopenharmony_ci  * pname:pAllocator controls host memory allocation as described in the
4679e5c31af7Sopenharmony_ci    <<memory-allocation, Memory Allocation>> chapter.
4680e5c31af7Sopenharmony_ci
4681e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
4682e5c31af7Sopenharmony_ci.Valid Usage
4683e5c31af7Sopenharmony_ci****
4684e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyDescriptorUpdateTemplate-descriptorSetLayout-00356]]
4685e5c31af7Sopenharmony_ci    If sname:VkAllocationCallbacks were provided when
4686e5c31af7Sopenharmony_ci    pname:descriptorUpdateTemplate was created, a compatible set of
4687e5c31af7Sopenharmony_ci    callbacks must: be provided here
4688e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyDescriptorUpdateTemplate-descriptorSetLayout-00357]]
4689e5c31af7Sopenharmony_ci    If no sname:VkAllocationCallbacks were provided when
4690e5c31af7Sopenharmony_ci    pname:descriptorUpdateTemplate was created, pname:pAllocator must: be
4691e5c31af7Sopenharmony_ci    `NULL`
4692e5c31af7Sopenharmony_ci****
4693e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
4694e5c31af7Sopenharmony_ci
4695e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkDestroyDescriptorUpdateTemplate.adoc[]
4696e5c31af7Sopenharmony_ci--
4697e5c31af7Sopenharmony_ci
4698e5c31af7Sopenharmony_ci[open,refpage='vkUpdateDescriptorSetWithTemplate',desc='Update the contents of a descriptor set object using an update template',type='protos']
4699e5c31af7Sopenharmony_ci--
4700e5c31af7Sopenharmony_ciOnce a sname:VkDescriptorUpdateTemplate has been created, descriptor sets
4701e5c31af7Sopenharmony_cican: be updated by calling:
4702e5c31af7Sopenharmony_ci
4703e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[]
4704e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkUpdateDescriptorSetWithTemplate.adoc[]
4705e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[]
4706e5c31af7Sopenharmony_ci
4707e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1+VK_KHR_descriptor_update_template[or the equivalent command]
4708e5c31af7Sopenharmony_ci
4709e5c31af7Sopenharmony_ciifdef::VK_KHR_descriptor_update_template[]
4710e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkUpdateDescriptorSetWithTemplateKHR.adoc[]
4711e5c31af7Sopenharmony_ciendif::VK_KHR_descriptor_update_template[]
4712e5c31af7Sopenharmony_ci
4713e5c31af7Sopenharmony_ci  * pname:device is the logical device that updates the descriptor set.
4714e5c31af7Sopenharmony_ci  * pname:descriptorSet is the descriptor set to update
4715e5c31af7Sopenharmony_ci  * pname:descriptorUpdateTemplate is a slink:VkDescriptorUpdateTemplate
4716e5c31af7Sopenharmony_ci    object specifying the update mapping between pname:pData and the
4717e5c31af7Sopenharmony_ci    descriptor set to update.
4718e5c31af7Sopenharmony_ci  * pname:pData is a pointer to memory containing one or more
4719e5c31af7Sopenharmony_ci    slink:VkDescriptorImageInfo, slink:VkDescriptorBufferInfo, or
4720e5c31af7Sopenharmony_ci    slink:VkBufferView structures
4721e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure[or slink:VkAccelerationStructureKHR]
4722e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing[or slink:VkAccelerationStructureNV]
4723e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing,VK_KHR_acceleration_structure[handles]
4724e5c31af7Sopenharmony_ci    used to write the descriptors.
4725e5c31af7Sopenharmony_ci
4726e5c31af7Sopenharmony_ci.Valid Usage
4727e5c31af7Sopenharmony_ci****
4728e5c31af7Sopenharmony_ci  * [[VUID-vkUpdateDescriptorSetWithTemplate-pData-01685]]
4729e5c31af7Sopenharmony_ci    pname:pData must: be a valid pointer to a memory containing one or more
4730e5c31af7Sopenharmony_ci    valid instances of slink:VkDescriptorImageInfo,
4731e5c31af7Sopenharmony_ci    slink:VkDescriptorBufferInfo, or slink:VkBufferView in a layout defined
4732e5c31af7Sopenharmony_ci    by pname:descriptorUpdateTemplate when it was created with
4733e5c31af7Sopenharmony_ci    flink:vkCreateDescriptorUpdateTemplate
4734e5c31af7Sopenharmony_ci  * [[VUID-vkUpdateDescriptorSetWithTemplate-descriptorSet-06995]]
4735e5c31af7Sopenharmony_ci    Host access to pname:descriptorSet must: be
4736e5c31af7Sopenharmony_ci    <<fundamentals-threadingbehavior,externally synchronized>>
4737e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
4738e5c31af7Sopenharmony_ci    unless explicitly denoted otherwise for specific flags
4739e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
4740e5c31af7Sopenharmony_ci****
4741e5c31af7Sopenharmony_ci
4742e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkUpdateDescriptorSetWithTemplate.adoc[]
4743e5c31af7Sopenharmony_ci
4744e5c31af7Sopenharmony_ci.API example
4745e5c31af7Sopenharmony_ci[source,c++]
4746e5c31af7Sopenharmony_ci----
4747e5c31af7Sopenharmony_cistruct AppBufferView {
4748e5c31af7Sopenharmony_ci    VkBufferView bufferView;
4749e5c31af7Sopenharmony_ci    uint32_t     applicationRelatedInformation;
4750e5c31af7Sopenharmony_ci};
4751e5c31af7Sopenharmony_ci
4752e5c31af7Sopenharmony_cistruct AppDataStructure
4753e5c31af7Sopenharmony_ci{
4754e5c31af7Sopenharmony_ci    VkDescriptorImageInfo  imageInfo;          // a single image info
4755e5c31af7Sopenharmony_ci    VkDescriptorBufferInfo bufferInfoArray[3]; // 3 buffer infos in an array
4756e5c31af7Sopenharmony_ci    AppBufferView          bufferView[2];      // An application defined structure containing a bufferView
4757e5c31af7Sopenharmony_ci    // ... some more application related data
4758e5c31af7Sopenharmony_ci};
4759e5c31af7Sopenharmony_ci
4760e5c31af7Sopenharmony_ciconst VkDescriptorUpdateTemplateEntry descriptorUpdateTemplateEntries[] =
4761e5c31af7Sopenharmony_ci{
4762e5c31af7Sopenharmony_ci    // binding to a single image descriptor
4763e5c31af7Sopenharmony_ci    {
4764e5c31af7Sopenharmony_ci        .binding = 0,
4765e5c31af7Sopenharmony_ci        .dstArrayElement = 0,
4766e5c31af7Sopenharmony_ci        .descriptorCount = 1,
4767e5c31af7Sopenharmony_ci        .descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
4768e5c31af7Sopenharmony_ci        .offset = offsetof(AppDataStructure, imageInfo),
4769e5c31af7Sopenharmony_ci        .stride = 0         // stride not required if descriptorCount is 1
4770e5c31af7Sopenharmony_ci    },
4771e5c31af7Sopenharmony_ci
4772e5c31af7Sopenharmony_ci    // binding to an array of buffer descriptors
4773e5c31af7Sopenharmony_ci    {
4774e5c31af7Sopenharmony_ci        .binding = 1,
4775e5c31af7Sopenharmony_ci        .dstArrayElement = 0,
4776e5c31af7Sopenharmony_ci        .descriptorCount = 3,
4777e5c31af7Sopenharmony_ci        .descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
4778e5c31af7Sopenharmony_ci        .offset = offsetof(AppDataStructure, bufferInfoArray),
4779e5c31af7Sopenharmony_ci        .stride = sizeof(VkDescriptorBufferInfo)    // descriptor buffer infos are compact
4780e5c31af7Sopenharmony_ci    },
4781e5c31af7Sopenharmony_ci
4782e5c31af7Sopenharmony_ci    // binding to an array of buffer views
4783e5c31af7Sopenharmony_ci    {
4784e5c31af7Sopenharmony_ci        .binding = 2,
4785e5c31af7Sopenharmony_ci        .dstArrayElement = 0,
4786e5c31af7Sopenharmony_ci        .descriptorCount = 2,
4787e5c31af7Sopenharmony_ci        .descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER,
4788e5c31af7Sopenharmony_ci        .offset = offsetof(AppDataStructure, bufferView) +
4789e5c31af7Sopenharmony_ci                  offsetof(AppBufferView, bufferView),
4790e5c31af7Sopenharmony_ci        .stride = sizeof(AppBufferView)             // bufferViews do not have to be compact
4791e5c31af7Sopenharmony_ci    },
4792e5c31af7Sopenharmony_ci};
4793e5c31af7Sopenharmony_ci
4794e5c31af7Sopenharmony_ci// create a descriptor update template for descriptor set updates
4795e5c31af7Sopenharmony_ciconst VkDescriptorUpdateTemplateCreateInfo createInfo =
4796e5c31af7Sopenharmony_ci{
4797e5c31af7Sopenharmony_ci    .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO,
4798e5c31af7Sopenharmony_ci    .pNext = NULL,
4799e5c31af7Sopenharmony_ci    .flags = 0,
4800e5c31af7Sopenharmony_ci    .descriptorUpdateEntryCount = 3,
4801e5c31af7Sopenharmony_ci    .pDescriptorUpdateEntries = descriptorUpdateTemplateEntries,
4802e5c31af7Sopenharmony_ci    .templateType = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET,
4803e5c31af7Sopenharmony_ci    .descriptorSetLayout = myLayout,
4804e5c31af7Sopenharmony_ci    .pipelineBindPoint = 0,     // ignored by given templateType
4805e5c31af7Sopenharmony_ci    .pipelineLayout = 0,        // ignored by given templateType
4806e5c31af7Sopenharmony_ci    .set = 0,                   // ignored by given templateType
4807e5c31af7Sopenharmony_ci};
4808e5c31af7Sopenharmony_ci
4809e5c31af7Sopenharmony_ciVkDescriptorUpdateTemplate myDescriptorUpdateTemplate;
4810e5c31af7Sopenharmony_cimyResult = vkCreateDescriptorUpdateTemplate(
4811e5c31af7Sopenharmony_ci    myDevice,
4812e5c31af7Sopenharmony_ci    &createInfo,
4813e5c31af7Sopenharmony_ci    NULL,
4814e5c31af7Sopenharmony_ci    &myDescriptorUpdateTemplate);
4815e5c31af7Sopenharmony_ci
4816e5c31af7Sopenharmony_ciAppDataStructure appData;
4817e5c31af7Sopenharmony_ci
4818e5c31af7Sopenharmony_ci// fill appData here or cache it in your engine
4819e5c31af7Sopenharmony_civkUpdateDescriptorSetWithTemplate(myDevice, myDescriptorSet, myDescriptorUpdateTemplate, &appData);
4820e5c31af7Sopenharmony_ci----
4821e5c31af7Sopenharmony_ci--
4822e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_descriptor_update_template[]
4823e5c31af7Sopenharmony_ci
4824e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
4825e5c31af7Sopenharmony_ci
4826e5c31af7Sopenharmony_ci
4827e5c31af7Sopenharmony_ci[[descriptorsets-binding]]
4828e5c31af7Sopenharmony_ci=== Descriptor Set Binding
4829e5c31af7Sopenharmony_ci
4830e5c31af7Sopenharmony_ci[open,refpage='vkCmdBindDescriptorSets',desc='Binds descriptor sets to a command buffer',type='protos']
4831e5c31af7Sopenharmony_ci--
4832e5c31af7Sopenharmony_ci:refpage: vkCmdBindDescriptorSets
4833e5c31af7Sopenharmony_ci
4834e5c31af7Sopenharmony_ciTo bind one or more descriptor sets to a command buffer, call:
4835e5c31af7Sopenharmony_ci
4836e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCmdBindDescriptorSets.adoc[]
4837e5c31af7Sopenharmony_ci
4838e5c31af7Sopenharmony_ci  * pname:commandBuffer is the command buffer that the descriptor sets will
4839e5c31af7Sopenharmony_ci    be bound to.
4840e5c31af7Sopenharmony_ci  * pname:pipelineBindPoint is a elink:VkPipelineBindPoint indicating the
4841e5c31af7Sopenharmony_ci    type of the pipeline that will use the descriptors.
4842e5c31af7Sopenharmony_ci    There is a separate set of bind points for each pipeline type, so
4843e5c31af7Sopenharmony_ci    binding one does not disturb the others.
4844e5c31af7Sopenharmony_ci  * pname:layout is a slink:VkPipelineLayout object used to program the
4845e5c31af7Sopenharmony_ci    bindings.
4846e5c31af7Sopenharmony_ci  * pname:firstSet is the set number of the first descriptor set to be
4847e5c31af7Sopenharmony_ci    bound.
4848e5c31af7Sopenharmony_ci  * pname:descriptorSetCount is the number of elements in the
4849e5c31af7Sopenharmony_ci    pname:pDescriptorSets array.
4850e5c31af7Sopenharmony_ci  * pname:pDescriptorSets is a pointer to an array of handles to
4851e5c31af7Sopenharmony_ci    slink:VkDescriptorSet objects describing the descriptor sets to bind to.
4852e5c31af7Sopenharmony_ci  * pname:dynamicOffsetCount is the number of dynamic offsets in the
4853e5c31af7Sopenharmony_ci    pname:pDynamicOffsets array.
4854e5c31af7Sopenharmony_ci  * pname:pDynamicOffsets is a pointer to an array of code:uint32_t values
4855e5c31af7Sopenharmony_ci    specifying dynamic offsets.
4856e5c31af7Sopenharmony_ci
4857e5c31af7Sopenharmony_cifname:vkCmdBindDescriptorSets binds descriptor sets
4858e5c31af7Sopenharmony_cipname:pDescriptorSets[0..pname:descriptorSetCount-1] to set numbers
4859e5c31af7Sopenharmony_ci[pname:firstSet..pname:firstSet+pname:descriptorSetCount-1] for subsequent
4860e5c31af7Sopenharmony_ci<<pipelines-bindpoint-commands, bound pipeline commands>> set by
4861e5c31af7Sopenharmony_cipname:pipelineBindPoint.
4862e5c31af7Sopenharmony_ciAny bindings that were previously applied via these sets
4863e5c31af7Sopenharmony_ciifdef::VK_EXT_descriptor_buffer[]
4864e5c31af7Sopenharmony_ci, or calls to flink:vkCmdSetDescriptorBufferOffsetsEXT or
4865e5c31af7Sopenharmony_ciflink:vkCmdBindDescriptorBufferEmbeddedSamplersEXT,
4866e5c31af7Sopenharmony_ciendif::VK_EXT_descriptor_buffer[]
4867e5c31af7Sopenharmony_ciare no longer valid.
4868e5c31af7Sopenharmony_ci
4869e5c31af7Sopenharmony_ciOnce bound, a descriptor set affects rendering of subsequent commands that
4870e5c31af7Sopenharmony_ciinteract with the given pipeline type in the command buffer until either a
4871e5c31af7Sopenharmony_cidifferent set is bound to the same set number, or the set is disturbed as
4872e5c31af7Sopenharmony_cidescribed in <<descriptorsets-compatibility, Pipeline Layout
4873e5c31af7Sopenharmony_ciCompatibility>>.
4874e5c31af7Sopenharmony_ci
4875e5c31af7Sopenharmony_ciA compatible descriptor set must: be bound for all set numbers that any
4876e5c31af7Sopenharmony_cishaders in a pipeline access, at the time that a drawing or dispatching
4877e5c31af7Sopenharmony_cicommand is recorded to execute using that pipeline.
4878e5c31af7Sopenharmony_ciHowever, if none of the shaders in a pipeline statically use any bindings
4879e5c31af7Sopenharmony_ciwith a particular set number, then no descriptor set need be bound for that
4880e5c31af7Sopenharmony_ciset number, even if the pipeline layout includes a non-trivial descriptor
4881e5c31af7Sopenharmony_ciset layout for that set number.
4882e5c31af7Sopenharmony_ci
4883e5c31af7Sopenharmony_ci[[descriptor-validity]]
4884e5c31af7Sopenharmony_ciWhen consuming a descriptor, a descriptor is considered valid if the
4885e5c31af7Sopenharmony_cidescriptor is not undefined: as described by
4886e5c31af7Sopenharmony_ci<<descriptor-set-initial-state,descriptor set allocation>>.
4887e5c31af7Sopenharmony_ciifdef::VK_EXT_robustness2[]
4888e5c31af7Sopenharmony_ciIf the <<features-nullDescriptor, pname:nullDescriptor>> feature is enabled,
4889e5c31af7Sopenharmony_cia null descriptor is also considered valid.
4890e5c31af7Sopenharmony_ciendif::VK_EXT_robustness2[]
4891e5c31af7Sopenharmony_ciA descriptor that was disturbed by <<descriptorsets-compatibility, Pipeline
4892e5c31af7Sopenharmony_ciLayout Compatibility>>, or was never bound by fname:vkCmdBindDescriptorSets
4893e5c31af7Sopenharmony_ciis not considered valid.
4894e5c31af7Sopenharmony_ciIf a pipeline accesses a descriptor either statically or dynamically
4895e5c31af7Sopenharmony_cidepending on the elink:VkDescriptorBindingFlagBits, the consuming descriptor
4896e5c31af7Sopenharmony_citype in the pipeline must: match the elink:VkDescriptorType in
4897e5c31af7Sopenharmony_cislink:VkDescriptorSetLayoutCreateInfo for the descriptor to be considered
4898e5c31af7Sopenharmony_civalid.
4899e5c31af7Sopenharmony_ciifdef::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
4900e5c31af7Sopenharmony_ciIf a descriptor is a mutable descriptor, the consuming descriptor type in
4901e5c31af7Sopenharmony_cithe pipeline must: match the active descriptor type for the descriptor to be
4902e5c31af7Sopenharmony_ciconsidered valid.
4903e5c31af7Sopenharmony_ciendif::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
4904e5c31af7Sopenharmony_ci
4905e5c31af7Sopenharmony_ci[NOTE]
4906e5c31af7Sopenharmony_ci.Note
4907e5c31af7Sopenharmony_ci====
4908e5c31af7Sopenharmony_ciFurther validation may be carried out beyond validation for descriptor
4909e5c31af7Sopenharmony_citypes, e.g. <<textures-input-validation,Texel Input Validation>>.
4910e5c31af7Sopenharmony_ci====
4911e5c31af7Sopenharmony_ci
4912e5c31af7Sopenharmony_ci[[descriptorsets-binding-dynamicoffsets]]
4913e5c31af7Sopenharmony_ciIf any of the sets being bound include dynamic uniform or storage buffers,
4914e5c31af7Sopenharmony_cithen pname:pDynamicOffsets includes one element for each array element in
4915e5c31af7Sopenharmony_cieach dynamic descriptor type binding in each set.
4916e5c31af7Sopenharmony_ciValues are taken from pname:pDynamicOffsets in an order such that all
4917e5c31af7Sopenharmony_cientries for set N come before set N+1; within a set, entries are ordered by
4918e5c31af7Sopenharmony_cithe binding numbers in the descriptor set layouts; and within a binding
4919e5c31af7Sopenharmony_ciarray, elements are in order.
4920e5c31af7Sopenharmony_cipname:dynamicOffsetCount must: equal the total number of dynamic descriptors
4921e5c31af7Sopenharmony_ciin the sets being bound.
4922e5c31af7Sopenharmony_ci
4923e5c31af7Sopenharmony_ci[[dynamic-effective-offset]]
4924e5c31af7Sopenharmony_ciThe effective offset used for dynamic uniform and storage buffer bindings is
4925e5c31af7Sopenharmony_cithe sum of the relative offset taken from pname:pDynamicOffsets, and the
4926e5c31af7Sopenharmony_cibase address of the buffer plus base offset in the descriptor set.
4927e5c31af7Sopenharmony_ciThe range of the dynamic uniform and storage buffer bindings is the buffer
4928e5c31af7Sopenharmony_cirange as specified in the descriptor set.
4929e5c31af7Sopenharmony_ci
4930e5c31af7Sopenharmony_ciEach of the pname:pDescriptorSets must: be compatible with the pipeline
4931e5c31af7Sopenharmony_cilayout specified by pname:layout.
4932e5c31af7Sopenharmony_ciThe layout used to program the bindings must: also be compatible with the
4933e5c31af7Sopenharmony_cipipeline used in subsequent <<pipelines-bindpoint-commands, bound pipeline
4934e5c31af7Sopenharmony_cicommands>> with that pipeline type, as defined in the
4935e5c31af7Sopenharmony_ci<<descriptorsets-compatibility, Pipeline Layout Compatibility>> section.
4936e5c31af7Sopenharmony_ci
4937e5c31af7Sopenharmony_ciThe descriptor set contents bound by a call to fname:vkCmdBindDescriptorSets
4938e5c31af7Sopenharmony_cimay: be consumed at the following times:
4939e5c31af7Sopenharmony_ci
4940e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
4941e5c31af7Sopenharmony_ci  * For descriptor bindings created with the
4942e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT bit set, the contents
4943e5c31af7Sopenharmony_ci    may: be consumed when the command buffer is submitted to a queue, or
4944e5c31af7Sopenharmony_ci    during shader execution of the resulting draws and dispatches, or any
4945e5c31af7Sopenharmony_ci    time in between.
4946e5c31af7Sopenharmony_ci    Otherwise,
4947e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
4948e5c31af7Sopenharmony_ci  * during host execution of the command, or during shader execution of the
4949e5c31af7Sopenharmony_ci    resulting draws and dispatches, or any time in between.
4950e5c31af7Sopenharmony_ci
4951e5c31af7Sopenharmony_ciThus, the contents of a descriptor set binding must: not be altered
4952e5c31af7Sopenharmony_ci(overwritten by an update command, or freed) between the first point in time
4953e5c31af7Sopenharmony_cithat it may: be consumed, and when the command completes executing on the
4954e5c31af7Sopenharmony_ciqueue.
4955e5c31af7Sopenharmony_ci
4956e5c31af7Sopenharmony_ciThe contents of pname:pDynamicOffsets are consumed immediately during
4957e5c31af7Sopenharmony_ciexecution of fname:vkCmdBindDescriptorSets.
4958e5c31af7Sopenharmony_ciOnce all pending uses have completed, it is legal to update and reuse a
4959e5c31af7Sopenharmony_cidescriptor set.
4960e5c31af7Sopenharmony_ci
4961e5c31af7Sopenharmony_ci.Valid Usage
4962e5c31af7Sopenharmony_ci****
4963e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/bind_descriptor_sets_common.adoc[]
4964e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBindDescriptorSets-pipelineBindPoint-00361]]
4965e5c31af7Sopenharmony_ci    pname:pipelineBindPoint must: be supported by the pname:commandBuffer's
4966e5c31af7Sopenharmony_ci    parent sname:VkCommandPool's queue family
4967e5c31af7Sopenharmony_ci****
4968e5c31af7Sopenharmony_ci
4969e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCmdBindDescriptorSets.adoc[]
4970e5c31af7Sopenharmony_ci--
4971e5c31af7Sopenharmony_ci
4972e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance6[]
4973e5c31af7Sopenharmony_ci[open,refpage='vkCmdBindDescriptorSets2KHR',desc='Binds descriptor sets to a command buffer',type='protos']
4974e5c31af7Sopenharmony_ci--
4975e5c31af7Sopenharmony_ciAlternatively, to bind one or more descriptor sets to a command buffer,
4976e5c31af7Sopenharmony_cicall:
4977e5c31af7Sopenharmony_ci
4978e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCmdBindDescriptorSets2KHR.adoc[]
4979e5c31af7Sopenharmony_ci
4980e5c31af7Sopenharmony_ci  * pname:commandBuffer is the command buffer that the descriptor sets will
4981e5c31af7Sopenharmony_ci    be bound to.
4982e5c31af7Sopenharmony_ci  * pname:pBindDescriptorSetsInfo is a pointer to a
4983e5c31af7Sopenharmony_ci    sname:VkBindDescriptorSetsInfoKHR structure.
4984e5c31af7Sopenharmony_ci
4985e5c31af7Sopenharmony_ci.Valid Usage
4986e5c31af7Sopenharmony_ci****
4987e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBindDescriptorSets2KHR-pBindDescriptorSetsInfo-09467]]
4988e5c31af7Sopenharmony_ci    Each bit in pname:pBindDescriptorSetsInfo->stageFlags must: be a stage
4989e5c31af7Sopenharmony_ci    supported by the pname:commandBuffer's parent sname:VkCommandPool's
4990e5c31af7Sopenharmony_ci    queue family
4991e5c31af7Sopenharmony_ci****
4992e5c31af7Sopenharmony_ci
4993e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCmdBindDescriptorSets2KHR.adoc[]
4994e5c31af7Sopenharmony_ci--
4995e5c31af7Sopenharmony_ci
4996e5c31af7Sopenharmony_ci[open,refpage='VkBindDescriptorSetsInfoKHR',desc='Structure specifying a descriptor set binding operation',type='structs']
4997e5c31af7Sopenharmony_ci--
4998e5c31af7Sopenharmony_ci:refpage: VkBindDescriptorSetsInfoKHR
4999e5c31af7Sopenharmony_ci
5000e5c31af7Sopenharmony_ciThe sname:VkBindDescriptorSetsInfoKHR structure is defined as:
5001e5c31af7Sopenharmony_ci
5002e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBindDescriptorSetsInfoKHR.adoc[]
5003e5c31af7Sopenharmony_ci
5004e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
5005e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
5006e5c31af7Sopenharmony_ci    structure.
5007e5c31af7Sopenharmony_ci  * pname:stageFlags is a bitmask of elink:VkShaderStageFlagBits specifying
5008e5c31af7Sopenharmony_ci    the shader stages the descriptor sets will be bound to.
5009e5c31af7Sopenharmony_ci  * pname:layout is a slink:VkPipelineLayout object used to program the
5010e5c31af7Sopenharmony_ci    bindings.
5011e5c31af7Sopenharmony_ciifdef::VK_NV_per_stage_descriptor_set[]
5012e5c31af7Sopenharmony_ci    If the <<features-dynamicPipelineLayout, pname:dynamicPipelineLayout>>
5013e5c31af7Sopenharmony_ci    feature is enabled, pname:layout can: be dlink:VK_NULL_HANDLE and the
5014e5c31af7Sopenharmony_ci    layout must: be specified by chaining the
5015e5c31af7Sopenharmony_ci    slink:VkPipelineLayoutCreateInfo structure off the pname:pNext
5016e5c31af7Sopenharmony_ciendif::VK_NV_per_stage_descriptor_set[]
5017e5c31af7Sopenharmony_ci  * pname:firstSet is the set number of the first descriptor set to be
5018e5c31af7Sopenharmony_ci    bound.
5019e5c31af7Sopenharmony_ci  * pname:descriptorSetCount is the number of elements in the
5020e5c31af7Sopenharmony_ci    pname:pDescriptorSets array.
5021e5c31af7Sopenharmony_ci  * pname:pDescriptorSets is a pointer to an array of handles to
5022e5c31af7Sopenharmony_ci    slink:VkDescriptorSet objects describing the descriptor sets to bind to.
5023e5c31af7Sopenharmony_ci  * pname:dynamicOffsetCount is the number of dynamic offsets in the
5024e5c31af7Sopenharmony_ci    pname:pDynamicOffsets array.
5025e5c31af7Sopenharmony_ci  * pname:pDynamicOffsets is a pointer to an array of code:uint32_t values
5026e5c31af7Sopenharmony_ci    specifying dynamic offsets.
5027e5c31af7Sopenharmony_ci
5028e5c31af7Sopenharmony_ciIf pname:stageFlags specifies a subset of all stages corresponding to one or
5029e5c31af7Sopenharmony_cimore pipeline bind points, the binding operation still affects all stages
5030e5c31af7Sopenharmony_cicorresponding to the given pipeline bind point(s) as if the equivalent
5031e5c31af7Sopenharmony_cioriginal version of this command had been called with the same parameters.
5032e5c31af7Sopenharmony_ciFor example, specifying a pname:stageFlags value of
5033e5c31af7Sopenharmony_ciename:VK_SHADER_STAGE_VERTEX_BIT | ename:VK_SHADER_STAGE_FRAGMENT_BIT |
5034e5c31af7Sopenharmony_ciename:VK_SHADER_STAGE_COMPUTE_BIT is equivalent to calling the original
5035e5c31af7Sopenharmony_civersion of this command once with ename:VK_PIPELINE_BIND_POINT_GRAPHICS and
5036e5c31af7Sopenharmony_cionce with ename:VK_PIPELINE_BIND_POINT_COMPUTE.
5037e5c31af7Sopenharmony_ci
5038e5c31af7Sopenharmony_ci.Valid Usage
5039e5c31af7Sopenharmony_ci****
5040e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/bind_descriptor_sets_common.adoc[]
5041e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/dynamic_pipeline_layout_common.adoc[]
5042e5c31af7Sopenharmony_ci****
5043e5c31af7Sopenharmony_ci
5044e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkBindDescriptorSetsInfoKHR.adoc[]
5045e5c31af7Sopenharmony_ci--
5046e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance6[]
5047e5c31af7Sopenharmony_ci
5048e5c31af7Sopenharmony_ci
5049e5c31af7Sopenharmony_ciifdef::VK_KHR_push_descriptor[]
5050e5c31af7Sopenharmony_ci[[descriptorsets-push-descriptors]]
5051e5c31af7Sopenharmony_ci=== Push Descriptor Updates
5052e5c31af7Sopenharmony_ci
5053e5c31af7Sopenharmony_ci[open,refpage='vkCmdPushDescriptorSetKHR',desc='Pushes descriptor updates into a command buffer',type='protos']
5054e5c31af7Sopenharmony_ci--
5055e5c31af7Sopenharmony_ci:refpage: vkCmdPushDescriptorSetKHR
5056e5c31af7Sopenharmony_ci
5057e5c31af7Sopenharmony_ciIn addition to allocating descriptor sets and binding them to a command
5058e5c31af7Sopenharmony_cibuffer, an application can: record descriptor updates into the command
5059e5c31af7Sopenharmony_cibuffer.
5060e5c31af7Sopenharmony_ci
5061e5c31af7Sopenharmony_ciTo push descriptor updates into a command buffer, call:
5062e5c31af7Sopenharmony_ci
5063e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCmdPushDescriptorSetKHR.adoc[]
5064e5c31af7Sopenharmony_ci
5065e5c31af7Sopenharmony_ci  * pname:commandBuffer is the command buffer that the descriptors will be
5066e5c31af7Sopenharmony_ci    recorded in.
5067e5c31af7Sopenharmony_ci  * pname:pipelineBindPoint is a elink:VkPipelineBindPoint indicating the
5068e5c31af7Sopenharmony_ci    type of the pipeline that will use the descriptors.
5069e5c31af7Sopenharmony_ci    There is a separate set of push descriptor bindings for each pipeline
5070e5c31af7Sopenharmony_ci    type, so binding one does not disturb the others.
5071e5c31af7Sopenharmony_ci  * pname:layout is a slink:VkPipelineLayout object used to program the
5072e5c31af7Sopenharmony_ci    bindings.
5073e5c31af7Sopenharmony_ci  * pname:set is the set number of the descriptor set in the pipeline layout
5074e5c31af7Sopenharmony_ci    that will be updated.
5075e5c31af7Sopenharmony_ci  * pname:descriptorWriteCount is the number of elements in the
5076e5c31af7Sopenharmony_ci    pname:pDescriptorWrites array.
5077e5c31af7Sopenharmony_ci  * pname:pDescriptorWrites is a pointer to an array of
5078e5c31af7Sopenharmony_ci    slink:VkWriteDescriptorSet structures describing the descriptors to be
5079e5c31af7Sopenharmony_ci    updated.
5080e5c31af7Sopenharmony_ci
5081e5c31af7Sopenharmony_ci_Push descriptors_ are a small bank of descriptors whose storage is
5082e5c31af7Sopenharmony_ciinternally managed by the command buffer rather than being written into a
5083e5c31af7Sopenharmony_cidescriptor set and later bound to a command buffer.
5084e5c31af7Sopenharmony_ciPush descriptors allow for incremental updates of descriptors without
5085e5c31af7Sopenharmony_cimanaging the lifetime of descriptor sets.
5086e5c31af7Sopenharmony_ci
5087e5c31af7Sopenharmony_ciWhen a command buffer begins recording, all push descriptors are undefined:.
5088e5c31af7Sopenharmony_ciPush descriptors can: be updated incrementally and cause shaders to use the
5089e5c31af7Sopenharmony_ciupdated descriptors for subsequent <<pipelines-bindpoint-commands, bound
5090e5c31af7Sopenharmony_cipipeline commands>> with the pipeline type set by pname:pipelineBindPoint
5091e5c31af7Sopenharmony_ciuntil the descriptor is overwritten, or else until the set is disturbed as
5092e5c31af7Sopenharmony_cidescribed in <<descriptorsets-compatibility, Pipeline Layout
5093e5c31af7Sopenharmony_ciCompatibility>>.
5094e5c31af7Sopenharmony_ciWhen the set is disturbed or push descriptors with a different descriptor
5095e5c31af7Sopenharmony_ciset layout are set, all push descriptors are undefined:.
5096e5c31af7Sopenharmony_ci
5097e5c31af7Sopenharmony_ciPush descriptors that are <<shaders-staticuse,statically used>> by a
5098e5c31af7Sopenharmony_cipipeline must: not be undefined: at the time that a drawing or dispatching
5099e5c31af7Sopenharmony_cicommand is recorded to execute using that pipeline.
5100e5c31af7Sopenharmony_ciThis includes immutable sampler descriptors, which must: be pushed before
5101e5c31af7Sopenharmony_cithey are accessed by a pipeline (the immutable samplers are pushed, rather
5102e5c31af7Sopenharmony_cithan the samplers in pname:pDescriptorWrites).
5103e5c31af7Sopenharmony_ciPush descriptors that are not statically used can: remain undefined:.
5104e5c31af7Sopenharmony_ci
5105e5c31af7Sopenharmony_ciPush descriptors do not use dynamic offsets.
5106e5c31af7Sopenharmony_ciInstead, the corresponding non-dynamic descriptor types can: be used and the
5107e5c31af7Sopenharmony_cipname:offset member of slink:VkDescriptorBufferInfo can: be changed each
5108e5c31af7Sopenharmony_citime the descriptor is written.
5109e5c31af7Sopenharmony_ci
5110e5c31af7Sopenharmony_ciEach element of pname:pDescriptorWrites is interpreted as in
5111e5c31af7Sopenharmony_cislink:VkWriteDescriptorSet, except the pname:dstSet member is ignored.
5112e5c31af7Sopenharmony_ci
5113e5c31af7Sopenharmony_ciTo push an immutable sampler, use a slink:VkWriteDescriptorSet with
5114e5c31af7Sopenharmony_cipname:dstBinding and pname:dstArrayElement selecting the immutable sampler's
5115e5c31af7Sopenharmony_cibinding.
5116e5c31af7Sopenharmony_ciIf the descriptor type is ename:VK_DESCRIPTOR_TYPE_SAMPLER, the
5117e5c31af7Sopenharmony_cipname:pImageInfo parameter is ignored and the immutable sampler is taken
5118e5c31af7Sopenharmony_cifrom the push descriptor set layout in the pipeline layout.
5119e5c31af7Sopenharmony_ciIf the descriptor type is ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
5120e5c31af7Sopenharmony_cithe pname:sampler member of the pname:pImageInfo parameter is ignored and
5121e5c31af7Sopenharmony_cithe immutable sampler is taken from the push descriptor set layout in the
5122e5c31af7Sopenharmony_cipipeline layout.
5123e5c31af7Sopenharmony_ci
5124e5c31af7Sopenharmony_ci.Valid Usage
5125e5c31af7Sopenharmony_ci****
5126e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/push_descriptor_set_common.adoc[]
5127e5c31af7Sopenharmony_ci  * [[VUID-vkCmdPushDescriptorSetKHR-pipelineBindPoint-00363]]
5128e5c31af7Sopenharmony_ci    pname:pipelineBindPoint must: be supported by the pname:commandBuffer's
5129e5c31af7Sopenharmony_ci    parent sname:VkCommandPool's queue family
5130e5c31af7Sopenharmony_ci****
5131e5c31af7Sopenharmony_ci
5132e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCmdPushDescriptorSetKHR.adoc[]
5133e5c31af7Sopenharmony_ci--
5134e5c31af7Sopenharmony_ci
5135e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance6[]
5136e5c31af7Sopenharmony_ci[open,refpage='vkCmdPushDescriptorSet2KHR',desc='Pushes descriptor updates into a command buffer',type='protos']
5137e5c31af7Sopenharmony_ci--
5138e5c31af7Sopenharmony_ciAlternatively, to push descriptor updates into a command buffer, call:
5139e5c31af7Sopenharmony_ci
5140e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCmdPushDescriptorSet2KHR.adoc[]
5141e5c31af7Sopenharmony_ci
5142e5c31af7Sopenharmony_ci  * pname:commandBuffer is the command buffer that the descriptors will be
5143e5c31af7Sopenharmony_ci    recorded in.
5144e5c31af7Sopenharmony_ci  * pname:pPushDescriptorSetInfo is a pointer to a
5145e5c31af7Sopenharmony_ci    sname:VkPushDescriptorSetInfoKHR structure.
5146e5c31af7Sopenharmony_ci
5147e5c31af7Sopenharmony_ci.Valid Usage
5148e5c31af7Sopenharmony_ci****
5149e5c31af7Sopenharmony_ci  * [[VUID-vkCmdPushDescriptorSet2KHR-pPushDescriptorSetInfo-09468]]
5150e5c31af7Sopenharmony_ci    Each bit in pname:pPushDescriptorSetInfo->stageFlags must: be a stage
5151e5c31af7Sopenharmony_ci    supported by the pname:commandBuffer's parent sname:VkCommandPool's
5152e5c31af7Sopenharmony_ci    queue family
5153e5c31af7Sopenharmony_ci****
5154e5c31af7Sopenharmony_ci
5155e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCmdPushDescriptorSet2KHR.adoc[]
5156e5c31af7Sopenharmony_ci--
5157e5c31af7Sopenharmony_ci
5158e5c31af7Sopenharmony_ci[open,refpage='VkPushDescriptorSetInfoKHR',desc='Structure specifying a descriptor set push operation',type='structs']
5159e5c31af7Sopenharmony_ci--
5160e5c31af7Sopenharmony_ci:refpage: VkPushDescriptorSetInfoKHR
5161e5c31af7Sopenharmony_ci
5162e5c31af7Sopenharmony_ciThe sname:VkPushDescriptorSetInfoKHR structure is defined as:
5163e5c31af7Sopenharmony_ci
5164e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPushDescriptorSetInfoKHR.adoc[]
5165e5c31af7Sopenharmony_ci
5166e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
5167e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
5168e5c31af7Sopenharmony_ci    structure.
5169e5c31af7Sopenharmony_ci  * pname:stageFlags is a bitmask of elink:VkShaderStageFlagBits specifying
5170e5c31af7Sopenharmony_ci    the shader stages that will use the descriptors.
5171e5c31af7Sopenharmony_ci  * pname:layout is a slink:VkPipelineLayout object used to program the
5172e5c31af7Sopenharmony_ci    bindings.
5173e5c31af7Sopenharmony_ciifdef::VK_NV_per_stage_descriptor_set[]
5174e5c31af7Sopenharmony_ci    If the <<features-dynamicPipelineLayout, pname:dynamicPipelineLayout>>
5175e5c31af7Sopenharmony_ci    feature is enabled, pname:layout can: be dlink:VK_NULL_HANDLE and the
5176e5c31af7Sopenharmony_ci    layout must: be specified by chaining slink:VkPipelineLayoutCreateInfo
5177e5c31af7Sopenharmony_ci    structure off the pname:pNext
5178e5c31af7Sopenharmony_ciendif::VK_NV_per_stage_descriptor_set[]
5179e5c31af7Sopenharmony_ci  * pname:set is the set number of the descriptor set in the pipeline layout
5180e5c31af7Sopenharmony_ci    that will be updated.
5181e5c31af7Sopenharmony_ci  * pname:descriptorWriteCount is the number of elements in the
5182e5c31af7Sopenharmony_ci    pname:pDescriptorWrites array.
5183e5c31af7Sopenharmony_ci  * pname:pDescriptorWrites is a pointer to an array of
5184e5c31af7Sopenharmony_ci    slink:VkWriteDescriptorSet structures describing the descriptors to be
5185e5c31af7Sopenharmony_ci    updated.
5186e5c31af7Sopenharmony_ci
5187e5c31af7Sopenharmony_ciIf pname:stageFlags specifies a subset of all stages corresponding to one or
5188e5c31af7Sopenharmony_cimore pipeline bind points, the binding operation still affects all stages
5189e5c31af7Sopenharmony_cicorresponding to the given pipeline bind point(s) as if the equivalent
5190e5c31af7Sopenharmony_cioriginal version of this command had been called with the same parameters.
5191e5c31af7Sopenharmony_ciFor example, specifying a pname:stageFlags value of
5192e5c31af7Sopenharmony_ciename:VK_SHADER_STAGE_VERTEX_BIT | ename:VK_SHADER_STAGE_FRAGMENT_BIT |
5193e5c31af7Sopenharmony_ciename:VK_SHADER_STAGE_COMPUTE_BIT is equivalent to calling the original
5194e5c31af7Sopenharmony_civersion of this command once with ename:VK_PIPELINE_BIND_POINT_GRAPHICS and
5195e5c31af7Sopenharmony_cionce with ename:VK_PIPELINE_BIND_POINT_COMPUTE.
5196e5c31af7Sopenharmony_ci
5197e5c31af7Sopenharmony_ci.Valid Usage
5198e5c31af7Sopenharmony_ci****
5199e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/push_descriptor_set_common.adoc[]
5200e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/dynamic_pipeline_layout_common.adoc[]
5201e5c31af7Sopenharmony_ci****
5202e5c31af7Sopenharmony_ci
5203e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkPushDescriptorSetInfoKHR.adoc[]
5204e5c31af7Sopenharmony_ci--
5205e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance6[]
5206e5c31af7Sopenharmony_ci
5207e5c31af7Sopenharmony_ci
5208e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_descriptor_update_template[]
5209e5c31af7Sopenharmony_ci=== Push Descriptor Updates With Descriptor Update Templates
5210e5c31af7Sopenharmony_ci
5211e5c31af7Sopenharmony_ci[open,refpage='vkCmdPushDescriptorSetWithTemplateKHR',desc='Pushes descriptor updates into a command buffer using a descriptor update template',type='protos']
5212e5c31af7Sopenharmony_ci--
5213e5c31af7Sopenharmony_ci:refpage: vkCmdPushDescriptorSetWithTemplateKHR
5214e5c31af7Sopenharmony_ci
5215e5c31af7Sopenharmony_ciIt is also possible to use a descriptor update template to specify the push
5216e5c31af7Sopenharmony_cidescriptors to update.
5217e5c31af7Sopenharmony_ciTo do so, call:
5218e5c31af7Sopenharmony_ci
5219e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCmdPushDescriptorSetWithTemplateKHR.adoc[]
5220e5c31af7Sopenharmony_ci
5221e5c31af7Sopenharmony_ci  * pname:commandBuffer is the command buffer that the descriptors will be
5222e5c31af7Sopenharmony_ci    recorded in.
5223e5c31af7Sopenharmony_ci  * pname:descriptorUpdateTemplate is a descriptor update template defining
5224e5c31af7Sopenharmony_ci    how to interpret the descriptor information in pname:pData.
5225e5c31af7Sopenharmony_ci  * pname:layout is a slink:VkPipelineLayout object used to program the
5226e5c31af7Sopenharmony_ci    bindings.
5227e5c31af7Sopenharmony_ci    It must: be compatible with the layout used to create the
5228e5c31af7Sopenharmony_ci    pname:descriptorUpdateTemplate handle.
5229e5c31af7Sopenharmony_ci  * pname:set is the set number of the descriptor set in the pipeline layout
5230e5c31af7Sopenharmony_ci    that will be updated.
5231e5c31af7Sopenharmony_ci    This must: be the same number used to create the
5232e5c31af7Sopenharmony_ci    pname:descriptorUpdateTemplate handle.
5233e5c31af7Sopenharmony_ci  * pname:pData is a pointer to memory containing descriptors for the
5234e5c31af7Sopenharmony_ci    templated update.
5235e5c31af7Sopenharmony_ci
5236e5c31af7Sopenharmony_ci.Valid Usage
5237e5c31af7Sopenharmony_ci****
5238e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/push_descriptor_set_with_template_common.adoc[]
5239e5c31af7Sopenharmony_ci****
5240e5c31af7Sopenharmony_ci
5241e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCmdPushDescriptorSetWithTemplateKHR.adoc[]
5242e5c31af7Sopenharmony_ci
5243e5c31af7Sopenharmony_ci.API example
5244e5c31af7Sopenharmony_ci[source,c++]
5245e5c31af7Sopenharmony_ci----
5246e5c31af7Sopenharmony_ci
5247e5c31af7Sopenharmony_cistruct AppDataStructure
5248e5c31af7Sopenharmony_ci{
5249e5c31af7Sopenharmony_ci    VkDescriptorImageInfo  imageInfo;          // a single image info
5250e5c31af7Sopenharmony_ci    // ... some more application related data
5251e5c31af7Sopenharmony_ci};
5252e5c31af7Sopenharmony_ci
5253e5c31af7Sopenharmony_ciconst VkDescriptorUpdateTemplateEntry descriptorUpdateTemplateEntries[] =
5254e5c31af7Sopenharmony_ci{
5255e5c31af7Sopenharmony_ci    // binding to a single image descriptor
5256e5c31af7Sopenharmony_ci    {
5257e5c31af7Sopenharmony_ci        .binding = 0,
5258e5c31af7Sopenharmony_ci        .dstArrayElement = 0,
5259e5c31af7Sopenharmony_ci        .descriptorCount = 1,
5260e5c31af7Sopenharmony_ci        .descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
5261e5c31af7Sopenharmony_ci        .offset = offsetof(AppDataStructure, imageInfo),
5262e5c31af7Sopenharmony_ci        .stride = 0     // not required if descriptorCount is 1
5263e5c31af7Sopenharmony_ci    }
5264e5c31af7Sopenharmony_ci};
5265e5c31af7Sopenharmony_ci
5266e5c31af7Sopenharmony_ci// create a descriptor update template for push descriptor set updates
5267e5c31af7Sopenharmony_ciconst VkDescriptorUpdateTemplateCreateInfo createInfo =
5268e5c31af7Sopenharmony_ci{
5269e5c31af7Sopenharmony_ci    .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO,
5270e5c31af7Sopenharmony_ci    .pNext = NULL,
5271e5c31af7Sopenharmony_ci    .flags = 0,
5272e5c31af7Sopenharmony_ci    .descriptorUpdateEntryCount = 1,
5273e5c31af7Sopenharmony_ci    .pDescriptorUpdateEntries = descriptorUpdateTemplateEntries,
5274e5c31af7Sopenharmony_ci    .templateType = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR,
5275e5c31af7Sopenharmony_ci    .descriptorSetLayout = 0,   // ignored by given templateType
5276e5c31af7Sopenharmony_ci    .pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS,
5277e5c31af7Sopenharmony_ci    .pipelineLayout = myPipelineLayout,
5278e5c31af7Sopenharmony_ci    .set = 0,
5279e5c31af7Sopenharmony_ci};
5280e5c31af7Sopenharmony_ci
5281e5c31af7Sopenharmony_ciVkDescriptorUpdateTemplate myDescriptorUpdateTemplate;
5282e5c31af7Sopenharmony_cimyResult = vkCreateDescriptorUpdateTemplate(
5283e5c31af7Sopenharmony_ci    myDevice,
5284e5c31af7Sopenharmony_ci    &createInfo,
5285e5c31af7Sopenharmony_ci    NULL,
5286e5c31af7Sopenharmony_ci    &myDescriptorUpdateTemplate);
5287e5c31af7Sopenharmony_ci
5288e5c31af7Sopenharmony_ciAppDataStructure appData;
5289e5c31af7Sopenharmony_ci// fill appData here or cache it in your engine
5290e5c31af7Sopenharmony_civkCmdPushDescriptorSetWithTemplateKHR(myCmdBuffer, myDescriptorUpdateTemplate, myPipelineLayout, 0,&appData);
5291e5c31af7Sopenharmony_ci----
5292e5c31af7Sopenharmony_ci--
5293e5c31af7Sopenharmony_ci
5294e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance6[]
5295e5c31af7Sopenharmony_ci[open,refpage='vkCmdPushDescriptorSetWithTemplate2KHR',desc='Pushes descriptor updates into a command buffer using a descriptor update template',type='protos']
5296e5c31af7Sopenharmony_ci--
5297e5c31af7Sopenharmony_ciAlternatively, to use a descriptor update template to specify the push
5298e5c31af7Sopenharmony_cidescriptors to update, call:
5299e5c31af7Sopenharmony_ci
5300e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCmdPushDescriptorSetWithTemplate2KHR.adoc[]
5301e5c31af7Sopenharmony_ci
5302e5c31af7Sopenharmony_ci  * pname:commandBuffer is the command buffer that the descriptors will be
5303e5c31af7Sopenharmony_ci    recorded in.
5304e5c31af7Sopenharmony_ci  * pname:pPushDescriptorSetWithTemplateInfo is a pointer to a
5305e5c31af7Sopenharmony_ci    sname:VkPushDescriptorSetWithTemplateInfoKHR structure.
5306e5c31af7Sopenharmony_ci
5307e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCmdPushDescriptorSetWithTemplate2KHR.adoc[]
5308e5c31af7Sopenharmony_ci--
5309e5c31af7Sopenharmony_ci
5310e5c31af7Sopenharmony_ci[open,refpage='VkPushDescriptorSetWithTemplateInfoKHR',desc='Structure specifying a descriptor set push operation using a descriptor update template',type='structs']
5311e5c31af7Sopenharmony_ci--
5312e5c31af7Sopenharmony_ci:refpage: VkPushDescriptorSetWithTemplateInfoKHR
5313e5c31af7Sopenharmony_ci
5314e5c31af7Sopenharmony_ciThe sname:VkPushDescriptorSetWithTemplateInfoKHR structure is defined as:
5315e5c31af7Sopenharmony_ci
5316e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPushDescriptorSetWithTemplateInfoKHR.adoc[]
5317e5c31af7Sopenharmony_ci
5318e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
5319e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
5320e5c31af7Sopenharmony_ci    structure.
5321e5c31af7Sopenharmony_ci  * pname:descriptorUpdateTemplate is a descriptor update template defining
5322e5c31af7Sopenharmony_ci    how to interpret the descriptor information in pname:pData.
5323e5c31af7Sopenharmony_ci  * pname:layout is a slink:VkPipelineLayout object used to program the
5324e5c31af7Sopenharmony_ci    bindings.
5325e5c31af7Sopenharmony_ci    It must: be compatible with the layout used to create the
5326e5c31af7Sopenharmony_ci    pname:descriptorUpdateTemplate handle.
5327e5c31af7Sopenharmony_ciifdef::VK_NV_per_stage_descriptor_set[]
5328e5c31af7Sopenharmony_ci    If the <<features-dynamicPipelineLayout, pname:dynamicPipelineLayout>>
5329e5c31af7Sopenharmony_ci    feature is enabled, pname:layout can: be dlink:VK_NULL_HANDLE and the
5330e5c31af7Sopenharmony_ci    layout must: be specified by chaining slink:VkPipelineLayoutCreateInfo
5331e5c31af7Sopenharmony_ci    structure off the pname:pNext
5332e5c31af7Sopenharmony_ciendif::VK_NV_per_stage_descriptor_set[]
5333e5c31af7Sopenharmony_ci  * pname:set is the set number of the descriptor set in the pipeline layout
5334e5c31af7Sopenharmony_ci    that will be updated.
5335e5c31af7Sopenharmony_ci    This must: be the same number used to create the
5336e5c31af7Sopenharmony_ci    pname:descriptorUpdateTemplate handle.
5337e5c31af7Sopenharmony_ci  * pname:pData is a pointer to memory containing descriptors for the
5338e5c31af7Sopenharmony_ci    templated update.
5339e5c31af7Sopenharmony_ci
5340e5c31af7Sopenharmony_ci.Valid Usage
5341e5c31af7Sopenharmony_ci****
5342e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/push_descriptor_set_with_template_common.adoc[]
5343e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/dynamic_pipeline_layout_common.adoc[]
5344e5c31af7Sopenharmony_ci****
5345e5c31af7Sopenharmony_ci
5346e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkPushDescriptorSetWithTemplateInfoKHR.adoc[]
5347e5c31af7Sopenharmony_ci--
5348e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance6[]
5349e5c31af7Sopenharmony_ci
5350e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_descriptor_update_template[]
5351e5c31af7Sopenharmony_ciendif::VK_KHR_push_descriptor[]
5352e5c31af7Sopenharmony_ci
5353e5c31af7Sopenharmony_ci
5354e5c31af7Sopenharmony_ci[[descriptorsets-push-constants]]
5355e5c31af7Sopenharmony_ci=== Push Constant Updates
5356e5c31af7Sopenharmony_ci
5357e5c31af7Sopenharmony_ciAs described above in section <<descriptorsets-pipelinelayout, Pipeline
5358e5c31af7Sopenharmony_ciLayouts>>, the pipeline layout defines shader push constants which are
5359e5c31af7Sopenharmony_ciupdated via Vulkan commands rather than via writes to memory or copy
5360e5c31af7Sopenharmony_cicommands.
5361e5c31af7Sopenharmony_ci
5362e5c31af7Sopenharmony_ci[NOTE]
5363e5c31af7Sopenharmony_ci.Note
5364e5c31af7Sopenharmony_ci====
5365e5c31af7Sopenharmony_ciPush constants represent a high speed path to modify constant data in
5366e5c31af7Sopenharmony_cipipelines that is expected to outperform memory-backed resource updates.
5367e5c31af7Sopenharmony_ci====
5368e5c31af7Sopenharmony_ci
5369e5c31af7Sopenharmony_ci[open,refpage='vkCmdPushConstants',desc='Update the values of push constants',type='protos']
5370e5c31af7Sopenharmony_ci--
5371e5c31af7Sopenharmony_ci:refpage: vkCmdPushConstants
5372e5c31af7Sopenharmony_ci
5373e5c31af7Sopenharmony_ciTo update push constants, call:
5374e5c31af7Sopenharmony_ci
5375e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCmdPushConstants.adoc[]
5376e5c31af7Sopenharmony_ci
5377e5c31af7Sopenharmony_ci  * pname:commandBuffer is the command buffer in which the push constant
5378e5c31af7Sopenharmony_ci    update will be recorded.
5379e5c31af7Sopenharmony_ci  * pname:layout is the pipeline layout used to program the push constant
5380e5c31af7Sopenharmony_ci    updates.
5381e5c31af7Sopenharmony_ci  * pname:stageFlags is a bitmask of elink:VkShaderStageFlagBits specifying
5382e5c31af7Sopenharmony_ci    the shader stages that will use the push constants in the updated range.
5383e5c31af7Sopenharmony_ci  * pname:offset is the start offset of the push constant range to update,
5384e5c31af7Sopenharmony_ci    in units of bytes.
5385e5c31af7Sopenharmony_ci  * pname:size is the size of the push constant range to update, in units of
5386e5c31af7Sopenharmony_ci    bytes.
5387e5c31af7Sopenharmony_ci  * pname:pValues is a pointer to an array of pname:size bytes containing
5388e5c31af7Sopenharmony_ci    the new push constant values.
5389e5c31af7Sopenharmony_ci
5390e5c31af7Sopenharmony_ciWhen a command buffer begins recording, all push constant values are
5391e5c31af7Sopenharmony_ciundefined:.
5392e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_KHR_maintenance4[]
5393e5c31af7Sopenharmony_ciReads of undefined: push constant values by the executing shader return
5394e5c31af7Sopenharmony_ciundefined: values.
5395e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_KHR_maintenance4[]
5396e5c31af7Sopenharmony_ci
5397e5c31af7Sopenharmony_ciPush constant values can: be updated incrementally, causing shader stages in
5398e5c31af7Sopenharmony_cipname:stageFlags to read the new data from pname:pValues for push constants
5399e5c31af7Sopenharmony_cimodified by this command, while still reading the previous data for push
5400e5c31af7Sopenharmony_ciconstants not modified by this command.
5401e5c31af7Sopenharmony_ciWhen a <<pipelines-bindpoint-commands, bound pipeline command>> is issued,
5402e5c31af7Sopenharmony_cithe bound pipeline's layout must: be compatible with the layouts used to set
5403e5c31af7Sopenharmony_cithe values of all push constants in the pipeline layout's push constant
5404e5c31af7Sopenharmony_ciranges, as described in <<descriptorsets-compatibility,Pipeline Layout
5405e5c31af7Sopenharmony_ciCompatibility>>.
5406e5c31af7Sopenharmony_ciBinding a pipeline with a layout that is not compatible with the push
5407e5c31af7Sopenharmony_ciconstant layout does not disturb the push constant values.
5408e5c31af7Sopenharmony_ci
5409e5c31af7Sopenharmony_ci[NOTE]
5410e5c31af7Sopenharmony_ci.Note
5411e5c31af7Sopenharmony_ci====
5412e5c31af7Sopenharmony_ciAs pname:stageFlags needs to include all flags the relevant push constant
5413e5c31af7Sopenharmony_ciranges were created with, any flags that are not supported by the queue
5414e5c31af7Sopenharmony_cifamily that the slink:VkCommandPool used to allocate pname:commandBuffer was
5415e5c31af7Sopenharmony_cicreated on are ignored.
5416e5c31af7Sopenharmony_ci====
5417e5c31af7Sopenharmony_ci
5418e5c31af7Sopenharmony_ci.Valid Usage
5419e5c31af7Sopenharmony_ci****
5420e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/push_constants_common.adoc[]
5421e5c31af7Sopenharmony_ci****
5422e5c31af7Sopenharmony_ci
5423e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCmdPushConstants.adoc[]
5424e5c31af7Sopenharmony_ci--
5425e5c31af7Sopenharmony_ci
5426e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance6[]
5427e5c31af7Sopenharmony_ci[open,refpage='vkCmdPushConstants2KHR',desc='Update the values of push constants',type='protos']
5428e5c31af7Sopenharmony_ci--
5429e5c31af7Sopenharmony_ciAlternatively, to update push constants, call:
5430e5c31af7Sopenharmony_ci
5431e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCmdPushConstants2KHR.adoc[]
5432e5c31af7Sopenharmony_ci
5433e5c31af7Sopenharmony_ci  * pname:commandBuffer is the command buffer in which the push constant
5434e5c31af7Sopenharmony_ci    update will be recorded.
5435e5c31af7Sopenharmony_ci  * pname:pPushConstantsInfo is a pointer to a sname:VkPushConstantsInfoKHR
5436e5c31af7Sopenharmony_ci    structure.
5437e5c31af7Sopenharmony_ci
5438e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCmdPushConstants2KHR.adoc[]
5439e5c31af7Sopenharmony_ci--
5440e5c31af7Sopenharmony_ci
5441e5c31af7Sopenharmony_ci[open,refpage='VkPushConstantsInfoKHR',desc='Structure specifying a push constant update operation',type='structs']
5442e5c31af7Sopenharmony_ci--
5443e5c31af7Sopenharmony_ci:refpage: VkPushConstantsInfoKHR
5444e5c31af7Sopenharmony_ci
5445e5c31af7Sopenharmony_ciThe sname:VkPushConstantsInfoKHR structure is defined as:
5446e5c31af7Sopenharmony_ci
5447e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPushConstantsInfoKHR.adoc[]
5448e5c31af7Sopenharmony_ci
5449e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
5450e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
5451e5c31af7Sopenharmony_ci    structure.
5452e5c31af7Sopenharmony_ci  * pname:layout is the pipeline layout used to program the push constant
5453e5c31af7Sopenharmony_ci    updates.
5454e5c31af7Sopenharmony_ciifdef::VK_NV_per_stage_descriptor_set[]
5455e5c31af7Sopenharmony_ci    If the <<features-dynamicPipelineLayout, pname:dynamicPipelineLayout>>
5456e5c31af7Sopenharmony_ci    feature is enabled, pname:layout can: be dlink:VK_NULL_HANDLE and the
5457e5c31af7Sopenharmony_ci    layout must: be specified by chaining slink:VkPipelineLayoutCreateInfo
5458e5c31af7Sopenharmony_ci    structure off the pname:pNext
5459e5c31af7Sopenharmony_ciendif::VK_NV_per_stage_descriptor_set[]
5460e5c31af7Sopenharmony_ci  * pname:stageFlags is a bitmask of elink:VkShaderStageFlagBits specifying
5461e5c31af7Sopenharmony_ci    the shader stages that will use the push constants in the updated range.
5462e5c31af7Sopenharmony_ci  * pname:offset is the start offset of the push constant range to update,
5463e5c31af7Sopenharmony_ci    in units of bytes.
5464e5c31af7Sopenharmony_ci  * pname:size is the size of the push constant range to update, in units of
5465e5c31af7Sopenharmony_ci    bytes.
5466e5c31af7Sopenharmony_ci  * pname:pValues is a pointer to an array of pname:size bytes containing
5467e5c31af7Sopenharmony_ci    the new push constant values.
5468e5c31af7Sopenharmony_ci
5469e5c31af7Sopenharmony_ci.Valid Usage
5470e5c31af7Sopenharmony_ci****
5471e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/push_constants_common.adoc[]
5472e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/dynamic_pipeline_layout_common.adoc[]
5473e5c31af7Sopenharmony_ci****
5474e5c31af7Sopenharmony_ci
5475e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkPushConstantsInfoKHR.adoc[]
5476e5c31af7Sopenharmony_ci--
5477e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance6[]
5478e5c31af7Sopenharmony_ci
5479e5c31af7Sopenharmony_ci
5480e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_buffer_device_address,VK_KHR_buffer_device_address[]
5481e5c31af7Sopenharmony_ci[[descriptorsets-physical-storage-buffer]]
5482e5c31af7Sopenharmony_ci== Physical Storage Buffer Access
5483e5c31af7Sopenharmony_ci
5484e5c31af7Sopenharmony_ci[open,refpage='vkGetBufferDeviceAddress',desc='Query an address of a buffer',type='protos',alias='vkGetBufferDeviceAddressKHR']
5485e5c31af7Sopenharmony_ci--
5486e5c31af7Sopenharmony_ciTo query a 64-bit buffer device address value through which buffer memory
5487e5c31af7Sopenharmony_cican: be accessed in a shader, call:
5488e5c31af7Sopenharmony_ci
5489e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2[]
5490e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetBufferDeviceAddress.adoc[]
5491e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2[]
5492e5c31af7Sopenharmony_ci
5493e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2+VK_KHR_buffer_device_address[or the equivalent command]
5494e5c31af7Sopenharmony_ci
5495e5c31af7Sopenharmony_ciifdef::VK_KHR_buffer_device_address[]
5496e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetBufferDeviceAddressKHR.adoc[]
5497e5c31af7Sopenharmony_ciendif::VK_KHR_buffer_device_address[]
5498e5c31af7Sopenharmony_ci
5499e5c31af7Sopenharmony_ci// Jon: 3-way conditional logic here is wrong
5500e5c31af7Sopenharmony_ci
5501e5c31af7Sopenharmony_ciifdef::VK_EXT_buffer_device_address[]
5502e5c31af7Sopenharmony_cior the equivalent command
5503e5c31af7Sopenharmony_ci
5504e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetBufferDeviceAddressEXT.adoc[]
5505e5c31af7Sopenharmony_ciendif::VK_EXT_buffer_device_address[]
5506e5c31af7Sopenharmony_ci
5507e5c31af7Sopenharmony_ci  * pname:device is the logical device that the buffer was created on.
5508e5c31af7Sopenharmony_ci  * pname:pInfo is a pointer to a slink:VkBufferDeviceAddressInfo structure
5509e5c31af7Sopenharmony_ci    specifying the buffer to retrieve an address for.
5510e5c31af7Sopenharmony_ci
5511e5c31af7Sopenharmony_ciThe 64-bit return value is an address of the start of pname:pInfo->buffer.
5512e5c31af7Sopenharmony_ciThe address range starting at this value and whose size is the size of the
5513e5c31af7Sopenharmony_cibuffer can: be used in a shader to access the memory bound to that buffer,
5514e5c31af7Sopenharmony_ciusing the
5515e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_buffer_device_address[]
5516e5c31af7Sopenharmony_ci`SPV_KHR_physical_storage_buffer` extension
5517e5c31af7Sopenharmony_ciifdef::VK_EXT_buffer_device_address[or the equivalent]
5518e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_buffer_device_address[]
5519e5c31af7Sopenharmony_ciifdef::VK_EXT_buffer_device_address[]
5520e5c31af7Sopenharmony_ci`SPV_EXT_physical_storage_buffer` extension
5521e5c31af7Sopenharmony_ciendif::VK_EXT_buffer_device_address[]
5522e5c31af7Sopenharmony_ciand the code:PhysicalStorageBuffer storage class.
5523e5c31af7Sopenharmony_ciFor example, this value can: be stored in a uniform buffer, and the shader
5524e5c31af7Sopenharmony_cican: read the value from the uniform buffer and use it to do a dependent
5525e5c31af7Sopenharmony_ciread/write to this buffer.
5526e5c31af7Sopenharmony_ciA value of zero is reserved as a "`null`" pointer and must: not be returned
5527e5c31af7Sopenharmony_cias a valid buffer device address.
5528e5c31af7Sopenharmony_ciAll loads, stores, and atomics in a shader through
5529e5c31af7Sopenharmony_cicode:PhysicalStorageBuffer pointers must: access addresses in the address
5530e5c31af7Sopenharmony_cirange of some buffer.
5531e5c31af7Sopenharmony_ci
5532e5c31af7Sopenharmony_ciIf the buffer was created with a non-zero value of
5533e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_buffer_device_address[]
5534e5c31af7Sopenharmony_ciifdef::VK_EXT_buffer_device_address[slink:VkBufferOpaqueCaptureAddressCreateInfo::pname:opaqueCaptureAddress or]
5535e5c31af7Sopenharmony_ciifndef::VK_EXT_buffer_device_address[slink:VkBufferOpaqueCaptureAddressCreateInfo::pname:opaqueCaptureAddress,]
5536e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_buffer_device_address[]
5537e5c31af7Sopenharmony_ciifdef::VK_EXT_buffer_device_address[]
5538e5c31af7Sopenharmony_cislink:VkBufferDeviceAddressCreateInfoEXT::pname:deviceAddress,
5539e5c31af7Sopenharmony_ciendif::VK_EXT_buffer_device_address[]
5540e5c31af7Sopenharmony_cithe return value will be the same address that was returned at capture time.
5541e5c31af7Sopenharmony_ci
5542e5c31af7Sopenharmony_ciThe returned address must: satisfy the alignment requirement specified by
5543e5c31af7Sopenharmony_cislink:VkMemoryRequirements::pname:alignment for the buffer in
5544e5c31af7Sopenharmony_cislink:VkBufferDeviceAddressInfo::pname:buffer.
5545e5c31af7Sopenharmony_ci
5546e5c31af7Sopenharmony_ciIf multiple slink:VkBuffer objects are bound to overlapping ranges of
5547e5c31af7Sopenharmony_cislink:VkDeviceMemory, implementations may: return address ranges which
5548e5c31af7Sopenharmony_cioverlap.
5549e5c31af7Sopenharmony_ciIn this case, it is ambiguous which slink:VkBuffer is associated with any
5550e5c31af7Sopenharmony_cigiven device address.
5551e5c31af7Sopenharmony_ciFor purposes of valid usage, if multiple slink:VkBuffer objects can: be
5552e5c31af7Sopenharmony_ciattributed to a device address, a slink:VkBuffer is selected such that valid
5553e5c31af7Sopenharmony_ciusage passes, if it exists.
5554e5c31af7Sopenharmony_ci
5555e5c31af7Sopenharmony_ci.Valid Usage
5556e5c31af7Sopenharmony_ci****
5557e5c31af7Sopenharmony_ci  * [[VUID-vkGetBufferDeviceAddress-bufferDeviceAddress-03324]]
5558e5c31af7Sopenharmony_ci    The <<features-bufferDeviceAddress, pname:bufferDeviceAddress>>
5559e5c31af7Sopenharmony_ciifdef::VK_EXT_buffer_device_address[]
5560e5c31af7Sopenharmony_ci    or <<features-bufferDeviceAddressEXT,
5561e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceBufferDeviceAddressFeaturesEXT::pname:bufferDeviceAddress>>
5562e5c31af7Sopenharmony_ciendif::VK_EXT_buffer_device_address[]
5563e5c31af7Sopenharmony_ci    feature must: be enabled
5564e5c31af7Sopenharmony_ci  * [[VUID-vkGetBufferDeviceAddress-device-03325]]
5565e5c31af7Sopenharmony_ci    If pname:device was created with multiple physical devices, then the
5566e5c31af7Sopenharmony_ci    <<features-bufferDeviceAddressMultiDevice,
5567e5c31af7Sopenharmony_ci    pname:bufferDeviceAddressMultiDevice>>
5568e5c31af7Sopenharmony_ciifdef::VK_EXT_buffer_device_address[]
5569e5c31af7Sopenharmony_ci    or <<features-bufferDeviceAddressMultiDeviceEXT,
5570e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceBufferDeviceAddressFeaturesEXT::pname:bufferDeviceAddressMultiDevice>>
5571e5c31af7Sopenharmony_ciendif::VK_EXT_buffer_device_address[]
5572e5c31af7Sopenharmony_ci    feature must: be enabled
5573e5c31af7Sopenharmony_ci****
5574e5c31af7Sopenharmony_ci
5575e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetBufferDeviceAddress.adoc[]
5576e5c31af7Sopenharmony_ci--
5577e5c31af7Sopenharmony_ci
5578e5c31af7Sopenharmony_ci[open,refpage='VkBufferDeviceAddressInfo',desc='Structure specifying the buffer to query an address for',type='structs',alias='VkBufferDeviceAddressInfoKHR,VkBufferDeviceAddressInfoEXT']
5579e5c31af7Sopenharmony_ci--
5580e5c31af7Sopenharmony_ciThe sname:VkBufferDeviceAddressInfo structure is defined as:
5581e5c31af7Sopenharmony_ci
5582e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBufferDeviceAddressInfo.adoc[]
5583e5c31af7Sopenharmony_ci
5584e5c31af7Sopenharmony_ciifdef::VK_KHR_buffer_device_address[]
5585e5c31af7Sopenharmony_cior the equivalent
5586e5c31af7Sopenharmony_ci
5587e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBufferDeviceAddressInfoKHR.adoc[]
5588e5c31af7Sopenharmony_ciendif::VK_KHR_buffer_device_address[]
5589e5c31af7Sopenharmony_ci
5590e5c31af7Sopenharmony_ci// Jon: three-way conditional logic is broken
5591e5c31af7Sopenharmony_ciifdef::VK_EXT_buffer_device_address[]
5592e5c31af7Sopenharmony_cior the equivalent
5593e5c31af7Sopenharmony_ci
5594e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBufferDeviceAddressInfoEXT.adoc[]
5595e5c31af7Sopenharmony_ciendif::VK_EXT_buffer_device_address[]
5596e5c31af7Sopenharmony_ci
5597e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
5598e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
5599e5c31af7Sopenharmony_ci    structure.
5600e5c31af7Sopenharmony_ci  * pname:buffer specifies the buffer whose address is being queried.
5601e5c31af7Sopenharmony_ci
5602e5c31af7Sopenharmony_ci.Valid Usage
5603e5c31af7Sopenharmony_ci****
5604e5c31af7Sopenharmony_ci  * [[VUID-VkBufferDeviceAddressInfo-buffer-02600]]
5605e5c31af7Sopenharmony_ci    If pname:buffer is non-sparse and was not created with the
5606e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT flag, then it
5607e5c31af7Sopenharmony_ci    must: be bound completely and contiguously to a single
5608e5c31af7Sopenharmony_ci    sname:VkDeviceMemory object
5609e5c31af7Sopenharmony_ci  * [[VUID-VkBufferDeviceAddressInfo-buffer-02601]]
5610e5c31af7Sopenharmony_ci    pname:buffer must: have been created with
5611e5c31af7Sopenharmony_ci    ename:VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT
5612e5c31af7Sopenharmony_ci****
5613e5c31af7Sopenharmony_ci
5614e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkBufferDeviceAddressInfo.adoc[]
5615e5c31af7Sopenharmony_ci--
5616e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_buffer_device_address,VK_KHR_buffer_device_address[]
5617e5c31af7Sopenharmony_ci
5618e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_buffer_device_address[]
5619e5c31af7Sopenharmony_ci[open,refpage='vkGetBufferOpaqueCaptureAddress',desc='Query an opaque capture address of a buffer',type='protos',alias='vkGetBufferOpaqueCaptureAddressKHR']
5620e5c31af7Sopenharmony_ci--
5621e5c31af7Sopenharmony_ciTo query a 64-bit buffer opaque capture address, call:
5622e5c31af7Sopenharmony_ci
5623e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2[]
5624e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetBufferOpaqueCaptureAddress.adoc[]
5625e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2[]
5626e5c31af7Sopenharmony_ci
5627e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2+VK_KHR_buffer_device_address[or the equivalent command]
5628e5c31af7Sopenharmony_ci
5629e5c31af7Sopenharmony_ciifdef::VK_KHR_buffer_device_address[]
5630e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetBufferOpaqueCaptureAddressKHR.adoc[]
5631e5c31af7Sopenharmony_ciendif::VK_KHR_buffer_device_address[]
5632e5c31af7Sopenharmony_ci
5633e5c31af7Sopenharmony_ci  * pname:device is the logical device that the buffer was created on.
5634e5c31af7Sopenharmony_ci  * pname:pInfo is a pointer to a slink:VkBufferDeviceAddressInfo structure
5635e5c31af7Sopenharmony_ci    specifying the buffer to retrieve an address for.
5636e5c31af7Sopenharmony_ci
5637e5c31af7Sopenharmony_ciThe 64-bit return value is an opaque capture address of the start of
5638e5c31af7Sopenharmony_cipname:pInfo->buffer.
5639e5c31af7Sopenharmony_ci
5640e5c31af7Sopenharmony_ciIf the buffer was created with a non-zero value of
5641e5c31af7Sopenharmony_cislink:VkBufferOpaqueCaptureAddressCreateInfo::pname:opaqueCaptureAddress the
5642e5c31af7Sopenharmony_cireturn value must: be the same address.
5643e5c31af7Sopenharmony_ci
5644e5c31af7Sopenharmony_ci.Valid Usage
5645e5c31af7Sopenharmony_ci****
5646e5c31af7Sopenharmony_ci  * [[VUID-vkGetBufferOpaqueCaptureAddress-None-03326]]
5647e5c31af7Sopenharmony_ci    The <<features-bufferDeviceAddress, pname:bufferDeviceAddress>> feature
5648e5c31af7Sopenharmony_ci    must: be enabled
5649e5c31af7Sopenharmony_ci  * [[VUID-vkGetBufferOpaqueCaptureAddress-device-03327]]
5650e5c31af7Sopenharmony_ci    If pname:device was created with multiple physical devices, then the
5651e5c31af7Sopenharmony_ci    <<features-bufferDeviceAddressMultiDevice,
5652e5c31af7Sopenharmony_ci    pname:bufferDeviceAddressMultiDevice>> feature must: be enabled
5653e5c31af7Sopenharmony_ci****
5654e5c31af7Sopenharmony_ci
5655e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetBufferOpaqueCaptureAddress.adoc[]
5656e5c31af7Sopenharmony_ci--
5657e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_buffer_device_address[]
5658e5c31af7Sopenharmony_ci
5659e5c31af7Sopenharmony_ci
5660e5c31af7Sopenharmony_ciifdef::VK_EXT_descriptor_buffer[]
5661e5c31af7Sopenharmony_ci[[descriptorbuffers]]
5662e5c31af7Sopenharmony_ci== Descriptor Buffers
5663e5c31af7Sopenharmony_ci
5664e5c31af7Sopenharmony_ciIf the <<features-descriptorBuffer, pname:descriptorBuffer>> feature is
5665e5c31af7Sopenharmony_cienabled, an alternative way to specify descriptor sets is via buffers,
5666e5c31af7Sopenharmony_cirather than descriptor set objects.
5667e5c31af7Sopenharmony_ci
5668e5c31af7Sopenharmony_ci
5669e5c31af7Sopenharmony_ci[[descriptorbuffers-puttingdescriptorsinmemory]]
5670e5c31af7Sopenharmony_ci=== Putting Descriptors in Memory
5671e5c31af7Sopenharmony_ci
5672e5c31af7Sopenharmony_ciCommands are provided to retrieve descriptor data, and also to locate where
5673e5c31af7Sopenharmony_ciin memory that data must: be written to match the given descriptor set
5674e5c31af7Sopenharmony_cilayout.
5675e5c31af7Sopenharmony_ci
5676e5c31af7Sopenharmony_ci[open,refpage='vkGetDescriptorSetLayoutSizeEXT',desc='Get the size of a descriptor set layout in memory',type='protos']
5677e5c31af7Sopenharmony_ci--
5678e5c31af7Sopenharmony_ciTo determine the amount of memory needed to store all descriptors with a
5679e5c31af7Sopenharmony_cigiven layout, call:
5680e5c31af7Sopenharmony_ci
5681e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetDescriptorSetLayoutSizeEXT.adoc[]
5682e5c31af7Sopenharmony_ci
5683e5c31af7Sopenharmony_ci  * pname:device is the logical device that gets the size.
5684e5c31af7Sopenharmony_ci  * pname:layout is the descriptor set layout being queried.
5685e5c31af7Sopenharmony_ci  * pname:pLayoutSizeInBytes is a pointer to basetype:VkDeviceSize where the
5686e5c31af7Sopenharmony_ci    size in bytes will be written.
5687e5c31af7Sopenharmony_ci
5688e5c31af7Sopenharmony_ciThe size of a descriptor set layout will be at least as large as the sum
5689e5c31af7Sopenharmony_citotal of the size of all descriptors in the layout, and may: be larger.
5690e5c31af7Sopenharmony_ciThis size represents the amount of memory that will be required to store all
5691e5c31af7Sopenharmony_ciof the descriptors for this layout in memory, when placed according to the
5692e5c31af7Sopenharmony_cilayout's offsets as obtained by
5693e5c31af7Sopenharmony_ciflink:vkGetDescriptorSetLayoutBindingOffsetEXT.
5694e5c31af7Sopenharmony_ci
5695e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
5696e5c31af7Sopenharmony_ciIf any pname:binding in pname:layout is
5697e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT, the returned size
5698e5c31af7Sopenharmony_ciincludes space for the maximum pname:descriptorCount descriptors as declared
5699e5c31af7Sopenharmony_cifor that pname:binding.
5700e5c31af7Sopenharmony_ciTo compute the required size of a descriptor set with a
5701e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT:
5702e5c31af7Sopenharmony_ci
5703e5c31af7Sopenharmony_ci  {empty}:: [eq]#size = offset + descriptorSize {times}
5704e5c31af7Sopenharmony_ci            variableDescriptorCount#
5705e5c31af7Sopenharmony_ci
5706e5c31af7Sopenharmony_ciwhere [eq]#offset# is obtained by
5707e5c31af7Sopenharmony_ciflink:vkGetDescriptorSetLayoutBindingOffsetEXT and [eq]#descriptorSize# is
5708e5c31af7Sopenharmony_cithe size of the relevant descriptor as obtained from
5709e5c31af7Sopenharmony_cislink:VkPhysicalDeviceDescriptorBufferPropertiesEXT, and
5710e5c31af7Sopenharmony_ci[eq]#variableDescriptorCount# is the equivalent of
5711e5c31af7Sopenharmony_cislink:VkDescriptorSetVariableDescriptorCountAllocateInfo::pname:pDescriptorCounts.
5712e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
5713e5c31af7Sopenharmony_ciFor ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK,
5714e5c31af7Sopenharmony_ci[eq]#variableDescriptorCount# is the size in bytes for the inline uniform
5715e5c31af7Sopenharmony_ciblock, and [eq]#descriptorSize# is 1.
5716e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
5717e5c31af7Sopenharmony_ci
5718e5c31af7Sopenharmony_ciIf
5719e5c31af7Sopenharmony_cislink:VkPhysicalDeviceDescriptorBufferPropertiesEXT::pname:combinedImageSamplerDescriptorSingleArray
5720e5c31af7Sopenharmony_ciis ename:VK_FALSE and the variable descriptor type is
5721e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
5722e5c31af7Sopenharmony_ci[eq]#variableDescriptorCount# is always considered to be the upper bound.
5723e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
5724e5c31af7Sopenharmony_ci
5725e5c31af7Sopenharmony_ci.Valid Usage
5726e5c31af7Sopenharmony_ci****
5727e5c31af7Sopenharmony_ci  * [[VUID-vkGetDescriptorSetLayoutSizeEXT-None-08011]]
5728e5c31af7Sopenharmony_ci    The <<features-descriptorBuffer, pname:descriptorBuffer>> feature must:
5729e5c31af7Sopenharmony_ci    be enabled
5730e5c31af7Sopenharmony_ci  * [[VUID-vkGetDescriptorSetLayoutSizeEXT-layout-08012]]
5731e5c31af7Sopenharmony_ci    pname:layout must: have been created with the
5732e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT flag set
5733e5c31af7Sopenharmony_ci****
5734e5c31af7Sopenharmony_ci
5735e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetDescriptorSetLayoutSizeEXT.adoc[]
5736e5c31af7Sopenharmony_ci--
5737e5c31af7Sopenharmony_ci
5738e5c31af7Sopenharmony_ci[open,refpage='vkGetDescriptorSetLayoutBindingOffsetEXT',desc='Get the offset of a binding within a descriptor set layout',type='protos']
5739e5c31af7Sopenharmony_ci--
5740e5c31af7Sopenharmony_ciTo get the offset of a binding within a descriptor set layout in memory,
5741e5c31af7Sopenharmony_cicall:
5742e5c31af7Sopenharmony_ci
5743e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetDescriptorSetLayoutBindingOffsetEXT.adoc[]
5744e5c31af7Sopenharmony_ci
5745e5c31af7Sopenharmony_ci  * pname:device is the logical device that gets the offset.
5746e5c31af7Sopenharmony_ci  * pname:layout is the descriptor set layout being queried.
5747e5c31af7Sopenharmony_ci  * pname:binding is the binding number being queried.
5748e5c31af7Sopenharmony_ci  * pname:pOffset is a pointer to basetype:VkDeviceSize where the byte
5749e5c31af7Sopenharmony_ci    offset of the binding will be written.
5750e5c31af7Sopenharmony_ci
5751e5c31af7Sopenharmony_ciEach binding in a descriptor set layout is assigned an offset in memory by
5752e5c31af7Sopenharmony_cithe implementation.
5753e5c31af7Sopenharmony_ciWhen a shader accesses a resource with that binding, it will access the
5754e5c31af7Sopenharmony_cibound descriptor buffer from that offset to look for its descriptor.
5755e5c31af7Sopenharmony_ciThis command provides an application with that offset, so that descriptors
5756e5c31af7Sopenharmony_cican be placed in the correct locations.
5757e5c31af7Sopenharmony_ciThe precise location accessed by a shader for a given descriptor is as
5758e5c31af7Sopenharmony_cifollows:
5759e5c31af7Sopenharmony_ci
5760e5c31af7Sopenharmony_ci  {empty}:: [eq]#location = bufferAddress {plus} setOffset {plus}
5761e5c31af7Sopenharmony_ci            descriptorOffset {plus} (arrayElement {times} descriptorSize)#
5762e5c31af7Sopenharmony_ci
5763e5c31af7Sopenharmony_ciwhere [eq]#bufferAddress# and [eq]#setOffset# are the base address and
5764e5c31af7Sopenharmony_cioffset for the identified descriptor set as specified by
5765e5c31af7Sopenharmony_ciflink:vkCmdBindDescriptorBuffersEXT and
5766e5c31af7Sopenharmony_ciflink:vkCmdSetDescriptorBufferOffsetsEXT, [eq]#descriptorOffset# is the
5767e5c31af7Sopenharmony_cioffset for the binding returned by this command, [eq]#arrayElement# is the
5768e5c31af7Sopenharmony_ciindex into the array specified in the shader, and [eq]#descriptorSize# is
5769e5c31af7Sopenharmony_cithe size of the relevant descriptor as obtained from
5770e5c31af7Sopenharmony_cislink:VkPhysicalDeviceDescriptorBufferPropertiesEXT.
5771e5c31af7Sopenharmony_ciApplications are responsible for placing valid descriptors at the expected
5772e5c31af7Sopenharmony_cilocation in order for a shader to access it.
5773e5c31af7Sopenharmony_ciThe overall offset added to [eq]#bufferAddress# to calculate [eq]#location#
5774e5c31af7Sopenharmony_cimust: be less than
5775e5c31af7Sopenharmony_cislink:VkPhysicalDeviceDescriptorBufferPropertiesEXT::pname:maxSamplerDescriptorBufferRange
5776e5c31af7Sopenharmony_cifor samplers and
5777e5c31af7Sopenharmony_cislink:VkPhysicalDeviceDescriptorBufferPropertiesEXT::pname:maxResourceDescriptorBufferRange
5778e5c31af7Sopenharmony_cifor resources.
5779e5c31af7Sopenharmony_ci
5780e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
5781e5c31af7Sopenharmony_ciIf any pname:binding in pname:layout is
5782e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT, that
5783e5c31af7Sopenharmony_cipname:binding must: have the largest offset of any pname:binding.
5784e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
5785e5c31af7Sopenharmony_ci
5786e5c31af7Sopenharmony_ciifdef::VK_VALVE_mutable_descriptor_type[]
5787e5c31af7Sopenharmony_ciA descriptor pname:binding with type ename:VK_DESCRIPTOR_TYPE_MUTABLE_VALVE
5788e5c31af7Sopenharmony_cican: be used.
5789e5c31af7Sopenharmony_ciAny potential types in
5790e5c31af7Sopenharmony_cislink:VkMutableDescriptorTypeCreateInfoVALVE::pname:pDescriptorTypes for
5791e5c31af7Sopenharmony_cipname:binding share the same offset.
5792e5c31af7Sopenharmony_ciIf the size of the <<descriptorsets-mutable, mutable descriptor>> is larger
5793e5c31af7Sopenharmony_cithan the size of a concrete descriptor type being accessed, the padding area
5794e5c31af7Sopenharmony_ciis ignored by the implementation.
5795e5c31af7Sopenharmony_ciendif::VK_VALVE_mutable_descriptor_type[]
5796e5c31af7Sopenharmony_ci
5797e5c31af7Sopenharmony_ci.Valid Usage
5798e5c31af7Sopenharmony_ci****
5799e5c31af7Sopenharmony_ci  * [[VUID-vkGetDescriptorSetLayoutBindingOffsetEXT-None-08013]]
5800e5c31af7Sopenharmony_ci    The <<features-descriptorBuffer, pname:descriptorBuffer>> feature must:
5801e5c31af7Sopenharmony_ci    be enabled
5802e5c31af7Sopenharmony_ci  * [[VUID-vkGetDescriptorSetLayoutBindingOffsetEXT-layout-08014]]
5803e5c31af7Sopenharmony_ci    pname:layout must: have been created with the
5804e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT flag set
5805e5c31af7Sopenharmony_ci****
5806e5c31af7Sopenharmony_ci
5807e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetDescriptorSetLayoutBindingOffsetEXT.adoc[]
5808e5c31af7Sopenharmony_ci--
5809e5c31af7Sopenharmony_ci
5810e5c31af7Sopenharmony_ci[open,refpage='vkGetDescriptorEXT',desc='To get a descriptor to place in a buffer',type='protos']
5811e5c31af7Sopenharmony_ci--
5812e5c31af7Sopenharmony_ciTo get descriptor data to place in a buffer, call:
5813e5c31af7Sopenharmony_ci
5814e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetDescriptorEXT.adoc[]
5815e5c31af7Sopenharmony_ci
5816e5c31af7Sopenharmony_ci  * pname:device is the logical device that gets the descriptor.
5817e5c31af7Sopenharmony_ci  * pname:pDescriptorInfo is a pointer to a slink:VkDescriptorGetInfoEXT
5818e5c31af7Sopenharmony_ci    structure specifying the parameters of the descriptor to get.
5819e5c31af7Sopenharmony_ci  * pname:dataSize is the amount of the descriptor data to get in bytes.
5820e5c31af7Sopenharmony_ci  * pname:pDescriptor is a pointer to a user-allocated buffer where the
5821e5c31af7Sopenharmony_ci    descriptor will be written.
5822e5c31af7Sopenharmony_ci
5823e5c31af7Sopenharmony_ciThe size of the data for each descriptor type is determined by the value in
5824e5c31af7Sopenharmony_cislink:VkPhysicalDeviceDescriptorBufferPropertiesEXT.
5825e5c31af7Sopenharmony_ciThis value also defines the stride in bytes for arrays of that descriptor
5826e5c31af7Sopenharmony_citype.
5827e5c31af7Sopenharmony_ci
5828e5c31af7Sopenharmony_ciIf the
5829e5c31af7Sopenharmony_cislink:VkPhysicalDeviceDescriptorBufferPropertiesEXT::pname:combinedImageSamplerDescriptorSingleArray
5830e5c31af7Sopenharmony_ciproperty is ename:VK_FALSE the implementation requires an array of
5831e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER descriptors to be written
5832e5c31af7Sopenharmony_ciinto a descriptor buffer as an array of image descriptors, immediately
5833e5c31af7Sopenharmony_cifollowed by an array of sampler descriptors.
5834e5c31af7Sopenharmony_ciApplications must: write the first
5835e5c31af7Sopenharmony_cislink:VkPhysicalDeviceDescriptorBufferPropertiesEXT::pname:sampledImageDescriptorSize
5836e5c31af7Sopenharmony_cibytes of the data returned through pname:pDescriptor to the first array, and
5837e5c31af7Sopenharmony_cithe remaining
5838e5c31af7Sopenharmony_cislink:VkPhysicalDeviceDescriptorBufferPropertiesEXT::pname:samplerDescriptorSize
5839e5c31af7Sopenharmony_cibytes of the data to the second array.
5840e5c31af7Sopenharmony_ciFor variable-sized descriptor bindings of
5841e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER descriptors, the two arrays
5842e5c31af7Sopenharmony_cieach have a size equal to the upper bound pname:descriptorCount of that
5843e5c31af7Sopenharmony_cibinding.
5844e5c31af7Sopenharmony_ci
5845e5c31af7Sopenharmony_ciA descriptor obtained by this command references the underlying
5846e5c31af7Sopenharmony_cislink:VkImageView or slink:VkSampler, and these objects must: not be
5847e5c31af7Sopenharmony_cidestroyed before the last time a descriptor is dynamically accessed.
5848e5c31af7Sopenharmony_ciFor descriptor types which consume an address instead of an object, the
5849e5c31af7Sopenharmony_ciunderlying slink:VkBuffer is referenced instead.
5850e5c31af7Sopenharmony_ci
5851e5c31af7Sopenharmony_ci.Valid Usage
5852e5c31af7Sopenharmony_ci****
5853e5c31af7Sopenharmony_ci  * [[VUID-vkGetDescriptorEXT-None-08015]]
5854e5c31af7Sopenharmony_ci    The <<features-descriptorBuffer, pname:descriptorBuffer>> feature must:
5855e5c31af7Sopenharmony_ci    be enabled
5856e5c31af7Sopenharmony_ci  * [[VUID-vkGetDescriptorEXT-dataSize-08125]]
5857e5c31af7Sopenharmony_ciifdef::VK_VULKAN_1_1,VK_KHR_sampler_ycbcr_conversion[]
5858e5c31af7Sopenharmony_ci    If pname:pDescriptorInfo->type is not
5859e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER or
5860e5c31af7Sopenharmony_ci    pname:pDescriptorInfo->data.pCombinedImageSampler has a pname:imageView
5861e5c31af7Sopenharmony_ci    member that was not created with a sname:VkSamplerYcbcrConversionInfo
5862e5c31af7Sopenharmony_ci    structure in its pname:pNext chain,
5863e5c31af7Sopenharmony_ciendif::VK_VULKAN_1_1,VK_KHR_sampler_ycbcr_conversion[]
5864e5c31af7Sopenharmony_ci    pname:dataSize must: equal the size of a descriptor of type
5865e5c31af7Sopenharmony_ci    slink:VkDescriptorGetInfoEXT::pname:type determined by the value in
5866e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDescriptorBufferPropertiesEXT
5867e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map[]
5868e5c31af7Sopenharmony_ci    , or determined by
5869e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT::pname:combinedImageSamplerDensityMapDescriptorSize
5870e5c31af7Sopenharmony_ci    if pname:pDescriptorInfo specifies a
5871e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER whose slink:VkSampler
5872e5c31af7Sopenharmony_ci    was created with ename:VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT set
5873e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map[]
5874e5c31af7Sopenharmony_ciifdef::VK_VULKAN_1_1,VK_KHR_sampler_ycbcr_conversion[]
5875e5c31af7Sopenharmony_ci  * [[VUID-vkGetDescriptorEXT-descriptorType-09469]]
5876e5c31af7Sopenharmony_ci    If pname:pDescriptorInfo->type is
5877e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER and
5878e5c31af7Sopenharmony_ci    pname:pDescriptorInfo->data.pCombinedImageSampler has a pname:imageView
5879e5c31af7Sopenharmony_ci    member that was created with a sname:VkSamplerYcbcrConversionInfo
5880e5c31af7Sopenharmony_ci    structure in its pname:pNext chain, pname:dataSize must: equal the size
5881e5c31af7Sopenharmony_ci    of
5882e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDescriptorBufferPropertiesEXT::pname:combinedImageSamplerDescriptorSize
5883e5c31af7Sopenharmony_ci    times
5884e5c31af7Sopenharmony_ci    slink:VkSamplerYcbcrConversionImageFormatProperties::pname:combinedImageSamplerDescriptorCount
5885e5c31af7Sopenharmony_ciendif::VK_VULKAN_1_1,VK_KHR_sampler_ycbcr_conversion[]
5886e5c31af7Sopenharmony_ci  * [[VUID-vkGetDescriptorEXT-pDescriptor-08016]]
5887e5c31af7Sopenharmony_ci    pname:pDescriptor must: be a valid pointer to an array of at least
5888e5c31af7Sopenharmony_ci    pname:dataSize bytes
5889e5c31af7Sopenharmony_ci****
5890e5c31af7Sopenharmony_ci
5891e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetDescriptorEXT.adoc[]
5892e5c31af7Sopenharmony_ci--
5893e5c31af7Sopenharmony_ci
5894e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorGetInfoEXT',desc='Structure specifying parameters of descriptor to get',type='structs']
5895e5c31af7Sopenharmony_ci--
5896e5c31af7Sopenharmony_ciInformation about the descriptor to get is passed in a
5897e5c31af7Sopenharmony_cisname:VkDescriptorGetInfoEXT structure:
5898e5c31af7Sopenharmony_ci
5899e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDescriptorGetInfoEXT.adoc[]
5900e5c31af7Sopenharmony_ci
5901e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
5902e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
5903e5c31af7Sopenharmony_ci    structure.
5904e5c31af7Sopenharmony_ci  * pname:type is the type of descriptor to get.
5905e5c31af7Sopenharmony_ci  * pname:data is a structure containing the information needed to get the
5906e5c31af7Sopenharmony_ci    descriptor.
5907e5c31af7Sopenharmony_ci
5908e5c31af7Sopenharmony_ci.Valid Usage
5909e5c31af7Sopenharmony_ci****
5910e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorGetInfoEXT-type-08018]]
5911e5c31af7Sopenharmony_ci    pname:type must: not be ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC,
5912e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC or
5913e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK
5914e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorGetInfoEXT-type-08019]]
5915e5c31af7Sopenharmony_ci    If pname:type is ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, the
5916e5c31af7Sopenharmony_ci    pname:pCombinedImageSampler->sampler member of pname:data must: be a
5917e5c31af7Sopenharmony_ci    slink:VkSampler created on pname:device
5918e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorGetInfoEXT-type-08020]]
5919e5c31af7Sopenharmony_ci    If pname:type is ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, the
5920e5c31af7Sopenharmony_ci    pname:pCombinedImageSampler->imageView member of pname:data must: be a
5921e5c31af7Sopenharmony_ci    slink:VkImageView created on pname:device, or dlink:VK_NULL_HANDLE
5922e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorGetInfoEXT-type-08021]]
5923e5c31af7Sopenharmony_ci    If pname:type is ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, the
5924e5c31af7Sopenharmony_ci    pname:pInputAttachmentImage->imageView member of pname:data must: be a
5925e5c31af7Sopenharmony_ci    slink:VkImageView created on pname:device
5926e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorGetInfoEXT-type-08022]]
5927e5c31af7Sopenharmony_ci    If pname:type is ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, and if
5928e5c31af7Sopenharmony_ci    pname:pSampledImage is not `NULL`, the pname:pSampledImage->imageView
5929e5c31af7Sopenharmony_ci    member of pname:data must: be a slink:VkImageView created on
5930e5c31af7Sopenharmony_ci    pname:device, or dlink:VK_NULL_HANDLE
5931e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorGetInfoEXT-type-08023]]
5932e5c31af7Sopenharmony_ci    If pname:type is ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, and if
5933e5c31af7Sopenharmony_ci    pname:pStorageImage is not `NULL`, the pname:pStorageImage->imageView
5934e5c31af7Sopenharmony_ci    member of pname:data must: be a slink:VkImageView created on
5935e5c31af7Sopenharmony_ci    pname:device, or dlink:VK_NULL_HANDLE
5936e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorGetInfoEXT-type-08024]]
5937e5c31af7Sopenharmony_ci    If pname:type is ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER,
5938e5c31af7Sopenharmony_ci    pname:pUniformTexelBuffer is not `NULL` and
5939e5c31af7Sopenharmony_ci    pname:pUniformTexelBuffer->address is not zero,
5940e5c31af7Sopenharmony_ci    pname:pUniformTexelBuffer->address must: be an address within a
5941e5c31af7Sopenharmony_ci    slink:VkBuffer created on pname:device
5942e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorGetInfoEXT-type-08025]]
5943e5c31af7Sopenharmony_ci    If pname:type is ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER,
5944e5c31af7Sopenharmony_ci    pname:pStorageTexelBuffer is not `NULL` and
5945e5c31af7Sopenharmony_ci    pname:pStorageTexelBuffer->address is not zero,
5946e5c31af7Sopenharmony_ci    pname:pStorageTexelBuffer->address must: be an address within a
5947e5c31af7Sopenharmony_ci    slink:VkBuffer created on pname:device
5948e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorGetInfoEXT-type-08026]]
5949e5c31af7Sopenharmony_ci    If pname:type is ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
5950e5c31af7Sopenharmony_ci    pname:pUniformBuffer is not `NULL` and pname:pUniformBuffer->address is
5951e5c31af7Sopenharmony_ci    not zero, pname:pUniformBuffer->address must: be an address within a
5952e5c31af7Sopenharmony_ci    slink:VkBuffer created on pname:device
5953e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorGetInfoEXT-type-08027]]
5954e5c31af7Sopenharmony_ci    If pname:type is ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
5955e5c31af7Sopenharmony_ci    pname:pStorageBuffer is not `NULL` and pname:pStorageBuffer->address is
5956e5c31af7Sopenharmony_ci    not zero, pname:pStorageBuffer->address must: be an address within a
5957e5c31af7Sopenharmony_ci    slink:VkBuffer created on pname:device
5958e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorGetInfoEXT-type-09427]]
5959e5c31af7Sopenharmony_ci    If pname:type is ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER,
5960e5c31af7Sopenharmony_ci    pname:pUniformBuffer is not `NULL` , the number of texel buffer elements
5961e5c31af7Sopenharmony_ci    given by [eq]#({lfloor}pname:pUniformBuffer->range / (texel block
5962e5c31af7Sopenharmony_ci    size){rfloor} {times} (texels per block))# where texel block size and
5963e5c31af7Sopenharmony_ci    texels per block are as defined in the <<formats-compatibility,
5964e5c31af7Sopenharmony_ci    Compatible Formats>> table for pname:pUniformBuffer->format, must: be
5965e5c31af7Sopenharmony_ci    less than or equal to
5966e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:maxTexelBufferElements
5967e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorGetInfoEXT-type-09428]]
5968e5c31af7Sopenharmony_ci    If pname:type is ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER,
5969e5c31af7Sopenharmony_ci    pname:pStorageBuffer is not `NULL` , the number of texel buffer elements
5970e5c31af7Sopenharmony_ci    given by [eq]#({lfloor}pname:pStorageBuffer->range / (texel block
5971e5c31af7Sopenharmony_ci    size){rfloor} {times} (texels per block))# where texel block size and
5972e5c31af7Sopenharmony_ci    texels per block are as defined in the <<formats-compatibility,
5973e5c31af7Sopenharmony_ci    Compatible Formats>> table for pname:pStorageBuffer->format, must: be
5974e5c31af7Sopenharmony_ci    less than or equal to
5975e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:maxTexelBufferElements
5976e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure[]
5977e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorGetInfoEXT-type-08028]]
5978e5c31af7Sopenharmony_ci    If pname:type is ename:VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR and
5979e5c31af7Sopenharmony_ci    pname:accelerationStructure is not `0`, pname:accelerationStructure
5980e5c31af7Sopenharmony_ci    must: contain the address of a slink:VkAccelerationStructureKHR created
5981e5c31af7Sopenharmony_ci    on pname:device
5982e5c31af7Sopenharmony_ciendif::VK_KHR_acceleration_structure[]
5983e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing[]
5984e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorGetInfoEXT-type-08029]]
5985e5c31af7Sopenharmony_ci    If pname:type is ename:VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV and
5986e5c31af7Sopenharmony_ci    pname:accelerationStructure is not `0`, pname:accelerationStructure
5987e5c31af7Sopenharmony_ci    must: contain the handle of a slink:VkAccelerationStructureNV created on
5988e5c31af7Sopenharmony_ci    pname:device, returned by flink:vkGetAccelerationStructureHandleNV
5989e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing[]
5990e5c31af7Sopenharmony_ci****
5991e5c31af7Sopenharmony_ci
5992e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDescriptorGetInfoEXT.adoc[]
5993e5c31af7Sopenharmony_ci--
5994e5c31af7Sopenharmony_ci
5995e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorDataEXT',desc='Structure specifying descriptor data',type='structs']
5996e5c31af7Sopenharmony_ci--
5997e5c31af7Sopenharmony_ciData describing the descriptor is passed in a sname:VkDescriptorDataEXT
5998e5c31af7Sopenharmony_cistructure:
5999e5c31af7Sopenharmony_ci
6000e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDescriptorDataEXT.adoc[]
6001e5c31af7Sopenharmony_ci
6002e5c31af7Sopenharmony_ci  * pname:pSampler is a pointer to a slink:VkSampler handle specifying the
6003e5c31af7Sopenharmony_ci    parameters of a ename:VK_DESCRIPTOR_TYPE_SAMPLER descriptor.
6004e5c31af7Sopenharmony_ci  * pname:pCombinedImageSampler is a pointer to a
6005e5c31af7Sopenharmony_ci    slink:VkDescriptorImageInfo structure specifying the parameters of a
6006e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER descriptor.
6007e5c31af7Sopenharmony_ci  * pname:pInputAttachmentImage is a pointer to a
6008e5c31af7Sopenharmony_ci    slink:VkDescriptorImageInfo structure specifying the parameters of a
6009e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT descriptor.
6010e5c31af7Sopenharmony_ci  * pname:pSampledImage is a pointer to a slink:VkDescriptorImageInfo
6011e5c31af7Sopenharmony_ci    structure specifying the parameters of a
6012e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE descriptor.
6013e5c31af7Sopenharmony_ci  * pname:pStorageImage is a pointer to a slink:VkDescriptorImageInfo
6014e5c31af7Sopenharmony_ci    structure specifying the parameters of a
6015e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE descriptor.
6016e5c31af7Sopenharmony_ci  * pname:pUniformTexelBuffer is a pointer to a
6017e5c31af7Sopenharmony_ci    slink:VkDescriptorAddressInfoEXT structure specifying the parameters of
6018e5c31af7Sopenharmony_ci    a ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER descriptor.
6019e5c31af7Sopenharmony_ci  * pname:pStorageTexelBuffer is a pointer to a
6020e5c31af7Sopenharmony_ci    slink:VkDescriptorAddressInfoEXT structure specifying the parameters of
6021e5c31af7Sopenharmony_ci    a ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor.
6022e5c31af7Sopenharmony_ci  * pname:pUniformBuffer is a pointer to a slink:VkDescriptorAddressInfoEXT
6023e5c31af7Sopenharmony_ci    structure specifying the parameters of a
6024e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER descriptor.
6025e5c31af7Sopenharmony_ci  * pname:pStorageBuffer is a pointer to a slink:VkDescriptorAddressInfoEXT
6026e5c31af7Sopenharmony_ci    structure specifying the parameters of a
6027e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER descriptor.
6028e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure+VK_NV_ray_tracing[]
6029e5c31af7Sopenharmony_ci  * pname:accelerationStructure is
6030e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure[]
6031e5c31af7Sopenharmony_ci     the address of a slink:VkAccelerationStructureKHR specifying the
6032e5c31af7Sopenharmony_ci     parameters of a ename:VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR
6033e5c31af7Sopenharmony_ci     descriptor
6034e5c31af7Sopenharmony_ciendif::VK_KHR_acceleration_structure[]
6035e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure+VK_NV_ray_tracing[, or ]
6036e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing[]
6037e5c31af7Sopenharmony_ci    a slink:VkAccelerationStructureNV handle specifying the parameters of a
6038e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV descriptor.
6039e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing[]
6040e5c31af7Sopenharmony_ciendif::VK_KHR_acceleration_structure+VK_NV_ray_tracing[]
6041e5c31af7Sopenharmony_ciifndef::VK_NV_ray_tracing,VK_NV_ray_tracing[]
6042e5c31af7Sopenharmony_ci  * pname:accelerationStructure is reserved for future use and is ignored.
6043e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing,VK_NV_ray_tracing[]
6044e5c31af7Sopenharmony_ci
6045e5c31af7Sopenharmony_ciifdef::VK_EXT_robustness2[]
6046e5c31af7Sopenharmony_ciIf the <<features-nullDescriptor, pname:nullDescriptor>> feature is enabled,
6047e5c31af7Sopenharmony_cipname:pSampledImage, pname:pStorageImage, pname:pUniformTexelBuffer,
6048e5c31af7Sopenharmony_cipname:pStorageTexelBuffer, pname:pUniformBuffer, and pname:pStorageBuffer
6049e5c31af7Sopenharmony_cican: each be `NULL`.
6050e5c31af7Sopenharmony_ciLoads from a null descriptor return zero values and stores and atomics to a
6051e5c31af7Sopenharmony_cinull descriptor are discarded.
6052e5c31af7Sopenharmony_ci
6053e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure,VK_NV_ray_tracing[]
6054e5c31af7Sopenharmony_ciIf the <<features-nullDescriptor, pname:nullDescriptor>> feature is enabled,
6055e5c31af7Sopenharmony_cipname:accelerationStructure can: be `0`.
6056e5c31af7Sopenharmony_ciA null acceleration structure descriptor results in the miss shader being
6057e5c31af7Sopenharmony_ciinvoked.
6058e5c31af7Sopenharmony_ciendif::VK_KHR_acceleration_structure,VK_NV_ray_tracing[]
6059e5c31af7Sopenharmony_ci
6060e5c31af7Sopenharmony_ci.Valid Usage
6061e5c31af7Sopenharmony_ci****
6062e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorDataEXT-type-08030]]
6063e5c31af7Sopenharmony_ci    If slink:VkDescriptorGetInfoEXT:pname:type is
6064e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, and
6065e5c31af7Sopenharmony_ci    pname:pUniformBuffer->address is the address of a non-sparse buffer,
6066e5c31af7Sopenharmony_ci    then that buffer must: be bound completely and contiguously to a single
6067e5c31af7Sopenharmony_ci    sname:VkDeviceMemory object
6068e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorDataEXT-type-08031]]
6069e5c31af7Sopenharmony_ci    If slink:VkDescriptorGetInfoEXT:pname:type is
6070e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, and
6071e5c31af7Sopenharmony_ci    pname:pStorageBuffer->address is the address of a non-sparse buffer,
6072e5c31af7Sopenharmony_ci    then that buffer must: be bound completely and contiguously to a single
6073e5c31af7Sopenharmony_ci    sname:VkDeviceMemory object
6074e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorDataEXT-type-08032]]
6075e5c31af7Sopenharmony_ci    If slink:VkDescriptorGetInfoEXT:pname:type is
6076e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, and
6077e5c31af7Sopenharmony_ci    pname:pUniformTexelBuffer->address is the address of a non-sparse
6078e5c31af7Sopenharmony_ci    buffer, then that buffer must: be bound completely and contiguously to a
6079e5c31af7Sopenharmony_ci    single sname:VkDeviceMemory object
6080e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorDataEXT-type-08033]]
6081e5c31af7Sopenharmony_ci    If slink:VkDescriptorGetInfoEXT:pname:type is
6082e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, and
6083e5c31af7Sopenharmony_ci    pname:pStorageTexelBuffer->address is the address of a non-sparse
6084e5c31af7Sopenharmony_ci    buffer, then that buffer must: be bound completely and contiguously to a
6085e5c31af7Sopenharmony_ci    single sname:VkDeviceMemory object
6086e5c31af7Sopenharmony_ciifdef::VK_EXT_robustness2[]
6087e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorDataEXT-type-08034]]
6088e5c31af7Sopenharmony_ci    If slink:VkDescriptorGetInfoEXT:pname:type is
6089e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and the
6090e5c31af7Sopenharmony_ci    <<features-nullDescriptor, pname:nullDescriptor>> feature is not
6091e5c31af7Sopenharmony_ci    enabled, pname:pCombinedImageSampler->imageView must: not be
6092e5c31af7Sopenharmony_ci    dlink:VK_NULL_HANDLE
6093e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorDataEXT-type-08035]]
6094e5c31af7Sopenharmony_ci    If slink:VkDescriptorGetInfoEXT:pname:type is
6095e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, and the
6096e5c31af7Sopenharmony_ci    <<features-nullDescriptor, pname:nullDescriptor>> feature is not
6097e5c31af7Sopenharmony_ci    enabled, pname:pSampledImage must: not be `NULL` and
6098e5c31af7Sopenharmony_ci    pname:pSampledImage->imageView must: not be dlink:VK_NULL_HANDLE
6099e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorDataEXT-type-08036]]
6100e5c31af7Sopenharmony_ci    If slink:VkDescriptorGetInfoEXT:pname:type is
6101e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, and the
6102e5c31af7Sopenharmony_ci    <<features-nullDescriptor, pname:nullDescriptor>> feature is not
6103e5c31af7Sopenharmony_ci    enabled, pname:pStorageImage must: not be `NULL` and
6104e5c31af7Sopenharmony_ci    pname:pStorageImage->imageView must: not be dlink:VK_NULL_HANDLE
6105e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorDataEXT-type-08037]]
6106e5c31af7Sopenharmony_ci    If slink:VkDescriptorGetInfoEXT:pname:type is
6107e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, and the
6108e5c31af7Sopenharmony_ci    <<features-nullDescriptor, pname:nullDescriptor>> feature is not
6109e5c31af7Sopenharmony_ci    enabled, pname:pUniformTexelBuffer must: not be `NULL`
6110e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorDataEXT-type-08038]]
6111e5c31af7Sopenharmony_ci    If slink:VkDescriptorGetInfoEXT:pname:type is
6112e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, and the
6113e5c31af7Sopenharmony_ci    <<features-nullDescriptor, pname:nullDescriptor>> feature is not
6114e5c31af7Sopenharmony_ci    enabled, pname:pStorageTexelBuffer must: not be `NULL`
6115e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorDataEXT-type-08039]]
6116e5c31af7Sopenharmony_ci    If slink:VkDescriptorGetInfoEXT:pname:type is
6117e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, and the
6118e5c31af7Sopenharmony_ci    <<features-nullDescriptor, pname:nullDescriptor>> feature is not
6119e5c31af7Sopenharmony_ci    enabled, pname:pUniformBuffer must: not be `NULL`
6120e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorDataEXT-type-08040]]
6121e5c31af7Sopenharmony_ci    If slink:VkDescriptorGetInfoEXT:pname:type is
6122e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, and the
6123e5c31af7Sopenharmony_ci    <<features-nullDescriptor, pname:nullDescriptor>> feature is not
6124e5c31af7Sopenharmony_ci    enabled, pname:pStorageBuffer must: not be `NULL`
6125e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure[]
6126e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorDataEXT-type-08041]]
6127e5c31af7Sopenharmony_ci    If slink:VkDescriptorGetInfoEXT:pname:type is
6128e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, and the
6129e5c31af7Sopenharmony_ci    <<features-nullDescriptor, pname:nullDescriptor>> feature is not
6130e5c31af7Sopenharmony_ci    enabled, pname:accelerationStructure must: not be `0`
6131e5c31af7Sopenharmony_ciendif::VK_KHR_acceleration_structure[]
6132e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing[]
6133e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorDataEXT-type-08042]]
6134e5c31af7Sopenharmony_ci    If slink:VkDescriptorGetInfoEXT:pname:type is
6135e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV, and the
6136e5c31af7Sopenharmony_ci    <<features-nullDescriptor, pname:nullDescriptor>> feature is not
6137e5c31af7Sopenharmony_ci    enabled, pname:accelerationStructure must: not be `0`
6138e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing[]
6139e5c31af7Sopenharmony_ciendif::VK_EXT_robustness2[]
6140e5c31af7Sopenharmony_ci****
6141e5c31af7Sopenharmony_ci
6142e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDescriptorDataEXT.adoc[]
6143e5c31af7Sopenharmony_ci
6144e5c31af7Sopenharmony_ciendif::VK_EXT_robustness2[]
6145e5c31af7Sopenharmony_ci--
6146e5c31af7Sopenharmony_ci
6147e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorAddressInfoEXT',desc='Structure specifying descriptor buffer address info',type='structs']
6148e5c31af7Sopenharmony_ci--
6149e5c31af7Sopenharmony_ciData describing a ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
6150e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
6151e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, or
6152e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is passed in a
6153e5c31af7Sopenharmony_cisname:VkDescriptorAddressInfoEXT structure:
6154e5c31af7Sopenharmony_ci
6155e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDescriptorAddressInfoEXT.adoc[]
6156e5c31af7Sopenharmony_ci
6157e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
6158e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
6159e5c31af7Sopenharmony_ci    structure.
6160e5c31af7Sopenharmony_ci  * pname:address is either `0` or a device address at an offset in a
6161e5c31af7Sopenharmony_ci    buffer, where the base address can be queried from
6162e5c31af7Sopenharmony_ci    flink:vkGetBufferDeviceAddress.
6163e5c31af7Sopenharmony_ci  * pname:range is the size in bytes of the buffer or buffer view used by
6164e5c31af7Sopenharmony_ci    the descriptor.
6165e5c31af7Sopenharmony_ci  * pname:format is the format of the data elements in the buffer view and
6166e5c31af7Sopenharmony_ci    is ignored for buffers.
6167e5c31af7Sopenharmony_ci
6168e5c31af7Sopenharmony_ci.Valid Usage
6169e5c31af7Sopenharmony_ci****
6170e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorAddressInfoEXT-address-08043]]
6171e5c31af7Sopenharmony_ciifdef::VK_EXT_robustness2[]
6172e5c31af7Sopenharmony_ci    If the <<features-nullDescriptor, pname:nullDescriptor>> feature is not
6173e5c31af7Sopenharmony_ci    enabled,
6174e5c31af7Sopenharmony_ciendif::VK_EXT_robustness2[]
6175e5c31af7Sopenharmony_ci    pname:address must: not be zero
6176e5c31af7Sopenharmony_ciifdef::VK_EXT_robustness2[]
6177e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorAddressInfoEXT-nullDescriptor-08938]]
6178e5c31af7Sopenharmony_ci    If pname:address is zero, pname:range must: be ename:VK_WHOLE_SIZE
6179e5c31af7Sopenharmony_ciendif::VK_EXT_robustness2[]
6180e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorAddressInfoEXT-nullDescriptor-08939]]
6181e5c31af7Sopenharmony_ciifdef::VK_EXT_robustness2[]
6182e5c31af7Sopenharmony_ci    If pname:address is not zero,
6183e5c31af7Sopenharmony_ciendif::VK_EXT_robustness2[]
6184e5c31af7Sopenharmony_ci    pname:range must: not be ename:VK_WHOLE_SIZE
6185e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorAddressInfoEXT-None-08044]]
6186e5c31af7Sopenharmony_ci    If pname:address is not zero, pname:address must: be a valid device
6187e5c31af7Sopenharmony_ci    address at an offset within a slink:VkBuffer
6188e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorAddressInfoEXT-range-08045]]
6189e5c31af7Sopenharmony_ci    pname:range must: be less than or equal to the size of the buffer
6190e5c31af7Sopenharmony_ci    containing pname:address minus the offset of pname:address from the base
6191e5c31af7Sopenharmony_ci    address of the buffer
6192e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorAddressInfoEXT-range-08940]]
6193e5c31af7Sopenharmony_ci    pname:range must: not be zero
6194e5c31af7Sopenharmony_ci****
6195e5c31af7Sopenharmony_ci
6196e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDescriptorAddressInfoEXT.adoc[]
6197e5c31af7Sopenharmony_ci
6198e5c31af7Sopenharmony_ciifdef::VK_EXT_robustness2[]
6199e5c31af7Sopenharmony_ciIf the <<features-nullDescriptor, pname:nullDescriptor>> feature is enabled,
6200e5c31af7Sopenharmony_cipname:address can: be zero.
6201e5c31af7Sopenharmony_ciLoads from a null descriptor return zero values and stores and atomics to a
6202e5c31af7Sopenharmony_cinull descriptor are discarded.
6203e5c31af7Sopenharmony_ciendif::VK_EXT_robustness2[]
6204e5c31af7Sopenharmony_ci--
6205e5c31af7Sopenharmony_ci
6206e5c31af7Sopenharmony_ciImmutable samplers specified in a descriptor set layout through
6207e5c31af7Sopenharmony_cipname:pImmutableSamplers must: be provided by applications when obtaining
6208e5c31af7Sopenharmony_cidescriptor data.
6209e5c31af7Sopenharmony_ciImmutable samplers written in a descriptor buffer must: have identical
6210e5c31af7Sopenharmony_ciparameters to the immutable samplers in the descriptor set layout that
6211e5c31af7Sopenharmony_ciconsumes the sampler.
6212e5c31af7Sopenharmony_ci
6213e5c31af7Sopenharmony_ci[NOTE]
6214e5c31af7Sopenharmony_ci.Note
6215e5c31af7Sopenharmony_ci====
6216e5c31af7Sopenharmony_ciIf the descriptor set layout was created with
6217e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT,
6218e5c31af7Sopenharmony_cithere is no buffer backing for the immutable sampler, so this requirement
6219e5c31af7Sopenharmony_cidoes not exist.
6220e5c31af7Sopenharmony_ciThe implementation handles allocation of these descriptors internally.
6221e5c31af7Sopenharmony_ci====
6222e5c31af7Sopenharmony_ci
6223e5c31af7Sopenharmony_ci[NOTE]
6224e5c31af7Sopenharmony_ci.Note
6225e5c31af7Sopenharmony_ci====
6226e5c31af7Sopenharmony_ciAs descriptors are now in regular memory, drivers cannot hide copies of
6227e5c31af7Sopenharmony_ciimmutable samplers that end up in descriptor sets from the application.
6228e5c31af7Sopenharmony_ciAs such, applications are required to provide these samplers as if they were
6229e5c31af7Sopenharmony_cinot provided immutably.
6230e5c31af7Sopenharmony_ci====
6231e5c31af7Sopenharmony_ci
6232e5c31af7Sopenharmony_ci
6233e5c31af7Sopenharmony_ci[[descriptorbuffers-binding]]
6234e5c31af7Sopenharmony_ci=== Binding Descriptor Buffers
6235e5c31af7Sopenharmony_ci
6236e5c31af7Sopenharmony_ciDescriptor buffers have their own separate binding point on the command
6237e5c31af7Sopenharmony_cibuffer, with buffers bound using flink:vkCmdBindDescriptorBuffersEXT.
6238e5c31af7Sopenharmony_ciflink:vkCmdSetDescriptorBufferOffsetsEXT assigns pairs of buffer binding
6239e5c31af7Sopenharmony_ciindices and buffer offsets to the same binding point on the command buffer
6240e5c31af7Sopenharmony_cias flink:vkCmdBindDescriptorSets, allowing subsequent
6241e5c31af7Sopenharmony_ci<<pipelines-bindpoint-commands, bound pipeline commands>> to use the
6242e5c31af7Sopenharmony_cispecified descriptor buffers.
6243e5c31af7Sopenharmony_ciBindings applied via flink:vkCmdBindDescriptorSets cannot: exist
6244e5c31af7Sopenharmony_cisimultaneously with those applied via calls to
6245e5c31af7Sopenharmony_ciflink:vkCmdSetDescriptorBufferOffsetsEXT or
6246e5c31af7Sopenharmony_ciflink:vkCmdBindDescriptorBufferEmbeddedSamplersEXT, as calls to
6247e5c31af7Sopenharmony_ciflink:vkCmdSetDescriptorBufferOffsetsEXT or
6248e5c31af7Sopenharmony_ciflink:vkCmdBindDescriptorBufferEmbeddedSamplersEXT invalidate any bindings
6249e5c31af7Sopenharmony_ciby previous calls to flink:vkCmdBindDescriptorSets and vice-versa.
6250e5c31af7Sopenharmony_ci
6251e5c31af7Sopenharmony_ci[open,refpage='vkCmdBindDescriptorBuffersEXT',desc='Binding descriptor buffers to a command buffer',type='protos']
6252e5c31af7Sopenharmony_ci--
6253e5c31af7Sopenharmony_ciTo bind descriptor buffers to a command buffer, call:
6254e5c31af7Sopenharmony_ci
6255e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCmdBindDescriptorBuffersEXT.adoc[]
6256e5c31af7Sopenharmony_ci
6257e5c31af7Sopenharmony_ci  * pname:commandBuffer is the command buffer that the descriptor buffers
6258e5c31af7Sopenharmony_ci    will be bound to.
6259e5c31af7Sopenharmony_ci  * pname:bufferCount is the number of elements in the pname:pBindingInfos
6260e5c31af7Sopenharmony_ci    array.
6261e5c31af7Sopenharmony_ci  * pname:pBindingInfos is a pointer to an array of
6262e5c31af7Sopenharmony_ci    slink:VkDescriptorBufferBindingInfoEXT structures.
6263e5c31af7Sopenharmony_ci
6264e5c31af7Sopenharmony_ci`vkCmdBindDescriptorBuffersEXT` causes any offsets previously set by
6265e5c31af7Sopenharmony_ciflink:vkCmdSetDescriptorBufferOffsetsEXT that use the bindings numbered
6266e5c31af7Sopenharmony_ci[`0`..
6267e5c31af7Sopenharmony_cipname:bufferCount-1] to be no longer valid for subsequent bound pipeline
6268e5c31af7Sopenharmony_cicommands.
6269e5c31af7Sopenharmony_ciAny previously bound buffers at binding points greater than or equal to
6270e5c31af7Sopenharmony_cipname:bufferCount are unbound.
6271e5c31af7Sopenharmony_ci
6272e5c31af7Sopenharmony_ci.Valid Usage
6273e5c31af7Sopenharmony_ci****
6274e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBindDescriptorBuffersEXT-None-08047]]
6275e5c31af7Sopenharmony_ci    The <<features-descriptorBuffer, pname:descriptorBuffer>> feature must:
6276e5c31af7Sopenharmony_ci    be enabled
6277e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBindDescriptorBuffersEXT-maxSamplerDescriptorBufferBindings-08048]]
6278e5c31af7Sopenharmony_ci    There must: be no more than
6279e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDescriptorBufferPropertiesEXT::pname:maxSamplerDescriptorBufferBindings
6280e5c31af7Sopenharmony_ci    descriptor buffers containing sampler descriptor data bound
6281e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBindDescriptorBuffersEXT-maxResourceDescriptorBufferBindings-08049]]
6282e5c31af7Sopenharmony_ci    There must: be no more than
6283e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDescriptorBufferPropertiesEXT::pname:maxResourceDescriptorBufferBindings
6284e5c31af7Sopenharmony_ci    descriptor buffers containing resource descriptor data bound
6285e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBindDescriptorBuffersEXT-None-08050]]
6286e5c31af7Sopenharmony_ci    There must: be no more than `1` descriptor buffer bound that was created
6287e5c31af7Sopenharmony_ci    with the
6288e5c31af7Sopenharmony_ci    ename:VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT bit set
6289e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBindDescriptorBuffersEXT-bufferCount-08051]]
6290e5c31af7Sopenharmony_ci    pname:bufferCount must: be less than or equal to
6291e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDescriptorBufferPropertiesEXT::pname:maxDescriptorBufferBindings
6292e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBindDescriptorBuffersEXT-pBindingInfos-08052]]
6293e5c31af7Sopenharmony_ci    For any element of pname:pBindingInfos, if the buffer from which
6294e5c31af7Sopenharmony_ci    pname:address was queried is non-sparse then it must: be bound
6295e5c31af7Sopenharmony_ci    completely and contiguously to a single slink:VkDeviceMemory object
6296e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBindDescriptorBuffersEXT-pBindingInfos-08053]]
6297e5c31af7Sopenharmony_ci    For any element of pname:pBindingInfos, the buffer from which
6298e5c31af7Sopenharmony_ci    pname:address was queried must: have been created with the
6299e5c31af7Sopenharmony_ci    ename:VK_BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT bit set if it
6300e5c31af7Sopenharmony_ci    contains sampler descriptor data
6301e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBindDescriptorBuffersEXT-pBindingInfos-08054]]
6302e5c31af7Sopenharmony_ci    For any element of pname:pBindingInfos, the buffer from which
6303e5c31af7Sopenharmony_ci    pname:address was queried must: have been created with the
6304e5c31af7Sopenharmony_ci    ename:VK_BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT bit set if it
6305e5c31af7Sopenharmony_ci    contains resource descriptor data
6306e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBindDescriptorBuffersEXT-pBindingInfos-08055]]
6307e5c31af7Sopenharmony_ci    For any element of pname:pBindingInfos, pname:usage must: match the
6308e5c31af7Sopenharmony_ci    buffer from which pname:address was queried
6309e5c31af7Sopenharmony_ci****
6310e5c31af7Sopenharmony_ci
6311e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCmdBindDescriptorBuffersEXT.adoc[]
6312e5c31af7Sopenharmony_ci--
6313e5c31af7Sopenharmony_ci
6314e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorBufferBindingInfoEXT',desc='Structure specifying descriptor buffer binding information',type='structs']
6315e5c31af7Sopenharmony_ci--
6316e5c31af7Sopenharmony_ci:refpage: VkDescriptorBufferBindingInfoEXT
6317e5c31af7Sopenharmony_ci
6318e5c31af7Sopenharmony_ciData describing a descriptor buffer binding is passed in a
6319e5c31af7Sopenharmony_cisname:VkDescriptorBufferBindingInfoEXT structure:
6320e5c31af7Sopenharmony_ci
6321e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDescriptorBufferBindingInfoEXT.adoc[]
6322e5c31af7Sopenharmony_ci
6323e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
6324e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
6325e5c31af7Sopenharmony_ci    structure.
6326e5c31af7Sopenharmony_ci  * pname:address is a basetype:VkDeviceAddress specifying the device
6327e5c31af7Sopenharmony_ci    address defining the descriptor buffer to be bound.
6328e5c31af7Sopenharmony_ci  * pname:usage is a bitmask of elink:VkBufferUsageFlagBits specifying the
6329e5c31af7Sopenharmony_ci    slink:VkBufferCreateInfo::pname:usage for the buffer from which
6330e5c31af7Sopenharmony_ci    pname:address was queried.
6331e5c31af7Sopenharmony_ci
6332e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance5[]
6333e5c31af7Sopenharmony_ciIf a slink:VkBufferUsageFlags2CreateInfoKHR structure is present in the
6334e5c31af7Sopenharmony_cipname:pNext chain, slink:VkBufferUsageFlags2CreateInfoKHR::pname:usage from
6335e5c31af7Sopenharmony_cithat structure is used instead of pname:usage from this structure.
6336e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance5[]
6337e5c31af7Sopenharmony_ci
6338e5c31af7Sopenharmony_ci.Valid Usage
6339e5c31af7Sopenharmony_ci****
6340e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/buffer_usage_flags_common.adoc[]
6341e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorBufferBindingInfoEXT-bufferlessPushDescriptors-08056]]
6342e5c31af7Sopenharmony_ci    If <<limits-bufferlessPushDescriptors,
6343e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceDescriptorBufferPropertiesEXT::pname:bufferlessPushDescriptors>>
6344e5c31af7Sopenharmony_ci    is ename:VK_FALSE, and pname:usage contains
6345e5c31af7Sopenharmony_ci    ename:VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT, then
6346e5c31af7Sopenharmony_ci    the pname:pNext chain must: include a
6347e5c31af7Sopenharmony_ci    slink:VkDescriptorBufferBindingPushDescriptorBufferHandleEXT structure
6348e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorBufferBindingInfoEXT-address-08057]]
6349e5c31af7Sopenharmony_ci    pname:address must: be aligned to
6350e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDescriptorBufferPropertiesEXT::pname:descriptorBufferOffsetAlignment
6351e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorBufferBindingInfoEXT-usage-08122]]
6352e5c31af7Sopenharmony_ci    If pname:usage includes
6353e5c31af7Sopenharmony_ci    ename:VK_BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT, pname:address
6354e5c31af7Sopenharmony_ci    must: be an address within a valid buffer that was created with
6355e5c31af7Sopenharmony_ci    ename:VK_BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT
6356e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorBufferBindingInfoEXT-usage-08123]]
6357e5c31af7Sopenharmony_ci    If pname:usage includes
6358e5c31af7Sopenharmony_ci    ename:VK_BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT, pname:address
6359e5c31af7Sopenharmony_ci    must: be an address within a valid buffer that was created with
6360e5c31af7Sopenharmony_ci    ename:VK_BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT
6361e5c31af7Sopenharmony_ciifdef::VK_KHR_push_descriptor[]
6362e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorBufferBindingInfoEXT-usage-08124]]
6363e5c31af7Sopenharmony_ci    If pname:usage includes
6364e5c31af7Sopenharmony_ci    ename:VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT,
6365e5c31af7Sopenharmony_ci    pname:address must: be an address within a valid buffer that was created
6366e5c31af7Sopenharmony_ci    with ename:VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT
6367e5c31af7Sopenharmony_ciendif::VK_KHR_push_descriptor[]
6368e5c31af7Sopenharmony_ci****
6369e5c31af7Sopenharmony_ci
6370e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDescriptorBufferBindingInfoEXT.adoc[]
6371e5c31af7Sopenharmony_ci--
6372e5c31af7Sopenharmony_ci
6373e5c31af7Sopenharmony_ci[open,refpage='VkDescriptorBufferBindingPushDescriptorBufferHandleEXT',desc='Structure specifying push descriptor buffer binding information',type='structs']
6374e5c31af7Sopenharmony_ci--
6375e5c31af7Sopenharmony_ciWhen the <<limits-bufferlessPushDescriptors,
6376e5c31af7Sopenharmony_cisname:VkPhysicalDeviceDescriptorBufferPropertiesEXT::pname:bufferlessPushDescriptors>>
6377e5c31af7Sopenharmony_ciproperty is ename:VK_FALSE, the sname:VkBuffer handle of the buffer for push
6378e5c31af7Sopenharmony_cidescriptors is passed in a
6379e5c31af7Sopenharmony_cisname:VkDescriptorBufferBindingPushDescriptorBufferHandleEXT structure:
6380e5c31af7Sopenharmony_ci
6381e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDescriptorBufferBindingPushDescriptorBufferHandleEXT.adoc[]
6382e5c31af7Sopenharmony_ci
6383e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
6384e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
6385e5c31af7Sopenharmony_ci    structure.
6386e5c31af7Sopenharmony_ci  * pname:buffer is the sname:VkBuffer handle of the buffer for push
6387e5c31af7Sopenharmony_ci    descriptors.
6388e5c31af7Sopenharmony_ci
6389e5c31af7Sopenharmony_ci.Valid Usage
6390e5c31af7Sopenharmony_ci****
6391e5c31af7Sopenharmony_ci  * [[VUID-VkDescriptorBufferBindingPushDescriptorBufferHandleEXT-bufferlessPushDescriptors-08059]]
6392e5c31af7Sopenharmony_ci    <<limits-bufferlessPushDescriptors,
6393e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceDescriptorBufferPropertiesEXT::pname:bufferlessPushDescriptors>>
6394e5c31af7Sopenharmony_ci    must: be ename:VK_FALSE
6395e5c31af7Sopenharmony_ci****
6396e5c31af7Sopenharmony_ci
6397e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDescriptorBufferBindingPushDescriptorBufferHandleEXT.adoc[]
6398e5c31af7Sopenharmony_ci--
6399e5c31af7Sopenharmony_ci
6400e5c31af7Sopenharmony_ci[open,refpage='vkCmdSetDescriptorBufferOffsetsEXT',desc='Setting descriptor buffer offsets in a command buffer',type='protos']
6401e5c31af7Sopenharmony_ci--
6402e5c31af7Sopenharmony_ci:refpage: vkCmdSetDescriptorBufferOffsetsEXT
6403e5c31af7Sopenharmony_ci
6404e5c31af7Sopenharmony_ciTo set descriptor buffer offsets in a command buffer, call:
6405e5c31af7Sopenharmony_ci
6406e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCmdSetDescriptorBufferOffsetsEXT.adoc[]
6407e5c31af7Sopenharmony_ci
6408e5c31af7Sopenharmony_ci  * pname:commandBuffer is the command buffer in which the descriptor buffer
6409e5c31af7Sopenharmony_ci    offsets will be set.
6410e5c31af7Sopenharmony_ci  * pname:pipelineBindPoint is a elink:VkPipelineBindPoint indicating the
6411e5c31af7Sopenharmony_ci    type of the pipeline that will use the descriptors.
6412e5c31af7Sopenharmony_ci  * pname:layout is a slink:VkPipelineLayout object used to program the
6413e5c31af7Sopenharmony_ci    bindings.
6414e5c31af7Sopenharmony_ci  * pname:firstSet is the number of the first set to be bound.
6415e5c31af7Sopenharmony_ci  * pname:setCount is the number of elements in the pname:pBufferIndices and
6416e5c31af7Sopenharmony_ci    pname:pOffsets arrays.
6417e5c31af7Sopenharmony_ci  * pname:pBufferIndices is a pointer to an array of indices into the
6418e5c31af7Sopenharmony_ci    descriptor buffer binding points set by
6419e5c31af7Sopenharmony_ci    flink:vkCmdBindDescriptorBuffersEXT.
6420e5c31af7Sopenharmony_ci  * pname:pOffsets is a pointer to an array of basetype:VkDeviceSize offsets
6421e5c31af7Sopenharmony_ci    to apply to the bound descriptor buffers.
6422e5c31af7Sopenharmony_ci
6423e5c31af7Sopenharmony_cifname:vkCmdSetDescriptorBufferOffsetsEXT binds pname:setCount pairs of
6424e5c31af7Sopenharmony_cidescriptor buffers, specified by indices into the binding points bound using
6425e5c31af7Sopenharmony_ciflink:vkCmdBindDescriptorBuffersEXT, and buffer offsets to set numbers
6426e5c31af7Sopenharmony_ci[pname:firstSet..pname:firstSet+pname:descriptorSetCount-1] for subsequent
6427e5c31af7Sopenharmony_ci<<pipelines-bindpoint-commands, bound pipeline commands>> set by
6428e5c31af7Sopenharmony_cipname:pipelineBindPoint.
6429e5c31af7Sopenharmony_ciSet [pname:firstSet + i] is bound to the descriptor buffer at binding
6430e5c31af7Sopenharmony_cipname:pBufferIndices[i] at an offset of pname:pOffsets[i].
6431e5c31af7Sopenharmony_ciAny bindings that were previously applied via these sets, or calls to
6432e5c31af7Sopenharmony_ciflink:vkCmdBindDescriptorSets, are no longer valid.
6433e5c31af7Sopenharmony_ciOther sets will also be invalidated upon calling this command if
6434e5c31af7Sopenharmony_cipname:layout differs from the pipeline layout used to bind those other sets,
6435e5c31af7Sopenharmony_cias described in <<descriptorsets-compatibility,Pipeline Layout
6436e5c31af7Sopenharmony_ciCompatibility>>.
6437e5c31af7Sopenharmony_ci
6438e5c31af7Sopenharmony_ciAfter binding descriptors, applications can: modify descriptor memory either
6439e5c31af7Sopenharmony_ciby performing writes on the host or with device commands.
6440e5c31af7Sopenharmony_ciWhen descriptor memory is updated with device commands, visibility for the
6441e5c31af7Sopenharmony_cishader stage accessing a descriptor is ensured with the
6442e5c31af7Sopenharmony_ciename:VK_ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT_EXT access flag.
6443e5c31af7Sopenharmony_ciImplementations must: not access resources referenced by these descriptors
6444e5c31af7Sopenharmony_ciunless they are dynamically accessed by shaders.
6445e5c31af7Sopenharmony_ciDescriptors bound with this call can: be undefined: if they are not
6446e5c31af7Sopenharmony_cidynamically accessed by shaders.
6447e5c31af7Sopenharmony_ci
6448e5c31af7Sopenharmony_ciImplementations may: read descriptor data for any statically accessed
6449e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
6450e5c31af7Sopenharmony_cidescriptor if the pname:binding in pname:layout is not declared with the
6451e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT flag.
6452e5c31af7Sopenharmony_ciIf the pname:binding in pname:layout is declared with
6453e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT, implementations
6454e5c31af7Sopenharmony_cimust: not read descriptor data that is not dynamically accessed.
6455e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
6456e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
6457e5c31af7Sopenharmony_cidescriptor.
6458e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
6459e5c31af7Sopenharmony_ci
6460e5c31af7Sopenharmony_ciApplications must: ensure that any descriptor which the implementation may:
6461e5c31af7Sopenharmony_ciread must: be in-bounds of the underlying descriptor buffer binding.
6462e5c31af7Sopenharmony_ci
6463e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
6464e5c31af7Sopenharmony_ci[NOTE]
6465e5c31af7Sopenharmony_ci.Note
6466e5c31af7Sopenharmony_ci====
6467e5c31af7Sopenharmony_ciApplications can freely decide how large a variable descriptor buffer
6468e5c31af7Sopenharmony_cibinding is, so it may not be safe to read such descriptor payloads
6469e5c31af7Sopenharmony_cistatically.
6470e5c31af7Sopenharmony_ciThe intention of these rules is to allow implementations to speculatively
6471e5c31af7Sopenharmony_ciprefetch descriptor payloads where feasible.
6472e5c31af7Sopenharmony_ci====
6473e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
6474e5c31af7Sopenharmony_ci
6475e5c31af7Sopenharmony_ciDynamically accessing a resource through descriptor data from an unbound
6476e5c31af7Sopenharmony_ciregion of a <<sparsememory-partially-resident-buffers, sparse
6477e5c31af7Sopenharmony_cipartially-resident buffer>> will result in invalid descriptor data being
6478e5c31af7Sopenharmony_ciread, and therefore undefined: behavior.
6479e5c31af7Sopenharmony_ci
6480e5c31af7Sopenharmony_ci[NOTE]
6481e5c31af7Sopenharmony_ci.Note
6482e5c31af7Sopenharmony_ci====
6483e5c31af7Sopenharmony_ciFor descriptors written by the host, visibility is implied through the
6484e5c31af7Sopenharmony_ciautomatic visibility operation on queue submit, and there is no need to
6485e5c31af7Sopenharmony_ciconsider etext:VK_ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT.
6486e5c31af7Sopenharmony_ciExplicit synchronization for descriptors is only required when descriptors
6487e5c31af7Sopenharmony_ciare updated on the device.
6488e5c31af7Sopenharmony_ci====
6489e5c31af7Sopenharmony_ci
6490e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
6491e5c31af7Sopenharmony_ci[NOTE]
6492e5c31af7Sopenharmony_ci.Note
6493e5c31af7Sopenharmony_ci====
6494e5c31af7Sopenharmony_ciThe requirements above imply that all descriptor bindings have been defined
6495e5c31af7Sopenharmony_ciwith the equivalent of ename:VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT,
6496e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT and
6497e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT, but enabling those features
6498e5c31af7Sopenharmony_ciis not required to get this behavior.
6499e5c31af7Sopenharmony_ci====
6500e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
6501e5c31af7Sopenharmony_ci
6502e5c31af7Sopenharmony_ci.Valid Usage
6503e5c31af7Sopenharmony_ci****
6504e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/set_descriptor_buffer_offsets_common.adoc[]
6505e5c31af7Sopenharmony_ci  * [[VUID-vkCmdSetDescriptorBufferOffsetsEXT-None-08060]]
6506e5c31af7Sopenharmony_ci    The <<features-descriptorBuffer, pname:descriptorBuffer>> feature must:
6507e5c31af7Sopenharmony_ci    be enabled
6508e5c31af7Sopenharmony_ci  * [[VUID-vkCmdSetDescriptorBufferOffsetsEXT-pipelineBindPoint-08067]]
6509e5c31af7Sopenharmony_ci    pname:pipelineBindPoint must: be supported by the pname:commandBuffer's
6510e5c31af7Sopenharmony_ci    parent sname:VkCommandPool's queue family
6511e5c31af7Sopenharmony_ci****
6512e5c31af7Sopenharmony_ci
6513e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCmdSetDescriptorBufferOffsetsEXT.adoc[]
6514e5c31af7Sopenharmony_ci--
6515e5c31af7Sopenharmony_ci
6516e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance6[]
6517e5c31af7Sopenharmony_ci[open,refpage='vkCmdSetDescriptorBufferOffsets2EXT',desc='Setting descriptor buffer offsets in a command buffer',type='protos']
6518e5c31af7Sopenharmony_ci--
6519e5c31af7Sopenharmony_ciAlternatively, to set descriptor buffer offsets in a command buffer, call:
6520e5c31af7Sopenharmony_ci
6521e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCmdSetDescriptorBufferOffsets2EXT.adoc[]
6522e5c31af7Sopenharmony_ci
6523e5c31af7Sopenharmony_ci  * pname:commandBuffer is the command buffer in which the descriptor buffer
6524e5c31af7Sopenharmony_ci    offsets will be set.
6525e5c31af7Sopenharmony_ci  * pname:pSetDescriptorBufferOffsetsInfo is a pointer to a
6526e5c31af7Sopenharmony_ci    sname:VkSetDescriptorBufferOffsetsInfoEXT structure.
6527e5c31af7Sopenharmony_ci
6528e5c31af7Sopenharmony_ci.Valid Usage
6529e5c31af7Sopenharmony_ci****
6530e5c31af7Sopenharmony_ci  * [[VUID-vkCmdSetDescriptorBufferOffsets2EXT-descriptorBuffer-09470]]
6531e5c31af7Sopenharmony_ci    The <<features-descriptorBuffer, pname:descriptorBuffer>> feature must:
6532e5c31af7Sopenharmony_ci    be enabled
6533e5c31af7Sopenharmony_ci  * [[VUID-vkCmdSetDescriptorBufferOffsets2EXT-pSetDescriptorBufferOffsetsInfo-09471]]
6534e5c31af7Sopenharmony_ci    Each bit in pname:pSetDescriptorBufferOffsetsInfo->stageFlags must: be a
6535e5c31af7Sopenharmony_ci    stage supported by the pname:commandBuffer's parent
6536e5c31af7Sopenharmony_ci    sname:VkCommandPool's queue family
6537e5c31af7Sopenharmony_ci****
6538e5c31af7Sopenharmony_ci
6539e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCmdSetDescriptorBufferOffsets2EXT.adoc[]
6540e5c31af7Sopenharmony_ci--
6541e5c31af7Sopenharmony_ci
6542e5c31af7Sopenharmony_ci[open,refpage='VkSetDescriptorBufferOffsetsInfoEXT',desc='Structure specifying descriptor buffer offsets to set in a command buffer',type='structs']
6543e5c31af7Sopenharmony_ci--
6544e5c31af7Sopenharmony_ci:refpage: VkSetDescriptorBufferOffsetsInfoEXT
6545e5c31af7Sopenharmony_ci
6546e5c31af7Sopenharmony_ciThe sname:VkSetDescriptorBufferOffsetsInfoEXT structure is defined as:
6547e5c31af7Sopenharmony_ci
6548e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkSetDescriptorBufferOffsetsInfoEXT.adoc[]
6549e5c31af7Sopenharmony_ci
6550e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
6551e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
6552e5c31af7Sopenharmony_ci    structure.
6553e5c31af7Sopenharmony_ci  * pname:stageFlags is a bitmask of elink:VkShaderStageFlagBits specifying
6554e5c31af7Sopenharmony_ci    the shader stages the descriptor sets will be bound to
6555e5c31af7Sopenharmony_ci  * pname:layout is a slink:VkPipelineLayout object used to program the
6556e5c31af7Sopenharmony_ci    bindings.
6557e5c31af7Sopenharmony_ciifdef::VK_NV_per_stage_descriptor_set[]
6558e5c31af7Sopenharmony_ci    If the <<features-dynamicPipelineLayout, pname:dynamicPipelineLayout>>
6559e5c31af7Sopenharmony_ci    feature is enabled, pname:layout can: be dlink:VK_NULL_HANDLE and the
6560e5c31af7Sopenharmony_ci    layout must: be specified by chaining slink:VkPipelineLayoutCreateInfo
6561e5c31af7Sopenharmony_ci    structure off the pname:pNext
6562e5c31af7Sopenharmony_ciendif::VK_NV_per_stage_descriptor_set[]
6563e5c31af7Sopenharmony_ci  * pname:firstSet is the number of the first set to be bound.
6564e5c31af7Sopenharmony_ci  * pname:setCount is the number of elements in the pname:pBufferIndices and
6565e5c31af7Sopenharmony_ci    pname:pOffsets arrays.
6566e5c31af7Sopenharmony_ci  * pname:pBufferIndices is a pointer to an array of indices into the
6567e5c31af7Sopenharmony_ci    descriptor buffer binding points set by
6568e5c31af7Sopenharmony_ci    flink:vkCmdBindDescriptorBuffersEXT.
6569e5c31af7Sopenharmony_ci  * pname:pOffsets is a pointer to an array of basetype:VkDeviceSize offsets
6570e5c31af7Sopenharmony_ci    to apply to the bound descriptor buffers.
6571e5c31af7Sopenharmony_ci
6572e5c31af7Sopenharmony_ciIf pname:stageFlags specifies a subset of all stages corresponding to one or
6573e5c31af7Sopenharmony_cimore pipeline bind points, the binding operation still affects all stages
6574e5c31af7Sopenharmony_cicorresponding to the given pipeline bind point(s) as if the equivalent
6575e5c31af7Sopenharmony_cioriginal version of this command had been called with the same parameters.
6576e5c31af7Sopenharmony_ciFor example, specifying a pname:stageFlags value of
6577e5c31af7Sopenharmony_ciename:VK_SHADER_STAGE_VERTEX_BIT | ename:VK_SHADER_STAGE_FRAGMENT_BIT |
6578e5c31af7Sopenharmony_ciename:VK_SHADER_STAGE_COMPUTE_BIT is equivalent to calling the original
6579e5c31af7Sopenharmony_civersion of this command once with ename:VK_PIPELINE_BIND_POINT_GRAPHICS and
6580e5c31af7Sopenharmony_cionce with ename:VK_PIPELINE_BIND_POINT_COMPUTE.
6581e5c31af7Sopenharmony_ci
6582e5c31af7Sopenharmony_ci.Valid Usage
6583e5c31af7Sopenharmony_ci****
6584e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/set_descriptor_buffer_offsets_common.adoc[]
6585e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/dynamic_pipeline_layout_common.adoc[]
6586e5c31af7Sopenharmony_ci****
6587e5c31af7Sopenharmony_ci
6588e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkSetDescriptorBufferOffsetsInfoEXT.adoc[]
6589e5c31af7Sopenharmony_ci--
6590e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance6[]
6591e5c31af7Sopenharmony_ci
6592e5c31af7Sopenharmony_ci[open,refpage='vkCmdBindDescriptorBufferEmbeddedSamplersEXT',desc='Setting embedded immutable samplers offsets in a command buffer',type='protos']
6593e5c31af7Sopenharmony_ci--
6594e5c31af7Sopenharmony_ci:refpage: vkCmdBindDescriptorBufferEmbeddedSamplersEXT
6595e5c31af7Sopenharmony_ci
6596e5c31af7Sopenharmony_ciTo bind an embedded immutable sampler set to a command buffer, call:
6597e5c31af7Sopenharmony_ci
6598e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCmdBindDescriptorBufferEmbeddedSamplersEXT.adoc[]
6599e5c31af7Sopenharmony_ci
6600e5c31af7Sopenharmony_ci  * pname:commandBuffer is the command buffer that the embedded immutable
6601e5c31af7Sopenharmony_ci    samplers will be bound to.
6602e5c31af7Sopenharmony_ci  * pname:pipelineBindPoint is a elink:VkPipelineBindPoint indicating the
6603e5c31af7Sopenharmony_ci    type of the pipeline that will use the embedded immutable samplers.
6604e5c31af7Sopenharmony_ci  * pname:layout is a slink:VkPipelineLayout object used to program the
6605e5c31af7Sopenharmony_ci    bindings.
6606e5c31af7Sopenharmony_ci  * pname:set is the number of the set to be bound.
6607e5c31af7Sopenharmony_ci
6608e5c31af7Sopenharmony_ci`vkCmdBindDescriptorBufferEmbeddedSamplersEXT` binds the embedded immutable
6609e5c31af7Sopenharmony_cisamplers in pname:set of pname:layout to pname:set for the command buffer
6610e5c31af7Sopenharmony_cifor subsequent <<pipelines-bindpoint-commands, bound pipeline commands>> set
6611e5c31af7Sopenharmony_ciby pname:pipelineBindPoint.
6612e5c31af7Sopenharmony_ciAny previous binding to this set by flink:vkCmdSetDescriptorBufferOffsetsEXT
6613e5c31af7Sopenharmony_cior this command is overwritten.
6614e5c31af7Sopenharmony_ciAny sets that were last bound by a call to flink:vkCmdBindDescriptorSets are
6615e5c31af7Sopenharmony_ciinvalidated upon calling this command.
6616e5c31af7Sopenharmony_ciOther sets will also be invalidated upon calling this command if
6617e5c31af7Sopenharmony_cipname:layout differs from the pipeline layout used to bind those other sets,
6618e5c31af7Sopenharmony_cias described in <<descriptorsets-compatibility,Pipeline Layout
6619e5c31af7Sopenharmony_ciCompatibility>>.
6620e5c31af7Sopenharmony_ci
6621e5c31af7Sopenharmony_ci.Valid Usage
6622e5c31af7Sopenharmony_ci****
6623e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/bind_descriptor_buffer_embedded_samplers_common.adoc[]
6624e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-None-08068]]
6625e5c31af7Sopenharmony_ci    The <<features-descriptorBuffer, pname:descriptorBuffer>> feature must:
6626e5c31af7Sopenharmony_ci    be enabled
6627e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-pipelineBindPoint-08069]]
6628e5c31af7Sopenharmony_ci    pname:pipelineBindPoint must: be supported by the pname:commandBuffer's
6629e5c31af7Sopenharmony_ci    parent sname:VkCommandPool's queue family
6630e5c31af7Sopenharmony_ci****
6631e5c31af7Sopenharmony_ci
6632e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCmdBindDescriptorBufferEmbeddedSamplersEXT.adoc[]
6633e5c31af7Sopenharmony_ci--
6634e5c31af7Sopenharmony_ci
6635e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance6[]
6636e5c31af7Sopenharmony_ci[open,refpage='vkCmdBindDescriptorBufferEmbeddedSamplers2EXT',desc='Setting embedded immutable samplers offsets in a command buffer',type='protos']
6637e5c31af7Sopenharmony_ci--
6638e5c31af7Sopenharmony_ciAlternatively, to bind an embedded immutable sampler set to a command
6639e5c31af7Sopenharmony_cibuffer, call:
6640e5c31af7Sopenharmony_ci
6641e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCmdBindDescriptorBufferEmbeddedSamplers2EXT.adoc[]
6642e5c31af7Sopenharmony_ci
6643e5c31af7Sopenharmony_ci  * pname:commandBuffer is the command buffer that the embedded immutable
6644e5c31af7Sopenharmony_ci    samplers will be bound to.
6645e5c31af7Sopenharmony_ci  * pname:pBindDescriptorBufferEmbeddedSamplersInfo is a pointer to a
6646e5c31af7Sopenharmony_ci    sname:VkBindDescriptorBufferEmbeddedSamplersInfoEXT structure.
6647e5c31af7Sopenharmony_ci
6648e5c31af7Sopenharmony_ci.Valid Usage
6649e5c31af7Sopenharmony_ci****
6650e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBindDescriptorBufferEmbeddedSamplers2EXT-descriptorBuffer-09472]]
6651e5c31af7Sopenharmony_ci    The <<features-descriptorBuffer, pname:descriptorBuffer>> feature must:
6652e5c31af7Sopenharmony_ci    be enabled
6653e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBindDescriptorBufferEmbeddedSamplers2EXT-pBindDescriptorBufferEmbeddedSamplersInfo-09473]]
6654e5c31af7Sopenharmony_ci    Each bit in pname:pBindDescriptorBufferEmbeddedSamplersInfo->stageFlags
6655e5c31af7Sopenharmony_ci    must: be a stage supported by the pname:commandBuffer's parent
6656e5c31af7Sopenharmony_ci    sname:VkCommandPool's queue family
6657e5c31af7Sopenharmony_ci****
6658e5c31af7Sopenharmony_ci
6659e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCmdBindDescriptorBufferEmbeddedSamplers2EXT.adoc[]
6660e5c31af7Sopenharmony_ci--
6661e5c31af7Sopenharmony_ci
6662e5c31af7Sopenharmony_ci[open,refpage='VkBindDescriptorBufferEmbeddedSamplersInfoEXT',desc='Structure specifying embedded immutable sampler offsets to set in a command buffer',type='structs']
6663e5c31af7Sopenharmony_ci--
6664e5c31af7Sopenharmony_ci:refpage: VkBindDescriptorBufferEmbeddedSamplersInfoEXT
6665e5c31af7Sopenharmony_ci
6666e5c31af7Sopenharmony_ciThe sname:VkBindDescriptorBufferEmbeddedSamplersInfoEXT structure is defined
6667e5c31af7Sopenharmony_cias:
6668e5c31af7Sopenharmony_ci
6669e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBindDescriptorBufferEmbeddedSamplersInfoEXT.adoc[]
6670e5c31af7Sopenharmony_ci
6671e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
6672e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
6673e5c31af7Sopenharmony_ci    structure.
6674e5c31af7Sopenharmony_ci  * pname:stageFlags is a bitmask of elink:VkShaderStageFlagBits specifying
6675e5c31af7Sopenharmony_ci    the shader stages that will use the embedded immutable samplers.
6676e5c31af7Sopenharmony_ci  * pname:layout is a slink:VkPipelineLayout object used to program the
6677e5c31af7Sopenharmony_ci    bindings.
6678e5c31af7Sopenharmony_ciifdef::VK_NV_per_stage_descriptor_set[]
6679e5c31af7Sopenharmony_ci    If the <<features-dynamicPipelineLayout, pname:dynamicPipelineLayout>>
6680e5c31af7Sopenharmony_ci    feature is enabled, pname:layout can: be dlink:VK_NULL_HANDLE and the
6681e5c31af7Sopenharmony_ci    layout must: be specified by chaining slink:VkPipelineLayoutCreateInfo
6682e5c31af7Sopenharmony_ci    structure off the pname:pNext
6683e5c31af7Sopenharmony_ciendif::VK_NV_per_stage_descriptor_set[]
6684e5c31af7Sopenharmony_ci  * pname:set is the number of the set to be bound.
6685e5c31af7Sopenharmony_ci
6686e5c31af7Sopenharmony_ciIf pname:stageFlags specifies a subset of all stages corresponding to one or
6687e5c31af7Sopenharmony_cimore pipeline bind points, the binding operation still affects all stages
6688e5c31af7Sopenharmony_cicorresponding to the given pipeline bind point(s) as if the equivalent
6689e5c31af7Sopenharmony_cioriginal version of this command had been called with the same parameters.
6690e5c31af7Sopenharmony_ciFor example, specifying a pname:stageFlags value of
6691e5c31af7Sopenharmony_ciename:VK_SHADER_STAGE_VERTEX_BIT | ename:VK_SHADER_STAGE_FRAGMENT_BIT |
6692e5c31af7Sopenharmony_ciename:VK_SHADER_STAGE_COMPUTE_BIT is equivalent to calling the original
6693e5c31af7Sopenharmony_civersion of this command once with ename:VK_PIPELINE_BIND_POINT_GRAPHICS and
6694e5c31af7Sopenharmony_cionce with ename:VK_PIPELINE_BIND_POINT_COMPUTE.
6695e5c31af7Sopenharmony_ci
6696e5c31af7Sopenharmony_ci.Valid Usage
6697e5c31af7Sopenharmony_ci****
6698e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/bind_descriptor_buffer_embedded_samplers_common.adoc[]
6699e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/dynamic_pipeline_layout_common.adoc[]
6700e5c31af7Sopenharmony_ci****
6701e5c31af7Sopenharmony_ci
6702e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkBindDescriptorBufferEmbeddedSamplersInfoEXT.adoc[]
6703e5c31af7Sopenharmony_ci--
6704e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance6[]
6705e5c31af7Sopenharmony_ci
6706e5c31af7Sopenharmony_ci
6707e5c31af7Sopenharmony_ci[[descriptorbuffers-updates]]
6708e5c31af7Sopenharmony_ci=== Updating Descriptor Buffers
6709e5c31af7Sopenharmony_ci
6710e5c31af7Sopenharmony_ciUpdates to descriptor data in buffers can: be performed by any operation on
6711e5c31af7Sopenharmony_cieither the host or device that can: access memory.
6712e5c31af7Sopenharmony_ci
6713e5c31af7Sopenharmony_ciDescriptor buffer reads can: be synchronized using
6714e5c31af7Sopenharmony_ciename:VK_ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT_EXT in the relevant shader
6715e5c31af7Sopenharmony_cistage.
6716e5c31af7Sopenharmony_ci
6717e5c31af7Sopenharmony_ci
6718e5c31af7Sopenharmony_ci[[descriptorbuffers-push-descriptors]]
6719e5c31af7Sopenharmony_ci=== Push Descriptors With Descriptor Buffers
6720e5c31af7Sopenharmony_ci
6721e5c31af7Sopenharmony_ciIf the <<features-descriptorBufferPushDescriptors,
6722e5c31af7Sopenharmony_cipname:descriptorBufferPushDescriptors>> feature is enabled, push descriptors
6723e5c31af7Sopenharmony_cican: be used with descriptor buffers in the same way as with descriptor
6724e5c31af7Sopenharmony_cisets.
6725e5c31af7Sopenharmony_ci
6726e5c31af7Sopenharmony_ciThe <<limits-bufferlessPushDescriptors,
6727e5c31af7Sopenharmony_cisname:VkPhysicalDeviceDescriptorBufferPropertiesEXT::pname:bufferlessPushDescriptors>>
6728e5c31af7Sopenharmony_ciproperty indicates whether the implementation requires a buffer to back push
6729e5c31af7Sopenharmony_cidescriptors.
6730e5c31af7Sopenharmony_ciIf the property is ename:VK_FALSE then before recording any push descriptors
6731e5c31af7Sopenharmony_cithe application must: bind exactly `1` descriptor buffer that was created
6732e5c31af7Sopenharmony_ciwith the ename:VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT
6733e5c31af7Sopenharmony_cibit set.
6734e5c31af7Sopenharmony_ciWhen this buffer is bound any previously recorded push descriptors that are
6735e5c31af7Sopenharmony_cirequired for a subsequent command must: be recorded again.
6736e5c31af7Sopenharmony_ci
6737e5c31af7Sopenharmony_ci
6738e5c31af7Sopenharmony_ci[[descriptorbuffers-capturereplay]]
6739e5c31af7Sopenharmony_ci=== Capture and Replay
6740e5c31af7Sopenharmony_ci
6741e5c31af7Sopenharmony_ciIn a similar way to <<features-bufferDeviceAddressCaptureReplay,
6742e5c31af7Sopenharmony_cipname:bufferDeviceAddressCaptureReplay>>, the
6743e5c31af7Sopenharmony_ci<<features-descriptorBufferCaptureReplay,
6744e5c31af7Sopenharmony_cipname:descriptorBufferCaptureReplay>> feature allows the creation of opaque
6745e5c31af7Sopenharmony_cihandles for objects at capture time that can: be passed into object creation
6746e5c31af7Sopenharmony_cicalls in a future replay, causing descriptors to be created with the same
6747e5c31af7Sopenharmony_cidata.
6748e5c31af7Sopenharmony_ciThe opaque memory address for any memory used by these resources must: have
6749e5c31af7Sopenharmony_cibeen captured using flink:vkGetDeviceMemoryOpaqueCaptureAddress and be
6750e5c31af7Sopenharmony_cireplayed using slink:VkMemoryOpaqueCaptureAddressAllocateInfo.
6751e5c31af7Sopenharmony_ci
6752e5c31af7Sopenharmony_ci[open,refpage='vkGetBufferOpaqueCaptureDescriptorDataEXT',desc='Get buffer opaque capture descriptor data',type='protos']
6753e5c31af7Sopenharmony_ci--
6754e5c31af7Sopenharmony_ciTo get the opaque descriptor data for a buffer, call:
6755e5c31af7Sopenharmony_ci
6756e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetBufferOpaqueCaptureDescriptorDataEXT.adoc[]
6757e5c31af7Sopenharmony_ci
6758e5c31af7Sopenharmony_ci  * pname:device is the logical device that gets the data.
6759e5c31af7Sopenharmony_ci  * pname:pInfo is a pointer to a slink:VkBufferCaptureDescriptorDataInfoEXT
6760e5c31af7Sopenharmony_ci    structure specifying the buffer.
6761e5c31af7Sopenharmony_ci  * pname:pData is a pointer to a user-allocated buffer where the data will
6762e5c31af7Sopenharmony_ci    be written.
6763e5c31af7Sopenharmony_ci
6764e5c31af7Sopenharmony_ci.Valid Usage
6765e5c31af7Sopenharmony_ci****
6766e5c31af7Sopenharmony_ci  * [[VUID-vkGetBufferOpaqueCaptureDescriptorDataEXT-None-08072]]
6767e5c31af7Sopenharmony_ci    The <<features-descriptorBuffer, pname:descriptorBufferCaptureReplay>>
6768e5c31af7Sopenharmony_ci    feature must: be enabled
6769e5c31af7Sopenharmony_ci  * [[VUID-vkGetBufferOpaqueCaptureDescriptorDataEXT-pData-08073]]
6770e5c31af7Sopenharmony_ci    pname:pData must: point to a buffer that is at least
6771e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDescriptorBufferPropertiesEXT::pname:bufferCaptureReplayDescriptorDataSize
6772e5c31af7Sopenharmony_ci    bytes in size
6773e5c31af7Sopenharmony_ci  * [[VUID-vkGetBufferOpaqueCaptureDescriptorDataEXT-device-08074]]
6774e5c31af7Sopenharmony_ci    If pname:device was created with multiple physical devices, then the
6775e5c31af7Sopenharmony_ci    <<features-bufferDeviceAddressMultiDevice,
6776e5c31af7Sopenharmony_ci    pname:bufferDeviceAddressMultiDevice>> feature must: be enabled
6777e5c31af7Sopenharmony_ci****
6778e5c31af7Sopenharmony_ci
6779e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetBufferOpaqueCaptureDescriptorDataEXT.adoc[]
6780e5c31af7Sopenharmony_ci--
6781e5c31af7Sopenharmony_ci
6782e5c31af7Sopenharmony_ci[open,refpage='VkBufferCaptureDescriptorDataInfoEXT',desc='Structure specifying a buffer for descriptor capture',type='structs']
6783e5c31af7Sopenharmony_ci--
6784e5c31af7Sopenharmony_ciInformation about the buffer to get descriptor buffer capture data for is
6785e5c31af7Sopenharmony_cipassed in a sname:VkBufferCaptureDescriptorDataInfoEXT structure:
6786e5c31af7Sopenharmony_ci
6787e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBufferCaptureDescriptorDataInfoEXT.adoc[]
6788e5c31af7Sopenharmony_ci
6789e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
6790e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
6791e5c31af7Sopenharmony_ci    structure.
6792e5c31af7Sopenharmony_ci  * pname:buffer is the sname:VkBuffer handle of the buffer to get opaque
6793e5c31af7Sopenharmony_ci    capture data for.
6794e5c31af7Sopenharmony_ci
6795e5c31af7Sopenharmony_ci.Valid Usage
6796e5c31af7Sopenharmony_ci****
6797e5c31af7Sopenharmony_ci  * [[VUID-VkBufferCaptureDescriptorDataInfoEXT-buffer-08075]]
6798e5c31af7Sopenharmony_ci    pname:buffer must: have been created with
6799e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT set in
6800e5c31af7Sopenharmony_ci    slink:VkBufferCreateInfo::pname:flags
6801e5c31af7Sopenharmony_ci****
6802e5c31af7Sopenharmony_ci
6803e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkBufferCaptureDescriptorDataInfoEXT.adoc[]
6804e5c31af7Sopenharmony_ci--
6805e5c31af7Sopenharmony_ci
6806e5c31af7Sopenharmony_ci
6807e5c31af7Sopenharmony_ci[open,refpage='vkGetImageOpaqueCaptureDescriptorDataEXT',desc='Get image opaque capture descriptor data',type='protos']
6808e5c31af7Sopenharmony_ci--
6809e5c31af7Sopenharmony_ciTo get the opaque capture descriptor data for an image, call:
6810e5c31af7Sopenharmony_ci
6811e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetImageOpaqueCaptureDescriptorDataEXT.adoc[]
6812e5c31af7Sopenharmony_ci
6813e5c31af7Sopenharmony_ci  * pname:device is the logical device that gets the data.
6814e5c31af7Sopenharmony_ci  * pname:pInfo is a pointer to a slink:VkImageCaptureDescriptorDataInfoEXT
6815e5c31af7Sopenharmony_ci    structure specifying the image.
6816e5c31af7Sopenharmony_ci  * pname:pData is a pointer to a user-allocated buffer where the data will
6817e5c31af7Sopenharmony_ci    be written.
6818e5c31af7Sopenharmony_ci
6819e5c31af7Sopenharmony_ci.Valid Usage
6820e5c31af7Sopenharmony_ci****
6821e5c31af7Sopenharmony_ci  * [[VUID-vkGetImageOpaqueCaptureDescriptorDataEXT-None-08076]]
6822e5c31af7Sopenharmony_ci    The <<features-descriptorBuffer, pname:descriptorBufferCaptureReplay>>
6823e5c31af7Sopenharmony_ci    feature must: be enabled
6824e5c31af7Sopenharmony_ci  * [[VUID-vkGetImageOpaqueCaptureDescriptorDataEXT-pData-08077]]
6825e5c31af7Sopenharmony_ci    pname:pData must: point to a buffer that is at least
6826e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDescriptorBufferPropertiesEXT::pname:imageCaptureReplayDescriptorDataSize
6827e5c31af7Sopenharmony_ci    bytes in size
6828e5c31af7Sopenharmony_ci  * [[VUID-vkGetImageOpaqueCaptureDescriptorDataEXT-device-08078]]
6829e5c31af7Sopenharmony_ci    If pname:device was created with multiple physical devices, then the
6830e5c31af7Sopenharmony_ci    <<features-bufferDeviceAddressMultiDevice,
6831e5c31af7Sopenharmony_ci    pname:bufferDeviceAddressMultiDevice>> feature must: be enabled
6832e5c31af7Sopenharmony_ci****
6833e5c31af7Sopenharmony_ci
6834e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetImageOpaqueCaptureDescriptorDataEXT.adoc[]
6835e5c31af7Sopenharmony_ci--
6836e5c31af7Sopenharmony_ci
6837e5c31af7Sopenharmony_ci[open,refpage='VkImageCaptureDescriptorDataInfoEXT',desc='Structure specifying an image for descriptor capture',type='structs']
6838e5c31af7Sopenharmony_ci--
6839e5c31af7Sopenharmony_ciInformation about the image to get descriptor buffer capture data for is
6840e5c31af7Sopenharmony_cipassed in a sname:VkImageCaptureDescriptorDataInfoEXT structure:
6841e5c31af7Sopenharmony_ci
6842e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageCaptureDescriptorDataInfoEXT.adoc[]
6843e5c31af7Sopenharmony_ci
6844e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
6845e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
6846e5c31af7Sopenharmony_ci    structure.
6847e5c31af7Sopenharmony_ci  * pname:image is the sname:VkImage handle of the image to get opaque
6848e5c31af7Sopenharmony_ci    capture data for.
6849e5c31af7Sopenharmony_ci
6850e5c31af7Sopenharmony_ci.Valid Usage
6851e5c31af7Sopenharmony_ci****
6852e5c31af7Sopenharmony_ci  * [[VUID-VkImageCaptureDescriptorDataInfoEXT-image-08079]]
6853e5c31af7Sopenharmony_ci    pname:image must: have been created with
6854e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT set in
6855e5c31af7Sopenharmony_ci    slink:VkImageCreateInfo::pname:flags
6856e5c31af7Sopenharmony_ci****
6857e5c31af7Sopenharmony_ci
6858e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkImageCaptureDescriptorDataInfoEXT.adoc[]
6859e5c31af7Sopenharmony_ci--
6860e5c31af7Sopenharmony_ci
6861e5c31af7Sopenharmony_ci[open,refpage='vkGetImageViewOpaqueCaptureDescriptorDataEXT',desc='Get image view opaque capture descriptor data',type='protos']
6862e5c31af7Sopenharmony_ci--
6863e5c31af7Sopenharmony_ciTo get the opaque capture descriptor data for an image view, call:
6864e5c31af7Sopenharmony_ci
6865e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetImageViewOpaqueCaptureDescriptorDataEXT.adoc[]
6866e5c31af7Sopenharmony_ci
6867e5c31af7Sopenharmony_ci  * pname:device is the logical device that gets the data.
6868e5c31af7Sopenharmony_ci  * pname:pInfo is a pointer to a
6869e5c31af7Sopenharmony_ci    slink:VkImageViewCaptureDescriptorDataInfoEXT structure specifying the
6870e5c31af7Sopenharmony_ci    image view.
6871e5c31af7Sopenharmony_ci  * pname:pData is a pointer to a user-allocated buffer where the data will
6872e5c31af7Sopenharmony_ci    be written.
6873e5c31af7Sopenharmony_ci
6874e5c31af7Sopenharmony_ci.Valid Usage
6875e5c31af7Sopenharmony_ci****
6876e5c31af7Sopenharmony_ci  * [[VUID-vkGetImageViewOpaqueCaptureDescriptorDataEXT-None-08080]]
6877e5c31af7Sopenharmony_ci    The <<features-descriptorBuffer, pname:descriptorBufferCaptureReplay>>
6878e5c31af7Sopenharmony_ci    feature must: be enabled
6879e5c31af7Sopenharmony_ci  * [[VUID-vkGetImageViewOpaqueCaptureDescriptorDataEXT-pData-08081]]
6880e5c31af7Sopenharmony_ci    pname:pData must: point to a buffer that is at least
6881e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDescriptorBufferPropertiesEXT::pname:imageViewCaptureReplayDescriptorDataSize
6882e5c31af7Sopenharmony_ci    bytes in size
6883e5c31af7Sopenharmony_ci  * [[VUID-vkGetImageViewOpaqueCaptureDescriptorDataEXT-device-08082]]
6884e5c31af7Sopenharmony_ci    If pname:device was created with multiple physical devices, then the
6885e5c31af7Sopenharmony_ci    <<features-bufferDeviceAddressMultiDevice,
6886e5c31af7Sopenharmony_ci    pname:bufferDeviceAddressMultiDevice>> feature must: be enabled
6887e5c31af7Sopenharmony_ci****
6888e5c31af7Sopenharmony_ci
6889e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetImageViewOpaqueCaptureDescriptorDataEXT.adoc[]
6890e5c31af7Sopenharmony_ci--
6891e5c31af7Sopenharmony_ci
6892e5c31af7Sopenharmony_ci[open,refpage='VkImageViewCaptureDescriptorDataInfoEXT',desc='Structure specifying an image view for descriptor capture',type='structs']
6893e5c31af7Sopenharmony_ci--
6894e5c31af7Sopenharmony_ciInformation about the image view to get descriptor buffer capture data for
6895e5c31af7Sopenharmony_ciis passed in a sname:VkImageViewCaptureDescriptorDataInfoEXT structure:
6896e5c31af7Sopenharmony_ci
6897e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageViewCaptureDescriptorDataInfoEXT.adoc[]
6898e5c31af7Sopenharmony_ci
6899e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
6900e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
6901e5c31af7Sopenharmony_ci    structure.
6902e5c31af7Sopenharmony_ci  * pname:imageView is the sname:VkImageView handle of the image view to get
6903e5c31af7Sopenharmony_ci    opaque capture data for.
6904e5c31af7Sopenharmony_ci
6905e5c31af7Sopenharmony_ci.Valid Usage
6906e5c31af7Sopenharmony_ci****
6907e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCaptureDescriptorDataInfoEXT-imageView-08083]]
6908e5c31af7Sopenharmony_ci    pname:imageView must: have been created with
6909e5c31af7Sopenharmony_ci    ename:VK_IMAGE_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT set
6910e5c31af7Sopenharmony_ci    in slink:VkImageViewCreateInfo::pname:flags
6911e5c31af7Sopenharmony_ci****
6912e5c31af7Sopenharmony_ci
6913e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkImageViewCaptureDescriptorDataInfoEXT.adoc[]
6914e5c31af7Sopenharmony_ci--
6915e5c31af7Sopenharmony_ci
6916e5c31af7Sopenharmony_ci[open,refpage='vkGetSamplerOpaqueCaptureDescriptorDataEXT',desc='Get sampler opaque capture descriptor data',type='protos']
6917e5c31af7Sopenharmony_ci--
6918e5c31af7Sopenharmony_ciTo get the opaque capture descriptor data for a sampler, call:
6919e5c31af7Sopenharmony_ci
6920e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetSamplerOpaqueCaptureDescriptorDataEXT.adoc[]
6921e5c31af7Sopenharmony_ci
6922e5c31af7Sopenharmony_ci  * pname:device is the logical device that gets the data.
6923e5c31af7Sopenharmony_ci  * pname:pInfo is a pointer to a
6924e5c31af7Sopenharmony_ci    slink:VkSamplerCaptureDescriptorDataInfoEXT structure specifying the
6925e5c31af7Sopenharmony_ci    sampler.
6926e5c31af7Sopenharmony_ci  * pname:pData is a pointer to a user-allocated buffer where the data will
6927e5c31af7Sopenharmony_ci    be written.
6928e5c31af7Sopenharmony_ci
6929e5c31af7Sopenharmony_ci.Valid Usage
6930e5c31af7Sopenharmony_ci****
6931e5c31af7Sopenharmony_ci  * [[VUID-vkGetSamplerOpaqueCaptureDescriptorDataEXT-None-08084]]
6932e5c31af7Sopenharmony_ci    The <<features-descriptorBuffer, pname:descriptorBufferCaptureReplay>>
6933e5c31af7Sopenharmony_ci    feature must: be enabled
6934e5c31af7Sopenharmony_ci  * [[VUID-vkGetSamplerOpaqueCaptureDescriptorDataEXT-pData-08085]]
6935e5c31af7Sopenharmony_ci    pname:pData must: point to a buffer that is at least
6936e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDescriptorBufferPropertiesEXT::pname:samplerCaptureReplayDescriptorDataSize
6937e5c31af7Sopenharmony_ci    bytes in size
6938e5c31af7Sopenharmony_ci  * [[VUID-vkGetSamplerOpaqueCaptureDescriptorDataEXT-device-08086]]
6939e5c31af7Sopenharmony_ci    If pname:device was created with multiple physical devices, then the
6940e5c31af7Sopenharmony_ci    <<features-bufferDeviceAddressMultiDevice,
6941e5c31af7Sopenharmony_ci    pname:bufferDeviceAddressMultiDevice>> feature must: be enabled
6942e5c31af7Sopenharmony_ci****
6943e5c31af7Sopenharmony_ci
6944e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetSamplerOpaqueCaptureDescriptorDataEXT.adoc[]
6945e5c31af7Sopenharmony_ci--
6946e5c31af7Sopenharmony_ci
6947e5c31af7Sopenharmony_ci[open,refpage='VkSamplerCaptureDescriptorDataInfoEXT',desc='Structure specifying a sampler for descriptor capture',type='structs']
6948e5c31af7Sopenharmony_ci--
6949e5c31af7Sopenharmony_ciInformation about the sampler to get descriptor buffer capture data for is
6950e5c31af7Sopenharmony_cipassed in a sname:VkSamplerCaptureDescriptorDataInfoEXT structure:
6951e5c31af7Sopenharmony_ci
6952e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkSamplerCaptureDescriptorDataInfoEXT.adoc[]
6953e5c31af7Sopenharmony_ci
6954e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
6955e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
6956e5c31af7Sopenharmony_ci    structure.
6957e5c31af7Sopenharmony_ci  * pname:sampler is the sname:VkSampler handle of the sampler to get opaque
6958e5c31af7Sopenharmony_ci    capture data for.
6959e5c31af7Sopenharmony_ci
6960e5c31af7Sopenharmony_ci.Valid Usage
6961e5c31af7Sopenharmony_ci****
6962e5c31af7Sopenharmony_ci  * [[VUID-VkSamplerCaptureDescriptorDataInfoEXT-sampler-08087]]
6963e5c31af7Sopenharmony_ci    pname:sampler must: have been created with
6964e5c31af7Sopenharmony_ci    ename:VK_SAMPLER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT set in
6965e5c31af7Sopenharmony_ci    slink:VkSamplerCreateInfo::pname:flags
6966e5c31af7Sopenharmony_ci****
6967e5c31af7Sopenharmony_ci
6968e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkSamplerCaptureDescriptorDataInfoEXT.adoc[]
6969e5c31af7Sopenharmony_ci--
6970e5c31af7Sopenharmony_ci
6971e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing,VK_KHR_acceleration_structure[]
6972e5c31af7Sopenharmony_ci[open,refpage='vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT',desc='Get acceleration structure opaque capture descriptor data',type='protos']
6973e5c31af7Sopenharmony_ci--
6974e5c31af7Sopenharmony_ciTo get the opaque capture descriptor data for an acceleration structure,
6975e5c31af7Sopenharmony_cicall:
6976e5c31af7Sopenharmony_ci
6977e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT.adoc[]
6978e5c31af7Sopenharmony_ci
6979e5c31af7Sopenharmony_ci  * pname:device is the logical device that gets the data.
6980e5c31af7Sopenharmony_ci  * pname:pInfo is a pointer to a
6981e5c31af7Sopenharmony_ci    slink:VkAccelerationStructureCaptureDescriptorDataInfoEXT structure
6982e5c31af7Sopenharmony_ci    specifying the acceleration structure.
6983e5c31af7Sopenharmony_ci  * pname:pData is a pointer to a user-allocated buffer where the data will
6984e5c31af7Sopenharmony_ci    be written.
6985e5c31af7Sopenharmony_ci
6986e5c31af7Sopenharmony_ci.Valid Usage
6987e5c31af7Sopenharmony_ci****
6988e5c31af7Sopenharmony_ci  * [[VUID-vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT-None-08088]]
6989e5c31af7Sopenharmony_ci    The <<features-descriptorBuffer, pname:descriptorBufferCaptureReplay>>
6990e5c31af7Sopenharmony_ci    feature must: be enabled
6991e5c31af7Sopenharmony_ci  * [[VUID-vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT-pData-08089]]
6992e5c31af7Sopenharmony_ci    pname:pData must: point to a buffer that is at least
6993e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDescriptorBufferPropertiesEXT::pname:accelerationStructureCaptureReplayDescriptorDataSize
6994e5c31af7Sopenharmony_ci    bytes in size
6995e5c31af7Sopenharmony_ci  * [[VUID-vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT-device-08090]]
6996e5c31af7Sopenharmony_ci    If pname:device was created with multiple physical devices, then the
6997e5c31af7Sopenharmony_ci    <<features-bufferDeviceAddressMultiDevice,
6998e5c31af7Sopenharmony_ci    pname:bufferDeviceAddressMultiDevice>> feature must: be enabled
6999e5c31af7Sopenharmony_ci****
7000e5c31af7Sopenharmony_ci
7001e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT.adoc[]
7002e5c31af7Sopenharmony_ci--
7003e5c31af7Sopenharmony_ci
7004e5c31af7Sopenharmony_ci[open,refpage='VkAccelerationStructureCaptureDescriptorDataInfoEXT',desc='Structure specifying an acceleration structure for descriptor capture',type='structs']
7005e5c31af7Sopenharmony_ci--
7006e5c31af7Sopenharmony_ciInformation about the acceleration structure to get descriptor buffer
7007e5c31af7Sopenharmony_cicapture data for is passed in a
7008e5c31af7Sopenharmony_cisname:VkAccelerationStructureCaptureDescriptorDataInfoEXT structure:
7009e5c31af7Sopenharmony_ci
7010e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkAccelerationStructureCaptureDescriptorDataInfoEXT.adoc[]
7011e5c31af7Sopenharmony_ci
7012e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
7013e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
7014e5c31af7Sopenharmony_ci    structure.
7015e5c31af7Sopenharmony_ci  * pname:accelerationStructure is the sname:VkAccelerationStructureKHR
7016e5c31af7Sopenharmony_ci    handle of the acceleration structure to get opaque capture data for.
7017e5c31af7Sopenharmony_ci  * pname:accelerationStructureNV is the sname:VkAccelerationStructureNV
7018e5c31af7Sopenharmony_ci    handle of the acceleration structure to get opaque capture data for.
7019e5c31af7Sopenharmony_ci
7020e5c31af7Sopenharmony_ci.Valid Usage
7021e5c31af7Sopenharmony_ci****
7022e5c31af7Sopenharmony_ci  * [[VUID-VkAccelerationStructureCaptureDescriptorDataInfoEXT-accelerationStructure-08091]]
7023e5c31af7Sopenharmony_ci    If pname:accelerationStructure is not dlink:VK_NULL_HANDLE then
7024e5c31af7Sopenharmony_ci    pname:accelerationStructure must: have been created with
7025e5c31af7Sopenharmony_ci    ename:VK_ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT
7026e5c31af7Sopenharmony_ci    set in slink:VkAccelerationStructureCreateInfoKHR::pname:createFlags
7027e5c31af7Sopenharmony_ci  * [[VUID-VkAccelerationStructureCaptureDescriptorDataInfoEXT-accelerationStructureNV-08092]]
7028e5c31af7Sopenharmony_ci    If pname:accelerationStructureNV is not dlink:VK_NULL_HANDLE then
7029e5c31af7Sopenharmony_ci    pname:accelerationStructureNV must: have been created with
7030e5c31af7Sopenharmony_ci    ename:VK_ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT
7031e5c31af7Sopenharmony_ci    set in slink:VkAccelerationStructureCreateInfoNV::pname:info.flags
7032e5c31af7Sopenharmony_ci  * [[VUID-VkAccelerationStructureCaptureDescriptorDataInfoEXT-accelerationStructure-08093]]
7033e5c31af7Sopenharmony_ci    If pname:accelerationStructure is not dlink:VK_NULL_HANDLE then
7034e5c31af7Sopenharmony_ci    pname:accelerationStructureNV must: be dlink:VK_NULL_HANDLE
7035e5c31af7Sopenharmony_ci  * [[VUID-VkAccelerationStructureCaptureDescriptorDataInfoEXT-accelerationStructureNV-08094]]
7036e5c31af7Sopenharmony_ci    If pname:accelerationStructureNV is not dlink:VK_NULL_HANDLE then
7037e5c31af7Sopenharmony_ci    pname:accelerationStructure must: be dlink:VK_NULL_HANDLE
7038e5c31af7Sopenharmony_ci****
7039e5c31af7Sopenharmony_ci
7040e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkAccelerationStructureCaptureDescriptorDataInfoEXT.adoc[]
7041e5c31af7Sopenharmony_ci--
7042e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing,VK_KHR_acceleration_structure[]
7043e5c31af7Sopenharmony_ci
7044e5c31af7Sopenharmony_ci[open,refpage='VkOpaqueCaptureDescriptorDataCreateInfoEXT',desc='Structure specifying opaque capture descriptor data',type='structs']
7045e5c31af7Sopenharmony_ci--
7046e5c31af7Sopenharmony_ciThe sname:VkOpaqueCaptureDescriptorDataCreateInfoEXT structure is defined
7047e5c31af7Sopenharmony_cias:
7048e5c31af7Sopenharmony_ci
7049e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkOpaqueCaptureDescriptorDataCreateInfoEXT.adoc[]
7050e5c31af7Sopenharmony_ci
7051e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
7052e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
7053e5c31af7Sopenharmony_ci    structure.
7054e5c31af7Sopenharmony_ci  * pname:opaqueCaptureDescriptorData is a pointer to a user-allocated
7055e5c31af7Sopenharmony_ci    buffer containing opaque capture data retrieved using
7056e5c31af7Sopenharmony_ci    flink:vkGetBufferOpaqueCaptureDescriptorDataEXT,
7057e5c31af7Sopenharmony_ci    flink:vkGetImageOpaqueCaptureDescriptorDataEXT,
7058e5c31af7Sopenharmony_ci    flink:vkGetImageViewOpaqueCaptureDescriptorDataEXT,
7059e5c31af7Sopenharmony_ci    flink:vkGetSamplerOpaqueCaptureDescriptorDataEXT, or
7060e5c31af7Sopenharmony_ci    flink:vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT.
7061e5c31af7Sopenharmony_ci
7062e5c31af7Sopenharmony_ciDuring replay, opaque descriptor capture data can: be specified by adding a
7063e5c31af7Sopenharmony_cisname:VkOpaqueCaptureDescriptorDataCreateInfoEXT structure to the relevant
7064e5c31af7Sopenharmony_cipname:pNext chain of a slink:VkBufferCreateInfo, slink:VkImageCreateInfo,
7065e5c31af7Sopenharmony_cislink:VkImageViewCreateInfo, slink:VkSamplerCreateInfo,
7066e5c31af7Sopenharmony_cislink:VkAccelerationStructureCreateInfoNV or
7067e5c31af7Sopenharmony_cislink:VkAccelerationStructureCreateInfoKHR structure.
7068e5c31af7Sopenharmony_ci
7069e5c31af7Sopenharmony_ci
7070e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkOpaqueCaptureDescriptorDataCreateInfoEXT.adoc[]
7071e5c31af7Sopenharmony_ci--
7072e5c31af7Sopenharmony_ci
7073e5c31af7Sopenharmony_ciendif::VK_EXT_descriptor_buffer[]
7074