1e5c31af7Sopenharmony_ci// Copyright 2015-2021 The Khronos Group, Inc.
2e5c31af7Sopenharmony_ci//
3e5c31af7Sopenharmony_ci// SPDX-License-Identifier: CC-BY-4.0
4e5c31af7Sopenharmony_ci
5e5c31af7Sopenharmony_ci[[renderpass]]
6e5c31af7Sopenharmony_ci= Render Pass
7e5c31af7Sopenharmony_ci
8e5c31af7Sopenharmony_ci<<drawing, Draw commands>> must: be recorded within a _render pass
9e5c31af7Sopenharmony_ciinstance_.
10e5c31af7Sopenharmony_ciEach render pass instance defines a set of image resources, referred to as
11e5c31af7Sopenharmony_ci_attachments_, used during rendering.
12e5c31af7Sopenharmony_ci
13e5c31af7Sopenharmony_ciifdef::VK_KHR_dynamic_rendering[]
14e5c31af7Sopenharmony_ci[open,refpage='vkCmdBeginRenderingKHR',desc='Begin a dynamic render pass instance',type='protos']
15e5c31af7Sopenharmony_ci--
16e5c31af7Sopenharmony_ciTo begin a render pass instance, call:
17e5c31af7Sopenharmony_ci
18e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCmdBeginRenderingKHR.txt[]
19e5c31af7Sopenharmony_ci
20e5c31af7Sopenharmony_ci  * pname:commandBuffer is the command buffer in which to record the
21e5c31af7Sopenharmony_ci    command.
22e5c31af7Sopenharmony_ci  * pname:pRenderingInfo is a pointer to a slink:VkRenderingInfoKHR
23e5c31af7Sopenharmony_ci    structure specifying details of the render pass instance to begin.
24e5c31af7Sopenharmony_ci
25e5c31af7Sopenharmony_ciAfter beginning a render pass instance, the command buffer is ready to
26e5c31af7Sopenharmony_cirecord <<drawing,draw commands>>.
27e5c31af7Sopenharmony_ci
28e5c31af7Sopenharmony_ciIf pname:pRenderingInfo->flags includes ename:VK_RENDERING_RESUMING_BIT_KHR
29e5c31af7Sopenharmony_cithen this render pass is resumed from a render pass instance that has been
30e5c31af7Sopenharmony_cisuspended earlier in <<synchronization-submission-order, submission order>>.
31e5c31af7Sopenharmony_ci
32e5c31af7Sopenharmony_ci.Valid Usage
33e5c31af7Sopenharmony_ci****
34e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBeginRenderingKHR-dynamicRendering-06446]]
35e5c31af7Sopenharmony_ci    The <<features-dynamicRendering,pname:dynamicRendering>> feature must:
36e5c31af7Sopenharmony_ci    be enabled
37e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBeginRenderingKHR-commandBuffer-06068]]
38e5c31af7Sopenharmony_ci    If pname:commandBuffer is a secondary command buffer,
39e5c31af7Sopenharmony_ci    pname:pRenderingInfo->flags must: not include
40e5c31af7Sopenharmony_ci    ename:VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT_KHR
41e5c31af7Sopenharmony_ci****
42e5c31af7Sopenharmony_ci
43e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCmdBeginRenderingKHR.txt[]
44e5c31af7Sopenharmony_ci--
45e5c31af7Sopenharmony_ci
46e5c31af7Sopenharmony_ci[open,refpage='VkRenderingInfoKHR',desc='Structure specifying render pass instance begin info',type='structs']
47e5c31af7Sopenharmony_ci--
48e5c31af7Sopenharmony_ciThe sname:VkRenderingInfoKHR structure is defined as:
49e5c31af7Sopenharmony_ci
50e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkRenderingInfoKHR.txt[]
51e5c31af7Sopenharmony_ci
52e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
53e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
54e5c31af7Sopenharmony_ci    structure.
55e5c31af7Sopenharmony_ci  * pname:flags is a bitmask of elink:VkRenderingFlagBitsKHR.
56e5c31af7Sopenharmony_ci  * pname:renderArea is the render area that is affected by the render pass
57e5c31af7Sopenharmony_ci    instance.
58e5c31af7Sopenharmony_ci  * pname:layerCount is the number of layers rendered to in each attachment
59e5c31af7Sopenharmony_ci    when pname:viewMask is `0`.
60e5c31af7Sopenharmony_ci  * pname:viewMask is the view mask indicating the indices of attachment
61e5c31af7Sopenharmony_ci    layers that will be rendered when it is not `0`.
62e5c31af7Sopenharmony_ci  * pname:colorAttachmentCount is the number of elements in
63e5c31af7Sopenharmony_ci    pname:pColorAttachments.
64e5c31af7Sopenharmony_ci  * pname:pColorAttachments is a pointer to an array of
65e5c31af7Sopenharmony_ci    pname:colorAttachmentCount slink:VkRenderingAttachmentInfoKHR structures
66e5c31af7Sopenharmony_ci    describing any color attachments used.
67e5c31af7Sopenharmony_ci  * pname:pDepthAttachment is a pointer to a
68e5c31af7Sopenharmony_ci    slink:VkRenderingAttachmentInfoKHR structure describing a depth
69e5c31af7Sopenharmony_ci    attachment.
70e5c31af7Sopenharmony_ci  * pname:pStencilAttachment is a pointer to a
71e5c31af7Sopenharmony_ci    slink:VkRenderingAttachmentInfoKHR structure describing a stencil
72e5c31af7Sopenharmony_ci    attachment.
73e5c31af7Sopenharmony_ci
74e5c31af7Sopenharmony_ciifdef::VK_KHR_multiview,VK_VERSION_1_1[]
75e5c31af7Sopenharmony_ciIf pname:viewMask is not `0`, multiview is enabled.
76e5c31af7Sopenharmony_ciendif::VK_KHR_multiview,VK_VERSION_1_1[]
77e5c31af7Sopenharmony_ci
78e5c31af7Sopenharmony_ciifdef::VK_KHR_device_group,VK_VERSION_1_1[]
79e5c31af7Sopenharmony_ciIf there is an instance of slink:VkDeviceGroupRenderPassBeginInfo included
80e5c31af7Sopenharmony_ciin the pname:pNext chain and its pname:deviceCount member is not `0`, then
81e5c31af7Sopenharmony_cipname:renderArea is ignored, and the render area is defined per-device by
82e5c31af7Sopenharmony_cithat structure.
83e5c31af7Sopenharmony_ciendif::VK_KHR_device_group,VK_VERSION_1_1[]
84e5c31af7Sopenharmony_ci
85e5c31af7Sopenharmony_ciEach element of the pname:pColorAttachments array corresponds to an output
86e5c31af7Sopenharmony_cilocation in the shader, i.e. if the shader declares an output variable
87e5c31af7Sopenharmony_cidecorated with a code:Location value of *X*, then it uses the attachment
88e5c31af7Sopenharmony_ciprovided in pname:pColorAttachments[*X*].
89e5c31af7Sopenharmony_ciIf the pname:imageView member of any element of pname:pColorAttachments is
90e5c31af7Sopenharmony_cidlink:VK_NULL_HANDLE, writes to the corresponding location by a fragment are
91e5c31af7Sopenharmony_cidiscarded.
92e5c31af7Sopenharmony_ci
93e5c31af7Sopenharmony_ci.Valid Usage
94e5c31af7Sopenharmony_ci****
95e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-viewMask-06069]]
96e5c31af7Sopenharmony_ci    If pname:viewMask is `0`, pname:layerCount must: not be `0`
97e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-imageView-06070]]
98e5c31af7Sopenharmony_ci    If neither the apiext:VK_AMD_mixed_attachment_samples nor the
99e5c31af7Sopenharmony_ci    apiext:VK_NV_framebuffer_mixed_samples extensions are enabled,
100e5c31af7Sopenharmony_ci    pname:imageView members of pname:pDepthAttachment,
101e5c31af7Sopenharmony_ci    pname:pStencilAttachment, and elements of pname:pColorAttachments that
102e5c31af7Sopenharmony_ci    are not dlink:VK_NULL_HANDLE must: have been created with the same
103e5c31af7Sopenharmony_ci    pname:sampleCount
104e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_device_group[]
105e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-renderArea-06071]]
106e5c31af7Sopenharmony_ci    pname:renderArea.offset.x must: be greater than or equal to 0
107e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-renderArea-06072]]
108e5c31af7Sopenharmony_ci    pname:renderArea.offset.y must: be greater than or equal to 0
109e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-renderArea-06073]]
110e5c31af7Sopenharmony_ci    The sum of pname:renderArea.offset.x and pname:renderArea.extent.width
111e5c31af7Sopenharmony_ci    must: be less than or equal to <<limits-maxFramebufferWidth,
112e5c31af7Sopenharmony_ci    pname:maxFramebufferWidth>>
113e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-renderArea-06074]]
114e5c31af7Sopenharmony_ci    The sum of pname:renderArea.offset.y and pname:renderArea.extent.height
115e5c31af7Sopenharmony_ci    must: be less than or equal to <<limits-maxFramebufferHeight,
116e5c31af7Sopenharmony_ci    pname:maxFramebufferHeight>>
117e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-imageView-06075]]
118e5c31af7Sopenharmony_ci    The width of the pname:imageView member of any element of
119e5c31af7Sopenharmony_ci    pname:pColorAttachments, pname:pDepthAttachment, or
120e5c31af7Sopenharmony_ci    pname:pStencilAttachment that is not dlink:VK_NULL_HANDLE must: be
121e5c31af7Sopenharmony_ci    greater than or equal to [eq]#pname:renderArea.offset.x {plus}
122e5c31af7Sopenharmony_ci    pname:renderArea.extent.width#
123e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-imageView-06076]]
124e5c31af7Sopenharmony_ci    The height of the pname:imageView member of any element of
125e5c31af7Sopenharmony_ci    pname:pColorAttachments, pname:pDepthAttachment, or
126e5c31af7Sopenharmony_ci    pname:pStencilAttachment that is not dlink:VK_NULL_HANDLE must: be
127e5c31af7Sopenharmony_ci    greater than or equal to [eq]#pname:renderArea.offset.y {plus}
128e5c31af7Sopenharmony_ci    pname:renderArea.extent.height#
129e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_device_group[]
130e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_device_group[]
131e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-pNext-06077]]
132e5c31af7Sopenharmony_ci    If the pname:pNext chain does not contain
133e5c31af7Sopenharmony_ci    slink:VkDeviceGroupRenderPassBeginInfo or its
134e5c31af7Sopenharmony_ci    pname:deviceRenderAreaCount member is equal to 0,
135e5c31af7Sopenharmony_ci    pname:renderArea.offset.x must: be greater than or equal to 0
136e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-pNext-06078]]
137e5c31af7Sopenharmony_ci    If the pname:pNext chain does not contain
138e5c31af7Sopenharmony_ci    slink:VkDeviceGroupRenderPassBeginInfo or its
139e5c31af7Sopenharmony_ci    pname:deviceRenderAreaCount member is equal to 0,
140e5c31af7Sopenharmony_ci    pname:renderArea.offset.y must: be greater than or equal to 0
141e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-pNext-06079]]
142e5c31af7Sopenharmony_ci    If the pname:pNext chain does not contain
143e5c31af7Sopenharmony_ci    slink:VkDeviceGroupRenderPassBeginInfo or its
144e5c31af7Sopenharmony_ci    pname:deviceRenderAreaCount member is equal to 0, the width of the
145e5c31af7Sopenharmony_ci    pname:imageView member of any element of pname:pColorAttachments,
146e5c31af7Sopenharmony_ci    pname:pDepthAttachment, or pname:pStencilAttachment that is not
147e5c31af7Sopenharmony_ci    dlink:VK_NULL_HANDLE must: be greater than or equal to
148e5c31af7Sopenharmony_ci    [eq]#pname:renderArea.offset.x {plus} pname:renderArea.extent.width#
149e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-pNext-06080]]
150e5c31af7Sopenharmony_ci    If the pname:pNext chain does not contain
151e5c31af7Sopenharmony_ci    slink:VkDeviceGroupRenderPassBeginInfo or its
152e5c31af7Sopenharmony_ci    pname:deviceRenderAreaCount member is equal to 0, the height of the
153e5c31af7Sopenharmony_ci    pname:imageView member of any element of pname:pColorAttachments,
154e5c31af7Sopenharmony_ci    pname:pDepthAttachment, or pname:pStencilAttachment that is not
155e5c31af7Sopenharmony_ci    dlink:VK_NULL_HANDLE must: be greater than or equal to
156e5c31af7Sopenharmony_ci    [eq]#pname:renderArea.offset.y {plus} pname:renderArea.extent.height#
157e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-pNext-06083]]
158e5c31af7Sopenharmony_ci    If the pname:pNext chain contains
159e5c31af7Sopenharmony_ci    slink:VkDeviceGroupRenderPassBeginInfo, the width of the pname:imageView
160e5c31af7Sopenharmony_ci    member of any element of pname:pColorAttachments,
161e5c31af7Sopenharmony_ci    pname:pDepthAttachment, or pname:pStencilAttachment that is not
162e5c31af7Sopenharmony_ci    dlink:VK_NULL_HANDLE must: be greater than or equal to the sum of the
163e5c31af7Sopenharmony_ci    pname:offset.x and pname:extent.width members of each element of
164e5c31af7Sopenharmony_ci    pname:pDeviceRenderAreas
165e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-pNext-06084]]
166e5c31af7Sopenharmony_ci    If the pname:pNext chain contains
167e5c31af7Sopenharmony_ci    slink:VkDeviceGroupRenderPassBeginInfo, the height of the
168e5c31af7Sopenharmony_ci    pname:imageView member of any element of pname:pColorAttachments,
169e5c31af7Sopenharmony_ci    pname:pDepthAttachment, or pname:pStencilAttachment that is not
170e5c31af7Sopenharmony_ci    dlink:VK_NULL_HANDLE must: be greater than or equal to the sum of the
171e5c31af7Sopenharmony_ci    pname:offset.y and pname:extent.height members of each element of
172e5c31af7Sopenharmony_ci    pname:pDeviceRenderAreas
173e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-pDepthAttachment-06085]]
174e5c31af7Sopenharmony_ci    If neither pname:pDepthAttachment or pname:pStencilAttachment are `NULL`
175e5c31af7Sopenharmony_ci    and the pname:imageView member of either structure is not
176e5c31af7Sopenharmony_ci    dlink:VK_NULL_HANDLE, the pname:imageView member of each structure must:
177e5c31af7Sopenharmony_ci    be the same
178e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-pDepthAttachment-06086]]
179e5c31af7Sopenharmony_ci    If neither pname:pDepthAttachment or pname:pStencilAttachment are
180e5c31af7Sopenharmony_ci    `NULL`, and the pname:resolveMode member of each is not
181e5c31af7Sopenharmony_ci    ename:VK_RESOLVE_MODE_NONE, the pname:resolveImageView member of each
182e5c31af7Sopenharmony_ci    structure must: be the same
183e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_device_group[]
184e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-colorAttachmentCount-06087]]
185e5c31af7Sopenharmony_ci    If pname:colorAttachmentCount is not `0` and the pname:imageView member
186e5c31af7Sopenharmony_ci    of an element of pname:pColorAttachments is not dlink:VK_NULL_HANDLE,
187e5c31af7Sopenharmony_ci    that pname:imageView must: have been created with
188e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
189e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-pDepthAttachment-06088]]
190e5c31af7Sopenharmony_ci    If pname:pDepthAttachment is not `NULL` and
191e5c31af7Sopenharmony_ci    pname:pDepthAttachment->imageView is not dlink:VK_NULL_HANDLE,
192e5c31af7Sopenharmony_ci    pname:pDepthAttachment->imageView must: have been created with
193e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
194e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-pStencilAttachment-06089]]
195e5c31af7Sopenharmony_ci    If pname:pStencilAttachment is not `NULL` and
196e5c31af7Sopenharmony_ci    pname:pStencilAttachment->imageView is not dlink:VK_NULL_HANDLE,
197e5c31af7Sopenharmony_ci    pname:pStencilAttachment->imageView must: have been created with a
198e5c31af7Sopenharmony_ci    stencil usage including
199e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
200e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-colorAttachmentCount-06090]]
201e5c31af7Sopenharmony_ci    If pname:colorAttachmentCount is not `0` and the pname:imageView member
202e5c31af7Sopenharmony_ci    of an element of pname:pColorAttachments is not dlink:VK_NULL_HANDLE,
203e5c31af7Sopenharmony_ci    the pname:layout member of that element of pname:pColorAttachments must:
204e5c31af7Sopenharmony_ci    not be ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL or
205e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL
206e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-colorAttachmentCount-06091]]
207e5c31af7Sopenharmony_ci    If pname:colorAttachmentCount is not `0` and the pname:imageView member
208e5c31af7Sopenharmony_ci    of an element of pname:pColorAttachments is not dlink:VK_NULL_HANDLE, if
209e5c31af7Sopenharmony_ci    the pname:resolveMode member of that element of pname:pColorAttachments
210e5c31af7Sopenharmony_ci    is not ename:VK_RESOLVE_MODE_NONE, its pname:resolveImageLayout member
211e5c31af7Sopenharmony_ci    must: not be ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL or
212e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL
213e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-pDepthAttachment-06092]]
214e5c31af7Sopenharmony_ci    If pname:pDepthAttachment is not `NULL` and
215e5c31af7Sopenharmony_ci    pname:pDepthAttachment->imageView is not dlink:VK_NULL_HANDLE,
216e5c31af7Sopenharmony_ci    pname:pDepthAttachment->layout must: not be
217e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL
218e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-pDepthAttachment-06093]]
219e5c31af7Sopenharmony_ci    If pname:pDepthAttachment is not `NULL`,
220e5c31af7Sopenharmony_ci    pname:pDepthAttachment->imageView is not dlink:VK_NULL_HANDLE, and
221e5c31af7Sopenharmony_ci    pname:pDepthAttachment->resolveMode is not ename:VK_RESOLVE_MODE_NONE,
222e5c31af7Sopenharmony_ci    pname:pDepthAttachment->resolveImageLayout must: not be
223e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL
224e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-pStencilAttachment-06094]]
225e5c31af7Sopenharmony_ci    If pname:pStencilAttachment is not `NULL` and
226e5c31af7Sopenharmony_ci    pname:pStencilAttachment->imageView is not dlink:VK_NULL_HANDLE,
227e5c31af7Sopenharmony_ci    pname:pStencilAttachment->layout must: not be
228e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL
229e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-pStencilAttachment-06095]]
230e5c31af7Sopenharmony_ci    If pname:pStencilAttachment is not `NULL`,
231e5c31af7Sopenharmony_ci    pname:pStencilAttachment->imageView is not dlink:VK_NULL_HANDLE, and
232e5c31af7Sopenharmony_ci    pname:pStencilAttachment->resolveMode is not ename:VK_RESOLVE_MODE_NONE,
233e5c31af7Sopenharmony_ci    pname:pStencilAttachment->resolveImageLayout must: not be
234e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL
235e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance2,VK_VERSION_1_1[]
236e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-colorAttachmentCount-06096]]
237e5c31af7Sopenharmony_ci    If pname:colorAttachmentCount is not `0` and the pname:imageView member
238e5c31af7Sopenharmony_ci    of an element of pname:pColorAttachments is not dlink:VK_NULL_HANDLE,
239e5c31af7Sopenharmony_ci    the pname:layout member of that element of pname:pColorAttachments must:
240e5c31af7Sopenharmony_ci    not be ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL
241e5c31af7Sopenharmony_ci    or ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL
242e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-colorAttachmentCount-06097]]
243e5c31af7Sopenharmony_ci    If pname:colorAttachmentCount is not `0` and the pname:imageView member
244e5c31af7Sopenharmony_ci    of an element of pname:pColorAttachments is not dlink:VK_NULL_HANDLE, if
245e5c31af7Sopenharmony_ci    the pname:resolveMode member of that element of pname:pColorAttachments
246e5c31af7Sopenharmony_ci    is not ename:VK_RESOLVE_MODE_NONE, its pname:resolveImageLayout member
247e5c31af7Sopenharmony_ci    must: not be
248e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL or
249e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL
250e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-pDepthAttachment-06098]]
251e5c31af7Sopenharmony_ci    If pname:pDepthAttachment is not `NULL`,
252e5c31af7Sopenharmony_ci    pname:pDepthAttachment->imageView is not dlink:VK_NULL_HANDLE, and
253e5c31af7Sopenharmony_ci    pname:pDepthAttachment->resolveMode is not ename:VK_RESOLVE_MODE_NONE,
254e5c31af7Sopenharmony_ci    pname:pDepthAttachment->resolveImageLayout must: not be
255e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL
256e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-pStencilAttachment-06099]]
257e5c31af7Sopenharmony_ci    If pname:pStencilAttachment is not `NULL`,
258e5c31af7Sopenharmony_ci    pname:pStencilAttachment->imageView is not dlink:VK_NULL_HANDLE, and
259e5c31af7Sopenharmony_ci    pname:pStencilAttachment->resolveMode is not ename:VK_RESOLVE_MODE_NONE,
260e5c31af7Sopenharmony_ci    pname:pStencilAttachment->resolveImageLayout must: not be
261e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL
262e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance2,VK_VERSION_1_1[]
263e5c31af7Sopenharmony_ciifdef::VK_KHR_separate_depth_stencil_layouts,VK_VERSION_1_2[]
264e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-colorAttachmentCount-06100]]
265e5c31af7Sopenharmony_ci    If pname:colorAttachmentCount is not `0` and the pname:imageView member
266e5c31af7Sopenharmony_ci    of an element of pname:pColorAttachments is not dlink:VK_NULL_HANDLE,
267e5c31af7Sopenharmony_ci    the pname:layout member of that element of pname:pColorAttachments must:
268e5c31af7Sopenharmony_ci    not be ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,
269e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,
270e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or
271e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
272e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-colorAttachmentCount-06101]]
273e5c31af7Sopenharmony_ci    If pname:colorAttachmentCount is not `0` and the pname:imageView member
274e5c31af7Sopenharmony_ci    of an element of pname:pColorAttachments is not dlink:VK_NULL_HANDLE, if
275e5c31af7Sopenharmony_ci    the pname:resolveMode member of that element of pname:pColorAttachments
276e5c31af7Sopenharmony_ci    is not ename:VK_RESOLVE_MODE_NONE, its pname:resolveImageLayout member
277e5c31af7Sopenharmony_ci    must: not be ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,
278e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,
279e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or
280e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
281e5c31af7Sopenharmony_ciendif::VK_KHR_separate_depth_stencil_layouts,VK_VERSION_1_2[]
282e5c31af7Sopenharmony_ciifdef::VK_KHR_depth_stencil_resolve,VK_VERSION_1_2[]
283e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-pDepthAttachment-06102]]
284e5c31af7Sopenharmony_ci    If pname:pDepthAttachment is not `NULL` and
285e5c31af7Sopenharmony_ci    pname:pDepthAttachment->imageView is not dlink:VK_NULL_HANDLE,
286e5c31af7Sopenharmony_ci    pname:pDepthAttachment->resolveMode must: be one of the bits set in
287e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDepthStencilResolveProperties::pname:supportedDepthResolveModes
288e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-pStencilAttachment-06103]]
289e5c31af7Sopenharmony_ci    If pname:pStencilAttachment is not `NULL` and
290e5c31af7Sopenharmony_ci    pname:pStencilAttachment->imageView is not dlink:VK_NULL_HANDLE,
291e5c31af7Sopenharmony_ci    pname:pStencilAttachment->resolveMode must: be one of the bits set in
292e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDepthStencilResolveProperties::pname:supportedStencilResolveModes
293e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-pDepthAttachment-06104]]
294e5c31af7Sopenharmony_ci    If pname:pDepthAttachment or pname:pStencilAttachment are both not
295e5c31af7Sopenharmony_ci    `NULL`, pname:pDepthAttachment->imageView and
296e5c31af7Sopenharmony_ci    pname:pStencilAttachment->imageView are both not dlink:VK_NULL_HANDLE,
297e5c31af7Sopenharmony_ci    and
298e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDepthStencilResolveProperties::pname:independentResolveNone
299e5c31af7Sopenharmony_ci    is ename:VK_FALSE, the pname:resolveMode of both structures must: be the
300e5c31af7Sopenharmony_ci    same value
301e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-pDepthAttachment-06105]]
302e5c31af7Sopenharmony_ci    If pname:pDepthAttachment or pname:pStencilAttachment are both not
303e5c31af7Sopenharmony_ci    `NULL`, pname:pDepthAttachment->imageView and
304e5c31af7Sopenharmony_ci    pname:pStencilAttachment->imageView are both not dlink:VK_NULL_HANDLE,
305e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDepthStencilResolveProperties::pname:independentResolve
306e5c31af7Sopenharmony_ci    is ename:VK_FALSE, and the pname:resolveMode of neither structure is
307e5c31af7Sopenharmony_ci    ename:VK_RESOLVE_MODE_NONE, the pname:resolveMode of both structures
308e5c31af7Sopenharmony_ci    must: be the same value
309e5c31af7Sopenharmony_ciendif::VK_KHR_depth_stencil_resolve,VK_VERSION_1_2[]
310e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-colorAttachmentCount-06106]]
311e5c31af7Sopenharmony_ci    pname:colorAttachmentCount must: be less than or equal to
312e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceLimits::pname:maxColorAttachments
313e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map[]
314e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-imageView-06107]]
315e5c31af7Sopenharmony_ci    If the pname:imageView member of a
316e5c31af7Sopenharmony_ci    slink:VkRenderingFragmentDensityMapAttachmentInfoEXT structure included
317e5c31af7Sopenharmony_ci    in the pname:pNext chain is not dlink:VK_NULL_HANDLE, and
318e5c31af7Sopenharmony_ci    <<features-fragmentDensityMapNonSubsampledImages,non-subsample image
319e5c31af7Sopenharmony_ci    feature>> is not enabled, valid pname:imageView and
320e5c31af7Sopenharmony_ci    pname:resolveImageView members of pname:pDepthAttachment,
321e5c31af7Sopenharmony_ci    pname:pStencilAttachment, and each element of pname:pColorAttachments
322e5c31af7Sopenharmony_ci    must: be a slink:VkImageView created with
323e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT
324e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_multiview[]
325e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-imageView-06108]]
326e5c31af7Sopenharmony_ci    If the pname:imageView member of a
327e5c31af7Sopenharmony_ci    slink:VkRenderingFragmentDensityMapAttachmentInfoEXT structure included
328e5c31af7Sopenharmony_ci    in the pname:pNext chain is not dlink:VK_NULL_HANDLE, and pname:viewMask
329e5c31af7Sopenharmony_ci    is not `0`, pname:imageView must: have a pname:layerCount greater than
330e5c31af7Sopenharmony_ci    or equal to the index of the most significant bit in pname:viewMask
331e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-imageView-06109]]
332e5c31af7Sopenharmony_ci    If the pname:imageView member of a
333e5c31af7Sopenharmony_ci    slink:VkRenderingFragmentDensityMapAttachmentInfoEXT structure included
334e5c31af7Sopenharmony_ci    in the pname:pNext chain is not dlink:VK_NULL_HANDLE, and pname:viewMask
335e5c31af7Sopenharmony_ci    is `0`, pname:imageView must: have a pname:layerCount equal to `1`
336e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_multiview[]
337e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_device_group[]
338e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-imageView-06110]]
339e5c31af7Sopenharmony_ci    If the pname:imageView member of a
340e5c31af7Sopenharmony_ci    slink:VkRenderingFragmentDensityMapAttachmentInfoEXT structure included
341e5c31af7Sopenharmony_ci    in the pname:pNext chain is not dlink:VK_NULL_HANDLE, pname:imageView
342e5c31af7Sopenharmony_ci    must: have a width greater than or equal to
343e5c31af7Sopenharmony_ci    latexmath:[\left\lceil{\frac{renderArea_{x}+renderArea_{width}}{maxFragmentDensityTexelSize_{width}}}\right\rceil]
344e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-imageView-06111]]
345e5c31af7Sopenharmony_ci    If the pname:imageView member of a
346e5c31af7Sopenharmony_ci    slink:VkRenderingFragmentDensityMapAttachmentInfoEXT structure included
347e5c31af7Sopenharmony_ci    in the pname:pNext chain is not dlink:VK_NULL_HANDLE, pname:imageView
348e5c31af7Sopenharmony_ci    must: have a height greater than or equal to
349e5c31af7Sopenharmony_ci    latexmath:[\left\lceil{\frac{renderArea_{y}+renderArea_{height}}{maxFragmentDensityTexelSize_{height}}}\right\rceil]
350e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_device_group[]
351e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_device_group[]
352e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-pNext-06112]]
353e5c31af7Sopenharmony_ci    If the pname:pNext chain does not contain
354e5c31af7Sopenharmony_ci    slink:VkDeviceGroupRenderPassBeginInfo or its
355e5c31af7Sopenharmony_ci    pname:deviceRenderAreaCount member is equal to 0 and the pname:imageView
356e5c31af7Sopenharmony_ci    member of a slink:VkRenderingFragmentDensityMapAttachmentInfoEXT
357e5c31af7Sopenharmony_ci    structure included in the pname:pNext chain is not dlink:VK_NULL_HANDLE,
358e5c31af7Sopenharmony_ci    pname:imageView must: have a width greater than or equal to
359e5c31af7Sopenharmony_ci    latexmath:[\left\lceil{\frac{renderArea_{x}+renderArea_{width}}{maxFragmentDensityTexelSize_{width}}}\right\rceil]
360e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-pNext-06113]]
361e5c31af7Sopenharmony_ci    If the pname:pNext chain contains a
362e5c31af7Sopenharmony_ci    slink:VkDeviceGroupRenderPassBeginInfo structure, its
363e5c31af7Sopenharmony_ci    pname:deviceRenderAreaCount member is not 0, and the pname:imageView
364e5c31af7Sopenharmony_ci    member of a slink:VkRenderingFragmentDensityMapAttachmentInfoEXT
365e5c31af7Sopenharmony_ci    structure included in the pname:pNext chain is not dlink:VK_NULL_HANDLE,
366e5c31af7Sopenharmony_ci    pname:imageView must: have a width greater than or equal to
367e5c31af7Sopenharmony_ci    latexmath:[\left\lceil{\frac{pDeviceRenderAreas_{x}+pDeviceRenderAreas_{width}}{maxFragmentDensityTexelSize_{width}}}\right\rceil]
368e5c31af7Sopenharmony_ci    for each element of pname:pDeviceRenderAreas
369e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-pNext-06114]]
370e5c31af7Sopenharmony_ci    If the pname:pNext chain does not contain
371e5c31af7Sopenharmony_ci    slink:VkDeviceGroupRenderPassBeginInfo or its
372e5c31af7Sopenharmony_ci    pname:deviceRenderAreaCount member is equal to 0 and the pname:imageView
373e5c31af7Sopenharmony_ci    member of a slink:VkRenderingFragmentDensityMapAttachmentInfoEXT
374e5c31af7Sopenharmony_ci    structure included in the pname:pNext chain is not dlink:VK_NULL_HANDLE,
375e5c31af7Sopenharmony_ci    pname:imageView must: have a height greater than or equal to
376e5c31af7Sopenharmony_ci    latexmath:[\left\lceil{\frac{renderArea_{y}+renderArea_{height}}{maxFragmentDensityTexelSize_{height}}}\right\rceil]
377e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-pNext-06115]]
378e5c31af7Sopenharmony_ci    If the pname:pNext chain contains a
379e5c31af7Sopenharmony_ci    slink:VkDeviceGroupRenderPassBeginInfo structure, its
380e5c31af7Sopenharmony_ci    pname:deviceRenderAreaCount member is not 0, and the pname:imageView
381e5c31af7Sopenharmony_ci    member of a slink:VkRenderingFragmentDensityMapAttachmentInfoEXT
382e5c31af7Sopenharmony_ci    structure included in the pname:pNext chain is not dlink:VK_NULL_HANDLE,
383e5c31af7Sopenharmony_ci    pname:imageView must: have a height greater than or equal to
384e5c31af7Sopenharmony_ci    latexmath:[\left\lceil{\frac{pDeviceRenderAreas_{y}+pDeviceRenderAreas_{height}}{maxFragmentDensityTexelSize_{height}}}\right\rceil]
385e5c31af7Sopenharmony_ci    for each element of pname:pDeviceRenderAreas
386e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_device_group[]
387e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-imageView-06116]]
388e5c31af7Sopenharmony_ci    If the pname:imageView member of a
389e5c31af7Sopenharmony_ci    slink:VkRenderingFragmentDensityMapAttachmentInfoEXT structure included
390e5c31af7Sopenharmony_ci    in the pname:pNext chain is not dlink:VK_NULL_HANDLE, it must: not be
391e5c31af7Sopenharmony_ci    equal to the pname:imageView or pname:resolveImageView member of
392e5c31af7Sopenharmony_ci    pname:pDepthAttachment, pname:pStencilAttachment, or any element of
393e5c31af7Sopenharmony_ci    pname:pColorAttachments
394e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map[]
395e5c31af7Sopenharmony_ciifdef::VK_KHR_fragment_shading_rate[]
396e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_device_group[]
397e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-imageView-06117]]
398e5c31af7Sopenharmony_ci    If the pname:imageView member of a
399e5c31af7Sopenharmony_ci    slink:VkRenderingFragmentShadingRateAttachmentInfoKHR structure included
400e5c31af7Sopenharmony_ci    in the pname:pNext chain is not dlink:VK_NULL_HANDLE, pname:imageView
401e5c31af7Sopenharmony_ci    must: have a width greater than or equal to
402e5c31af7Sopenharmony_ci    latexmath:[\left\lceil{\frac{renderArea_{x}+renderArea_{width}}{shadingRateAttachmentTexelSize_{width}}}\right\rceil]
403e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-imageView-06118]]
404e5c31af7Sopenharmony_ci    If the pname:imageView member of a
405e5c31af7Sopenharmony_ci    slink:VkRenderingFragmentShadingRateAttachmentInfoKHR structure included
406e5c31af7Sopenharmony_ci    in the pname:pNext chain is not dlink:VK_NULL_HANDLE, pname:imageView
407e5c31af7Sopenharmony_ci    must: have a height greater than or equal to
408e5c31af7Sopenharmony_ci    latexmath:[\left\lceil{\frac{renderArea_{y}+renderArea_{height}}{shadingRateAttachmentTexelSize_{height}}}\right\rceil]
409e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_device_group[]
410e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_device_group[]
411e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-pNext-06119]]
412e5c31af7Sopenharmony_ci    If the pname:pNext chain does not contain
413e5c31af7Sopenharmony_ci    slink:VkDeviceGroupRenderPassBeginInfo or its
414e5c31af7Sopenharmony_ci    pname:deviceRenderAreaCount member is equal to 0 and the pname:imageView
415e5c31af7Sopenharmony_ci    member of a slink:VkRenderingFragmentShadingRateAttachmentInfoKHR
416e5c31af7Sopenharmony_ci    structure included in the pname:pNext chain is not dlink:VK_NULL_HANDLE,
417e5c31af7Sopenharmony_ci    pname:imageView must: have a width greater than or equal to
418e5c31af7Sopenharmony_ci    latexmath:[\left\lceil{\frac{renderArea_{x}+renderArea_{width}}{shadingRateAttachmentTexelSize_{width}}}\right\rceil]
419e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-pNext-06120]]
420e5c31af7Sopenharmony_ci    If the pname:pNext chain contains a
421e5c31af7Sopenharmony_ci    slink:VkDeviceGroupRenderPassBeginInfo structure, its
422e5c31af7Sopenharmony_ci    pname:deviceRenderAreaCount member is not 0, and the pname:imageView
423e5c31af7Sopenharmony_ci    member of a slink:VkRenderingFragmentShadingRateAttachmentInfoKHR
424e5c31af7Sopenharmony_ci    structure included in the pname:pNext chain is not dlink:VK_NULL_HANDLE,
425e5c31af7Sopenharmony_ci    pname:imageView must: have a width greater than or equal to
426e5c31af7Sopenharmony_ci    latexmath:[\left\lceil{\frac{pDeviceRenderAreas_{x}+pDeviceRenderAreas_{width}}{shadingRateAttachmentTexelSize_{width}}}\right\rceil]
427e5c31af7Sopenharmony_ci    for each element of pname:pDeviceRenderAreas
428e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-pNext-06121]]
429e5c31af7Sopenharmony_ci    If the pname:pNext chain does not contain
430e5c31af7Sopenharmony_ci    slink:VkDeviceGroupRenderPassBeginInfo or its
431e5c31af7Sopenharmony_ci    pname:deviceRenderAreaCount member is equal to 0 and the pname:imageView
432e5c31af7Sopenharmony_ci    member of a slink:VkRenderingFragmentShadingRateAttachmentInfoKHR
433e5c31af7Sopenharmony_ci    structure included in the pname:pNext chain is not dlink:VK_NULL_HANDLE,
434e5c31af7Sopenharmony_ci    pname:imageView must: have a height greater than or equal to
435e5c31af7Sopenharmony_ci    latexmath:[\left\lceil{\frac{renderArea_{y}+renderArea_{height}}{shadingRateAttachmentTexelSize_{height}}}\right\rceil]
436e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-pNext-06122]]
437e5c31af7Sopenharmony_ci    If the pname:pNext chain contains a
438e5c31af7Sopenharmony_ci    slink:VkDeviceGroupRenderPassBeginInfo structure, its
439e5c31af7Sopenharmony_ci    pname:deviceRenderAreaCount member is not 0, and the pname:imageView
440e5c31af7Sopenharmony_ci    member of a slink:VkRenderingFragmentShadingRateAttachmentInfoKHR
441e5c31af7Sopenharmony_ci    structure included in the pname:pNext chain is not dlink:VK_NULL_HANDLE,
442e5c31af7Sopenharmony_ci    pname:imageView must: have a height greater than or equal to
443e5c31af7Sopenharmony_ci    latexmath:[\left\lceil{\frac{pDeviceRenderAreas_{y}+pDeviceRenderAreas_{height}}{shadingRateAttachmentTexelSize_{height}}}\right\rceil]
444e5c31af7Sopenharmony_ci    for each element of pname:pDeviceRenderAreas
445e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_device_group[]
446e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-imageView-06123]]
447e5c31af7Sopenharmony_ci    If the pname:imageView member of a
448e5c31af7Sopenharmony_ci    slink:VkRenderingFragmentShadingRateAttachmentInfoKHR structure included
449e5c31af7Sopenharmony_ci    in the pname:pNext chain is not dlink:VK_NULL_HANDLE, and pname:viewMask
450e5c31af7Sopenharmony_ci    is `0`, pname:imageView must: have a pname:layerCount that is either
451e5c31af7Sopenharmony_ci    equal to `1` or greater than or equal to pname:layerCount
452e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-imageView-06124]]
453e5c31af7Sopenharmony_ci    If the pname:imageView member of a
454e5c31af7Sopenharmony_ci    slink:VkRenderingFragmentShadingRateAttachmentInfoKHR structure included
455e5c31af7Sopenharmony_ci    in the pname:pNext chain is not dlink:VK_NULL_HANDLE, and pname:viewMask
456e5c31af7Sopenharmony_ci    is not `0`, pname:imageView must: have a pname:layerCount that either
457e5c31af7Sopenharmony_ci    equal to `1` or greater than or equal to the index of the most
458e5c31af7Sopenharmony_ci    significant bit in pname:viewMask
459e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-imageView-06125]]
460e5c31af7Sopenharmony_ci    If the pname:imageView member of a
461e5c31af7Sopenharmony_ci    slink:VkRenderingFragmentShadingRateAttachmentInfoKHR structure included
462e5c31af7Sopenharmony_ci    in the pname:pNext chain is not dlink:VK_NULL_HANDLE, it must: not be
463e5c31af7Sopenharmony_ci    equal to the pname:imageView or pname:resolveImageView member of
464e5c31af7Sopenharmony_ci    pname:pDepthAttachment, pname:pStencilAttachment, or any element of
465e5c31af7Sopenharmony_ci    pname:pColorAttachments
466e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map[]
467e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-imageView-06126]]
468e5c31af7Sopenharmony_ci    If the pname:imageView member of a
469e5c31af7Sopenharmony_ci    slink:VkRenderingFragmentShadingRateAttachmentInfoKHR structure included
470e5c31af7Sopenharmony_ci    in the pname:pNext chain is not dlink:VK_NULL_HANDLE, it must: not be
471e5c31af7Sopenharmony_ci    equal to the pname:imageView member of a
472e5c31af7Sopenharmony_ci    slink:VkRenderingFragmentDensityMapAttachmentInfoEXT structure included
473e5c31af7Sopenharmony_ci    in the pname:pNext chain
474e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map[]
475e5c31af7Sopenharmony_ciendif::VK_KHR_fragment_shading_rate[]
476e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-multiview-06127]]
477e5c31af7Sopenharmony_ci    If the <<features-multiview,pname:multiview>> feature is not enabled,
478e5c31af7Sopenharmony_ci    pname:viewMask must: be `0`
479e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_multiview[]
480e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingInfoKHR-viewMask-06128]]
481e5c31af7Sopenharmony_ci    The index of the most significant bit in pname:viewMask must: be less
482e5c31af7Sopenharmony_ci    than <<limits-maxMultiviewViewCount,pname:maxMultiviewViewCount>>
483e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_multiview[]
484e5c31af7Sopenharmony_ci****
485e5c31af7Sopenharmony_ci
486e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkRenderingInfoKHR.txt[]
487e5c31af7Sopenharmony_ci--
488e5c31af7Sopenharmony_ci
489e5c31af7Sopenharmony_ci[open,refpage='VkRenderingFlagBitsKHR',desc='Bitmask specifying additional properties of a dynamic render pass instance',type='enums']
490e5c31af7Sopenharmony_ci--
491e5c31af7Sopenharmony_ciBits which can: be set in slink:VkRenderingInfoKHR::pname:flags describing
492e5c31af7Sopenharmony_ciadditional properties of the render pass are:
493e5c31af7Sopenharmony_ci
494e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkRenderingFlagBitsKHR.txt[]
495e5c31af7Sopenharmony_ci
496e5c31af7Sopenharmony_ci  * ename:VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT_KHR specifies
497e5c31af7Sopenharmony_ci    that draw calls for the render pass instance will be recorded in
498e5c31af7Sopenharmony_ci    secondary command buffers.
499e5c31af7Sopenharmony_ci  * ename:VK_RENDERING_RESUMING_BIT_KHR specifies that the render pass
500e5c31af7Sopenharmony_ci    instance is resuming an earlier suspended render pass instance.
501e5c31af7Sopenharmony_ci  * ename:VK_RENDERING_SUSPENDING_BIT_KHR specifies that the render pass
502e5c31af7Sopenharmony_ci    instance will be suspended.
503e5c31af7Sopenharmony_ci
504e5c31af7Sopenharmony_ci[[renderpass-suspension]]
505e5c31af7Sopenharmony_ciThe contents of pname:pRenderingInfo must: match between suspended render
506e5c31af7Sopenharmony_cipass instances and the render pass instances that resume them, other than
507e5c31af7Sopenharmony_cithe presence or absence of the ename:VK_RENDERING_RESUMING_BIT_KHR,
508e5c31af7Sopenharmony_ciename:VK_RENDERING_SUSPENDING_BIT_KHR, and
509e5c31af7Sopenharmony_ciename:VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT_KHR flags.
510e5c31af7Sopenharmony_ciNo action or synchronization commands, or other render pass instances, are
511e5c31af7Sopenharmony_ciallowed between suspending and resuming render pass instances.
512e5c31af7Sopenharmony_ci--
513e5c31af7Sopenharmony_ci
514e5c31af7Sopenharmony_ci[open,refpage='VkRenderingFlagsKHR',desc='Bitmask of VkRenderingFlagBitsKHR',type='flags']
515e5c31af7Sopenharmony_ci--
516e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkRenderingFlagsKHR.txt[]
517e5c31af7Sopenharmony_ci
518e5c31af7Sopenharmony_citname:VkRenderingFlagsKHR is a bitmask type for setting a mask of zero or
519e5c31af7Sopenharmony_cimore elink:VkRenderingFlagBitsKHR.
520e5c31af7Sopenharmony_ci--
521e5c31af7Sopenharmony_ci
522e5c31af7Sopenharmony_ci[open,refpage='VkRenderingAttachmentInfoKHR',desc='Structure specifying attachment information',type='structs']
523e5c31af7Sopenharmony_ci--
524e5c31af7Sopenharmony_ciThe sname:VkRenderingAttachmentInfoKHR structure is defined as:
525e5c31af7Sopenharmony_ci
526e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkRenderingAttachmentInfoKHR.txt[]
527e5c31af7Sopenharmony_ci
528e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
529e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
530e5c31af7Sopenharmony_ci    structure.
531e5c31af7Sopenharmony_ci  * pname:imageView is the image view that will be used for rendering.
532e5c31af7Sopenharmony_ci  * pname:imageLayout is the layout that pname:imageView will be in during
533e5c31af7Sopenharmony_ci    rendering.
534e5c31af7Sopenharmony_ci  * pname:resolveMode is a elink:VkResolveModeFlagBits value defining how
535e5c31af7Sopenharmony_ci    multisampled data written to pname:imageView will be resolved.
536e5c31af7Sopenharmony_ci  * pname:resolveImageView is an image view used to write resolved
537e5c31af7Sopenharmony_ci    multisample data at the end of rendering.
538e5c31af7Sopenharmony_ci  * pname:resolveImageLayout is the layout that pname:resolveImageView will
539e5c31af7Sopenharmony_ci    be in during rendering.
540e5c31af7Sopenharmony_ci  * pname:loadOp is a elink:VkAttachmentLoadOp value specifying how the
541e5c31af7Sopenharmony_ci    contents of pname:imageView are treated at the start of the render pass
542e5c31af7Sopenharmony_ci    instance.
543e5c31af7Sopenharmony_ci  * pname:storeOp is a elink:VkAttachmentStoreOp value specifying how the
544e5c31af7Sopenharmony_ci    contents of pname:imageView are treated at the end of the render pass
545e5c31af7Sopenharmony_ci    instance.
546e5c31af7Sopenharmony_ci  * pname:clearValue is a slink:VkClearValue structure defining values used
547e5c31af7Sopenharmony_ci    to clear pname:imageView when pname:loadOp is
548e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_LOAD_OP_CLEAR.
549e5c31af7Sopenharmony_ci
550e5c31af7Sopenharmony_ciValues in pname:imageView are loaded and stored according to the values of
551e5c31af7Sopenharmony_cipname:loadOp and pname:storeOp, within the render area
552e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_device_group[]
553e5c31af7Sopenharmony_cifor each device
554e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_device_group[]
555e5c31af7Sopenharmony_cispecified in slink:VkRenderingInfoKHR.
556e5c31af7Sopenharmony_ciIf pname:imageView is dlink:VK_NULL_HANDLE, other members of this structure
557e5c31af7Sopenharmony_ciare ignored; writes to this attachment will be discarded, and no load,
558e5c31af7Sopenharmony_cistore, or resolve operations will be performed.
559e5c31af7Sopenharmony_ci
560e5c31af7Sopenharmony_ciIf pname:resolveMode is ename:VK_RESOLVE_MODE_NONE, then
561e5c31af7Sopenharmony_cipname:resolveImageView is ignored.
562e5c31af7Sopenharmony_ciIf pname:resolveMode is not ename:VK_RESOLVE_MODE_NONE, values in
563e5c31af7Sopenharmony_cipname:resolveImageView within the render area become undefined: once
564e5c31af7Sopenharmony_cirendering begins.
565e5c31af7Sopenharmony_ciAt the end of rendering, the color values written to each pixel location in
566e5c31af7Sopenharmony_cipname:imageView will be resolved according to pname:resolveMode and stored
567e5c31af7Sopenharmony_ciinto the the same location in pname:resolveImageView.
568e5c31af7Sopenharmony_ci
569e5c31af7Sopenharmony_ci[NOTE]
570e5c31af7Sopenharmony_ci.Note
571e5c31af7Sopenharmony_ci====
572e5c31af7Sopenharmony_ciThe resolve mode and store operation are independent; it is valid to write
573e5c31af7Sopenharmony_ciboth resolved and unresolved values, and equally valid to discard the
574e5c31af7Sopenharmony_ciunresolved values while writing the resolved ones.
575e5c31af7Sopenharmony_ci====
576e5c31af7Sopenharmony_ci
577e5c31af7Sopenharmony_ciStore and resolve operations are only performed at the end of a render pass
578e5c31af7Sopenharmony_ciinstance that does not specify the ename:VK_RENDERING_SUSPENDING_BIT_KHR
579e5c31af7Sopenharmony_ciflag.
580e5c31af7Sopenharmony_ci
581e5c31af7Sopenharmony_ciLoad operations are only performed at the beginning of a render pass
582e5c31af7Sopenharmony_ciinstance that does not specify the ename:VK_RENDERING_RESUMING_BIT_KHR flag.
583e5c31af7Sopenharmony_ci
584e5c31af7Sopenharmony_ciImage contents at the end of a suspended render pass instance remain defined
585e5c31af7Sopenharmony_cifor access by a resuming render pass instance.
586e5c31af7Sopenharmony_ci
587e5c31af7Sopenharmony_ci.Valid Usage
588e5c31af7Sopenharmony_ci****
589e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingAttachmentInfoKHR-imageView-06129]]
590e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE and has a non-integer
591e5c31af7Sopenharmony_ci    color format, pname:resolveMode must: be ename:VK_RESOLVE_MODE_NONE or
592e5c31af7Sopenharmony_ci    ename:VK_RESOLVE_MODE_AVERAGE_BIT
593e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingAttachmentInfoKHR-imageView-06130]]
594e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE and has an integer color
595e5c31af7Sopenharmony_ci    format, pname:resolveMode must: be ename:VK_RESOLVE_MODE_NONE or
596e5c31af7Sopenharmony_ci    ename:VK_RESOLVE_MODE_SAMPLE_ZERO_BIT
597e5c31af7Sopenharmony_ciifndef::VK_KHR_depth_stencil_resolve,VK_VERSION_1_2[]
598e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingAttachmentInfoKHR-imageView-06131]]
599e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE and has a depth or
600e5c31af7Sopenharmony_ci    stencil format, pname:resolveMode must: be ename:VK_RESOLVE_MODE_NONE
601e5c31af7Sopenharmony_ciendif::VK_KHR_depth_stencil_resolve,VK_VERSION_1_2[]
602e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingAttachmentInfoKHR-imageView-06132]]
603e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE and pname:resolveMode is
604e5c31af7Sopenharmony_ci    not ename:VK_RESOLVE_MODE_NONE, pname:imageView must: not have a sample
605e5c31af7Sopenharmony_ci    count of ename:VK_SAMPLE_COUNT_1_BIT
606e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingAttachmentInfoKHR-imageView-06133]]
607e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE and pname:resolveMode is
608e5c31af7Sopenharmony_ci    not ename:VK_RESOLVE_MODE_NONE, pname:resolveImageView must: have a
609e5c31af7Sopenharmony_ci    sample count of ename:VK_SAMPLE_COUNT_1_BIT
610e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingAttachmentInfoKHR-imageView-06134]]
611e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE and pname:resolveMode is
612e5c31af7Sopenharmony_ci    not ename:VK_RESOLVE_MODE_NONE, pname:imageView and
613e5c31af7Sopenharmony_ci    pname:resolveImageView must: have the same elink:VkFormat
614e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingAttachmentInfoKHR-imageView-06135]]
615e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE, pname:layout must: not
616e5c31af7Sopenharmony_ci    be ename:VK_IMAGE_LAYOUT_UNDEFINED,
617e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
618e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
619e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, or
620e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_PREINITIALIZED
621e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingAttachmentInfoKHR-imageView-06136]]
622e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE and pname:resolveMode is
623e5c31af7Sopenharmony_ci    not ename:VK_RESOLVE_MODE_NONE, pname:resolveImageLayout must: not be
624e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_UNDEFINED,
625e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL,
626e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
627e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
628e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, or
629e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_PREINITIALIZED
630e5c31af7Sopenharmony_ciifdef::VK_KHR_separate_depth_stencil_layouts,VK_VERSION_1_2[]
631e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingAttachmentInfoKHR-imageView-06137]]
632e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE and pname:resolveMode is
633e5c31af7Sopenharmony_ci    not ename:VK_RESOLVE_MODE_NONE, pname:resolveImageLayout must: not be
634e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL or
635e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
636e5c31af7Sopenharmony_ciendif::VK_KHR_separate_depth_stencil_layouts,VK_VERSION_1_2[]
637e5c31af7Sopenharmony_ciifdef::VK_NV_shading_rate_image[]
638e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingAttachmentInfoKHR-imageView-06138]]
639e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE, pname:layout must: not
640e5c31af7Sopenharmony_ci    be ename:VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV
641e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingAttachmentInfoKHR-imageView-06139]]
642e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE and pname:resolveMode is
643e5c31af7Sopenharmony_ci    not ename:VK_RESOLVE_MODE_NONE, pname:resolveImageLayout must: not be
644e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV
645e5c31af7Sopenharmony_ciendif::VK_NV_shading_rate_image[]
646e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map[]
647e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingAttachmentInfoKHR-imageView-06140]]
648e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE, pname:layout must: not
649e5c31af7Sopenharmony_ci    be ename:VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT
650e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingAttachmentInfoKHR-imageView-06141]]
651e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE and pname:resolveMode is
652e5c31af7Sopenharmony_ci    not ename:VK_RESOLVE_MODE_NONE, pname:resolveImageLayout must: not be
653e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT
654e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map[]
655e5c31af7Sopenharmony_ciifdef::VK_KHR_synchronization2[]
656e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingAttachmentInfoKHR-imageView-06142]]
657e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE and pname:resolveMode is
658e5c31af7Sopenharmony_ci    not ename:VK_RESOLVE_MODE_NONE, pname:resolveImageLayout must: not be
659e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR
660e5c31af7Sopenharmony_ciendif::VK_KHR_synchronization2[]
661e5c31af7Sopenharmony_ciifdef::VK_KHR_fragment_shading_rate[]
662e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingAttachmentInfoKHR-imageView-06143]]
663e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE, pname:layout must: not
664e5c31af7Sopenharmony_ci    be ename:VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR
665e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingAttachmentInfoKHR-imageView-06144]]
666e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE and pname:resolveMode is
667e5c31af7Sopenharmony_ci    not ename:VK_RESOLVE_MODE_NONE, pname:resolveImageLayout must: not be
668e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR
669e5c31af7Sopenharmony_ciendif::VK_KHR_fragment_shading_rate[]
670e5c31af7Sopenharmony_ciifdef::VK_KHR_swapchain[]
671e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingAttachmentInfoKHR-imageView-06145]]
672e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE, pname:layout must: not
673e5c31af7Sopenharmony_ci    be ename:VK_IMAGE_LAYOUT_PRESENT_SRC_KHR
674e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingAttachmentInfoKHR-imageView-06146]]
675e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE and pname:resolveMode is
676e5c31af7Sopenharmony_ci    not ename:VK_RESOLVE_MODE_NONE, pname:resolveImageLayout must: not be
677e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_PRESENT_SRC_KHR
678e5c31af7Sopenharmony_ciendif::VK_KHR_swapchain[]
679e5c31af7Sopenharmony_ci****
680e5c31af7Sopenharmony_ci
681e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkRenderingAttachmentInfoKHR.txt[]
682e5c31af7Sopenharmony_ci--
683e5c31af7Sopenharmony_ci
684e5c31af7Sopenharmony_ciifdef::VK_KHR_fragment_shading_rate[]
685e5c31af7Sopenharmony_ci[open,refpage='VkRenderingFragmentShadingRateAttachmentInfoKHR',desc='Structure specifying fragment shading rate attachment information',type='structs']
686e5c31af7Sopenharmony_ci--
687e5c31af7Sopenharmony_ciThe sname:VkRenderingFragmentShadingRateAttachmentInfoKHR structure is
688e5c31af7Sopenharmony_cidefined as:
689e5c31af7Sopenharmony_ci
690e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkRenderingFragmentShadingRateAttachmentInfoKHR.txt[]
691e5c31af7Sopenharmony_ci
692e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
693e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
694e5c31af7Sopenharmony_ci    structure.
695e5c31af7Sopenharmony_ci  * pname:imageView is the image view that will be used as a fragment
696e5c31af7Sopenharmony_ci    shading rate attachment.
697e5c31af7Sopenharmony_ci  * pname:imageLayout is the layout that pname:imageView will be in during
698e5c31af7Sopenharmony_ci    rendering.
699e5c31af7Sopenharmony_ci  * pname:shadingRateAttachmentTexelSize specifies the number of pixels
700e5c31af7Sopenharmony_ci    corresponding to each texel in pname:imageView.
701e5c31af7Sopenharmony_ci
702e5c31af7Sopenharmony_ciThis structure can be included in the pname:pNext chain of
703e5c31af7Sopenharmony_cislink:VkRenderingInfoKHR to define a
704e5c31af7Sopenharmony_ci<<primsrast-fragment-shading-rate-attachment, fragment shading rate
705e5c31af7Sopenharmony_ciattachment>>.
706e5c31af7Sopenharmony_ciIf pname:imageView is dlink:VK_NULL_HANDLE, or if this structure is not
707e5c31af7Sopenharmony_cispecified, the implementation behaves as if a valid shading rate attachment
708e5c31af7Sopenharmony_ciwas specified with all texels specifying a single pixel per fragment.
709e5c31af7Sopenharmony_ci
710e5c31af7Sopenharmony_ci.Valid Usage
711e5c31af7Sopenharmony_ci****
712e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-06147]]
713e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE, pname:layout must: be
714e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_GENERAL or
715e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR
716e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-06148]]
717e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE, it must: have been
718e5c31af7Sopenharmony_ci    created with
719e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
720e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-06149]]
721e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE,
722e5c31af7Sopenharmony_ci    pname:shadingRateAttachmentTexelSize.width must: be a power of two value
723e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-06150]]
724e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE,
725e5c31af7Sopenharmony_ci    pname:shadingRateAttachmentTexelSize.width must: be less than or equal
726e5c31af7Sopenharmony_ci    to <<limits-maxFragmentShadingRateAttachmentTexelSize,
727e5c31af7Sopenharmony_ci    pname:maxFragmentShadingRateAttachmentTexelSize.width>>
728e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-06151]]
729e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE,
730e5c31af7Sopenharmony_ci    pname:shadingRateAttachmentTexelSize.width must: be greater than or
731e5c31af7Sopenharmony_ci    equal to <<limits-minFragmentShadingRateAttachmentTexelSize,
732e5c31af7Sopenharmony_ci    pname:minFragmentShadingRateAttachmentTexelSize.width>>
733e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-06152]]
734e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE,
735e5c31af7Sopenharmony_ci    pname:shadingRateAttachmentTexelSize.height must: be a power of two
736e5c31af7Sopenharmony_ci    value
737e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-06153]]
738e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE,
739e5c31af7Sopenharmony_ci    pname:shadingRateAttachmentTexelSize.height must: be less than or equal
740e5c31af7Sopenharmony_ci    to <<limits-maxFragmentShadingRateAttachmentTexelSize,
741e5c31af7Sopenharmony_ci    pname:maxFragmentShadingRateAttachmentTexelSize.height>>
742e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-06154]]
743e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE,
744e5c31af7Sopenharmony_ci    pname:shadingRateAttachmentTexelSize.height must: be greater than or
745e5c31af7Sopenharmony_ci    equal to <<limits-minFragmentShadingRateAttachmentTexelSize,
746e5c31af7Sopenharmony_ci    pname:minFragmentShadingRateAttachmentTexelSize.height>>
747e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-06155]]
748e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE, the quotient of
749e5c31af7Sopenharmony_ci    pname:shadingRateAttachmentTexelSize.width and
750e5c31af7Sopenharmony_ci    pname:shadingRateAttachmentTexelSize.height must: be less than or equal
751e5c31af7Sopenharmony_ci    to <<limits-maxFragmentShadingRateAttachmentTexelSizeAspectRatio,
752e5c31af7Sopenharmony_ci    pname:maxFragmentShadingRateAttachmentTexelSizeAspectRatio>>
753e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-06156]]
754e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE, the quotient of
755e5c31af7Sopenharmony_ci    pname:shadingRateAttachmentTexelSize.height and
756e5c31af7Sopenharmony_ci    pname:shadingRateAttachmentTexelSize.width must: be less than or equal
757e5c31af7Sopenharmony_ci    to <<limits-maxFragmentShadingRateAttachmentTexelSizeAspectRatio,
758e5c31af7Sopenharmony_ci    pname:maxFragmentShadingRateAttachmentTexelSizeAspectRatio>>
759e5c31af7Sopenharmony_ci****
760e5c31af7Sopenharmony_ci
761e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkRenderingFragmentShadingRateAttachmentInfoKHR.txt[]
762e5c31af7Sopenharmony_ci--
763e5c31af7Sopenharmony_ciendif::VK_KHR_fragment_shading_rate[]
764e5c31af7Sopenharmony_ci
765e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map[]
766e5c31af7Sopenharmony_ci[open,refpage='VkRenderingFragmentDensityMapAttachmentInfoEXT',desc='Structure specifying fragment shading rate attachment information',type='structs']
767e5c31af7Sopenharmony_ci--
768e5c31af7Sopenharmony_ciThe sname:VkRenderingFragmentDensityMapAttachmentInfoEXT structure is
769e5c31af7Sopenharmony_cidefined as:
770e5c31af7Sopenharmony_ci
771e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkRenderingFragmentDensityMapAttachmentInfoEXT.txt[]
772e5c31af7Sopenharmony_ci
773e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
774e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
775e5c31af7Sopenharmony_ci    structure.
776e5c31af7Sopenharmony_ci  * pname:imageView is the image view that will be used as a fragment
777e5c31af7Sopenharmony_ci    shading rate attachment.
778e5c31af7Sopenharmony_ci  * pname:imageLayout is the layout that pname:imageView will be in during
779e5c31af7Sopenharmony_ci    rendering.
780e5c31af7Sopenharmony_ci
781e5c31af7Sopenharmony_ciThis structure can be included in the pname:pNext chain of
782e5c31af7Sopenharmony_cislink:VkRenderingInfoKHR to define a fragment density map.
783e5c31af7Sopenharmony_ciIf pname:imageView is dlink:VK_NULL_HANDLE, or if this structure is not
784e5c31af7Sopenharmony_cispecified, pname:imageView is dlink:VK_NULL_HANDLE.
785e5c31af7Sopenharmony_ci
786e5c31af7Sopenharmony_ci.Valid Usage
787e5c31af7Sopenharmony_ci****
788e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingFragmentDensityMapAttachmentInfoEXT-imageView-06157]]
789e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE, pname:layout must: be
790e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_GENERAL or
791e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT
792e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingFragmentDensityMapAttachmentInfoEXT-imageView-06158]]
793e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE, it must: have been
794e5c31af7Sopenharmony_ci    created with ename:VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT
795e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingFragmentDensityMapAttachmentInfoEXT-imageView-06159]]
796e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE, it must: not have been
797e5c31af7Sopenharmony_ci    created with ename:VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT
798e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_multiview[]
799e5c31af7Sopenharmony_ci  * [[VUID-VkRenderingFragmentDensityMapAttachmentInfoEXT-imageView-06160]]
800e5c31af7Sopenharmony_ci    If pname:imageView is not dlink:VK_NULL_HANDLE, it must: have a
801e5c31af7Sopenharmony_ci    pname:layerCount equal to `1`
802e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_multiview[]
803e5c31af7Sopenharmony_ci****
804e5c31af7Sopenharmony_ci
805e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkRenderingFragmentDensityMapAttachmentInfoEXT.txt[]
806e5c31af7Sopenharmony_ci--
807e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map[]
808e5c31af7Sopenharmony_ci
809e5c31af7Sopenharmony_ci[open,refpage='vkCmdEndRenderingKHR',desc='End a dynamic render pass instance',type='protos']
810e5c31af7Sopenharmony_ci--
811e5c31af7Sopenharmony_ciTo end a render pass instance, call:
812e5c31af7Sopenharmony_ci
813e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCmdEndRenderingKHR.txt[]
814e5c31af7Sopenharmony_ci
815e5c31af7Sopenharmony_ci  * pname:commandBuffer is the command buffer in which to record the
816e5c31af7Sopenharmony_ci    command.
817e5c31af7Sopenharmony_ci
818e5c31af7Sopenharmony_ciIf the value of pname:pRenderingInfo->flags used to begin this render pass
819e5c31af7Sopenharmony_ciinstance included ename:VK_RENDERING_SUSPENDING_BIT_KHR, then this render
820e5c31af7Sopenharmony_cipass is suspended and will be resumed later in
821e5c31af7Sopenharmony_ci<<synchronization-submission-order, submission order>>.
822e5c31af7Sopenharmony_ci
823e5c31af7Sopenharmony_ci.Valid Usage
824e5c31af7Sopenharmony_ci****
825e5c31af7Sopenharmony_ci  * [[VUID-vkCmdEndRenderingKHR-None-06161]]
826e5c31af7Sopenharmony_ci    The current render pass instance must: have been begun with
827e5c31af7Sopenharmony_ci    flink:vkCmdBeginRenderingKHR
828e5c31af7Sopenharmony_ci  * [[VUID-vkCmdEndRenderingKHR-commandBuffer-06162]]
829e5c31af7Sopenharmony_ci    The current render pass instance must: have been begun in
830e5c31af7Sopenharmony_ci    pname:commandBuffer
831e5c31af7Sopenharmony_ci****
832e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCmdEndRenderingKHR.txt[]
833e5c31af7Sopenharmony_ci--
834e5c31af7Sopenharmony_ci
835e5c31af7Sopenharmony_ci[NOTE]
836e5c31af7Sopenharmony_ci.Note
837e5c31af7Sopenharmony_ci====
838e5c31af7Sopenharmony_ciFor more complex rendering graphs, it is possible to pre-define a static
839e5c31af7Sopenharmony_ci_render pass_ object, which as well as allowing draw commands, allows the
840e5c31af7Sopenharmony_cidefinition of framebuffer-local dependencies between multiple subpasses.
841e5c31af7Sopenharmony_ciThese objects have a lot of setup cost compared to
842e5c31af7Sopenharmony_ciflink:vkCmdBeginRenderingKHR, but use of subpass dependencies can confer
843e5c31af7Sopenharmony_ciimportant performance benefits on some devices.
844e5c31af7Sopenharmony_ci====
845e5c31af7Sopenharmony_ciendif::VK_KHR_dynamic_rendering[]
846e5c31af7Sopenharmony_ci
847e5c31af7Sopenharmony_ci[open,refpage='VkRenderPass',desc='Opaque handle to a render pass object',type='handles']
848e5c31af7Sopenharmony_ci--
849e5c31af7Sopenharmony_ciA render pass object represents a collection of attachments, subpasses, and
850e5c31af7Sopenharmony_cidependencies between the subpasses, and describes how the attachments are
851e5c31af7Sopenharmony_ciused over the course of the subpasses.
852e5c31af7Sopenharmony_ci
853e5c31af7Sopenharmony_ciRender passes are represented by sname:VkRenderPass handles:
854e5c31af7Sopenharmony_ci
855e5c31af7Sopenharmony_ciinclude::{generated}/api/handles/VkRenderPass.txt[]
856e5c31af7Sopenharmony_ci--
857e5c31af7Sopenharmony_ci
858e5c31af7Sopenharmony_ciAn _attachment description_ describes the properties of an attachment
859e5c31af7Sopenharmony_ciincluding its format, sample count, and how its contents are treated at the
860e5c31af7Sopenharmony_cibeginning and end of each render pass instance.
861e5c31af7Sopenharmony_ci
862e5c31af7Sopenharmony_ci[[renderpass-subpass]]
863e5c31af7Sopenharmony_ciA _subpass_ represents a phase of rendering that reads and writes a subset
864e5c31af7Sopenharmony_ciof the attachments in a render pass.
865e5c31af7Sopenharmony_ciRendering commands are recorded into a particular subpass of a render pass
866e5c31af7Sopenharmony_ciinstance.
867e5c31af7Sopenharmony_ci
868e5c31af7Sopenharmony_ciA _subpass description_ describes the subset of attachments that is involved
869e5c31af7Sopenharmony_ciin the execution of a subpass.
870e5c31af7Sopenharmony_ciEach subpass can: read from some attachments as _input attachments_, write
871e5c31af7Sopenharmony_cito some as _color attachments_ or _depth/stencil attachments_,
872e5c31af7Sopenharmony_ciifdef::VK_QCOM_render_pass_shader_resolve[]
873e5c31af7Sopenharmony_ciperform _shader resolve operations_ to _color_attachments_ or
874e5c31af7Sopenharmony_ci_depth/stencil_attachments_,
875e5c31af7Sopenharmony_ciendif::VK_QCOM_render_pass_shader_resolve[]
876e5c31af7Sopenharmony_ciand perform _multisample resolve operations_ to _resolve attachments_.
877e5c31af7Sopenharmony_ciA subpass description can: also include a set of _preserve attachments_,
878e5c31af7Sopenharmony_ciwhich are attachments that are not read or written by the subpass but whose
879e5c31af7Sopenharmony_cicontents must: be preserved throughout the subpass.
880e5c31af7Sopenharmony_ci
881e5c31af7Sopenharmony_ciA subpass _uses an attachment_ if the attachment is a color, depth/stencil,
882e5c31af7Sopenharmony_ciresolve,
883e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_depth_stencil_resolve[]
884e5c31af7Sopenharmony_cidepth/stencil resolve,
885e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_depth_stencil_resolve[]
886e5c31af7Sopenharmony_ciifdef::VK_KHR_fragment_shading_rate[]
887e5c31af7Sopenharmony_cifragment shading rate,
888e5c31af7Sopenharmony_ciendif::VK_KHR_fragment_shading_rate[]
889e5c31af7Sopenharmony_cior input attachment for that subpass (as determined by the
890e5c31af7Sopenharmony_cipname:pColorAttachments, pname:pDepthStencilAttachment,
891e5c31af7Sopenharmony_cipname:pResolveAttachments,
892e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_depth_stencil_resolve[]
893e5c31af7Sopenharmony_cislink:VkSubpassDescriptionDepthStencilResolve::pname:pDepthStencilResolveAttachment,
894e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_depth_stencil_resolve[]
895e5c31af7Sopenharmony_ciifdef::VK_KHR_fragment_shading_rate[]
896e5c31af7Sopenharmony_cislink:VkFragmentShadingRateAttachmentInfoKHR::pname:pFragmentShadingRateAttachment->attachment,
897e5c31af7Sopenharmony_ciendif::VK_KHR_fragment_shading_rate[]
898e5c31af7Sopenharmony_ciand pname:pInputAttachments members of slink:VkSubpassDescription,
899e5c31af7Sopenharmony_cirespectively).
900e5c31af7Sopenharmony_ciA subpass does not use an attachment if that attachment is preserved by the
901e5c31af7Sopenharmony_cisubpass.
902e5c31af7Sopenharmony_ciThe _first use of an attachment_ is in the lowest numbered subpass that uses
903e5c31af7Sopenharmony_cithat attachment.
904e5c31af7Sopenharmony_ciSimilarly, the _last use of an attachment_ is in the highest numbered
905e5c31af7Sopenharmony_cisubpass that uses that attachment.
906e5c31af7Sopenharmony_ci
907e5c31af7Sopenharmony_ciThe subpasses in a render pass all render to the same dimensions, and
908e5c31af7Sopenharmony_cifragments for pixel (x,y,layer) in one subpass can: only read attachment
909e5c31af7Sopenharmony_cicontents written by previous subpasses at that same (x,y,layer) location.
910e5c31af7Sopenharmony_ciifdef::VK_KHR_fragment_shading_rate,VK_NV_shading_rate,VK_EXT_fragment_density_map[]
911e5c31af7Sopenharmony_ciFor multi-pixel fragments, the pixel read from an input attachment is
912e5c31af7Sopenharmony_ciselected from the pixels covered by that fragment in an
913e5c31af7Sopenharmony_ciimplementation-dependent manner.
914e5c31af7Sopenharmony_ciHowever, this selection must: be made consistently for any fragment with the
915e5c31af7Sopenharmony_cisame shading rate for the lifetime of the slink:VkDevice.
916e5c31af7Sopenharmony_ciendif::VK_KHR_fragment_shading_rate,VK_NV_shading_rate,VK_EXT_fragment_density_map[]
917e5c31af7Sopenharmony_ci
918e5c31af7Sopenharmony_ci[NOTE]
919e5c31af7Sopenharmony_ci.Note
920e5c31af7Sopenharmony_ci====
921e5c31af7Sopenharmony_ciBy describing a complete set of subpasses in advance, render passes provide
922e5c31af7Sopenharmony_cithe implementation an opportunity to optimize the storage and transfer of
923e5c31af7Sopenharmony_ciattachment data between subpasses.
924e5c31af7Sopenharmony_ci
925e5c31af7Sopenharmony_ciIn practice, this means that subpasses with a simple framebuffer-space
926e5c31af7Sopenharmony_cidependency may: be merged into a single tiled rendering pass, keeping the
927e5c31af7Sopenharmony_ciattachment data on-chip for the duration of a render pass instance.
928e5c31af7Sopenharmony_ciHowever, it is also quite common for a render pass to only contain a single
929e5c31af7Sopenharmony_cisubpass.
930e5c31af7Sopenharmony_ci====
931e5c31af7Sopenharmony_ci
932e5c31af7Sopenharmony_ci_Subpass dependencies_ describe <<synchronization-dependencies, execution
933e5c31af7Sopenharmony_ciand memory dependencies>> between subpasses.
934e5c31af7Sopenharmony_ci
935e5c31af7Sopenharmony_ciA _subpass dependency chain_ is a sequence of subpass dependencies in a
936e5c31af7Sopenharmony_cirender pass, where the source subpass of each subpass dependency (after the
937e5c31af7Sopenharmony_cifirst) equals the destination subpass of the previous dependency.
938e5c31af7Sopenharmony_ci
939e5c31af7Sopenharmony_ciExecution of subpasses may: overlap or execute out of order with regards to
940e5c31af7Sopenharmony_ciother subpasses, unless otherwise enforced by an execution dependency.
941e5c31af7Sopenharmony_ciEach subpass only respects <<synchronization-submission-order, submission
942e5c31af7Sopenharmony_ciorder>> for commands recorded in the same subpass, and the
943e5c31af7Sopenharmony_ciflink:vkCmdBeginRenderPass and flink:vkCmdEndRenderPass commands that
944e5c31af7Sopenharmony_cidelimit the render pass - commands within other subpasses are not included.
945e5c31af7Sopenharmony_ciThis affects most other <<synchronization-implicit, implicit ordering
946e5c31af7Sopenharmony_ciguarantees>>.
947e5c31af7Sopenharmony_ci
948e5c31af7Sopenharmony_ciA render pass describes the structure of subpasses and attachments
949e5c31af7Sopenharmony_ciindependent of any specific image views for the attachments.
950e5c31af7Sopenharmony_ciThe specific image views that will be used for the attachments, and their
951e5c31af7Sopenharmony_cidimensions, are specified in sname:VkFramebuffer objects.
952e5c31af7Sopenharmony_ciFramebuffers are created with respect to a specific render pass that the
953e5c31af7Sopenharmony_ciframebuffer is compatible with (see <<renderpass-compatibility,Render Pass
954e5c31af7Sopenharmony_ciCompatibility>>).
955e5c31af7Sopenharmony_ciCollectively, a render pass and a framebuffer define the complete render
956e5c31af7Sopenharmony_citarget state for one or more subpasses as well as the algorithmic
957e5c31af7Sopenharmony_cidependencies between the subpasses.
958e5c31af7Sopenharmony_ci
959e5c31af7Sopenharmony_ciThe various pipeline stages of the drawing commands for a given subpass may:
960e5c31af7Sopenharmony_ciexecute concurrently and/or out of order, both within and across drawing
961e5c31af7Sopenharmony_cicommands, whilst still respecting <<synchronization-pipeline-stages-order,
962e5c31af7Sopenharmony_cipipeline order>>.
963e5c31af7Sopenharmony_ciHowever for a given (x,y,layer,sample) sample location, certain per-sample
964e5c31af7Sopenharmony_cioperations are performed in <<primsrast-order,rasterization order>>.
965e5c31af7Sopenharmony_ci
966e5c31af7Sopenharmony_ci[open,refpage='VK_ATTACHMENT_UNUSED',desc='Unused attachment sentinel',type='consts']
967e5c31af7Sopenharmony_ci--
968e5c31af7Sopenharmony_ciename:VK_ATTACHMENT_UNUSED is a constant indicating that a render pass
969e5c31af7Sopenharmony_ciattachment is not used.
970e5c31af7Sopenharmony_ci
971e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VK_ATTACHMENT_UNUSED.txt[]
972e5c31af7Sopenharmony_ci--
973e5c31af7Sopenharmony_ci
974e5c31af7Sopenharmony_ci
975e5c31af7Sopenharmony_ci[[renderpass-creation]]
976e5c31af7Sopenharmony_ci== Render Pass Creation
977e5c31af7Sopenharmony_ci
978e5c31af7Sopenharmony_ci[open,refpage='vkCreateRenderPass',desc='Create a new render pass object',type='protos']
979e5c31af7Sopenharmony_ci--
980e5c31af7Sopenharmony_ciTo create a render pass, call:
981e5c31af7Sopenharmony_ci
982e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCreateRenderPass.txt[]
983e5c31af7Sopenharmony_ci
984e5c31af7Sopenharmony_ci  * pname:device is the logical device that creates the render pass.
985e5c31af7Sopenharmony_ci  * pname:pCreateInfo is a pointer to a slink:VkRenderPassCreateInfo
986e5c31af7Sopenharmony_ci    structure describing the parameters of the render pass.
987e5c31af7Sopenharmony_ci  * pname:pAllocator controls host memory allocation as described in the
988e5c31af7Sopenharmony_ci    <<memory-allocation, Memory Allocation>> chapter.
989e5c31af7Sopenharmony_ci  * pname:pRenderPass is a pointer to a slink:VkRenderPass handle in which
990e5c31af7Sopenharmony_ci    the resulting render pass object is returned.
991e5c31af7Sopenharmony_ci
992e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCreateRenderPass.txt[]
993e5c31af7Sopenharmony_ci--
994e5c31af7Sopenharmony_ci
995e5c31af7Sopenharmony_ci[open,refpage='VkRenderPassCreateInfo',desc='Structure specifying parameters of a newly created render pass',type='structs']
996e5c31af7Sopenharmony_ci--
997e5c31af7Sopenharmony_ciThe sname:VkRenderPassCreateInfo structure is defined as:
998e5c31af7Sopenharmony_ci
999e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkRenderPassCreateInfo.txt[]
1000e5c31af7Sopenharmony_ci
1001e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
1002e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
1003e5c31af7Sopenharmony_ci    structure.
1004e5c31af7Sopenharmony_ciifndef::VK_QCOM_render_pass_transform[]
1005e5c31af7Sopenharmony_ci  * pname:flags is reserved for future use.
1006e5c31af7Sopenharmony_ciendif::VK_QCOM_render_pass_transform[]
1007e5c31af7Sopenharmony_ciifdef::VK_QCOM_render_pass_transform[]
1008e5c31af7Sopenharmony_ci  * pname:flags is a bitmask of elink:VkRenderPassCreateFlagBits
1009e5c31af7Sopenharmony_ciendif::VK_QCOM_render_pass_transform[]
1010e5c31af7Sopenharmony_ci  * pname:attachmentCount is the number of attachments used by this render
1011e5c31af7Sopenharmony_ci    pass.
1012e5c31af7Sopenharmony_ci  * pname:pAttachments is a pointer to an array of pname:attachmentCount
1013e5c31af7Sopenharmony_ci    slink:VkAttachmentDescription structures describing the attachments used
1014e5c31af7Sopenharmony_ci    by the render pass.
1015e5c31af7Sopenharmony_ci  * pname:subpassCount is the number of subpasses to create.
1016e5c31af7Sopenharmony_ci  * pname:pSubpasses is a pointer to an array of pname:subpassCount
1017e5c31af7Sopenharmony_ci    slink:VkSubpassDescription structures describing each subpass.
1018e5c31af7Sopenharmony_ci  * pname:dependencyCount is the number of memory dependencies between pairs
1019e5c31af7Sopenharmony_ci    of subpasses.
1020e5c31af7Sopenharmony_ci  * pname:pDependencies is a pointer to an array of pname:dependencyCount
1021e5c31af7Sopenharmony_ci    slink:VkSubpassDependency structures describing dependencies between
1022e5c31af7Sopenharmony_ci    pairs of subpasses.
1023e5c31af7Sopenharmony_ci
1024e5c31af7Sopenharmony_ci[NOTE]
1025e5c31af7Sopenharmony_ci.Note
1026e5c31af7Sopenharmony_ci====
1027e5c31af7Sopenharmony_ciCare should be taken to avoid a data race here; if any subpasses access
1028e5c31af7Sopenharmony_ciattachments with overlapping memory locations, and one of those accesses is
1029e5c31af7Sopenharmony_cia write, a subpass dependency needs to be included between them.
1030e5c31af7Sopenharmony_ci====
1031e5c31af7Sopenharmony_ci
1032e5c31af7Sopenharmony_ci.Valid Usage
1033e5c31af7Sopenharmony_ci****
1034e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo-attachment-00834]]
1035e5c31af7Sopenharmony_ci    If the pname:attachment member of any element of
1036e5c31af7Sopenharmony_ci    pname:pInputAttachments, pname:pColorAttachments,
1037e5c31af7Sopenharmony_ci    pname:pResolveAttachments or pname:pDepthStencilAttachment, or any
1038e5c31af7Sopenharmony_ci    element of pname:pPreserveAttachments in any element of pname:pSubpasses
1039e5c31af7Sopenharmony_ci    is not ename:VK_ATTACHMENT_UNUSED, then it must: be less than
1040e5c31af7Sopenharmony_ci    pname:attachmentCount
1041e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map[]
1042e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo-fragmentDensityMapAttachment-06471]]
1043e5c31af7Sopenharmony_ci    If the pNext chain includes a
1044e5c31af7Sopenharmony_ci    slink:VkRenderPassFragmentDensityMapCreateInfoEXT structure and the
1045e5c31af7Sopenharmony_ci    pname:fragmentDensityMapAttachment member is not
1046e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_UNUSED, then pname:attachment must: be less than
1047e5c31af7Sopenharmony_ci    pname:attachmentCount
1048e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map[]
1049e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo-pAttachments-00836]]
1050e5c31af7Sopenharmony_ci    For any member of pname:pAttachments with a pname:loadOp equal to
1051e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment
1052e5c31af7Sopenharmony_ci    must: not specify a pname:layout equal to
1053e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL or
1054e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL
1055e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo-pAttachments-02511]]
1056e5c31af7Sopenharmony_ci    For any member of pname:pAttachments with a pname:stencilLoadOp equal to
1057e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment
1058e5c31af7Sopenharmony_ci    must: not specify a pname:layout equal to
1059e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL or
1060e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL
1061e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance2[]
1062e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo-pAttachments-01566]]
1063e5c31af7Sopenharmony_ci    For any member of pname:pAttachments with a pname:loadOp equal to
1064e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment
1065e5c31af7Sopenharmony_ci    must: not specify a pname:layout equal to
1066e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL
1067e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo-pAttachments-01567]]
1068e5c31af7Sopenharmony_ci    For any member of pname:pAttachments with a pname:stencilLoadOp equal to
1069e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment
1070e5c31af7Sopenharmony_ci    must: not specify a pname:layout equal to
1071e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL
1072e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo-pNext-01926]]
1073e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
1074e5c31af7Sopenharmony_ci    slink:VkRenderPassInputAttachmentAspectCreateInfo structure, the
1075e5c31af7Sopenharmony_ci    pname:subpass member of each element of its pname:pAspectReferences
1076e5c31af7Sopenharmony_ci    member must: be less than pname:subpassCount
1077e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo-pNext-01927]]
1078e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
1079e5c31af7Sopenharmony_ci    slink:VkRenderPassInputAttachmentAspectCreateInfo structure, the
1080e5c31af7Sopenharmony_ci    pname:inputAttachmentIndex member of each element of its
1081e5c31af7Sopenharmony_ci    pname:pAspectReferences member must: be less than the value of
1082e5c31af7Sopenharmony_ci    pname:inputAttachmentCount in the element of pname:pSubpasses identified
1083e5c31af7Sopenharmony_ci    by its pname:subpass member
1084e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo-pNext-01963]]
1085e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
1086e5c31af7Sopenharmony_ci    slink:VkRenderPassInputAttachmentAspectCreateInfo structure, for any
1087e5c31af7Sopenharmony_ci    element of the pname:pInputAttachments member of any element of
1088e5c31af7Sopenharmony_ci    pname:pSubpasses where the pname:attachment member is not
1089e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_UNUSED, the pname:aspectMask member of the
1090e5c31af7Sopenharmony_ci    corresponding element of
1091e5c31af7Sopenharmony_ci    slink:VkRenderPassInputAttachmentAspectCreateInfo::pname:pAspectReferences
1092e5c31af7Sopenharmony_ci    must: only include aspects that are present in images of the format
1093e5c31af7Sopenharmony_ci    specified by the element of pname:pAttachments at pname:attachment
1094e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
1095e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_multiview[]
1096e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo-pNext-01928]]
1097e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
1098e5c31af7Sopenharmony_ci    slink:VkRenderPassMultiviewCreateInfo structure, and its
1099e5c31af7Sopenharmony_ci    pname:subpassCount member is not zero, that member must: be equal to the
1100e5c31af7Sopenharmony_ci    value of pname:subpassCount
1101e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo-pNext-01929]]
1102e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
1103e5c31af7Sopenharmony_ci    slink:VkRenderPassMultiviewCreateInfo structure, if its
1104e5c31af7Sopenharmony_ci    pname:dependencyCount member is not zero, it must: be equal to
1105e5c31af7Sopenharmony_ci    pname:dependencyCount
1106e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo-pNext-01930]]
1107e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
1108e5c31af7Sopenharmony_ci    slink:VkRenderPassMultiviewCreateInfo structure, for each non-zero
1109e5c31af7Sopenharmony_ci    element of pname:pViewOffsets, the pname:srcSubpass and pname:dstSubpass
1110e5c31af7Sopenharmony_ci    members of pname:pDependencies at the same index must: not be equal
1111e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo-pNext-02512]]
1112e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
1113e5c31af7Sopenharmony_ci    slink:VkRenderPassMultiviewCreateInfo structure, for any element of
1114e5c31af7Sopenharmony_ci    pname:pDependencies with a pname:dependencyFlags member that does not
1115e5c31af7Sopenharmony_ci    include ename:VK_DEPENDENCY_VIEW_LOCAL_BIT, the corresponding element of
1116e5c31af7Sopenharmony_ci    the pname:pViewOffsets member of that
1117e5c31af7Sopenharmony_ci    slink:VkRenderPassMultiviewCreateInfo instance must: be `0`
1118e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo-pNext-02513]]
1119e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
1120e5c31af7Sopenharmony_ci    slink:VkRenderPassMultiviewCreateInfo structure, elements of its
1121e5c31af7Sopenharmony_ci    pname:pViewMasks member must: either all be `0`, or all not be `0`
1122e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo-pNext-02514]]
1123e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
1124e5c31af7Sopenharmony_ci    slink:VkRenderPassMultiviewCreateInfo structure, and each element of its
1125e5c31af7Sopenharmony_ci    pname:pViewMasks member is `0`, the pname:dependencyFlags member of each
1126e5c31af7Sopenharmony_ci    element of pname:pDependencies must: not include
1127e5c31af7Sopenharmony_ci    ename:VK_DEPENDENCY_VIEW_LOCAL_BIT
1128e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo-pNext-02515]]
1129e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
1130e5c31af7Sopenharmony_ci    slink:VkRenderPassMultiviewCreateInfo structure, and each element of its
1131e5c31af7Sopenharmony_ci    pname:pViewMasks member is `0`, its pname:correlationMaskCount member
1132e5c31af7Sopenharmony_ci    must: be `0`
1133e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_multiview[]
1134e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo-pDependencies-00837]]
1135e5c31af7Sopenharmony_ci    For any element of pname:pDependencies, if the pname:srcSubpass is not
1136e5c31af7Sopenharmony_ci    ename:VK_SUBPASS_EXTERNAL, all stage flags included in the
1137e5c31af7Sopenharmony_ci    pname:srcStageMask member of that dependency must: be a pipeline stage
1138e5c31af7Sopenharmony_ci    supported by the <<synchronization-pipeline-stages-types, pipeline>>
1139e5c31af7Sopenharmony_ci    identified by the pname:pipelineBindPoint member of the source subpass
1140e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo-pDependencies-00838]]
1141e5c31af7Sopenharmony_ci    For any element of pname:pDependencies, if the pname:dstSubpass is not
1142e5c31af7Sopenharmony_ci    ename:VK_SUBPASS_EXTERNAL, all stage flags included in the
1143e5c31af7Sopenharmony_ci    pname:dstStageMask member of that dependency must: be a pipeline stage
1144e5c31af7Sopenharmony_ci    supported by the <<synchronization-pipeline-stages-types, pipeline>>
1145e5c31af7Sopenharmony_ci    identified by the pname:pipelineBindPoint member of the destination
1146e5c31af7Sopenharmony_ci    subpass
1147e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo-srcSubpass-02517]]
1148e5c31af7Sopenharmony_ci    The pname:srcSubpass member of each element of pname:pDependencies must:
1149e5c31af7Sopenharmony_ci    be less than pname:subpassCount
1150e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo-dstSubpass-02518]]
1151e5c31af7Sopenharmony_ci    The pname:dstSubpass member of each element of pname:pDependencies must:
1152e5c31af7Sopenharmony_ci    be less than pname:subpassCount
1153e5c31af7Sopenharmony_ci****
1154e5c31af7Sopenharmony_ci
1155e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkRenderPassCreateInfo.txt[]
1156e5c31af7Sopenharmony_ci--
1157e5c31af7Sopenharmony_ci
1158e5c31af7Sopenharmony_ciifdef::VK_QCOM_render_pass_transform[]
1159e5c31af7Sopenharmony_ci[open,refpage='VkRenderPassCreateFlagBits',desc='Bitmask specifying additional properties of a render pass',type='enums']
1160e5c31af7Sopenharmony_ci--
1161e5c31af7Sopenharmony_ciBits which can: be set in slink:VkRenderPassCreateInfo::pname:flags
1162e5c31af7Sopenharmony_cidescribing additional properties of the render pass are:
1163e5c31af7Sopenharmony_ci
1164e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkRenderPassCreateFlagBits.txt[]
1165e5c31af7Sopenharmony_ci
1166e5c31af7Sopenharmony_ci  * ename:VK_RENDER_PASS_CREATE_TRANSFORM_BIT_QCOM specifies that the
1167e5c31af7Sopenharmony_ci    created render pass is compatible with
1168e5c31af7Sopenharmony_ci    <<vertexpostproc-renderpass-transform, render pass transform>>.
1169e5c31af7Sopenharmony_ci--
1170e5c31af7Sopenharmony_ciendif::VK_QCOM_render_pass_transform[]
1171e5c31af7Sopenharmony_ci
1172e5c31af7Sopenharmony_ci[open,refpage='VkRenderPassCreateFlags',desc='Bitmask of VkRenderPassCreateFlagBits',type='flags']
1173e5c31af7Sopenharmony_ci--
1174e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkRenderPassCreateFlags.txt[]
1175e5c31af7Sopenharmony_ci
1176e5c31af7Sopenharmony_citname:VkRenderPassCreateFlags is a bitmask type for setting a mask of zero
1177e5c31af7Sopenharmony_cior more elink:VkRenderPassCreateFlagBits.
1178e5c31af7Sopenharmony_ci--
1179e5c31af7Sopenharmony_ci
1180e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_multiview[]
1181e5c31af7Sopenharmony_ci[[renderpass-multiview]]
1182e5c31af7Sopenharmony_ci[open,refpage='VkRenderPassMultiviewCreateInfo',desc='Structure containing multiview information for all subpasses',type='structs']
1183e5c31af7Sopenharmony_ci--
1184e5c31af7Sopenharmony_ciIf the slink:VkRenderPassCreateInfo::pname:pNext chain includes a
1185e5c31af7Sopenharmony_cisname:VkRenderPassMultiviewCreateInfo structure, then that structure
1186e5c31af7Sopenharmony_ciincludes an array of view masks, view offsets, and correlation masks for the
1187e5c31af7Sopenharmony_cirender pass.
1188e5c31af7Sopenharmony_ci
1189e5c31af7Sopenharmony_ciThe sname:VkRenderPassMultiviewCreateInfo structure is defined as:
1190e5c31af7Sopenharmony_ci
1191e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkRenderPassMultiviewCreateInfo.txt[]
1192e5c31af7Sopenharmony_ci
1193e5c31af7Sopenharmony_ciifdef::VK_KHR_multiview[]
1194e5c31af7Sopenharmony_cior the equivalent
1195e5c31af7Sopenharmony_ci
1196e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkRenderPassMultiviewCreateInfoKHR.txt[]
1197e5c31af7Sopenharmony_ciendif::VK_KHR_multiview[]
1198e5c31af7Sopenharmony_ci
1199e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
1200e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
1201e5c31af7Sopenharmony_ci    structure.
1202e5c31af7Sopenharmony_ci  * pname:subpassCount is zero or the number of subpasses in the render
1203e5c31af7Sopenharmony_ci    pass.
1204e5c31af7Sopenharmony_ci  * pname:pViewMasks is a pointer to an array of pname:subpassCount view
1205e5c31af7Sopenharmony_ci    masks, where each mask is a bitfield of view indices describing which
1206e5c31af7Sopenharmony_ci    views rendering is broadcast to in each subpass, when multiview is
1207e5c31af7Sopenharmony_ci    enabled.
1208e5c31af7Sopenharmony_ci    If pname:subpassCount is zero, each view mask is treated as zero.
1209e5c31af7Sopenharmony_ci  * pname:dependencyCount is zero or the number of dependencies in the
1210e5c31af7Sopenharmony_ci    render pass.
1211e5c31af7Sopenharmony_ci  * pname:pViewOffsets is a pointer to an array of pname:dependencyCount
1212e5c31af7Sopenharmony_ci    view offsets, one for each dependency.
1213e5c31af7Sopenharmony_ci    If pname:dependencyCount is zero, each dependency's view offset is
1214e5c31af7Sopenharmony_ci    treated as zero.
1215e5c31af7Sopenharmony_ci    Each view offset controls which views in the source subpass the views in
1216e5c31af7Sopenharmony_ci    the destination subpass depend on.
1217e5c31af7Sopenharmony_ci  * pname:correlationMaskCount is zero or the number of correlation masks.
1218e5c31af7Sopenharmony_ci  * pname:pCorrelationMasks is a pointer to an array of
1219e5c31af7Sopenharmony_ci    pname:correlationMaskCount view masks indicating sets of views that may:
1220e5c31af7Sopenharmony_ci    be more efficient to render concurrently.
1221e5c31af7Sopenharmony_ci
1222e5c31af7Sopenharmony_ciWhen a subpass uses a non-zero view mask, _multiview_ functionality is
1223e5c31af7Sopenharmony_ciconsidered to be enabled.
1224e5c31af7Sopenharmony_ciMultiview is all-or-nothing for a render pass - that is, either all
1225e5c31af7Sopenharmony_cisubpasses must: have a non-zero view mask (though some subpasses may: have
1226e5c31af7Sopenharmony_cionly one view) or all must: be zero.
1227e5c31af7Sopenharmony_ciMultiview causes all drawing and clear commands in the subpass to behave as
1228e5c31af7Sopenharmony_ciif they were broadcast to each view, where a view is represented by one
1229e5c31af7Sopenharmony_cilayer of the framebuffer attachments.
1230e5c31af7Sopenharmony_ciAll draws and clears are broadcast to each _view index_ whose bit is set in
1231e5c31af7Sopenharmony_cithe view mask.
1232e5c31af7Sopenharmony_ciThe view index is provided in the code:ViewIndex shader input variable, and
1233e5c31af7Sopenharmony_cicolor, depth/stencil, and input attachments all read/write the layer of the
1234e5c31af7Sopenharmony_ciframebuffer corresponding to the view index.
1235e5c31af7Sopenharmony_ci
1236e5c31af7Sopenharmony_ciIf the view mask is zero for all subpasses, multiview is considered to be
1237e5c31af7Sopenharmony_cidisabled and all drawing commands execute normally, without this additional
1238e5c31af7Sopenharmony_cibroadcasting.
1239e5c31af7Sopenharmony_ci
1240e5c31af7Sopenharmony_ciSome implementations may: not support multiview in conjunction with
1241e5c31af7Sopenharmony_ci<<features-multiview-gs,geometry shaders>> or
1242e5c31af7Sopenharmony_ci<<features-multiview-tess,tessellation shaders>>.
1243e5c31af7Sopenharmony_ci
1244e5c31af7Sopenharmony_ci[[renderpass-multiview-view-local]]
1245e5c31af7Sopenharmony_ciWhen multiview is enabled, the ename:VK_DEPENDENCY_VIEW_LOCAL_BIT bit in a
1246e5c31af7Sopenharmony_cidependency can: be used to express a view-local dependency, meaning that
1247e5c31af7Sopenharmony_cieach view in the destination subpass depends on a single view in the source
1248e5c31af7Sopenharmony_cisubpass.
1249e5c31af7Sopenharmony_ciUnlike pipeline barriers, a subpass dependency can: potentially have a
1250e5c31af7Sopenharmony_cidifferent view mask in the source subpass and the destination subpass.
1251e5c31af7Sopenharmony_ciIf the dependency is view-local, then each view ([eq]#dstView#) in the
1252e5c31af7Sopenharmony_cidestination subpass depends on the view [eq]#dstView {plus}
1253e5c31af7Sopenharmony_cipname:pViewOffsets[dependency]# in the source subpass.
1254e5c31af7Sopenharmony_ciIf there is not such a view in the source subpass, then this dependency does
1255e5c31af7Sopenharmony_cinot affect that view in the destination subpass.
1256e5c31af7Sopenharmony_ciIf the dependency is not view-local, then all views in the destination
1257e5c31af7Sopenharmony_cisubpass depend on all views in the source subpass, and the view offset is
1258e5c31af7Sopenharmony_ciignored.
1259e5c31af7Sopenharmony_ciA non-zero view offset is not allowed in a self-dependency.
1260e5c31af7Sopenharmony_ci
1261e5c31af7Sopenharmony_ciThe elements of pname:pCorrelationMasks are a set of masks of views
1262e5c31af7Sopenharmony_ciindicating that views in the same mask may: exhibit spatial coherency
1263e5c31af7Sopenharmony_cibetween the views, making it more efficient to render them concurrently.
1264e5c31af7Sopenharmony_ciCorrelation masks must: not have a functional effect on the results of the
1265e5c31af7Sopenharmony_cimultiview rendering.
1266e5c31af7Sopenharmony_ci
1267e5c31af7Sopenharmony_ciWhen multiview is enabled, at the beginning of each subpass all non-render
1268e5c31af7Sopenharmony_cipass state is undefined:.
1269e5c31af7Sopenharmony_ciIn particular, each time flink:vkCmdBeginRenderPass or
1270e5c31af7Sopenharmony_ciflink:vkCmdNextSubpass is called the graphics pipeline must: be bound, any
1271e5c31af7Sopenharmony_cirelevant descriptor sets or vertex/index buffers must: be bound, and any
1272e5c31af7Sopenharmony_cirelevant dynamic state or push constants must: be set before they are used.
1273e5c31af7Sopenharmony_ci
1274e5c31af7Sopenharmony_ciifdef::VK_NVX_multiview_per_view_attributes[]
1275e5c31af7Sopenharmony_ci
1276e5c31af7Sopenharmony_ciA multiview subpass can: declare that its shaders will write per-view
1277e5c31af7Sopenharmony_ciattributes for all views in a single invocation, by setting the
1278e5c31af7Sopenharmony_ciename:VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX bit in the subpass
1279e5c31af7Sopenharmony_cidescription.
1280e5c31af7Sopenharmony_ciThe only supported per-view attributes are position and viewport mask, and
1281e5c31af7Sopenharmony_ciper-view position and viewport masks are written to output array variables
1282e5c31af7Sopenharmony_cidecorated with code:PositionPerViewNV and code:ViewportMaskPerViewNV,
1283e5c31af7Sopenharmony_cirespectively.
1284e5c31af7Sopenharmony_ciIf `apiext:VK_NV_viewport_array2` is not supported and enabled,
1285e5c31af7Sopenharmony_cicode:ViewportMaskPerViewNV must: not be used.
1286e5c31af7Sopenharmony_ciValues written to elements of code:PositionPerViewNV and
1287e5c31af7Sopenharmony_cicode:ViewportMaskPerViewNV must: not depend on the code:ViewIndex.
1288e5c31af7Sopenharmony_ciThe shader must: also write to an output variable decorated with
1289e5c31af7Sopenharmony_cicode:Position, and the value written to code:Position must: equal the value
1290e5c31af7Sopenharmony_ciwritten to code:PositionPerViewNV[code:ViewIndex].
1291e5c31af7Sopenharmony_ciSimilarly, if code:ViewportMaskPerViewNV is written to then the shader must:
1292e5c31af7Sopenharmony_cialso write to an output variable decorated with code:ViewportMaskNV, and the
1293e5c31af7Sopenharmony_civalue written to code:ViewportMaskNV must: equal the value written to
1294e5c31af7Sopenharmony_cicode:ViewportMaskPerViewNV[code:ViewIndex].
1295e5c31af7Sopenharmony_ciImplementations will either use values taken from code:Position and
1296e5c31af7Sopenharmony_cicode:ViewportMaskNV and invoke the shader once for each view, or will use
1297e5c31af7Sopenharmony_civalues taken from code:PositionPerViewNV and code:ViewportMaskPerViewNV and
1298e5c31af7Sopenharmony_ciinvoke the shader fewer times.
1299e5c31af7Sopenharmony_ciThe values written to code:Position and code:ViewportMaskNV must: not depend
1300e5c31af7Sopenharmony_cion the values written to code:PositionPerViewNV and
1301e5c31af7Sopenharmony_cicode:ViewportMaskPerViewNV, or vice versa (to allow compilers to eliminate
1302e5c31af7Sopenharmony_cithe unused outputs).
1303e5c31af7Sopenharmony_ciAll attributes that do not have `*PerViewNV` counterparts must: not depend
1304e5c31af7Sopenharmony_cion code:ViewIndex.
1305e5c31af7Sopenharmony_ci
1306e5c31af7Sopenharmony_ciPer-view attributes are all-or-nothing for a subpass.
1307e5c31af7Sopenharmony_ciThat is, all pipelines compiled against a subpass that includes the
1308e5c31af7Sopenharmony_ciename:VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX bit must: write
1309e5c31af7Sopenharmony_ciper-view attributes to the `*PerViewNV[]` shader outputs, in addition to the
1310e5c31af7Sopenharmony_cinon-per-view (e.g. code:Position) outputs.
1311e5c31af7Sopenharmony_ciPipelines compiled against a subpass that does not include this bit must:
1312e5c31af7Sopenharmony_cinot include the `*PerViewNV[]` outputs in their interfaces.
1313e5c31af7Sopenharmony_ci
1314e5c31af7Sopenharmony_ciendif::VK_NVX_multiview_per_view_attributes[]
1315e5c31af7Sopenharmony_ci
1316e5c31af7Sopenharmony_ci.Valid Usage
1317e5c31af7Sopenharmony_ci****
1318e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassMultiviewCreateInfo-pCorrelationMasks-00841]]
1319e5c31af7Sopenharmony_ci    Each view index must: not be set in more than one element of
1320e5c31af7Sopenharmony_ci    pname:pCorrelationMasks
1321e5c31af7Sopenharmony_ci****
1322e5c31af7Sopenharmony_ci
1323e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkRenderPassMultiviewCreateInfo.txt[]
1324e5c31af7Sopenharmony_ci--
1325e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_multiview[]
1326e5c31af7Sopenharmony_ci
1327e5c31af7Sopenharmony_ciifdef::VK_NVX_multiview_per_view_attributes[]
1328e5c31af7Sopenharmony_ciifdef::VK_KHR_dynamic_rendering[]
1329e5c31af7Sopenharmony_ci
1330e5c31af7Sopenharmony_ci[open,refpage='VkMultiviewPerViewAttributesInfoNVX',desc='Structure specifying the multiview per-attribute properties',type='structs']
1331e5c31af7Sopenharmony_ci--
1332e5c31af7Sopenharmony_ci
1333e5c31af7Sopenharmony_ciThe sname:VkMultiviewPerViewAttributesInfoNVX structure is defined as:
1334e5c31af7Sopenharmony_ci
1335e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkMultiviewPerViewAttributesInfoNVX.txt[]
1336e5c31af7Sopenharmony_ci
1337e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
1338e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
1339e5c31af7Sopenharmony_ci    structure.
1340e5c31af7Sopenharmony_ci  * pname:perViewAttributes specifies that shaders compiled for this
1341e5c31af7Sopenharmony_ci    pipeline write the attributes for all views in a single invocation of
1342e5c31af7Sopenharmony_ci    each vertex processing stage.
1343e5c31af7Sopenharmony_ci    All pipelines executed within a render pass instance that includes this
1344e5c31af7Sopenharmony_ci    bit must: write per-view attributes to the `*PerViewNV[]` shader
1345e5c31af7Sopenharmony_ci    outputs, in addition to the non-per-view (e.g. code:Position) outputs.
1346e5c31af7Sopenharmony_ci  * pname:perViewAttributesPositionXOnly specifies that shaders compiled for
1347e5c31af7Sopenharmony_ci    this pipeline use per-view positions which only differ in value in the x
1348e5c31af7Sopenharmony_ci    component.
1349e5c31af7Sopenharmony_ci    Per-view viewport mask can: also be used.
1350e5c31af7Sopenharmony_ci
1351e5c31af7Sopenharmony_ciWhen dynamic render pass instances are being used, instead of specifying
1352e5c31af7Sopenharmony_ciename:VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX or
1353e5c31af7Sopenharmony_ciename:VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX in the subpass
1354e5c31af7Sopenharmony_cidescription flags, the per-attibute properties of the render pass instance
1355e5c31af7Sopenharmony_cimust: be specified by the sname:VkMultiviewPerViewAttributesInfoNVX
1356e5c31af7Sopenharmony_cistructure Include the sname:VkMultiviewPerViewAttributesInfoNVX structure in
1357e5c31af7Sopenharmony_cithe pname:pNext chain of slink:VkGraphicsPipelineCreateInfo when creating a
1358e5c31af7Sopenharmony_cigraphics pipeline for dynamic rendering, slink:VkRenderingInfoKHR when
1359e5c31af7Sopenharmony_cistarting a dynamic render pass instance, and
1360e5c31af7Sopenharmony_cislink:VkCommandBufferInheritanceInfo when specifying the dynamic render pass
1361e5c31af7Sopenharmony_ciinstance parameters for secondary command buffers.
1362e5c31af7Sopenharmony_ci
1363e5c31af7Sopenharmony_ci.Valid Usage
1364e5c31af7Sopenharmony_ci****
1365e5c31af7Sopenharmony_ci  * [[VUID-VkMultiviewPerViewAttributesInfoNVX-perViewAttributesPositionXOnly-06163]]
1366e5c31af7Sopenharmony_ci    If pname:perViewAttributesPositionXOnly is ename:VK_TRUE then
1367e5c31af7Sopenharmony_ci    pname:perViewAttributes must: also be ename:VK_TRUE
1368e5c31af7Sopenharmony_ci****
1369e5c31af7Sopenharmony_ci
1370e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkMultiviewPerViewAttributesInfoNVX.txt[]
1371e5c31af7Sopenharmony_ci--
1372e5c31af7Sopenharmony_ciendif::VK_KHR_dynamic_rendering[]
1373e5c31af7Sopenharmony_ciendif::VK_NVX_multiview_per_view_attributes[]
1374e5c31af7Sopenharmony_ci
1375e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map[]
1376e5c31af7Sopenharmony_ci[[renderpass-fragmentdensitymapattachment]]
1377e5c31af7Sopenharmony_ci[open,refpage='VkRenderPassFragmentDensityMapCreateInfoEXT',desc='Structure containing fragment density map attachment for render pass',type='structs']
1378e5c31af7Sopenharmony_ci--
1379e5c31af7Sopenharmony_ciIf the slink:VkRenderPassCreateInfo::pname:pNext chain includes a
1380e5c31af7Sopenharmony_cisname:VkRenderPassFragmentDensityMapCreateInfoEXT structure, then that
1381e5c31af7Sopenharmony_cistructure includes a fragment density map attachment for the render pass.
1382e5c31af7Sopenharmony_ci
1383e5c31af7Sopenharmony_ciThe sname:VkRenderPassFragmentDensityMapCreateInfoEXT structure is defined
1384e5c31af7Sopenharmony_cias:
1385e5c31af7Sopenharmony_ci
1386e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkRenderPassFragmentDensityMapCreateInfoEXT.txt[]
1387e5c31af7Sopenharmony_ci
1388e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
1389e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
1390e5c31af7Sopenharmony_ci    structure.
1391e5c31af7Sopenharmony_ci  * pname:fragmentDensityMapAttachment is the fragment density map to use
1392e5c31af7Sopenharmony_ci    for the render pass.
1393e5c31af7Sopenharmony_ci
1394e5c31af7Sopenharmony_ciThe fragment density map is read at an implementation-dependent time with
1395e5c31af7Sopenharmony_cithe following constraints determined by the attachment's image view
1396e5c31af7Sopenharmony_cipname:flags:
1397e5c31af7Sopenharmony_ci
1398e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT
1399e5c31af7Sopenharmony_ci    specifies that the fragment density map will be read by the device
1400e5c31af7Sopenharmony_ci    during ename:VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT
1401e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map2[]
1402e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT
1403e5c31af7Sopenharmony_ci    specifies that the fragment density map will be read by the host during
1404e5c31af7Sopenharmony_ci    flink:vkEndCommandBuffer of the primary command buffer that the render
1405e5c31af7Sopenharmony_ci    pass is recorded into
1406e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map2[]
1407e5c31af7Sopenharmony_ci  * Otherwise the fragment density map will be read by the host during
1408e5c31af7Sopenharmony_ci    flink:vkCmdBeginRenderPass
1409e5c31af7Sopenharmony_ci
1410e5c31af7Sopenharmony_ciThe fragment density map may: additionally be read by the device during
1411e5c31af7Sopenharmony_ciename:VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT for any mode.
1412e5c31af7Sopenharmony_ci
1413e5c31af7Sopenharmony_ciIf this structure is not present, it is as if
1414e5c31af7Sopenharmony_cipname:fragmentDensityMapAttachment was given as ename:VK_ATTACHMENT_UNUSED.
1415e5c31af7Sopenharmony_ci
1416e5c31af7Sopenharmony_ci.Valid Usage
1417e5c31af7Sopenharmony_ci****
1418e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassFragmentDensityMapCreateInfoEXT-fragmentDensityMapAttachment-02548]]
1419e5c31af7Sopenharmony_ci    If pname:fragmentDensityMapAttachment is not ename:VK_ATTACHMENT_UNUSED,
1420e5c31af7Sopenharmony_ci    pname:fragmentDensityMapAttachment must: not be an element of
1421e5c31af7Sopenharmony_ci    sname:VkSubpassDescription::pname:pInputAttachments,
1422e5c31af7Sopenharmony_ci    sname:VkSubpassDescription::pname:pColorAttachments,
1423e5c31af7Sopenharmony_ci    sname:VkSubpassDescription::pname:pResolveAttachments,
1424e5c31af7Sopenharmony_ci    sname:VkSubpassDescription::pname:pDepthStencilAttachment, or
1425e5c31af7Sopenharmony_ci    sname:VkSubpassDescription::pname:pPreserveAttachments for any subpass
1426e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassFragmentDensityMapCreateInfoEXT-fragmentDensityMapAttachment-02549]]
1427e5c31af7Sopenharmony_ci    If pname:fragmentDensityMapAttachment is not ename:VK_ATTACHMENT_UNUSED,
1428e5c31af7Sopenharmony_ci    pname:layout must: be equal to
1429e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT, or
1430e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_GENERAL
1431e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassFragmentDensityMapCreateInfoEXT-fragmentDensityMapAttachment-02550]]
1432e5c31af7Sopenharmony_ci    If pname:fragmentDensityMapAttachment is not ename:VK_ATTACHMENT_UNUSED,
1433e5c31af7Sopenharmony_ci    pname:fragmentDensityMapAttachment must: reference an attachment with a
1434e5c31af7Sopenharmony_ci    pname:loadOp equal to ename:VK_ATTACHMENT_LOAD_OP_LOAD or
1435e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_LOAD_OP_DONT_CARE
1436e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassFragmentDensityMapCreateInfoEXT-fragmentDensityMapAttachment-02551]]
1437e5c31af7Sopenharmony_ci    If pname:fragmentDensityMapAttachment is not ename:VK_ATTACHMENT_UNUSED,
1438e5c31af7Sopenharmony_ci    pname:fragmentDensityMapAttachment must: reference an attachment with a
1439e5c31af7Sopenharmony_ci    pname:storeOp equal to ename:VK_ATTACHMENT_STORE_OP_DONT_CARE
1440e5c31af7Sopenharmony_ci****
1441e5c31af7Sopenharmony_ci
1442e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkRenderPassFragmentDensityMapCreateInfoEXT.txt[]
1443e5c31af7Sopenharmony_ci--
1444e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map[]
1445e5c31af7Sopenharmony_ci
1446e5c31af7Sopenharmony_ci[open,refpage='VkAttachmentDescription',desc='Structure specifying an attachment description',type='structs']
1447e5c31af7Sopenharmony_ci--
1448e5c31af7Sopenharmony_ciThe sname:VkAttachmentDescription structure is defined as:
1449e5c31af7Sopenharmony_ci
1450e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkAttachmentDescription.txt[]
1451e5c31af7Sopenharmony_ci
1452e5c31af7Sopenharmony_ci  * pname:flags is a bitmask of elink:VkAttachmentDescriptionFlagBits
1453e5c31af7Sopenharmony_ci    specifying additional properties of the attachment.
1454e5c31af7Sopenharmony_ci  * pname:format is a elink:VkFormat value specifying the format of the
1455e5c31af7Sopenharmony_ci    image view that will be used for the attachment.
1456e5c31af7Sopenharmony_ci  * pname:samples is a elink:VkSampleCountFlagBits value specifying the
1457e5c31af7Sopenharmony_ci    number of samples of the image.
1458e5c31af7Sopenharmony_ci  * pname:loadOp is a elink:VkAttachmentLoadOp value specifying how the
1459e5c31af7Sopenharmony_ci    contents of color and depth components of the attachment are treated at
1460e5c31af7Sopenharmony_ci    the beginning of the subpass where it is first used.
1461e5c31af7Sopenharmony_ci  * pname:storeOp is a elink:VkAttachmentStoreOp value specifying how the
1462e5c31af7Sopenharmony_ci    contents of color and depth components of the attachment are treated at
1463e5c31af7Sopenharmony_ci    the end of the subpass where it is last used.
1464e5c31af7Sopenharmony_ci  * pname:stencilLoadOp is a elink:VkAttachmentLoadOp value specifying how
1465e5c31af7Sopenharmony_ci    the contents of stencil components of the attachment are treated at the
1466e5c31af7Sopenharmony_ci    beginning of the subpass where it is first used.
1467e5c31af7Sopenharmony_ci  * pname:stencilStoreOp is a elink:VkAttachmentStoreOp value specifying how
1468e5c31af7Sopenharmony_ci    the contents of stencil components of the attachment are treated at the
1469e5c31af7Sopenharmony_ci    end of the last subpass where it is used.
1470e5c31af7Sopenharmony_ci  * pname:initialLayout is the layout the attachment image subresource will
1471e5c31af7Sopenharmony_ci    be in when a render pass instance begins.
1472e5c31af7Sopenharmony_ci  * pname:finalLayout is the layout the attachment image subresource will be
1473e5c31af7Sopenharmony_ci    transitioned to when a render pass instance ends.
1474e5c31af7Sopenharmony_ci
1475e5c31af7Sopenharmony_ci[[renderpass-load-store-ops]]
1476e5c31af7Sopenharmony_ciIf the attachment uses a color format, then pname:loadOp and pname:storeOp
1477e5c31af7Sopenharmony_ciare used, and pname:stencilLoadOp and pname:stencilStoreOp are ignored.
1478e5c31af7Sopenharmony_ciIf the format has depth and/or stencil components, pname:loadOp and
1479e5c31af7Sopenharmony_cipname:storeOp apply only to the depth data, while pname:stencilLoadOp and
1480e5c31af7Sopenharmony_cipname:stencilStoreOp define how the stencil data is handled.
1481e5c31af7Sopenharmony_cipname:loadOp and pname:stencilLoadOp define the _load operations_ that
1482e5c31af7Sopenharmony_ciexecute as part of the first subpass that uses the attachment.
1483e5c31af7Sopenharmony_cipname:storeOp and pname:stencilStoreOp define the _store operations_ that
1484e5c31af7Sopenharmony_ciexecute as part of the last subpass that uses the attachment.
1485e5c31af7Sopenharmony_ci
1486e5c31af7Sopenharmony_ciThe load operation for each sample in an attachment happens-before any
1487e5c31af7Sopenharmony_cirecorded command which accesses the sample in the first subpass where the
1488e5c31af7Sopenharmony_ciattachment is used.
1489e5c31af7Sopenharmony_ciLoad operations for attachments with a depth/stencil format execute in the
1490e5c31af7Sopenharmony_ciename:VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT pipeline stage.
1491e5c31af7Sopenharmony_ciLoad operations for attachments with a color format execute in the
1492e5c31af7Sopenharmony_ciename:VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT pipeline stage.
1493e5c31af7Sopenharmony_ci
1494e5c31af7Sopenharmony_ciThe store operation for each sample in an attachment happens-after any
1495e5c31af7Sopenharmony_cirecorded command which accesses the sample in the last subpass where the
1496e5c31af7Sopenharmony_ciattachment is used.
1497e5c31af7Sopenharmony_ciStore operations for attachments with a depth/stencil format execute in the
1498e5c31af7Sopenharmony_ciename:VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT pipeline stage.
1499e5c31af7Sopenharmony_ciStore operations for attachments with a color format execute in the
1500e5c31af7Sopenharmony_ciename:VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT pipeline stage.
1501e5c31af7Sopenharmony_ci
1502e5c31af7Sopenharmony_ciIf an attachment is not used by any subpass, then pname:loadOp,
1503e5c31af7Sopenharmony_cipname:storeOp, pname:stencilStoreOp, and pname:stencilLoadOp are ignored,
1504e5c31af7Sopenharmony_ciand the attachment's memory contents will not be modified by execution of a
1505e5c31af7Sopenharmony_cirender pass instance.
1506e5c31af7Sopenharmony_ci
1507e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_multiview[]
1508e5c31af7Sopenharmony_ci
1509e5c31af7Sopenharmony_ciThe load and store operations apply on the first and last use of each view
1510e5c31af7Sopenharmony_ciin the render pass, respectively.
1511e5c31af7Sopenharmony_ciIf a view index of an attachment is not included in the view mask in any
1512e5c31af7Sopenharmony_cisubpass that uses it, then the load and store operations are ignored, and
1513e5c31af7Sopenharmony_cithe attachment's memory contents will not be modified by execution of a
1514e5c31af7Sopenharmony_cirender pass instance.
1515e5c31af7Sopenharmony_ci
1516e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_multiview[]
1517e5c31af7Sopenharmony_ci
1518e5c31af7Sopenharmony_ci[[renderpass-precision]]
1519e5c31af7Sopenharmony_ciDuring a render pass instance, input/color attachments with color formats
1520e5c31af7Sopenharmony_cithat have a component size of 8, 16, or 32 bits must: be represented in the
1521e5c31af7Sopenharmony_ciattachment's format throughout the instance.
1522e5c31af7Sopenharmony_ciAttachments with other floating- or fixed-point color formats, or with depth
1523e5c31af7Sopenharmony_cicomponents may: be represented in a format with a precision higher than the
1524e5c31af7Sopenharmony_ciattachment format, but must: be represented with the same range.
1525e5c31af7Sopenharmony_ciWhen such a component is loaded via the pname:loadOp, it will be converted
1526e5c31af7Sopenharmony_ciinto an implementation-dependent format used by the render pass.
1527e5c31af7Sopenharmony_ciSuch components must: be converted from the render pass format, to the
1528e5c31af7Sopenharmony_ciformat of the attachment, before they are resolved or stored at the end of a
1529e5c31af7Sopenharmony_cirender pass instance via pname:storeOp.
1530e5c31af7Sopenharmony_ciConversions occur as described in <<fundamentals-numerics,Numeric
1531e5c31af7Sopenharmony_ciRepresentation and Computation>> and <<fundamentals-fixedconv, Fixed-Point
1532e5c31af7Sopenharmony_ciData Conversions>>.
1533e5c31af7Sopenharmony_ci
1534e5c31af7Sopenharmony_ci[[renderpass-aliasing]]
1535e5c31af7Sopenharmony_ciIf pname:flags includes ename:VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT, then
1536e5c31af7Sopenharmony_cithe attachment is treated as if it shares physical memory with another
1537e5c31af7Sopenharmony_ciattachment in the same render pass.
1538e5c31af7Sopenharmony_ciThis information limits the ability of the implementation to reorder certain
1539e5c31af7Sopenharmony_cioperations (like layout transitions and the pname:loadOp) such that it is
1540e5c31af7Sopenharmony_cinot improperly reordered against other uses of the same physical memory via
1541e5c31af7Sopenharmony_cia different attachment.
1542e5c31af7Sopenharmony_ciThis is described in more detail below.
1543e5c31af7Sopenharmony_ci
1544e5c31af7Sopenharmony_ciIf a render pass uses multiple attachments that alias the same device
1545e5c31af7Sopenharmony_cimemory, those attachments must: each include the
1546e5c31af7Sopenharmony_ciename:VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT bit in their attachment
1547e5c31af7Sopenharmony_cidescription flags.
1548e5c31af7Sopenharmony_ciAttachments aliasing the same memory occurs in multiple ways:
1549e5c31af7Sopenharmony_ci
1550e5c31af7Sopenharmony_ci  * Multiple attachments being assigned the same image view as part of
1551e5c31af7Sopenharmony_ci    framebuffer creation.
1552e5c31af7Sopenharmony_ci  * Attachments using distinct image views that correspond to the same image
1553e5c31af7Sopenharmony_ci    subresource of an image.
1554e5c31af7Sopenharmony_ci  * Attachments using views of distinct image subresources which are bound
1555e5c31af7Sopenharmony_ci    to overlapping memory ranges.
1556e5c31af7Sopenharmony_ci
1557e5c31af7Sopenharmony_ci[NOTE]
1558e5c31af7Sopenharmony_ci.Note
1559e5c31af7Sopenharmony_ci====
1560e5c31af7Sopenharmony_ciRender passes must: include subpass dependencies (either directly or via a
1561e5c31af7Sopenharmony_cisubpass dependency chain) between any two subpasses that operate on the same
1562e5c31af7Sopenharmony_ciattachment or aliasing attachments and those subpass dependencies must:
1563e5c31af7Sopenharmony_ciinclude execution and memory dependencies separating uses of the aliases, if
1564e5c31af7Sopenharmony_ciat least one of those subpasses writes to one of the aliases.
1565e5c31af7Sopenharmony_ciThese dependencies must: not include the ename:VK_DEPENDENCY_BY_REGION_BIT
1566e5c31af7Sopenharmony_ciif the aliases are views of distinct image subresources which overlap in
1567e5c31af7Sopenharmony_cimemory.
1568e5c31af7Sopenharmony_ci====
1569e5c31af7Sopenharmony_ci
1570e5c31af7Sopenharmony_ciMultiple attachments that alias the same memory must: not be used in a
1571e5c31af7Sopenharmony_cisingle subpass.
1572e5c31af7Sopenharmony_ciA given attachment index must: not be used multiple times in a single
1573e5c31af7Sopenharmony_cisubpass, with one exception: two subpass attachments can: use the same
1574e5c31af7Sopenharmony_ciattachment index if at least one use is as an input attachment and neither
1575e5c31af7Sopenharmony_ciuse is as a resolve or preserve attachment.
1576e5c31af7Sopenharmony_ciIn other words, the same view can: be used simultaneously as an input and
1577e5c31af7Sopenharmony_cicolor or depth/stencil attachment, but must: not be used as multiple color
1578e5c31af7Sopenharmony_cior depth/stencil attachments nor as resolve or preserve attachments.
1579e5c31af7Sopenharmony_ciThe precise set of valid scenarios is described in more detail
1580e5c31af7Sopenharmony_ci<<renderpass-feedbackloop, below>>.
1581e5c31af7Sopenharmony_ci
1582e5c31af7Sopenharmony_ciIf a set of attachments alias each other, then all except the first to be
1583e5c31af7Sopenharmony_ciused in the render pass must: use an pname:initialLayout of
1584e5c31af7Sopenharmony_ciename:VK_IMAGE_LAYOUT_UNDEFINED, since the earlier uses of the other aliases
1585e5c31af7Sopenharmony_cimake their contents undefined:.
1586e5c31af7Sopenharmony_ciOnce an alias has been used and a different alias has been used after it,
1587e5c31af7Sopenharmony_cithe first alias must: not be used in any later subpasses.
1588e5c31af7Sopenharmony_ciHowever, an application can: assign the same image view to multiple aliasing
1589e5c31af7Sopenharmony_ciattachment indices, which allows that image view to be used multiple times
1590e5c31af7Sopenharmony_cieven if other aliases are used in between.
1591e5c31af7Sopenharmony_ci
1592e5c31af7Sopenharmony_ci[NOTE]
1593e5c31af7Sopenharmony_ci.Note
1594e5c31af7Sopenharmony_ci====
1595e5c31af7Sopenharmony_ciOnce an attachment needs the ename:VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT
1596e5c31af7Sopenharmony_cibit, there should: be no additional cost of introducing additional aliases,
1597e5c31af7Sopenharmony_ciand using these additional aliases may: allow more efficient clearing of the
1598e5c31af7Sopenharmony_ciattachments on multiple uses via ename:VK_ATTACHMENT_LOAD_OP_CLEAR.
1599e5c31af7Sopenharmony_ci====
1600e5c31af7Sopenharmony_ci
1601e5c31af7Sopenharmony_ci.Valid Usage
1602e5c31af7Sopenharmony_ci****
1603e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescription-finalLayout-00843]]
1604e5c31af7Sopenharmony_ci    pname:finalLayout must: not be ename:VK_IMAGE_LAYOUT_UNDEFINED or
1605e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_PREINITIALIZED
1606e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescription-format-03280]]
1607e5c31af7Sopenharmony_ci    If pname:format is a color format, pname:initialLayout must: not be
1608e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL,
1609e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL,
1610e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, or
1611e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL
1612e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescription-format-03281]]
1613e5c31af7Sopenharmony_ci    If pname:format is a depth/stencil format, pname:initialLayout must: not
1614e5c31af7Sopenharmony_ci    be ename:VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL
1615e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescription-format-03282]]
1616e5c31af7Sopenharmony_ci    If pname:format is a color format, pname:finalLayout must: not be
1617e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL,
1618e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL,
1619e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, or
1620e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL
1621e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescription-format-03283]]
1622e5c31af7Sopenharmony_ci    If pname:format is a depth/stencil format, pname:finalLayout must: not
1623e5c31af7Sopenharmony_ci    be ename:VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL
1624e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
1625e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescription-separateDepthStencilLayouts-03284]]
1626e5c31af7Sopenharmony_ci    If the <<features-separateDepthStencilLayouts,
1627e5c31af7Sopenharmony_ci    pname:separateDepthStencilLayouts>> feature is not enabled,
1628e5c31af7Sopenharmony_ci    pname:initialLayout must: not be
1629e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,
1630e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,
1631e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or
1632e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
1633e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescription-separateDepthStencilLayouts-03285]]
1634e5c31af7Sopenharmony_ci    If the <<features-separateDepthStencilLayouts,
1635e5c31af7Sopenharmony_ci    pname:separateDepthStencilLayouts>> feature is not enabled,
1636e5c31af7Sopenharmony_ci    pname:finalLayout must: not be
1637e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,
1638e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,
1639e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or
1640e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
1641e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescription-format-03286]]
1642e5c31af7Sopenharmony_ci    If pname:format is a color format, pname:initialLayout must: not be
1643e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,
1644e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,
1645e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or
1646e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
1647e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescription-format-03287]]
1648e5c31af7Sopenharmony_ci    If pname:format is a color format, pname:finalLayout must: not be
1649e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,
1650e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,
1651e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or
1652e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
1653e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescription-format-03288]]
1654e5c31af7Sopenharmony_ci    If pname:format is a depth/stencil format which includes both depth and
1655e5c31af7Sopenharmony_ci    stencil aspects, pname:initialLayout must: not be
1656e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,
1657e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,
1658e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or
1659e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
1660e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescription-format-03289]]
1661e5c31af7Sopenharmony_ci    If pname:format is a depth/stencil format which includes both depth and
1662e5c31af7Sopenharmony_ci    stencil aspects, pname:finalLayout must: not be
1663e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,
1664e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,
1665e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or
1666e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
1667e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescription-format-03290]]
1668e5c31af7Sopenharmony_ci    If pname:format is a depth/stencil format which includes only the depth
1669e5c31af7Sopenharmony_ci    aspect, pname:initialLayout must: not be
1670e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL or
1671e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
1672e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescription-format-03291]]
1673e5c31af7Sopenharmony_ci    If pname:format is a depth/stencil format which includes only the depth
1674e5c31af7Sopenharmony_ci    aspect, pname:finalLayout must: not be
1675e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL or
1676e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
1677e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescription-format-03292]]
1678e5c31af7Sopenharmony_ci    If pname:format is a depth/stencil format which includes only the
1679e5c31af7Sopenharmony_ci    stencil aspect, pname:initialLayout must: not be
1680e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or
1681e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL
1682e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescription-format-03293]]
1683e5c31af7Sopenharmony_ci    If pname:format is a depth/stencil format which includes only the
1684e5c31af7Sopenharmony_ci    stencil aspect, pname:finalLayout must: not be
1685e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or
1686e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL
1687e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
1688e5c31af7Sopenharmony_ci****
1689e5c31af7Sopenharmony_ci
1690e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkAttachmentDescription.txt[]
1691e5c31af7Sopenharmony_ci--
1692e5c31af7Sopenharmony_ci
1693e5c31af7Sopenharmony_ci[open,refpage='VkAttachmentDescriptionFlagBits',desc='Bitmask specifying additional properties of an attachment',type='enums']
1694e5c31af7Sopenharmony_ci--
1695e5c31af7Sopenharmony_ciBits which can: be set in slink:VkAttachmentDescription::pname:flags
1696e5c31af7Sopenharmony_cidescribing additional properties of the attachment are:
1697e5c31af7Sopenharmony_ci
1698e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkAttachmentDescriptionFlagBits.txt[]
1699e5c31af7Sopenharmony_ci
1700e5c31af7Sopenharmony_ci  * ename:VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT specifies that the
1701e5c31af7Sopenharmony_ci    attachment aliases the same device memory as other attachments.
1702e5c31af7Sopenharmony_ci--
1703e5c31af7Sopenharmony_ci
1704e5c31af7Sopenharmony_ci[open,refpage='VkAttachmentDescriptionFlags',desc='Bitmask of VkAttachmentDescriptionFlagBits',type='flags']
1705e5c31af7Sopenharmony_ci--
1706e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkAttachmentDescriptionFlags.txt[]
1707e5c31af7Sopenharmony_ci
1708e5c31af7Sopenharmony_citname:VkAttachmentDescriptionFlags is a bitmask type for setting a mask of
1709e5c31af7Sopenharmony_cizero or more elink:VkAttachmentDescriptionFlagBits.
1710e5c31af7Sopenharmony_ci--
1711e5c31af7Sopenharmony_ci
1712e5c31af7Sopenharmony_ci[open,refpage='VkAttachmentLoadOp',desc='Specify how contents of an attachment are treated at the beginning of a subpass',type='enums']
1713e5c31af7Sopenharmony_ci--
1714e5c31af7Sopenharmony_ciPossible values of slink:VkAttachmentDescription::pname:loadOp and
1715e5c31af7Sopenharmony_cipname:stencilLoadOp, specifying how the contents of the attachment are
1716e5c31af7Sopenharmony_citreated, are:
1717e5c31af7Sopenharmony_ci
1718e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkAttachmentLoadOp.txt[]
1719e5c31af7Sopenharmony_ci
1720e5c31af7Sopenharmony_ci  * ename:VK_ATTACHMENT_LOAD_OP_LOAD specifies that the previous contents of
1721e5c31af7Sopenharmony_ci    the image within the render area will be preserved.
1722e5c31af7Sopenharmony_ci    For attachments with a depth/stencil format, this uses the access type
1723e5c31af7Sopenharmony_ci    ename:VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT.
1724e5c31af7Sopenharmony_ci    For attachments with a color format, this uses the access type
1725e5c31af7Sopenharmony_ci    ename:VK_ACCESS_COLOR_ATTACHMENT_READ_BIT.
1726e5c31af7Sopenharmony_ci  * ename:VK_ATTACHMENT_LOAD_OP_CLEAR specifies that the contents within the
1727e5c31af7Sopenharmony_ci    render area will be cleared to a uniform value, which is specified when
1728e5c31af7Sopenharmony_ci    a render pass instance is begun.
1729e5c31af7Sopenharmony_ci    For attachments with a depth/stencil format, this uses the access type
1730e5c31af7Sopenharmony_ci    ename:VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT.
1731e5c31af7Sopenharmony_ci    For attachments with a color format, this uses the access type
1732e5c31af7Sopenharmony_ci    ename:VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT.
1733e5c31af7Sopenharmony_ci  * ename:VK_ATTACHMENT_LOAD_OP_DONT_CARE specifies that the previous
1734e5c31af7Sopenharmony_ci    contents within the area need not be preserved; the contents of the
1735e5c31af7Sopenharmony_ci    attachment will be undefined: inside the render area.
1736e5c31af7Sopenharmony_ci    For attachments with a depth/stencil format, this uses the access type
1737e5c31af7Sopenharmony_ci    ename:VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT.
1738e5c31af7Sopenharmony_ci    For attachments with a color format, this uses the access type
1739e5c31af7Sopenharmony_ci    ename:VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT.
1740e5c31af7Sopenharmony_ciifdef::VK_EXT_load_store_op_none[]
1741e5c31af7Sopenharmony_ci  * ename:VK_ATTACHMENT_LOAD_OP_NONE_EXT specifies that the previous
1742e5c31af7Sopenharmony_ci    contents of the image within the render area will be preserved, but the
1743e5c31af7Sopenharmony_ci    contents of the attachment will be undefined: inside the render pass.
1744e5c31af7Sopenharmony_ci    No access type is used as the image is not accessed.
1745e5c31af7Sopenharmony_ciendif::VK_EXT_load_store_op_none[]
1746e5c31af7Sopenharmony_ci--
1747e5c31af7Sopenharmony_ci
1748e5c31af7Sopenharmony_ci[open,refpage='VkAttachmentStoreOp',desc='Specify how contents of an attachment are treated at the end of a subpass',type='enums']
1749e5c31af7Sopenharmony_ci--
1750e5c31af7Sopenharmony_ciPossible values of slink:VkAttachmentDescription::pname:storeOp and
1751e5c31af7Sopenharmony_cipname:stencilStoreOp, specifying how the contents of the attachment are
1752e5c31af7Sopenharmony_citreated, are:
1753e5c31af7Sopenharmony_ci
1754e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkAttachmentStoreOp.txt[]
1755e5c31af7Sopenharmony_ci
1756e5c31af7Sopenharmony_ci  * ename:VK_ATTACHMENT_STORE_OP_STORE specifies the contents generated
1757e5c31af7Sopenharmony_ci    during the render pass and within the render area are written to memory.
1758e5c31af7Sopenharmony_ci    For attachments with a depth/stencil format, this uses the access type
1759e5c31af7Sopenharmony_ci    ename:VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT.
1760e5c31af7Sopenharmony_ci    For attachments with a color format, this uses the access type
1761e5c31af7Sopenharmony_ci    ename:VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT.
1762e5c31af7Sopenharmony_ci  * ename:VK_ATTACHMENT_STORE_OP_DONT_CARE specifies the contents within the
1763e5c31af7Sopenharmony_ci    render area are not needed after rendering, and may: be discarded; the
1764e5c31af7Sopenharmony_ci    contents of the attachment will be undefined: inside the render area.
1765e5c31af7Sopenharmony_ci    For attachments with a depth/stencil format, this uses the access type
1766e5c31af7Sopenharmony_ci    ename:VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT.
1767e5c31af7Sopenharmony_ci    For attachments with a color format, this uses the access type
1768e5c31af7Sopenharmony_ci    ename:VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT.
1769e5c31af7Sopenharmony_ciifdef::VK_EXT_load_store_op_none,VK_KHR_dynamic_rendering,VK_QCOM_render_pass_store_ops[]
1770e5c31af7Sopenharmony_ci  * ename:VK_ATTACHMENT_STORE_OP_NONE_KHR specifies the contents within the
1771e5c31af7Sopenharmony_ci    render area are not accessed by the store operation.
1772e5c31af7Sopenharmony_ci    However, if the attachment was written to during the render pass, the
1773e5c31af7Sopenharmony_ci    contents of the attachment will be undefined: inside the render area.
1774e5c31af7Sopenharmony_ciendif::VK_EXT_load_store_op_none,VK_KHR_dynamic_rendering,VK_QCOM_render_pass_store_ops[]
1775e5c31af7Sopenharmony_ci
1776e5c31af7Sopenharmony_ci[NOTE]
1777e5c31af7Sopenharmony_ci.Note
1778e5c31af7Sopenharmony_ci====
1779e5c31af7Sopenharmony_ciename:VK_ATTACHMENT_STORE_OP_DONT_CARE can: cause contents generated during
1780e5c31af7Sopenharmony_ciprevious render passes to be discarded before reaching memory, even if no
1781e5c31af7Sopenharmony_ciwrite to the attachment occurs during the current render pass.
1782e5c31af7Sopenharmony_ci====
1783e5c31af7Sopenharmony_ci--
1784e5c31af7Sopenharmony_ci
1785e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance2[]
1786e5c31af7Sopenharmony_ci[open,refpage='VkRenderPassInputAttachmentAspectCreateInfo',desc='Structure specifying, for a given subpass/input attachment pair, which aspect can: be read.',type='structs']
1787e5c31af7Sopenharmony_ci--
1788e5c31af7Sopenharmony_ciThe sname:VkRenderPassInputAttachmentAspectCreateInfo structure is defined
1789e5c31af7Sopenharmony_cias:
1790e5c31af7Sopenharmony_ci
1791e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkRenderPassInputAttachmentAspectCreateInfo.txt[]
1792e5c31af7Sopenharmony_ci
1793e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance2[]
1794e5c31af7Sopenharmony_cior the equivalent
1795e5c31af7Sopenharmony_ci
1796e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkRenderPassInputAttachmentAspectCreateInfoKHR.txt[]
1797e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance2[]
1798e5c31af7Sopenharmony_ci
1799e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
1800e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
1801e5c31af7Sopenharmony_ci    structure.
1802e5c31af7Sopenharmony_ci  * pname:aspectReferenceCount is the number of elements in the
1803e5c31af7Sopenharmony_ci    pname:pAspectReferences array.
1804e5c31af7Sopenharmony_ci  * pname:pAspectReferences is a pointer to an array of
1805e5c31af7Sopenharmony_ci    pname:aspectReferenceCount slink:VkInputAttachmentAspectReference
1806e5c31af7Sopenharmony_ci    structures containing a mask describing which aspect(s) can: be accessed
1807e5c31af7Sopenharmony_ci    for a given input attachment within a given subpass.
1808e5c31af7Sopenharmony_ci
1809e5c31af7Sopenharmony_ciTo specify which aspects of an input attachment can: be read, add a
1810e5c31af7Sopenharmony_cislink:VkRenderPassInputAttachmentAspectCreateInfo structure to the
1811e5c31af7Sopenharmony_cipname:pNext chain of the slink:VkRenderPassCreateInfo structure:
1812e5c31af7Sopenharmony_ci
1813e5c31af7Sopenharmony_ciAn application can: access any aspect of an input attachment that does not
1814e5c31af7Sopenharmony_cihave a specified aspect mask in the pname:pAspectReferences array.
1815e5c31af7Sopenharmony_ciOtherwise, an application must: not access aspect(s) of an input attachment
1816e5c31af7Sopenharmony_ciother than those in its specified aspect mask.
1817e5c31af7Sopenharmony_ci
1818e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkRenderPassInputAttachmentAspectCreateInfo.txt[]
1819e5c31af7Sopenharmony_ci--
1820e5c31af7Sopenharmony_ci
1821e5c31af7Sopenharmony_ci[open,refpage='VkInputAttachmentAspectReference',desc='Structure specifying a subpass/input attachment pair and an aspect mask that can: be read.',type='structs']
1822e5c31af7Sopenharmony_ci--
1823e5c31af7Sopenharmony_ciThe sname:VkInputAttachmentAspectReference structure is defined as:
1824e5c31af7Sopenharmony_ci
1825e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkInputAttachmentAspectReference.txt[]
1826e5c31af7Sopenharmony_ci
1827e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance2[]
1828e5c31af7Sopenharmony_cior the equivalent
1829e5c31af7Sopenharmony_ci
1830e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkInputAttachmentAspectReferenceKHR.txt[]
1831e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance2[]
1832e5c31af7Sopenharmony_ci
1833e5c31af7Sopenharmony_ci  * pname:subpass is an index into the pname:pSubpasses array of the parent
1834e5c31af7Sopenharmony_ci    sname:VkRenderPassCreateInfo structure.
1835e5c31af7Sopenharmony_ci  * pname:inputAttachmentIndex is an index into the pname:pInputAttachments
1836e5c31af7Sopenharmony_ci    of the specified subpass.
1837e5c31af7Sopenharmony_ci  * pname:aspectMask is a mask of which aspect(s) can: be accessed within
1838e5c31af7Sopenharmony_ci    the specified subpass.
1839e5c31af7Sopenharmony_ci
1840e5c31af7Sopenharmony_ciThis structure specifies an aspect mask for a specific input attachment of a
1841e5c31af7Sopenharmony_cispecific subpass in the render pass.
1842e5c31af7Sopenharmony_ci
1843e5c31af7Sopenharmony_cipname:subpass and pname:inputAttachmentIndex index into the render pass as:
1844e5c31af7Sopenharmony_ci
1845e5c31af7Sopenharmony_ci[source,c]
1846e5c31af7Sopenharmony_ci~~~~
1847e5c31af7Sopenharmony_cipCreateInfo->pSubpasses[subpass].pInputAttachments[inputAttachmentIndex]
1848e5c31af7Sopenharmony_ci~~~~
1849e5c31af7Sopenharmony_ci
1850e5c31af7Sopenharmony_ci.Valid Usage
1851e5c31af7Sopenharmony_ci****
1852e5c31af7Sopenharmony_ci  * [[VUID-VkInputAttachmentAspectReference-aspectMask-01964]]
1853e5c31af7Sopenharmony_ci    pname:aspectMask must: not include ename:VK_IMAGE_ASPECT_METADATA_BIT
1854e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
1855e5c31af7Sopenharmony_ci  * [[VUID-VkInputAttachmentAspectReference-aspectMask-02250]]
1856e5c31af7Sopenharmony_ci    pname:aspectMask must: not include
1857e5c31af7Sopenharmony_ci    `VK_IMAGE_ASPECT_MEMORY_PLANE__{ibit}__BIT_EXT` for any index _i_
1858e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
1859e5c31af7Sopenharmony_ci****
1860e5c31af7Sopenharmony_ci
1861e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkInputAttachmentAspectReference.txt[]
1862e5c31af7Sopenharmony_ci--
1863e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
1864e5c31af7Sopenharmony_ci
1865e5c31af7Sopenharmony_ci[open,refpage='VkSubpassDescription',desc='Structure specifying a subpass description',type='structs']
1866e5c31af7Sopenharmony_ci--
1867e5c31af7Sopenharmony_ciThe sname:VkSubpassDescription structure is defined as:
1868e5c31af7Sopenharmony_ci
1869e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkSubpassDescription.txt[]
1870e5c31af7Sopenharmony_ci
1871e5c31af7Sopenharmony_ci  * pname:flags is a bitmask of elink:VkSubpassDescriptionFlagBits
1872e5c31af7Sopenharmony_ci    specifying usage of the subpass.
1873e5c31af7Sopenharmony_ci  * pname:pipelineBindPoint is a elink:VkPipelineBindPoint value specifying
1874e5c31af7Sopenharmony_ci    the pipeline type supported for this subpass.
1875e5c31af7Sopenharmony_ci  * pname:inputAttachmentCount is the number of input attachments.
1876e5c31af7Sopenharmony_ci  * pname:pInputAttachments is a pointer to an array of
1877e5c31af7Sopenharmony_ci    slink:VkAttachmentReference structures defining the input attachments
1878e5c31af7Sopenharmony_ci    for this subpass and their layouts.
1879e5c31af7Sopenharmony_ci  * pname:colorAttachmentCount is the number of color attachments.
1880e5c31af7Sopenharmony_ci  * pname:pColorAttachments is a pointer to an array of
1881e5c31af7Sopenharmony_ci    pname:colorAttachmentCount slink:VkAttachmentReference structures
1882e5c31af7Sopenharmony_ci    defining the color attachments for this subpass and their layouts.
1883e5c31af7Sopenharmony_ci  * pname:pResolveAttachments is `NULL` or a pointer to an array of
1884e5c31af7Sopenharmony_ci    pname:colorAttachmentCount slink:VkAttachmentReference structures
1885e5c31af7Sopenharmony_ci    defining the resolve attachments for this subpass and their layouts.
1886e5c31af7Sopenharmony_ci  * pname:pDepthStencilAttachment is a pointer to a
1887e5c31af7Sopenharmony_ci    slink:VkAttachmentReference structure specifying the depth/stencil
1888e5c31af7Sopenharmony_ci    attachment for this subpass and its layout.
1889e5c31af7Sopenharmony_ci  * pname:preserveAttachmentCount is the number of preserved attachments.
1890e5c31af7Sopenharmony_ci  * pname:pPreserveAttachments is a pointer to an array of
1891e5c31af7Sopenharmony_ci    pname:preserveAttachmentCount render pass attachment indices identifying
1892e5c31af7Sopenharmony_ci    attachments that are not used by this subpass, but whose contents must:
1893e5c31af7Sopenharmony_ci    be preserved throughout the subpass.
1894e5c31af7Sopenharmony_ci
1895e5c31af7Sopenharmony_ciEach element of the pname:pInputAttachments array corresponds to an input
1896e5c31af7Sopenharmony_ciattachment index in a fragment shader, i.e. if a shader declares an image
1897e5c31af7Sopenharmony_civariable decorated with a code:InputAttachmentIndex value of *X*, then it
1898e5c31af7Sopenharmony_ciuses the attachment provided in pname:pInputAttachments[*X*].
1899e5c31af7Sopenharmony_ciInput attachments must: also be bound to the pipeline in a descriptor set.
1900e5c31af7Sopenharmony_ciIf the pname:attachment member of any element of pname:pInputAttachments is
1901e5c31af7Sopenharmony_ciename:VK_ATTACHMENT_UNUSED, the application must: not read from the
1902e5c31af7Sopenharmony_cicorresponding input attachment index.
1903e5c31af7Sopenharmony_ciFragment shaders can: use subpass input variables to access the contents of
1904e5c31af7Sopenharmony_cian input attachment at the fragment's (x, y, layer) framebuffer coordinates.
1905e5c31af7Sopenharmony_ciifdef::VK_QCOM_render_pass_transform[]
1906e5c31af7Sopenharmony_ciInput attachments must: not be used by any subpasses within a render pass
1907e5c31af7Sopenharmony_cithat enables <<vertexpostproc-renderpass-transform, render pass transform>>.
1908e5c31af7Sopenharmony_ciendif::VK_QCOM_render_pass_transform[]
1909e5c31af7Sopenharmony_ci
1910e5c31af7Sopenharmony_ciEach element of the pname:pColorAttachments array corresponds to an output
1911e5c31af7Sopenharmony_cilocation in the shader, i.e. if the shader declares an output variable
1912e5c31af7Sopenharmony_cidecorated with a code:Location value of *X*, then it uses the attachment
1913e5c31af7Sopenharmony_ciprovided in pname:pColorAttachments[*X*].
1914e5c31af7Sopenharmony_ciIf the pname:attachment member of any element of pname:pColorAttachments is
1915e5c31af7Sopenharmony_ciename:VK_ATTACHMENT_UNUSED,
1916e5c31af7Sopenharmony_ciifdef::VK_EXT_color_write_enable[]
1917e5c31af7Sopenharmony_cior if <<framebuffer-color-write-enable,Color Write Enable>> has been
1918e5c31af7Sopenharmony_cidisabled for the corresponding attachment index,
1919e5c31af7Sopenharmony_ciendif::VK_EXT_color_write_enable[]
1920e5c31af7Sopenharmony_cithen writes to the corresponding location by a fragment shader are
1921e5c31af7Sopenharmony_cidiscarded.
1922e5c31af7Sopenharmony_ci
1923e5c31af7Sopenharmony_ciIf
1924e5c31af7Sopenharmony_ciifdef::VK_QCOM_render_pass_shader_resolve[]
1925e5c31af7Sopenharmony_cipname:flags does not include
1926e5c31af7Sopenharmony_ciename:VK_SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM, and if
1927e5c31af7Sopenharmony_ciendif::VK_QCOM_render_pass_shader_resolve[]
1928e5c31af7Sopenharmony_cipname:pResolveAttachments is not `NULL`, each of its elements corresponds to
1929e5c31af7Sopenharmony_cia color attachment (the element in pname:pColorAttachments at the same
1930e5c31af7Sopenharmony_ciindex), and a multisample resolve operation is defined for each attachment.
1931e5c31af7Sopenharmony_ciAt the end of each subpass, multisample resolve operations read the
1932e5c31af7Sopenharmony_cisubpass's color attachments, and resolve the samples for each pixel within
1933e5c31af7Sopenharmony_cithe render area to the same pixel location in the corresponding resolve
1934e5c31af7Sopenharmony_ciattachments, unless the resolve attachment index is
1935e5c31af7Sopenharmony_ciename:VK_ATTACHMENT_UNUSED.
1936e5c31af7Sopenharmony_ci
1937e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_depth_stencil_resolve[]
1938e5c31af7Sopenharmony_ciSimilarly, if
1939e5c31af7Sopenharmony_ciifdef::VK_QCOM_render_pass_shader_resolve[]
1940e5c31af7Sopenharmony_cipname:flags does not include
1941e5c31af7Sopenharmony_ciename:VK_SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM, and
1942e5c31af7Sopenharmony_ciendif::VK_QCOM_render_pass_shader_resolve[]
1943e5c31af7Sopenharmony_cislink:VkSubpassDescriptionDepthStencilResolve::pname:pDepthStencilResolveAttachment
1944e5c31af7Sopenharmony_ciis not `NULL` and does not have the value ename:VK_ATTACHMENT_UNUSED, it
1945e5c31af7Sopenharmony_cicorresponds to the depth/stencil attachment in
1946e5c31af7Sopenharmony_cipname:pDepthStencilAttachment, and multisample resolve operations for depth
1947e5c31af7Sopenharmony_ciand stencil are defined by
1948e5c31af7Sopenharmony_cislink:VkSubpassDescriptionDepthStencilResolve::pname:depthResolveMode and
1949e5c31af7Sopenharmony_cislink:VkSubpassDescriptionDepthStencilResolve::pname:stencilResolveMode,
1950e5c31af7Sopenharmony_cirespectively.
1951e5c31af7Sopenharmony_ciAt the end of each subpass, multisample resolve operations read the
1952e5c31af7Sopenharmony_cisubpass's depth/stencil attachment, and resolve the samples for each pixel
1953e5c31af7Sopenharmony_cito the same pixel location in the corresponding resolve attachment.
1954e5c31af7Sopenharmony_ciIf slink:VkSubpassDescriptionDepthStencilResolve::pname:depthResolveMode is
1955e5c31af7Sopenharmony_ciename:VK_RESOLVE_MODE_NONE, then the depth component of the resolve
1956e5c31af7Sopenharmony_ciattachment is not written to and its contents are preserved.
1957e5c31af7Sopenharmony_ciSimilarly, if
1958e5c31af7Sopenharmony_cislink:VkSubpassDescriptionDepthStencilResolve::pname:stencilResolveMode is
1959e5c31af7Sopenharmony_ciename:VK_RESOLVE_MODE_NONE, then the stencil component of the resolve
1960e5c31af7Sopenharmony_ciattachment is not written to and its contents are preserved.
1961e5c31af7Sopenharmony_cislink:VkSubpassDescriptionDepthStencilResolve::pname:depthResolveMode is
1962e5c31af7Sopenharmony_ciignored if the elink:VkFormat of the pname:pDepthStencilResolveAttachment
1963e5c31af7Sopenharmony_cidoes not have a depth component.
1964e5c31af7Sopenharmony_ciSimilarly,
1965e5c31af7Sopenharmony_cislink:VkSubpassDescriptionDepthStencilResolve::pname:stencilResolveMode is
1966e5c31af7Sopenharmony_ciignored if the elink:VkFormat of the pname:pDepthStencilResolveAttachment
1967e5c31af7Sopenharmony_cidoes not have a stencil component.
1968e5c31af7Sopenharmony_ci
1969e5c31af7Sopenharmony_ciifdef::VK_EXT_sample_locations[]
1970e5c31af7Sopenharmony_ciIf the image subresource range referenced by the depth/stencil attachment is
1971e5c31af7Sopenharmony_cicreated with
1972e5c31af7Sopenharmony_ciename:VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT, then the
1973e5c31af7Sopenharmony_cimultisample resolve operation uses the sample locations state specified in
1974e5c31af7Sopenharmony_cithe pname:sampleLocationsInfo member of the element of the
1975e5c31af7Sopenharmony_cisname:VkRenderPassSampleLocationsBeginInfoEXT::pname:pPostSubpassSampleLocations
1976e5c31af7Sopenharmony_cifor the subpass.
1977e5c31af7Sopenharmony_ciendif::VK_EXT_sample_locations[]
1978e5c31af7Sopenharmony_ci
1979e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_depth_stencil_resolve[]
1980e5c31af7Sopenharmony_ci
1981e5c31af7Sopenharmony_ciIf pname:pDepthStencilAttachment is `NULL`, or if its attachment index is
1982e5c31af7Sopenharmony_ciename:VK_ATTACHMENT_UNUSED, it indicates that no depth/stencil attachment
1983e5c31af7Sopenharmony_ciwill be used in the subpass.
1984e5c31af7Sopenharmony_ci
1985e5c31af7Sopenharmony_ciThe contents of an attachment within the render area become undefined: at
1986e5c31af7Sopenharmony_cithe start of a subpass *S* if all of the following conditions are true:
1987e5c31af7Sopenharmony_ci
1988e5c31af7Sopenharmony_ci  * The attachment is used as a color, depth/stencil, or resolve attachment
1989e5c31af7Sopenharmony_ci    in any subpass in the render pass.
1990e5c31af7Sopenharmony_ci  * There is a subpass *S~1~* that uses or preserves the attachment, and a
1991e5c31af7Sopenharmony_ci    subpass dependency from *S~1~* to *S*.
1992e5c31af7Sopenharmony_ci  * The attachment is not used or preserved in subpass *S*.
1993e5c31af7Sopenharmony_ci
1994e5c31af7Sopenharmony_ciifdef::VK_QCOM_render_pass_shader_resolve[]
1995e5c31af7Sopenharmony_ciIn addition, the contents of an attachment within the render area become
1996e5c31af7Sopenharmony_ciundefined: at the start of a subpass *S* if all of the following conditions
1997e5c31af7Sopenharmony_ciare true:
1998e5c31af7Sopenharmony_ci
1999e5c31af7Sopenharmony_ci  * ename:VK_SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM is set.
2000e5c31af7Sopenharmony_ci  * The attachment is used as a color or depth/stencil in the subpass.
2001e5c31af7Sopenharmony_ciendif::VK_QCOM_render_pass_shader_resolve[]
2002e5c31af7Sopenharmony_ci
2003e5c31af7Sopenharmony_ciOnce the contents of an attachment become undefined: in subpass *S*, they
2004e5c31af7Sopenharmony_ciremain undefined: for subpasses in subpass dependency chains starting with
2005e5c31af7Sopenharmony_cisubpass *S* until they are written again.
2006e5c31af7Sopenharmony_ciHowever, they remain valid for subpasses in other subpass dependency chains
2007e5c31af7Sopenharmony_cistarting with subpass *S~1~* if those subpasses use or preserve the
2008e5c31af7Sopenharmony_ciattachment.
2009e5c31af7Sopenharmony_ci
2010e5c31af7Sopenharmony_ci.Valid Usage
2011e5c31af7Sopenharmony_ci****
2012e5c31af7Sopenharmony_ciifndef::VK_HUAWEI_subpass_shading[]
2013e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription-pipelineBindPoint-00844]]
2014e5c31af7Sopenharmony_ci    pname:pipelineBindPoint must: be ename:VK_PIPELINE_BIND_POINT_GRAPHICS
2015e5c31af7Sopenharmony_ciendif::VK_HUAWEI_subpass_shading[]
2016e5c31af7Sopenharmony_ciifdef::VK_HUAWEI_subpass_shading[]
2017e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription-pipelineBindPoint-04952]]
2018e5c31af7Sopenharmony_ci    pname:pipelineBindPoint must: be ename:VK_PIPELINE_BIND_POINT_GRAPHICS
2019e5c31af7Sopenharmony_ci    or ename:VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI
2020e5c31af7Sopenharmony_ciendif::VK_HUAWEI_subpass_shading[]
2021e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription-colorAttachmentCount-00845]]
2022e5c31af7Sopenharmony_ci    pname:colorAttachmentCount must: be less than or equal to
2023e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:maxColorAttachments
2024e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription-loadOp-00846]]
2025e5c31af7Sopenharmony_ci    If the first use of an attachment in this render pass is as an input
2026e5c31af7Sopenharmony_ci    attachment, and the attachment is not also used as a color or
2027e5c31af7Sopenharmony_ci    depth/stencil attachment in the same subpass, then pname:loadOp must:
2028e5c31af7Sopenharmony_ci    not be ename:VK_ATTACHMENT_LOAD_OP_CLEAR
2029e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription-pResolveAttachments-00847]]
2030e5c31af7Sopenharmony_ci    If pname:pResolveAttachments is not `NULL`, for each resolve attachment
2031e5c31af7Sopenharmony_ci    that is not ename:VK_ATTACHMENT_UNUSED, the corresponding color
2032e5c31af7Sopenharmony_ci    attachment must: not be ename:VK_ATTACHMENT_UNUSED
2033e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription-pResolveAttachments-00848]]
2034e5c31af7Sopenharmony_ci    If pname:pResolveAttachments is not `NULL`, for each resolve attachment
2035e5c31af7Sopenharmony_ci    that is not ename:VK_ATTACHMENT_UNUSED, the corresponding color
2036e5c31af7Sopenharmony_ci    attachment must: not have a sample count of ename:VK_SAMPLE_COUNT_1_BIT
2037e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription-pResolveAttachments-00849]]
2038e5c31af7Sopenharmony_ci    If pname:pResolveAttachments is not `NULL`, each resolve attachment that
2039e5c31af7Sopenharmony_ci    is not ename:VK_ATTACHMENT_UNUSED must: have a sample count of
2040e5c31af7Sopenharmony_ci    ename:VK_SAMPLE_COUNT_1_BIT
2041e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription-pResolveAttachments-00850]]
2042e5c31af7Sopenharmony_ci    If pname:pResolveAttachments is not `NULL`, each resolve attachment that
2043e5c31af7Sopenharmony_ci    is not ename:VK_ATTACHMENT_UNUSED must: have the same elink:VkFormat as
2044e5c31af7Sopenharmony_ci    its corresponding color attachment
2045e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription-pColorAttachments-01417]]
2046e5c31af7Sopenharmony_ci    All attachments in pname:pColorAttachments that are not
2047e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_UNUSED must: have the same sample count
2048e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription-pInputAttachments-02647]]
2049e5c31af7Sopenharmony_ci    All attachments in pname:pInputAttachments that are not
2050e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_UNUSED must: have image formats whose
2051e5c31af7Sopenharmony_ci    <<potential-format-features, potential format features>> contain at
2052e5c31af7Sopenharmony_ci    least ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT or
2053e5c31af7Sopenharmony_ci    ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT
2054e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription-pColorAttachments-02648]]
2055e5c31af7Sopenharmony_ci    All attachments in pname:pColorAttachments that are not
2056e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_UNUSED must: have image formats whose
2057e5c31af7Sopenharmony_ci    <<potential-format-features, potential format features>> contain
2058e5c31af7Sopenharmony_ci    ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT
2059e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription-pResolveAttachments-02649]]
2060e5c31af7Sopenharmony_ci    All attachments in pname:pResolveAttachments that are not
2061e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_UNUSED must: have image formats whose
2062e5c31af7Sopenharmony_ci    <<potential-format-features, potential format features>> contain
2063e5c31af7Sopenharmony_ci    ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT
2064e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription-pDepthStencilAttachment-02650]]
2065e5c31af7Sopenharmony_ci    If pname:pDepthStencilAttachment is not `NULL` and the attachment is not
2066e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_UNUSED then it must: have an image format whose
2067e5c31af7Sopenharmony_ci    <<potential-format-features, potential format features>> contain
2068e5c31af7Sopenharmony_ci    ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT
2069e5c31af7Sopenharmony_ciifdef::VK_AMD_mixed_attachment_samples[]
2070e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription-pColorAttachments-01506]]
2071e5c31af7Sopenharmony_ci    If the `apiext:VK_AMD_mixed_attachment_samples` extension is enabled,
2072e5c31af7Sopenharmony_ci    and all attachments in pname:pColorAttachments that are not
2073e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_UNUSED must: have a sample count that is smaller
2074e5c31af7Sopenharmony_ci    than or equal to the sample count of pname:pDepthStencilAttachment if it
2075e5c31af7Sopenharmony_ci    is not ename:VK_ATTACHMENT_UNUSED
2076e5c31af7Sopenharmony_ciendif::VK_AMD_mixed_attachment_samples[]
2077e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription-pDepthStencilAttachment-01418]]
2078e5c31af7Sopenharmony_ci    If neither the `apiext:VK_AMD_mixed_attachment_samples` nor the
2079e5c31af7Sopenharmony_ci    `apiext:VK_NV_framebuffer_mixed_samples` extensions are enabled, and if
2080e5c31af7Sopenharmony_ci    pname:pDepthStencilAttachment is not ename:VK_ATTACHMENT_UNUSED and any
2081e5c31af7Sopenharmony_ci    attachments in pname:pColorAttachments are not
2082e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_UNUSED, they must: have the same sample count
2083e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription-attachment-00853]]
2084e5c31af7Sopenharmony_ci    Each element of pname:pPreserveAttachments must: not be
2085e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_UNUSED
2086e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription-pPreserveAttachments-00854]]
2087e5c31af7Sopenharmony_ci    Each element of pname:pPreserveAttachments must: not also be an element
2088e5c31af7Sopenharmony_ci    of any other member of the subpass description
2089e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription-layout-02519]]
2090e5c31af7Sopenharmony_ci    If any attachment is used by more than one slink:VkAttachmentReference
2091e5c31af7Sopenharmony_ci    member, then each use must: use the same pname:layout
2092e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription-None-04437]]
2093e5c31af7Sopenharmony_ci    Each attachment must: follow the <<attachment-type-imagelayout, image
2094e5c31af7Sopenharmony_ci    layout requirements>> specified for its attachment type
2095e5c31af7Sopenharmony_ciifdef::VK_NVX_multiview_per_view_attributes[]
2096e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription-flags-00856]]
2097e5c31af7Sopenharmony_ci    If pname:flags includes
2098e5c31af7Sopenharmony_ci    ename:VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX, it must:
2099e5c31af7Sopenharmony_ci    also include ename:VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX
2100e5c31af7Sopenharmony_ciendif::VK_NVX_multiview_per_view_attributes[]
2101e5c31af7Sopenharmony_ciifdef::VK_QCOM_render_pass_shader_resolve[]
2102e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription-flags-03341]]
2103e5c31af7Sopenharmony_ci    If pname:flags includes
2104e5c31af7Sopenharmony_ci    ename:VK_SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM, and if
2105e5c31af7Sopenharmony_ci    pname:pResolveAttachments is not `NULL`, then each resolve attachment
2106e5c31af7Sopenharmony_ci    must: be ename:VK_ATTACHMENT_UNUSED
2107e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription-flags-03343]]
2108e5c31af7Sopenharmony_ci    If pname:flags includes
2109e5c31af7Sopenharmony_ci    ename:VK_SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM, then the subpass
2110e5c31af7Sopenharmony_ci    must: be the last subpass in a subpass dependency chain
2111e5c31af7Sopenharmony_ciendif::VK_QCOM_render_pass_shader_resolve[]
2112e5c31af7Sopenharmony_ciifdef::VK_QCOM_render_pass_transform[]
2113e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription-pInputAttachments-02868]]
2114e5c31af7Sopenharmony_ci    If the render pass is created with
2115e5c31af7Sopenharmony_ci    ename:VK_RENDER_PASS_CREATE_TRANSFORM_BIT_QCOM each of the elements of
2116e5c31af7Sopenharmony_ci    pname:pInputAttachments must: be ename:VK_ATTACHMENT_UNUSED
2117e5c31af7Sopenharmony_ciendif::VK_QCOM_render_pass_transform[]
2118e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription-pDepthStencilAttachment-04438]]
2119e5c31af7Sopenharmony_ci    pname:pDepthStencilAttachment and pname:pColorAttachments must not
2120e5c31af7Sopenharmony_ci    contain references to the same attachment
2121e5c31af7Sopenharmony_ci****
2122e5c31af7Sopenharmony_ci
2123e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkSubpassDescription.txt[]
2124e5c31af7Sopenharmony_ci--
2125e5c31af7Sopenharmony_ci
2126e5c31af7Sopenharmony_ci[open,refpage='VkSubpassDescriptionFlagBits',desc='Bitmask specifying usage of a subpass',type='enums']
2127e5c31af7Sopenharmony_ci--
2128e5c31af7Sopenharmony_ciBits which can: be set in slink:VkSubpassDescription::pname:flags,
2129e5c31af7Sopenharmony_cispecifying usage of the subpass, are:
2130e5c31af7Sopenharmony_ci
2131e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkSubpassDescriptionFlagBits.txt[]
2132e5c31af7Sopenharmony_ci
2133e5c31af7Sopenharmony_ciifdef::VK_NVX_multiview_per_view_attributes[]
2134e5c31af7Sopenharmony_ci  * ename:VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX specifies that
2135e5c31af7Sopenharmony_ci    shaders compiled for this subpass write the attributes for all views in
2136e5c31af7Sopenharmony_ci    a single invocation of each
2137e5c31af7Sopenharmony_ci    <<pipeline-graphics-subsets-pre-rasterization,pre-rasterization shader
2138e5c31af7Sopenharmony_ci    stage>>.
2139e5c31af7Sopenharmony_ci    All pipelines compiled against a subpass that includes this bit must:
2140e5c31af7Sopenharmony_ci    write per-view attributes to the `*PerViewNV[]` shader outputs, in
2141e5c31af7Sopenharmony_ci    addition to the non-per-view (e.g. code:Position) outputs.
2142e5c31af7Sopenharmony_ci  * ename:VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX specifies
2143e5c31af7Sopenharmony_ci    that shaders compiled for this subpass use per-view positions which only
2144e5c31af7Sopenharmony_ci    differ in value in the x component.
2145e5c31af7Sopenharmony_ci    Per-view viewport mask can: also be used.
2146e5c31af7Sopenharmony_ciendif::VK_NVX_multiview_per_view_attributes[]
2147e5c31af7Sopenharmony_ciifdef::VK_QCOM_render_pass_shader_resolve[]
2148e5c31af7Sopenharmony_ci  * ename:VK_SUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_QCOM specifies that the
2149e5c31af7Sopenharmony_ci    framebuffer region is the fragment region, that is, the minimum region
2150e5c31af7Sopenharmony_ci    dependencies are by pixel rather than by sample, such that any fragment
2151e5c31af7Sopenharmony_ci    shader invocation can: access any sample associated with that fragment
2152e5c31af7Sopenharmony_ci    shader invocation.
2153e5c31af7Sopenharmony_ci  * ename:VK_SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM specifies that the
2154e5c31af7Sopenharmony_ci    subpass performs shader resolve operations.
2155e5c31af7Sopenharmony_ciendif::VK_QCOM_render_pass_shader_resolve[]
2156e5c31af7Sopenharmony_ciifdef::VK_ARM_rasterization_order_attachment_access[]
2157e5c31af7Sopenharmony_ci  * ename:VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_ARM
2158e5c31af7Sopenharmony_ci    specifies that this subpass supports pipelines created with
2159e5c31af7Sopenharmony_ci    ename:VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_ARM.
2160e5c31af7Sopenharmony_ci  * ename:VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_ARM
2161e5c31af7Sopenharmony_ci    specifies that this subpass supports pipelines created with
2162e5c31af7Sopenharmony_ci    ename:VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_ARM.
2163e5c31af7Sopenharmony_ci  * ename:VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_ARM
2164e5c31af7Sopenharmony_ci    specifies that this subpass supports pipelines created with
2165e5c31af7Sopenharmony_ci    ename:VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_ARM.
2166e5c31af7Sopenharmony_ciendif::VK_ARM_rasterization_order_attachment_access[]
2167e5c31af7Sopenharmony_ci
2168e5c31af7Sopenharmony_ciifndef::VK_NVX_multiview_per_view_attributes,VK_QCOM_render_pass_shader_resolve[]
2169e5c31af7Sopenharmony_ci[NOTE]
2170e5c31af7Sopenharmony_ci.Note
2171e5c31af7Sopenharmony_ci====
2172e5c31af7Sopenharmony_ciAll bits for this type are defined by extensions, and none of those
2173e5c31af7Sopenharmony_ciextensions are enabled in this build of the specification.
2174e5c31af7Sopenharmony_ci====
2175e5c31af7Sopenharmony_ciendif::VK_NVX_multiview_per_view_attributes,VK_QCOM_render_pass_shader_resolve[]
2176e5c31af7Sopenharmony_ciifdef::VK_QCOM_render_pass_shader_resolve[]
2177e5c31af7Sopenharmony_ci[NOTE]
2178e5c31af7Sopenharmony_ci.Note
2179e5c31af7Sopenharmony_ci====
2180e5c31af7Sopenharmony_ciShader resolve operations allow for custom resolve operations, but
2181e5c31af7Sopenharmony_cioverdrawing pixels may: have a performance and/or power cost.
2182e5c31af7Sopenharmony_ciFurthermore, since the content of any depth stencil attachment or color
2183e5c31af7Sopenharmony_ciattachment is undefined: at the begining of a shader resolve subpass, any
2184e5c31af7Sopenharmony_cidepth testing, stencil testing, or blending operation which sources these
2185e5c31af7Sopenharmony_ciundefined: values also has undefined: result value.
2186e5c31af7Sopenharmony_ci====
2187e5c31af7Sopenharmony_ciendif::VK_QCOM_render_pass_shader_resolve[]
2188e5c31af7Sopenharmony_ci--
2189e5c31af7Sopenharmony_ci
2190e5c31af7Sopenharmony_ci[open,refpage='VkSubpassDescriptionFlags',desc='Bitmask of VkSubpassDescriptionFlagBits',type='flags']
2191e5c31af7Sopenharmony_ci--
2192e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkSubpassDescriptionFlags.txt[]
2193e5c31af7Sopenharmony_ci
2194e5c31af7Sopenharmony_citname:VkSubpassDescriptionFlags is a bitmask type for setting a mask of zero
2195e5c31af7Sopenharmony_cior more elink:VkSubpassDescriptionFlagBits.
2196e5c31af7Sopenharmony_ci--
2197e5c31af7Sopenharmony_ci
2198e5c31af7Sopenharmony_ci[open,refpage='VkAttachmentReference',desc='Structure specifying an attachment reference',type='structs']
2199e5c31af7Sopenharmony_ci--
2200e5c31af7Sopenharmony_ciThe sname:VkAttachmentReference structure is defined as:
2201e5c31af7Sopenharmony_ci
2202e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkAttachmentReference.txt[]
2203e5c31af7Sopenharmony_ci
2204e5c31af7Sopenharmony_ci  * pname:attachment is either an integer value identifying an attachment at
2205e5c31af7Sopenharmony_ci    the corresponding index in
2206e5c31af7Sopenharmony_ci    slink:VkRenderPassCreateInfo::pname:pAttachments, or
2207e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_UNUSED to signify that this attachment is not used.
2208e5c31af7Sopenharmony_ci  * pname:layout is a elink:VkImageLayout value specifying the layout the
2209e5c31af7Sopenharmony_ci    attachment uses during the subpass.
2210e5c31af7Sopenharmony_ci
2211e5c31af7Sopenharmony_ci.Valid Usage
2212e5c31af7Sopenharmony_ci****
2213e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentReference-layout-00857]]
2214e5c31af7Sopenharmony_ci    If pname:attachment is not ename:VK_ATTACHMENT_UNUSED, pname:layout
2215e5c31af7Sopenharmony_ci    must: not be ename:VK_IMAGE_LAYOUT_UNDEFINED,
2216e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_PREINITIALIZED,
2217e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_PRESENT_SRC_KHR,
2218e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,
2219e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,
2220e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or
2221e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
2222e5c31af7Sopenharmony_ci****
2223e5c31af7Sopenharmony_ci
2224e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkAttachmentReference.txt[]
2225e5c31af7Sopenharmony_ci--
2226e5c31af7Sopenharmony_ci
2227e5c31af7Sopenharmony_ci[open,refpage='VK_SUBPASS_EXTERNAL',desc='Subpass index sentinel expanding synchronization scope outside a subpass',type='consts']
2228e5c31af7Sopenharmony_ci--
2229e5c31af7Sopenharmony_ciename:VK_SUBPASS_EXTERNAL is a special subpass index value expanding
2230e5c31af7Sopenharmony_cisynchronization scope outside a subpass.
2231e5c31af7Sopenharmony_ciIt is described in more detail by slink:VkSubpassDependency.
2232e5c31af7Sopenharmony_ci
2233e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VK_SUBPASS_EXTERNAL.txt[]
2234e5c31af7Sopenharmony_ci--
2235e5c31af7Sopenharmony_ci
2236e5c31af7Sopenharmony_ci[open,refpage='VkSubpassDependency',desc='Structure specifying a subpass dependency',type='structs']
2237e5c31af7Sopenharmony_ci--
2238e5c31af7Sopenharmony_ci:refpage: VkSubpassDependency
2239e5c31af7Sopenharmony_ciThe sname:VkSubpassDependency structure is defined as:
2240e5c31af7Sopenharmony_ci
2241e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkSubpassDependency.txt[]
2242e5c31af7Sopenharmony_ci
2243e5c31af7Sopenharmony_ci  * pname:srcSubpass is the subpass index of the first subpass in the
2244e5c31af7Sopenharmony_ci    dependency, or ename:VK_SUBPASS_EXTERNAL.
2245e5c31af7Sopenharmony_ci  * pname:dstSubpass is the subpass index of the second subpass in the
2246e5c31af7Sopenharmony_ci    dependency, or ename:VK_SUBPASS_EXTERNAL.
2247e5c31af7Sopenharmony_ci  * pname:srcStageMask is a bitmask of elink:VkPipelineStageFlagBits
2248e5c31af7Sopenharmony_ci    specifying the <<synchronization-pipeline-stages-masks, source stage
2249e5c31af7Sopenharmony_ci    mask>>.
2250e5c31af7Sopenharmony_ci  * pname:dstStageMask is a bitmask of elink:VkPipelineStageFlagBits
2251e5c31af7Sopenharmony_ci    specifying the <<synchronization-pipeline-stages-masks, destination
2252e5c31af7Sopenharmony_ci    stage mask>>
2253e5c31af7Sopenharmony_ci  * pname:srcAccessMask is a bitmask of elink:VkAccessFlagBits specifying a
2254e5c31af7Sopenharmony_ci    <<synchronization-access-masks, source access mask>>.
2255e5c31af7Sopenharmony_ci  * pname:dstAccessMask is a bitmask of elink:VkAccessFlagBits specifying a
2256e5c31af7Sopenharmony_ci    <<synchronization-access-masks, destination access mask>>.
2257e5c31af7Sopenharmony_ci  * pname:dependencyFlags is a bitmask of elink:VkDependencyFlagBits.
2258e5c31af7Sopenharmony_ci
2259e5c31af7Sopenharmony_ciIf pname:srcSubpass is equal to pname:dstSubpass then the
2260e5c31af7Sopenharmony_cislink:VkSubpassDependency describes a
2261e5c31af7Sopenharmony_ci<<synchronization-pipeline-barriers-subpass-self-dependencies, subpass
2262e5c31af7Sopenharmony_ciself-dependency>>, and only constrains the pipeline barriers allowed within
2263e5c31af7Sopenharmony_cia subpass instance.
2264e5c31af7Sopenharmony_ciOtherwise, when a render pass instance which includes a subpass dependency
2265e5c31af7Sopenharmony_ciis submitted to a queue, it defines a memory dependency between the
2266e5c31af7Sopenharmony_cisubpasses identified by pname:srcSubpass and pname:dstSubpass.
2267e5c31af7Sopenharmony_ci
2268e5c31af7Sopenharmony_ciIf pname:srcSubpass is equal to ename:VK_SUBPASS_EXTERNAL, the first
2269e5c31af7Sopenharmony_ci<<synchronization-dependencies-scopes, synchronization scope>> includes
2270e5c31af7Sopenharmony_cicommands that occur earlier in <<synchronization-submission-order,submission
2271e5c31af7Sopenharmony_ciorder>> than the flink:vkCmdBeginRenderPass used to begin the render pass
2272e5c31af7Sopenharmony_ciinstance.
2273e5c31af7Sopenharmony_ciOtherwise, the first set of commands includes all commands submitted as part
2274e5c31af7Sopenharmony_ciof the subpass instance identified by pname:srcSubpass and any load, store
2275e5c31af7Sopenharmony_cior multisample resolve operations on attachments used in pname:srcSubpass.
2276e5c31af7Sopenharmony_ciIn either case, the first synchronization scope is limited to operations on
2277e5c31af7Sopenharmony_cithe pipeline stages determined by the
2278e5c31af7Sopenharmony_ci<<synchronization-pipeline-stages-masks, source stage mask>> specified by
2279e5c31af7Sopenharmony_cipname:srcStageMask.
2280e5c31af7Sopenharmony_ci
2281e5c31af7Sopenharmony_ciIf pname:dstSubpass is equal to ename:VK_SUBPASS_EXTERNAL, the second
2282e5c31af7Sopenharmony_ci<<synchronization-dependencies-scopes, synchronization scope>> includes
2283e5c31af7Sopenharmony_cicommands that occur later in <<synchronization-submission-order,submission
2284e5c31af7Sopenharmony_ciorder>> than the flink:vkCmdEndRenderPass used to end the render pass
2285e5c31af7Sopenharmony_ciinstance.
2286e5c31af7Sopenharmony_ciOtherwise, the second set of commands includes all commands submitted as
2287e5c31af7Sopenharmony_cipart of the subpass instance identified by pname:dstSubpass and any load,
2288e5c31af7Sopenharmony_cistore or multisample resolve operations on attachments used in
2289e5c31af7Sopenharmony_cipname:dstSubpass.
2290e5c31af7Sopenharmony_ciIn either case, the second synchronization scope is limited to operations on
2291e5c31af7Sopenharmony_cithe pipeline stages determined by the
2292e5c31af7Sopenharmony_ci<<synchronization-pipeline-stages-masks, destination stage mask>> specified
2293e5c31af7Sopenharmony_ciby pname:dstStageMask.
2294e5c31af7Sopenharmony_ci
2295e5c31af7Sopenharmony_ciThe first <<synchronization-dependencies-access-scopes, access scope>> is
2296e5c31af7Sopenharmony_cilimited to accesses in the pipeline stages determined by the
2297e5c31af7Sopenharmony_ci<<synchronization-pipeline-stages-masks, source stage mask>> specified by
2298e5c31af7Sopenharmony_cipname:srcStageMask.
2299e5c31af7Sopenharmony_ciIt is also limited to access types in the <<synchronization-access-masks,
2300e5c31af7Sopenharmony_cisource access mask>> specified by pname:srcAccessMask.
2301e5c31af7Sopenharmony_ci
2302e5c31af7Sopenharmony_ciThe second <<synchronization-dependencies-access-scopes, access scope>> is
2303e5c31af7Sopenharmony_cilimited to accesses in the pipeline stages determined by the
2304e5c31af7Sopenharmony_ci<<synchronization-pipeline-stages-masks, destination stage mask>> specified
2305e5c31af7Sopenharmony_ciby pname:dstStageMask.
2306e5c31af7Sopenharmony_ciIt is also limited to access types in the <<synchronization-access-masks,
2307e5c31af7Sopenharmony_cidestination access mask>> specified by pname:dstAccessMask.
2308e5c31af7Sopenharmony_ci
2309e5c31af7Sopenharmony_ciThe <<synchronization-dependencies-available-and-visible, availability and
2310e5c31af7Sopenharmony_civisibility operations>> defined by a subpass dependency affect the execution
2311e5c31af7Sopenharmony_ciof <<renderpass-layout-transitions, image layout transitions>> within the
2312e5c31af7Sopenharmony_cirender pass.
2313e5c31af7Sopenharmony_ci
2314e5c31af7Sopenharmony_ci[NOTE]
2315e5c31af7Sopenharmony_ci.Note
2316e5c31af7Sopenharmony_ci====
2317e5c31af7Sopenharmony_ciFor non-attachment resources, the memory dependency expressed by subpass
2318e5c31af7Sopenharmony_cidependency is nearly identical to that of a slink:VkMemoryBarrier (with
2319e5c31af7Sopenharmony_cimatching pname:srcAccessMask and pname:dstAccessMask parameters) submitted
2320e5c31af7Sopenharmony_cias a part of a flink:vkCmdPipelineBarrier (with matching pname:srcStageMask
2321e5c31af7Sopenharmony_ciand pname:dstStageMask parameters).
2322e5c31af7Sopenharmony_ciThe only difference being that its scopes are limited to the identified
2323e5c31af7Sopenharmony_cisubpasses rather than potentially affecting everything before and after.
2324e5c31af7Sopenharmony_ci
2325e5c31af7Sopenharmony_ciFor attachments however, subpass dependencies work more like a
2326e5c31af7Sopenharmony_cislink:VkImageMemoryBarrier defined similarly to the slink:VkMemoryBarrier
2327e5c31af7Sopenharmony_ciabove, the queue family indices set to ename:VK_QUEUE_FAMILY_IGNORED, and
2328e5c31af7Sopenharmony_cilayouts as follows:
2329e5c31af7Sopenharmony_ci
2330e5c31af7Sopenharmony_ci  * The equivalent to pname:oldLayout is the attachment's layout according
2331e5c31af7Sopenharmony_ci    to the subpass description for pname:srcSubpass.
2332e5c31af7Sopenharmony_ci  * The equivalent to pname:newLayout is the attachment's layout according
2333e5c31af7Sopenharmony_ci    to the subpass description for pname:dstSubpass.
2334e5c31af7Sopenharmony_ci====
2335e5c31af7Sopenharmony_ci
2336e5c31af7Sopenharmony_ci.Valid Usage
2337e5c31af7Sopenharmony_ci****
2338e5c31af7Sopenharmony_ci:stageMaskName: srcStageMask
2339e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/stage_mask_common.txt[]
2340e5c31af7Sopenharmony_ci
2341e5c31af7Sopenharmony_ci:stageMaskName: dstStageMask
2342e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/stage_mask_common.txt[]
2343e5c31af7Sopenharmony_ci
2344e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDependency-srcSubpass-00864]]
2345e5c31af7Sopenharmony_ci    pname:srcSubpass must: be less than or equal to pname:dstSubpass, unless
2346e5c31af7Sopenharmony_ci    one of them is ename:VK_SUBPASS_EXTERNAL, to avoid cyclic dependencies
2347e5c31af7Sopenharmony_ci    and ensure a valid execution order
2348e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDependency-srcSubpass-00865]]
2349e5c31af7Sopenharmony_ci    pname:srcSubpass and pname:dstSubpass must: not both be equal to
2350e5c31af7Sopenharmony_ci    ename:VK_SUBPASS_EXTERNAL
2351e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDependency-srcSubpass-00867]]
2352e5c31af7Sopenharmony_ci    If pname:srcSubpass is equal to pname:dstSubpass and not all of the
2353e5c31af7Sopenharmony_ci    stages in pname:srcStageMask and pname:dstStageMask are
2354e5c31af7Sopenharmony_ci    <<synchronization-framebuffer-regions,framebuffer-space stages>>, the
2355e5c31af7Sopenharmony_ci    <<synchronization-pipeline-stages-order, logically latest>> pipeline
2356e5c31af7Sopenharmony_ci    stage in pname:srcStageMask must: be
2357e5c31af7Sopenharmony_ci    <<synchronization-pipeline-stages-order, logically earlier>> than or
2358e5c31af7Sopenharmony_ci    equal to the <<synchronization-pipeline-stages-order, logically
2359e5c31af7Sopenharmony_ci    earliest>> pipeline stage in pname:dstStageMask
2360e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDependency-srcAccessMask-00868]]
2361e5c31af7Sopenharmony_ci    Any access flag included in pname:srcAccessMask must: be supported by
2362e5c31af7Sopenharmony_ci    one of the pipeline stages in pname:srcStageMask, as specified in the
2363e5c31af7Sopenharmony_ci    <<synchronization-access-types-supported, table of supported access
2364e5c31af7Sopenharmony_ci    types>>
2365e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDependency-dstAccessMask-00869]]
2366e5c31af7Sopenharmony_ci    Any access flag included in pname:dstAccessMask must: be supported by
2367e5c31af7Sopenharmony_ci    one of the pipeline stages in pname:dstStageMask, as specified in the
2368e5c31af7Sopenharmony_ci    <<synchronization-access-types-supported, table of supported access
2369e5c31af7Sopenharmony_ci    types>>
2370e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDependency-srcSubpass-02243]]
2371e5c31af7Sopenharmony_ci    If pname:srcSubpass equals pname:dstSubpass, and pname:srcStageMask and
2372e5c31af7Sopenharmony_ci    pname:dstStageMask both include a
2373e5c31af7Sopenharmony_ci    <<synchronization-framebuffer-regions,framebuffer-space stage>>, then
2374e5c31af7Sopenharmony_ci    pname:dependencyFlags must: include ename:VK_DEPENDENCY_BY_REGION_BIT
2375e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_multiview[]
2376e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDependency-dependencyFlags-02520]]
2377e5c31af7Sopenharmony_ci    If pname:dependencyFlags includes ename:VK_DEPENDENCY_VIEW_LOCAL_BIT,
2378e5c31af7Sopenharmony_ci    pname:srcSubpass must: not be equal to ename:VK_SUBPASS_EXTERNAL
2379e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDependency-dependencyFlags-02521]]
2380e5c31af7Sopenharmony_ci    If pname:dependencyFlags includes ename:VK_DEPENDENCY_VIEW_LOCAL_BIT,
2381e5c31af7Sopenharmony_ci    pname:dstSubpass must: not be equal to ename:VK_SUBPASS_EXTERNAL
2382e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDependency-srcSubpass-00872]]
2383e5c31af7Sopenharmony_ci    If pname:srcSubpass equals pname:dstSubpass and that subpass has more
2384e5c31af7Sopenharmony_ci    than one bit set in the view mask, then pname:dependencyFlags must:
2385e5c31af7Sopenharmony_ci    include ename:VK_DEPENDENCY_VIEW_LOCAL_BIT
2386e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_multiview[]
2387e5c31af7Sopenharmony_ci****
2388e5c31af7Sopenharmony_ci
2389e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkSubpassDependency.txt[]
2390e5c31af7Sopenharmony_ci--
2391e5c31af7Sopenharmony_ci
2392e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_multiview[]
2393e5c31af7Sopenharmony_ci
2394e5c31af7Sopenharmony_ciWhen multiview is enabled, the execution of the multiple views of one
2395e5c31af7Sopenharmony_cisubpass may: not occur simultaneously or even back-to-back, and rather may:
2396e5c31af7Sopenharmony_cibe interleaved with the execution of other subpasses.
2397e5c31af7Sopenharmony_ciThe load and store operations apply to attachments on a per-view basis.
2398e5c31af7Sopenharmony_ciFor example, an attachment using ename:VK_ATTACHMENT_LOAD_OP_CLEAR will have
2399e5c31af7Sopenharmony_cieach view cleared on first use, but the first use of one view may be
2400e5c31af7Sopenharmony_citemporally distant from the first use of another view.
2401e5c31af7Sopenharmony_ci
2402e5c31af7Sopenharmony_ci[NOTE]
2403e5c31af7Sopenharmony_ci.Note
2404e5c31af7Sopenharmony_ci====
2405e5c31af7Sopenharmony_ciA good mental model for multiview is to think of a multiview subpass as if
2406e5c31af7Sopenharmony_ciit were a collection of individual (per-view) subpasses that are logically
2407e5c31af7Sopenharmony_cigrouped together and described as a single multiview subpass in the API.
2408e5c31af7Sopenharmony_ciSimilarly, a multiview attachment can be thought of like several individual
2409e5c31af7Sopenharmony_ciattachments that happen to be layers in a single image.
2410e5c31af7Sopenharmony_ciA view-local dependency between two multiview subpasses acts like a set of
2411e5c31af7Sopenharmony_cione-to-one dependencies between corresponding pairs of per-view subpasses.
2412e5c31af7Sopenharmony_ciA view-global dependency between two multiview subpasses acts like a set of
2413e5c31af7Sopenharmony_ci[eq]#N {times} M# dependencies between all pairs of per-view subpasses in
2414e5c31af7Sopenharmony_cithe source and destination.
2415e5c31af7Sopenharmony_ciThus, it is a more compact representation which also makes clear the
2416e5c31af7Sopenharmony_cicommonality and reuse that is present between views in a subpass.
2417e5c31af7Sopenharmony_ciThis interpretation motivates the answers to questions like "`when does the
2418e5c31af7Sopenharmony_ciload op apply`" - it is on the first use of each view of an attachment, as
2419e5c31af7Sopenharmony_ciif each view was a separate attachment.
2420e5c31af7Sopenharmony_ci====
2421e5c31af7Sopenharmony_ci
2422e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_multiview[]
2423e5c31af7Sopenharmony_ci
2424e5c31af7Sopenharmony_ciifdef::VK_EXT_transform_feedback[]
2425e5c31af7Sopenharmony_ciIf any two subpasses of a render pass activate transform feedback to the
2426e5c31af7Sopenharmony_cisame bound transform feedback buffers, a subpass dependency must: be
2427e5c31af7Sopenharmony_ciincluded (either directly or via some intermediate subpasses) between them.
2428e5c31af7Sopenharmony_ciendif::VK_EXT_transform_feedback[]
2429e5c31af7Sopenharmony_ci
2430e5c31af7Sopenharmony_ciifdef::editing-notes[]
2431e5c31af7Sopenharmony_ci[NOTE]
2432e5c31af7Sopenharmony_ci.editing-note
2433e5c31af7Sopenharmony_ci====
2434e5c31af7Sopenharmony_ciThe following two alleged implicit dependencies are practically no-ops, as
2435e5c31af7Sopenharmony_cithe operations they describe are already guaranteed by semaphores and
2436e5c31af7Sopenharmony_cisubmission order (so they are almost entirely no-ops on their own).
2437e5c31af7Sopenharmony_ciThe *only* reason they exist is because it simplifies reasoning about where
2438e5c31af7Sopenharmony_ci<<renderpass-layout-transitions, automatic layout transitions>> happen.
2439e5c31af7Sopenharmony_ciFurther rewrites of this chapter could potentially remove the need for
2440e5c31af7Sopenharmony_cithese.
2441e5c31af7Sopenharmony_ci====
2442e5c31af7Sopenharmony_ciendif::editing-notes[]
2443e5c31af7Sopenharmony_ci
2444e5c31af7Sopenharmony_ci[[renderpass-implicit-dependencies]]
2445e5c31af7Sopenharmony_ciIf there is no subpass dependency from ename:VK_SUBPASS_EXTERNAL to the
2446e5c31af7Sopenharmony_cifirst subpass that uses an attachment, then an implicit subpass dependency
2447e5c31af7Sopenharmony_ciexists from ename:VK_SUBPASS_EXTERNAL to the first subpass it is used in.
2448e5c31af7Sopenharmony_ciThe implicit subpass dependency only exists if there exists an automatic
2449e5c31af7Sopenharmony_cilayout transition away from pname:initialLayout.
2450e5c31af7Sopenharmony_ciThe subpass dependency operates as if defined with the following parameters:
2451e5c31af7Sopenharmony_ci
2452e5c31af7Sopenharmony_ci[source,c]
2453e5c31af7Sopenharmony_ci~~~~
2454e5c31af7Sopenharmony_ciVkSubpassDependency implicitDependency = {
2455e5c31af7Sopenharmony_ci    .srcSubpass = VK_SUBPASS_EXTERNAL;
2456e5c31af7Sopenharmony_ci    .dstSubpass = firstSubpass; // First subpass attachment is used in
2457e5c31af7Sopenharmony_ciifdef::VK_KHR_synchronization2[]
2458e5c31af7Sopenharmony_ci    .srcStageMask = VK_PIPELINE_STAGE_NONE_KHR;
2459e5c31af7Sopenharmony_ciendif::VK_KHR_synchronization2[]
2460e5c31af7Sopenharmony_ciifndef::VK_KHR_synchronization2[]
2461e5c31af7Sopenharmony_ci    .srcStageMask = VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT;
2462e5c31af7Sopenharmony_ciendif::VK_KHR_synchronization2[]
2463e5c31af7Sopenharmony_ci    .dstStageMask = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT;
2464e5c31af7Sopenharmony_ci    .srcAccessMask = 0;
2465e5c31af7Sopenharmony_ci    .dstAccessMask = VK_ACCESS_INPUT_ATTACHMENT_READ_BIT |
2466e5c31af7Sopenharmony_ci                     VK_ACCESS_COLOR_ATTACHMENT_READ_BIT |
2467e5c31af7Sopenharmony_ci                     VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT |
2468e5c31af7Sopenharmony_ci                     VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT |
2469e5c31af7Sopenharmony_ci                     VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT;
2470e5c31af7Sopenharmony_ci    .dependencyFlags = 0;
2471e5c31af7Sopenharmony_ci};
2472e5c31af7Sopenharmony_ci~~~~
2473e5c31af7Sopenharmony_ci
2474e5c31af7Sopenharmony_ciSimilarly, if there is no subpass dependency from the last subpass that uses
2475e5c31af7Sopenharmony_cian attachment to ename:VK_SUBPASS_EXTERNAL, then an implicit subpass
2476e5c31af7Sopenharmony_cidependency exists from the last subpass it is used in to
2477e5c31af7Sopenharmony_ciename:VK_SUBPASS_EXTERNAL.
2478e5c31af7Sopenharmony_ciThe implicit subpass dependency only exists if there exists an automatic
2479e5c31af7Sopenharmony_cilayout transition into pname:finalLayout.
2480e5c31af7Sopenharmony_ciThe subpass dependency operates as if defined with the following parameters:
2481e5c31af7Sopenharmony_ci
2482e5c31af7Sopenharmony_ci[source,c]
2483e5c31af7Sopenharmony_ci~~~~
2484e5c31af7Sopenharmony_ciVkSubpassDependency implicitDependency = {
2485e5c31af7Sopenharmony_ci    .srcSubpass = lastSubpass; // Last subpass attachment is used in
2486e5c31af7Sopenharmony_ci    .dstSubpass = VK_SUBPASS_EXTERNAL;
2487e5c31af7Sopenharmony_ci    .srcStageMask = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT;
2488e5c31af7Sopenharmony_ciifdef::VK_KHR_synchronization2[]
2489e5c31af7Sopenharmony_ci    .dstStageMask = VK_PIPELINE_STAGE_NONE_KHR;
2490e5c31af7Sopenharmony_ciendif::VK_KHR_synchronization2[]
2491e5c31af7Sopenharmony_ciifndef::VK_KHR_synchronization2[]
2492e5c31af7Sopenharmony_ci    .dstStageMask = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT;
2493e5c31af7Sopenharmony_ciendif::VK_KHR_synchronization2[]
2494e5c31af7Sopenharmony_ci    .srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT |
2495e5c31af7Sopenharmony_ci                     VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT;
2496e5c31af7Sopenharmony_ci    .dstAccessMask = 0;
2497e5c31af7Sopenharmony_ci    .dependencyFlags = 0;
2498e5c31af7Sopenharmony_ci};
2499e5c31af7Sopenharmony_ci~~~~
2500e5c31af7Sopenharmony_ci
2501e5c31af7Sopenharmony_ci[[renderpass-layout-transitions]]
2502e5c31af7Sopenharmony_ciAs subpasses may: overlap or execute out of order with regards to other
2503e5c31af7Sopenharmony_cisubpasses unless a subpass dependency chain describes otherwise, the layout
2504e5c31af7Sopenharmony_citransitions required between subpasses cannot: be known to an application.
2505e5c31af7Sopenharmony_ciInstead, an application provides the layout that each attachment must: be in
2506e5c31af7Sopenharmony_ciat the start and end of a render pass, and the layout it must: be in during
2507e5c31af7Sopenharmony_cieach subpass it is used in.
2508e5c31af7Sopenharmony_ciThe implementation then must: execute layout transitions between subpasses
2509e5c31af7Sopenharmony_ciin order to guarantee that the images are in the layouts required by each
2510e5c31af7Sopenharmony_cisubpass, and in the final layout at the end of the render pass.
2511e5c31af7Sopenharmony_ci
2512e5c31af7Sopenharmony_ciAutomatic layout transitions apply to the entire image subresource attached
2513e5c31af7Sopenharmony_cito the framebuffer.
2514e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance1[]
2515e5c31af7Sopenharmony_ciIf the attachment view is a 2D or 2D array view of a 3D image, even if the
2516e5c31af7Sopenharmony_ciattachment view only refers to a subset of the slices of the selected mip
2517e5c31af7Sopenharmony_cilevel of the 3D image, automatic layout transitions apply to the entire
2518e5c31af7Sopenharmony_cisubresource referenced which is the entire mip level in this case.
2519e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance1[]
2520e5c31af7Sopenharmony_ci
2521e5c31af7Sopenharmony_ciAutomatic layout transitions away from the layout used in a subpass
2522e5c31af7Sopenharmony_cihappen-after the availability operations for all dependencies with that
2523e5c31af7Sopenharmony_cisubpass as the pname:srcSubpass.
2524e5c31af7Sopenharmony_ci
2525e5c31af7Sopenharmony_ciAutomatic layout transitions into the layout used in a subpass happen-before
2526e5c31af7Sopenharmony_cithe visibility operations for all dependencies with that subpass as the
2527e5c31af7Sopenharmony_cipname:dstSubpass.
2528e5c31af7Sopenharmony_ci
2529e5c31af7Sopenharmony_ciAutomatic layout transitions away from pname:initialLayout happen-after the
2530e5c31af7Sopenharmony_ciavailability operations for all dependencies with a pname:srcSubpass equal
2531e5c31af7Sopenharmony_cito ename:VK_SUBPASS_EXTERNAL, where pname:dstSubpass uses the attachment
2532e5c31af7Sopenharmony_cithat will be transitioned.
2533e5c31af7Sopenharmony_ciFor attachments created with ename:VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT,
2534e5c31af7Sopenharmony_ciautomatic layout transitions away from pname:initialLayout happen-after the
2535e5c31af7Sopenharmony_ciavailability operations for all dependencies with a pname:srcSubpass equal
2536e5c31af7Sopenharmony_cito ename:VK_SUBPASS_EXTERNAL, where pname:dstSubpass uses any aliased
2537e5c31af7Sopenharmony_ciattachment.
2538e5c31af7Sopenharmony_ci
2539e5c31af7Sopenharmony_ciAutomatic layout transitions into pname:finalLayout happen-before the
2540e5c31af7Sopenharmony_civisibility operations for all dependencies with a pname:dstSubpass equal to
2541e5c31af7Sopenharmony_ciename:VK_SUBPASS_EXTERNAL, where pname:srcSubpass uses the attachment that
2542e5c31af7Sopenharmony_ciwill be transitioned.
2543e5c31af7Sopenharmony_ciFor attachments created with ename:VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT,
2544e5c31af7Sopenharmony_ciautomatic layout transitions into pname:finalLayout happen-before the
2545e5c31af7Sopenharmony_civisibility operations for all dependencies with a pname:dstSubpass equal to
2546e5c31af7Sopenharmony_ciename:VK_SUBPASS_EXTERNAL, where pname:srcSubpass uses any aliased
2547e5c31af7Sopenharmony_ciattachment.
2548e5c31af7Sopenharmony_ci
2549e5c31af7Sopenharmony_ciifdef::VK_EXT_sample_locations[]
2550e5c31af7Sopenharmony_ci
2551e5c31af7Sopenharmony_ciThe image layout of the depth aspect of a depth/stencil attachment referring
2552e5c31af7Sopenharmony_cito an image created with
2553e5c31af7Sopenharmony_ciename:VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT is dependent
2554e5c31af7Sopenharmony_cion the last sample locations used to render to the attachment, thus
2555e5c31af7Sopenharmony_ciautomatic layout transitions use the sample locations state specified in
2556e5c31af7Sopenharmony_cislink:VkRenderPassSampleLocationsBeginInfoEXT.
2557e5c31af7Sopenharmony_ci
2558e5c31af7Sopenharmony_ciAutomatic layout transitions of an attachment referring to a depth/stencil
2559e5c31af7Sopenharmony_ciimage created with
2560e5c31af7Sopenharmony_ciename:VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT use the
2561e5c31af7Sopenharmony_cisample locations the image subresource range referenced by the attachment
2562e5c31af7Sopenharmony_ciwas last rendered with.
2563e5c31af7Sopenharmony_ciIf the current render pass does not use the attachment as a depth/stencil
2564e5c31af7Sopenharmony_ciattachment in any subpass that happens-before, the automatic layout
2565e5c31af7Sopenharmony_citransition uses the sample locations state specified in the
2566e5c31af7Sopenharmony_cipname:sampleLocationsInfo member of the element of the
2567e5c31af7Sopenharmony_cisname:VkRenderPassSampleLocationsBeginInfoEXT::pname:pAttachmentInitialSampleLocations
2568e5c31af7Sopenharmony_ciarray for which the pname:attachmentIndex member equals the attachment index
2569e5c31af7Sopenharmony_ciof the attachment, if one is specified.
2570e5c31af7Sopenharmony_ciOtherwise, the automatic layout transition uses the sample locations state
2571e5c31af7Sopenharmony_cispecified in the pname:sampleLocationsInfo member of the element of the
2572e5c31af7Sopenharmony_cisname:VkRenderPassSampleLocationsBeginInfoEXT::pname:pPostSubpassSampleLocations
2573e5c31af7Sopenharmony_ciarray for which the pname:subpassIndex member equals the index of the
2574e5c31af7Sopenharmony_cisubpass that last used the attachment as a depth/stencil attachment, if one
2575e5c31af7Sopenharmony_ciis specified.
2576e5c31af7Sopenharmony_ci
2577e5c31af7Sopenharmony_ciIf no sample locations state has been specified for an automatic layout
2578e5c31af7Sopenharmony_citransition performed on an attachment referring to a depth/stencil image
2579e5c31af7Sopenharmony_cicreated with ename:VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT
2580e5c31af7Sopenharmony_cithe contents of the depth aspect of the depth/stencil attachment become
2581e5c31af7Sopenharmony_ciundefined: as if the layout of the attachment was transitioned from the
2582e5c31af7Sopenharmony_ciename:VK_IMAGE_LAYOUT_UNDEFINED layout.
2583e5c31af7Sopenharmony_ci
2584e5c31af7Sopenharmony_ciendif::VK_EXT_sample_locations[]
2585e5c31af7Sopenharmony_ci
2586e5c31af7Sopenharmony_ciIf two subpasses use the same attachment, and both subpasses use the
2587e5c31af7Sopenharmony_ciattachment in a read-only layout, no subpass dependency needs to be
2588e5c31af7Sopenharmony_cispecified between those subpasses.
2589e5c31af7Sopenharmony_ciIf an implementation treats those layouts separately, it must: insert an
2590e5c31af7Sopenharmony_ciimplicit subpass dependency between those subpasses to separate the uses in
2591e5c31af7Sopenharmony_cieach layout.
2592e5c31af7Sopenharmony_ciThe subpass dependency operates as if defined with the following parameters:
2593e5c31af7Sopenharmony_ci
2594e5c31af7Sopenharmony_ci[source,c]
2595e5c31af7Sopenharmony_ci~~~~
2596e5c31af7Sopenharmony_ci// Used for input attachments
2597e5c31af7Sopenharmony_ciVkPipelineStageFlags inputAttachmentStages = VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT;
2598e5c31af7Sopenharmony_ciVkAccessFlags inputAttachmentDstAccess = VK_ACCESS_INPUT_ATTACHMENT_READ_BIT;
2599e5c31af7Sopenharmony_ci
2600e5c31af7Sopenharmony_ci// Used for depth/stencil attachments
2601e5c31af7Sopenharmony_ciVkPipelineStageFlags depthStencilAttachmentStages = VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT | VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT;
2602e5c31af7Sopenharmony_ciVkAccessFlags depthStencilAttachmentDstAccess = VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT;
2603e5c31af7Sopenharmony_ci
2604e5c31af7Sopenharmony_ciVkSubpassDependency implicitDependency = {
2605e5c31af7Sopenharmony_ci    .srcSubpass = firstSubpass;
2606e5c31af7Sopenharmony_ci    .dstSubpass = secondSubpass;
2607e5c31af7Sopenharmony_ci    .srcStageMask = inputAttachmentStages | depthStencilAttachmentStages;
2608e5c31af7Sopenharmony_ci    .dstStageMask = inputAttachmentStages | depthStencilAttachmentStages;
2609e5c31af7Sopenharmony_ci    .srcAccessMask = 0;
2610e5c31af7Sopenharmony_ci    .dstAccessMask = inputAttachmentDstAccess | depthStencilAttachmentDstAccess;
2611e5c31af7Sopenharmony_ci    .dependencyFlags = 0;
2612e5c31af7Sopenharmony_ci};
2613e5c31af7Sopenharmony_ci~~~~
2614e5c31af7Sopenharmony_ci
2615e5c31af7Sopenharmony_ci[[renderpass-feedbackloop]]
2616e5c31af7Sopenharmony_ciIf a subpass uses the same attachment as both an input attachment and either
2617e5c31af7Sopenharmony_cia color attachment or a depth/stencil attachment, writes via the color or
2618e5c31af7Sopenharmony_cidepth/stencil attachment are not automatically made visible to reads via the
2619e5c31af7Sopenharmony_ciinput attachment, causing a _feedback loop_, except in any of the following
2620e5c31af7Sopenharmony_ciconditions:
2621e5c31af7Sopenharmony_ci
2622e5c31af7Sopenharmony_ci  * If the color components or depth/stencil components read by the input
2623e5c31af7Sopenharmony_ci    attachment are mutually exclusive with the components written by the
2624e5c31af7Sopenharmony_ci    color or depth/stencil attachments, then there is no feedback loop.
2625e5c31af7Sopenharmony_ci    This requires the graphics pipelines used by the subpass to disable
2626e5c31af7Sopenharmony_ci    writes to color components that are read as inputs via the
2627e5c31af7Sopenharmony_ciifdef::VK_EXT_color_write_enable[]
2628e5c31af7Sopenharmony_ci    pname:colorWriteEnable or
2629e5c31af7Sopenharmony_ciendif::VK_EXT_color_write_enable[]
2630e5c31af7Sopenharmony_ci    pname:colorWriteMask, and to disable writes to depth/stencil components
2631e5c31af7Sopenharmony_ci    that are read as inputs via pname:depthWriteEnable or
2632e5c31af7Sopenharmony_ci    pname:stencilTestEnable.
2633e5c31af7Sopenharmony_ci  * If the attachment is used as an input attachment and depth/stencil
2634e5c31af7Sopenharmony_ci    attachment only, and the depth/stencil attachment is not written to.
2635e5c31af7Sopenharmony_ci
2636e5c31af7Sopenharmony_ciRendering within a subpass containing a feedback loop creates a
2637e5c31af7Sopenharmony_ci<<memory-model-access-data-race, data race>>, except in the following cases:
2638e5c31af7Sopenharmony_ci
2639e5c31af7Sopenharmony_ci  * If a memory dependency is inserted between when the attachment is
2640e5c31af7Sopenharmony_ci    written and when it is subsequently read by later fragments.
2641e5c31af7Sopenharmony_ci    <<synchronization-pipeline-barriers, Pipeline barriers>> expressing a
2642e5c31af7Sopenharmony_ci    <<synchronization-pipeline-barriers-subpass-self-dependencies, subpass
2643e5c31af7Sopenharmony_ci    self-dependency>> are the only way to achieve this, and one must: be
2644e5c31af7Sopenharmony_ci    inserted every time a fragment will read values at a particular sample
2645e5c31af7Sopenharmony_ci    (x, y, layer, sample) coordinate, if those values have been written
2646e5c31af7Sopenharmony_ci    since the most recent pipeline barrier; or since the start of the
2647e5c31af7Sopenharmony_ci    subpass, if there have been no pipeline barriers since the start of the
2648e5c31af7Sopenharmony_ci    subpass.
2649e5c31af7Sopenharmony_ciifdef::VK_ARM_rasterization_order_attachment_access[]
2650e5c31af7Sopenharmony_ci  * If the attachment is used as color and input attachment, and the
2651e5c31af7Sopenharmony_ci    pipeline performing the read was created with
2652e5c31af7Sopenharmony_ci    ename:VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_ARM
2653e5c31af7Sopenharmony_ci    included in the pname:flags member of the pname:pColorBlendState member
2654e5c31af7Sopenharmony_ci    of its slink:VkGraphicsPipelineCreateInfo.
2655e5c31af7Sopenharmony_ci    This creates a framebuffer-local memory dependency for each fragment
2656e5c31af7Sopenharmony_ci    generated by draw commands using this pipeline with the following
2657e5c31af7Sopenharmony_ci    properties:
2658e5c31af7Sopenharmony_ci  ** The first <<synchronization-dependencies-scopes, synchronization
2659e5c31af7Sopenharmony_ci     scope>> includes the
2660e5c31af7Sopenharmony_ci     ename:VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT pipeline stage
2661e5c31af7Sopenharmony_ci     executed by all previous fragments (as defined by
2662e5c31af7Sopenharmony_ci     <<drawing-primitive-order, primitive order>>) in the corresponding
2663e5c31af7Sopenharmony_ci     <<synchronization-framebuffer-regions, framebuffer regions>> including
2664e5c31af7Sopenharmony_ci     those generated by the same draw command.
2665e5c31af7Sopenharmony_ci  ** The second <<synchronization-dependencies-scopes, synchronization
2666e5c31af7Sopenharmony_ci     scope>> includes the ename:VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT
2667e5c31af7Sopenharmony_ci     pipeline stage executed by the generated fragment.
2668e5c31af7Sopenharmony_ci  ** The first <<synchronization-dependencies-access-scopes, access scope>>
2669e5c31af7Sopenharmony_ci     includes all writes to color attachments.
2670e5c31af7Sopenharmony_ci  ** The second <<synchronization-dependencies-access-scopes, access scope>>
2671e5c31af7Sopenharmony_ci     includes all reads from input attachments.
2672e5c31af7Sopenharmony_ci  * If the attachment is used as depth/stencil and input attachment, and the
2673e5c31af7Sopenharmony_ci    pipeline performs a read of the depth aspect and was created with
2674e5c31af7Sopenharmony_ci    ename:VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_ARM
2675e5c31af7Sopenharmony_ci    included in the pname:flags member of the pname:pDepthStencilState
2676e5c31af7Sopenharmony_ci    member of its slink:VkGraphicsPipelineCreateInfo.
2677e5c31af7Sopenharmony_ci    This creates a memory dependency for each fragment generated by draw
2678e5c31af7Sopenharmony_ci    commands using this pipeline with the following properties:
2679e5c31af7Sopenharmony_ci  ** The first <<synchronization-dependencies-scopes, synchronization
2680e5c31af7Sopenharmony_ci     scope>> includes ename:VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT
2681e5c31af7Sopenharmony_ci     ename:VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT pipeline stages
2682e5c31af7Sopenharmony_ci     executed by all previous fragments (as defined by
2683e5c31af7Sopenharmony_ci     <<drawing-primitive-order, primitive order>>) in the corresponding
2684e5c31af7Sopenharmony_ci     <<synchronization-framebuffer-regions, framebuffer regions>> including
2685e5c31af7Sopenharmony_ci     those generated by the same draw command.
2686e5c31af7Sopenharmony_ci ** The second <<synchronization-dependencies-scopes, synchronization
2687e5c31af7Sopenharmony_ci    scope>> includes ename:VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT and
2688e5c31af7Sopenharmony_ci    ename:VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT pipeline stages executed
2689e5c31af7Sopenharmony_ci    by the generated fragment.
2690e5c31af7Sopenharmony_ci  ** The first <<synchronization-dependencies-access-scopes, access scope>>
2691e5c31af7Sopenharmony_ci     includes all writes to the depth aspect of depth/stencil attachments.
2692e5c31af7Sopenharmony_ci  ** The second <<synchronization-dependencies-access-scopes, access scope>>
2693e5c31af7Sopenharmony_ci     includes all reads from the depth aspect of input attachments.
2694e5c31af7Sopenharmony_ci  * If the attachment is used as depth/stencil and input attachment, and the
2695e5c31af7Sopenharmony_ci    pipeline performs a read of the stencil aspect and was created with
2696e5c31af7Sopenharmony_ci    ename:VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_ARM
2697e5c31af7Sopenharmony_ci    included in the pname:flags member of the pname:pDepthStencilState
2698e5c31af7Sopenharmony_ci    member of its slink:VkGraphicsPipelineCreateInfo.
2699e5c31af7Sopenharmony_ci    This creates a memory dependency for each fragment generated by draw
2700e5c31af7Sopenharmony_ci    commands using this pipeline with the following properties:
2701e5c31af7Sopenharmony_ci  ** The first <<synchronization-dependencies-scopes, synchronization
2702e5c31af7Sopenharmony_ci     scope>> includes ename:VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT
2703e5c31af7Sopenharmony_ci     ename:VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT pipeline stages
2704e5c31af7Sopenharmony_ci     executed by all previous fragments (as defined by
2705e5c31af7Sopenharmony_ci     <<drawing-primitive-order, primitive order>>) in the corresponding
2706e5c31af7Sopenharmony_ci     <<synchronization-framebuffer-regions, framebuffer regions>> including
2707e5c31af7Sopenharmony_ci     those generated by the same draw command.
2708e5c31af7Sopenharmony_ci  ** The second <<synchronization-dependencies-scopes, synchronization
2709e5c31af7Sopenharmony_ci     scope>> includes ename:VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT and
2710e5c31af7Sopenharmony_ci     ename:VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT pipeline stages
2711e5c31af7Sopenharmony_ci     executed by the generated fragment.
2712e5c31af7Sopenharmony_ci  ** The first <<synchronization-dependencies-access-scopes, access scope>>
2713e5c31af7Sopenharmony_ci     includes all writes to the stencil aspect of depth/stencil attachments.
2714e5c31af7Sopenharmony_ci  ** The second <<synchronization-dependencies-access-scopes, access scope>>
2715e5c31af7Sopenharmony_ci     includes all reads from the stencil aspect of input attachments.
2716e5c31af7Sopenharmony_ciendif::VK_ARM_rasterization_order_attachment_access[]
2717e5c31af7Sopenharmony_ci
2718e5c31af7Sopenharmony_ci[[attachment-type-imagelayout]]
2719e5c31af7Sopenharmony_ciAttachments have requirements for a valid image layout depending on the
2720e5c31af7Sopenharmony_ciusage
2721e5c31af7Sopenharmony_ci
2722e5c31af7Sopenharmony_ci  * An attachment used as an input attachment must: be in the
2723e5c31af7Sopenharmony_ciifdef::VK_KHR_shared_presentable_image[]
2724e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR,
2725e5c31af7Sopenharmony_ciendif::VK_KHR_shared_presentable_image[]
2726e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance2[]
2727e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL,
2728e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL,
2729e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
2730e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
2731e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,
2732e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL,
2733e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
2734e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL,
2735e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, or
2736e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_GENERAL layout.
2737e5c31af7Sopenharmony_ci  * An attachment used only as a color attachment must: be in the
2738e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL or
2739e5c31af7Sopenharmony_ciifdef::VK_KHR_shared_presentable_image[]
2740e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR or
2741e5c31af7Sopenharmony_ciendif::VK_KHR_shared_presentable_image[]
2742e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_GENERAL layout.
2743e5c31af7Sopenharmony_ci  * An attachment used as both an input attachment and a color attachment
2744e5c31af7Sopenharmony_ci    must: be in the
2745e5c31af7Sopenharmony_ciifdef::VK_KHR_shared_presentable_image[]
2746e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR or
2747e5c31af7Sopenharmony_ciendif::VK_KHR_shared_presentable_image[]
2748e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_GENERAL layout.
2749e5c31af7Sopenharmony_ci  * An attachment used only as a depth/stencil attachment must: be in the
2750e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL,
2751e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
2752e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,
2753e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,
2754e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL,
2755e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL,
2756e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
2757e5c31af7Sopenharmony_ciifdef::VK_KHR_shared_presentable_image[]
2758e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR,
2759e5c31af7Sopenharmony_ciendif::VK_KHR_shared_presentable_image[]
2760e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance2[]
2761e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL,
2762e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL,
2763e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
2764e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, or
2765e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_GENERAL layout.
2766e5c31af7Sopenharmony_ci  * An attachment used as an input attachment and depth/stencil attachment
2767e5c31af7Sopenharmony_ci    must: be in the
2768e5c31af7Sopenharmony_ciifdef::VK_KHR_shared_presentable_image[]
2769e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR,
2770e5c31af7Sopenharmony_ciendif::VK_KHR_shared_presentable_image[]
2771e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance2[]
2772e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL,
2773e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL,
2774e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
2775e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, or
2776e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_GENERAL layout.
2777e5c31af7Sopenharmony_ci
2778e5c31af7Sopenharmony_ciAn attachment must: not be used as both a depth/stencil attachment and a
2779e5c31af7Sopenharmony_cicolor attachment.
2780e5c31af7Sopenharmony_ci
2781e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_create_renderpass2[]
2782e5c31af7Sopenharmony_ciA more extensible version of render pass creation is also defined below.
2783e5c31af7Sopenharmony_ci
2784e5c31af7Sopenharmony_ci[open,refpage='vkCreateRenderPass2',desc='Create a new render pass object',type='protos',alias='vkCreateRenderPass2KHR']
2785e5c31af7Sopenharmony_ci--
2786e5c31af7Sopenharmony_ciTo create a render pass, call:
2787e5c31af7Sopenharmony_ci
2788e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2[]
2789e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCreateRenderPass2.txt[]
2790e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2[]
2791e5c31af7Sopenharmony_ci
2792e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2+VK_KHR_create_renderpass2[or the equivalent command]
2793e5c31af7Sopenharmony_ci
2794e5c31af7Sopenharmony_ciifdef::VK_KHR_create_renderpass2[]
2795e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCreateRenderPass2KHR.txt[]
2796e5c31af7Sopenharmony_ciendif::VK_KHR_create_renderpass2[]
2797e5c31af7Sopenharmony_ci
2798e5c31af7Sopenharmony_ci  * pname:device is the logical device that creates the render pass.
2799e5c31af7Sopenharmony_ci  * pname:pCreateInfo is a pointer to a slink:VkRenderPassCreateInfo2
2800e5c31af7Sopenharmony_ci    structure describing the parameters of the render pass.
2801e5c31af7Sopenharmony_ci  * pname:pAllocator controls host memory allocation as described in the
2802e5c31af7Sopenharmony_ci    <<memory-allocation, Memory Allocation>> chapter.
2803e5c31af7Sopenharmony_ci  * pname:pRenderPass is a pointer to a slink:VkRenderPass handle in which
2804e5c31af7Sopenharmony_ci    the resulting render pass object is returned.
2805e5c31af7Sopenharmony_ci
2806e5c31af7Sopenharmony_ciThis command is functionally identical to flink:vkCreateRenderPass, but
2807e5c31af7Sopenharmony_ciincludes extensible sub-structures that include pname:sType and pname:pNext
2808e5c31af7Sopenharmony_ciparameters, allowing them to be more easily extended.
2809e5c31af7Sopenharmony_ci
2810e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCreateRenderPass2.txt[]
2811e5c31af7Sopenharmony_ci--
2812e5c31af7Sopenharmony_ci
2813e5c31af7Sopenharmony_ci[open,refpage='VkRenderPassCreateInfo2',desc='Structure specifying parameters of a newly created render pass',type='structs',alias='VkRenderPassCreateInfo2KHR']
2814e5c31af7Sopenharmony_ci--
2815e5c31af7Sopenharmony_ciThe sname:VkRenderPassCreateInfo2 structure is defined as:
2816e5c31af7Sopenharmony_ci
2817e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkRenderPassCreateInfo2.txt[]
2818e5c31af7Sopenharmony_ci
2819e5c31af7Sopenharmony_ciifdef::VK_KHR_create_renderpass2[]
2820e5c31af7Sopenharmony_cior the equivalent
2821e5c31af7Sopenharmony_ci
2822e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkRenderPassCreateInfo2KHR.txt[]
2823e5c31af7Sopenharmony_ciendif::VK_KHR_create_renderpass2[]
2824e5c31af7Sopenharmony_ci
2825e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
2826e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
2827e5c31af7Sopenharmony_ci    structure.
2828e5c31af7Sopenharmony_ci  * pname:flags is reserved for future use.
2829e5c31af7Sopenharmony_ci  * pname:attachmentCount is the number of attachments used by this render
2830e5c31af7Sopenharmony_ci    pass.
2831e5c31af7Sopenharmony_ci  * pname:pAttachments is a pointer to an array of pname:attachmentCount
2832e5c31af7Sopenharmony_ci    slink:VkAttachmentDescription2 structures describing the attachments
2833e5c31af7Sopenharmony_ci    used by the render pass.
2834e5c31af7Sopenharmony_ci  * pname:subpassCount is the number of subpasses to create.
2835e5c31af7Sopenharmony_ci  * pname:pSubpasses is a pointer to an array of pname:subpassCount
2836e5c31af7Sopenharmony_ci    slink:VkSubpassDescription2 structures describing each subpass.
2837e5c31af7Sopenharmony_ci  * pname:dependencyCount is the number of dependencies between pairs of
2838e5c31af7Sopenharmony_ci    subpasses.
2839e5c31af7Sopenharmony_ci  * pname:pDependencies is a pointer to an array of pname:dependencyCount
2840e5c31af7Sopenharmony_ci    slink:VkSubpassDependency2 structures describing dependencies between
2841e5c31af7Sopenharmony_ci    pairs of subpasses.
2842e5c31af7Sopenharmony_ci  * pname:correlatedViewMaskCount is the number of correlation masks.
2843e5c31af7Sopenharmony_ci  * pname:pCorrelatedViewMasks is a pointer to an array of view masks
2844e5c31af7Sopenharmony_ci    indicating sets of views that may: be more efficient to render
2845e5c31af7Sopenharmony_ci    concurrently.
2846e5c31af7Sopenharmony_ci
2847e5c31af7Sopenharmony_ciParameters defined by this structure with the same name as those in
2848e5c31af7Sopenharmony_cislink:VkRenderPassCreateInfo have the identical effect to those parameters;
2849e5c31af7Sopenharmony_cithe child structures are variants of those used in
2850e5c31af7Sopenharmony_cislink:VkRenderPassCreateInfo which add pname:sType and pname:pNext
2851e5c31af7Sopenharmony_ciparameters, allowing them to be extended.
2852e5c31af7Sopenharmony_ci
2853e5c31af7Sopenharmony_ciIf the slink:VkSubpassDescription2::pname:viewMask member of any element of
2854e5c31af7Sopenharmony_cipname:pSubpasses is not zero, _multiview_ functionality is considered to be
2855e5c31af7Sopenharmony_cienabled for this render pass.
2856e5c31af7Sopenharmony_ci
2857e5c31af7Sopenharmony_cipname:correlatedViewMaskCount and pname:pCorrelatedViewMasks have the same
2858e5c31af7Sopenharmony_cieffect as slink:VkRenderPassMultiviewCreateInfo::pname:correlationMaskCount
2859e5c31af7Sopenharmony_ciand slink:VkRenderPassMultiviewCreateInfo::pname:pCorrelationMasks,
2860e5c31af7Sopenharmony_cirespectively.
2861e5c31af7Sopenharmony_ci
2862e5c31af7Sopenharmony_ci.Valid Usage
2863e5c31af7Sopenharmony_ci****
2864e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo2-None-03049]]
2865e5c31af7Sopenharmony_ci    If any two subpasses operate on attachments with overlapping ranges of
2866e5c31af7Sopenharmony_ci    the same sname:VkDeviceMemory object, and at least one subpass writes to
2867e5c31af7Sopenharmony_ci    that area of sname:VkDeviceMemory, a subpass dependency must: be
2868e5c31af7Sopenharmony_ci    included (either directly or via some intermediate subpasses) between
2869e5c31af7Sopenharmony_ci    them
2870e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo2-attachment-03050]]
2871e5c31af7Sopenharmony_ci    If the pname:attachment member of any element of
2872e5c31af7Sopenharmony_ci    pname:pInputAttachments, pname:pColorAttachments,
2873e5c31af7Sopenharmony_ci    pname:pResolveAttachments or pname:pDepthStencilAttachment, or the
2874e5c31af7Sopenharmony_ci    attachment indexed by any element of pname:pPreserveAttachments in any
2875e5c31af7Sopenharmony_ci    given element of pname:pSubpasses is bound to a range of a
2876e5c31af7Sopenharmony_ci    sname:VkDeviceMemory object that overlaps with any other attachment in
2877e5c31af7Sopenharmony_ci    any subpass (including the same subpass), the
2878e5c31af7Sopenharmony_ci    sname:VkAttachmentDescription2 structures describing them must: include
2879e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT in pname:flags
2880e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo2-attachment-03051]]
2881e5c31af7Sopenharmony_ci    If the pname:attachment member of any element of
2882e5c31af7Sopenharmony_ci    pname:pInputAttachments, pname:pColorAttachments,
2883e5c31af7Sopenharmony_ci    pname:pResolveAttachments or pname:pDepthStencilAttachment, or any
2884e5c31af7Sopenharmony_ci    element of pname:pPreserveAttachments in any given element of
2885e5c31af7Sopenharmony_ci    pname:pSubpasses is not ename:VK_ATTACHMENT_UNUSED, then it must: be
2886e5c31af7Sopenharmony_ci    less than pname:attachmentCount
2887e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map[]
2888e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo2-fragmentDensityMapAttachment-06472]]
2889e5c31af7Sopenharmony_ci    If the pNext chain includes a
2890e5c31af7Sopenharmony_ci    slink:VkRenderPassFragmentDensityMapCreateInfoEXT structure and the
2891e5c31af7Sopenharmony_ci    pname:fragmentDensityMapAttachment member is not
2892e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_UNUSED, then pname:attachment must: be less than
2893e5c31af7Sopenharmony_ci    pname:attachmentCount
2894e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map[]
2895e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_depth_stencil_resolve[]
2896e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo2-pSubpasses-06473]]
2897e5c31af7Sopenharmony_ci    If the pname:pSubpasses pNext chain includes a
2898e5c31af7Sopenharmony_ci    slink:VkSubpassDescriptionDepthStencilResolve structure and the
2899e5c31af7Sopenharmony_ci    pname:pDepthStencilResolveAttachment member is not `NULL` and does not
2900e5c31af7Sopenharmony_ci    have the value ename:VK_ATTACHMENT_UNUSED, then pname:attachment must:
2901e5c31af7Sopenharmony_ci    be less than pname:attachmentCount
2902e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_depth_stencil_resolve[]
2903e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo2-pAttachments-02522]]
2904e5c31af7Sopenharmony_ci    For any member of pname:pAttachments with a pname:loadOp equal to
2905e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment
2906e5c31af7Sopenharmony_ci    must: not specify a pname:layout equal to
2907e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
2908e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, or
2909e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL
2910e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo2-pAttachments-02523]]
2911e5c31af7Sopenharmony_ci    For any member of pname:pAttachments with a pname:stencilLoadOp equal to
2912e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment
2913e5c31af7Sopenharmony_ci    must: not specify a pname:layout equal to
2914e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
2915e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, or
2916e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL
2917e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo2-pDependencies-03054]]
2918e5c31af7Sopenharmony_ci    For any element of pname:pDependencies, if the pname:srcSubpass is not
2919e5c31af7Sopenharmony_ci    ename:VK_SUBPASS_EXTERNAL, all stage flags included in the
2920e5c31af7Sopenharmony_ci    pname:srcStageMask member of that dependency must: be a pipeline stage
2921e5c31af7Sopenharmony_ci    supported by the <<synchronization-pipeline-stages-types, pipeline>>
2922e5c31af7Sopenharmony_ci    identified by the pname:pipelineBindPoint member of the source subpass
2923e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo2-pDependencies-03055]]
2924e5c31af7Sopenharmony_ci    For any element of pname:pDependencies, if the pname:dstSubpass is not
2925e5c31af7Sopenharmony_ci    ename:VK_SUBPASS_EXTERNAL, all stage flags included in the
2926e5c31af7Sopenharmony_ci    pname:dstStageMask member of that dependency must: be a pipeline stage
2927e5c31af7Sopenharmony_ci    supported by the <<synchronization-pipeline-stages-types, pipeline>>
2928e5c31af7Sopenharmony_ci    identified by the pname:pipelineBindPoint member of the destination
2929e5c31af7Sopenharmony_ci    subpass
2930e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo2-pCorrelatedViewMasks-03056]]
2931e5c31af7Sopenharmony_ci    The set of bits included in any element of pname:pCorrelatedViewMasks
2932e5c31af7Sopenharmony_ci    must: not overlap with the set of bits included in any other element of
2933e5c31af7Sopenharmony_ci    pname:pCorrelatedViewMasks
2934e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo2-viewMask-03057]]
2935e5c31af7Sopenharmony_ci    If the slink:VkSubpassDescription2::pname:viewMask member of all
2936e5c31af7Sopenharmony_ci    elements of pname:pSubpasses is `0`, pname:correlatedViewMaskCount must:
2937e5c31af7Sopenharmony_ci    be `0`
2938e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo2-viewMask-03058]]
2939e5c31af7Sopenharmony_ci    The slink:VkSubpassDescription2::pname:viewMask member of all elements
2940e5c31af7Sopenharmony_ci    of pname:pSubpasses must: either all be `0`, or all not be `0`
2941e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo2-viewMask-03059]]
2942e5c31af7Sopenharmony_ci    If the slink:VkSubpassDescription2::pname:viewMask member of all
2943e5c31af7Sopenharmony_ci    elements of pname:pSubpasses is `0`, the pname:dependencyFlags member of
2944e5c31af7Sopenharmony_ci    any element of pname:pDependencies must: not include
2945e5c31af7Sopenharmony_ci    ename:VK_DEPENDENCY_VIEW_LOCAL_BIT
2946e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo2-pDependencies-03060]]
2947e5c31af7Sopenharmony_ci    For any element of pname:pDependencies where its pname:srcSubpass member
2948e5c31af7Sopenharmony_ci    equals its pname:dstSubpass member, if the pname:viewMask member of the
2949e5c31af7Sopenharmony_ci    corresponding element of pname:pSubpasses includes more than one bit,
2950e5c31af7Sopenharmony_ci    its pname:dependencyFlags member must: include
2951e5c31af7Sopenharmony_ci    ename:VK_DEPENDENCY_VIEW_LOCAL_BIT
2952e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo2-attachment-02525]]
2953e5c31af7Sopenharmony_ci    If the pname:attachment member of any element of the
2954e5c31af7Sopenharmony_ci    pname:pInputAttachments member of any element of pname:pSubpasses is not
2955e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_UNUSED, the pname:aspectMask member of that element
2956e5c31af7Sopenharmony_ci    of pname:pInputAttachments must: only include aspects that are present
2957e5c31af7Sopenharmony_ci    in images of the format specified by the element of pname:pAttachments
2958e5c31af7Sopenharmony_ci    specified by pname:attachment
2959e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo2-srcSubpass-02526]]
2960e5c31af7Sopenharmony_ci    The pname:srcSubpass member of each element of pname:pDependencies must:
2961e5c31af7Sopenharmony_ci    be less than pname:subpassCount
2962e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo2-dstSubpass-02527]]
2963e5c31af7Sopenharmony_ci    The pname:dstSubpass member of each element of pname:pDependencies must:
2964e5c31af7Sopenharmony_ci    be less than pname:subpassCount
2965e5c31af7Sopenharmony_ciifdef::VK_KHR_fragment_shading_rate[]
2966e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo2-pAttachments-04585]]
2967e5c31af7Sopenharmony_ci    If any element of pname:pAttachments is used as a fragment shading rate
2968e5c31af7Sopenharmony_ci    attachment in any subpass, it must: not be used as any other attachment
2969e5c31af7Sopenharmony_ci    in the render pass
2970e5c31af7Sopenharmony_ciifdef::VK_QCOM_render_pass_transform[]
2971e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo2-flags-04521]]
2972e5c31af7Sopenharmony_ci    If pname:flags includes ename:VK_RENDER_PASS_CREATE_TRANSFORM_BIT_QCOM,
2973e5c31af7Sopenharmony_ci    an element of pname:pSubpasses includes an instance of
2974e5c31af7Sopenharmony_ci    slink:VkFragmentShadingRateAttachmentInfoKHR in its pname:pNext chain,
2975e5c31af7Sopenharmony_ci    and the pname:pFragmentShadingRateAttachment member of that structure is
2976e5c31af7Sopenharmony_ci    not equal to `NULL`, the pname:attachment member of
2977e5c31af7Sopenharmony_ci    pname:pFragmentShadingRateAttachment must: be ename:VK_ATTACHMENT_UNUSED
2978e5c31af7Sopenharmony_ciendif::VK_QCOM_render_pass_transform[]
2979e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo2-pAttachments-04586]]
2980e5c31af7Sopenharmony_ci    If any element of pname:pAttachments is used as a fragment shading rate
2981e5c31af7Sopenharmony_ci    attachment in any subpass, it must: have an image format whose
2982e5c31af7Sopenharmony_ci    <<potential-format-features, potential format features>> contain
2983e5c31af7Sopenharmony_ci    ename:VK_FORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
2984e5c31af7Sopenharmony_ciendif::VK_KHR_fragment_shading_rate[]
2985e5c31af7Sopenharmony_ciifdef::VK_QCOM_render_pass_shader_resolve[]
2986e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo2-rasterizationSamples-04905]]
2987e5c31af7Sopenharmony_ci    If the pipeline is being created with fragment shader state, and the
2988e5c31af7Sopenharmony_ci    apiext:VK_QCOM_render_pass_shader_resolve extension is enabled, and if
2989e5c31af7Sopenharmony_ci    subpass has any input attachments, and if the subpass description
2990e5c31af7Sopenharmony_ci    contains ename:VK_SUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_QCOM, then the
2991e5c31af7Sopenharmony_ci    sample count of the input attachments must: equal
2992e5c31af7Sopenharmony_ci    pname:rasterizationSamples
2993e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo2-sampleShadingEnable-04906]]
2994e5c31af7Sopenharmony_ci    If the pipeline is being created with fragment shader state, and the
2995e5c31af7Sopenharmony_ci    apiext:VK_QCOM_render_pass_shader_resolve extension is enabled, and if
2996e5c31af7Sopenharmony_ci    the subpass description contains
2997e5c31af7Sopenharmony_ci    ename:VK_SUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_QCOM, then
2998e5c31af7Sopenharmony_ci    pname:sampleShadingEnable must: be false
2999e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo2-flags-04907]]
3000e5c31af7Sopenharmony_ci    If pname:flags includes
3001e5c31af7Sopenharmony_ci    ename:VK_SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM, and if
3002e5c31af7Sopenharmony_ci    pname:pResolveAttachments is not `NULL`, then each resolve attachment
3003e5c31af7Sopenharmony_ci    must: be ename:VK_ATTACHMENT_UNUSED
3004e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo2-flags-04908]]
3005e5c31af7Sopenharmony_ci    If pname:flags includes
3006e5c31af7Sopenharmony_ci    ename:VK_SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM, and if
3007e5c31af7Sopenharmony_ci    pname:pDepthStencilResolveAttachment is not `NULL`, then the
3008e5c31af7Sopenharmony_ci    depth/stencil resolve attachment must: be ename:VK_ATTACHMENT_UNUSED
3009e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassCreateInfo2-flags-04909]]
3010e5c31af7Sopenharmony_ci    If pname:flags includes
3011e5c31af7Sopenharmony_ci    ename:VK_SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM, then the subpass
3012e5c31af7Sopenharmony_ci    must: be the last subpass in a subpass dependency chain
3013e5c31af7Sopenharmony_ciendif::VK_QCOM_render_pass_shader_resolve[]
3014e5c31af7Sopenharmony_ci****
3015e5c31af7Sopenharmony_ci
3016e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkRenderPassCreateInfo2.txt[]
3017e5c31af7Sopenharmony_ci--
3018e5c31af7Sopenharmony_ci
3019e5c31af7Sopenharmony_ci[open,refpage='VkAttachmentDescription2',desc='Structure specifying an attachment description',type='structs',alias='VkAttachmentDescription2KHR']
3020e5c31af7Sopenharmony_ci--
3021e5c31af7Sopenharmony_ciThe sname:VkAttachmentDescription2 structure is defined as:
3022e5c31af7Sopenharmony_ci
3023e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkAttachmentDescription2.txt[]
3024e5c31af7Sopenharmony_ci
3025e5c31af7Sopenharmony_ciifdef::VK_KHR_create_renderpass2[]
3026e5c31af7Sopenharmony_cior the equivalent
3027e5c31af7Sopenharmony_ci
3028e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkAttachmentDescription2KHR.txt[]
3029e5c31af7Sopenharmony_ciendif::VK_KHR_create_renderpass2[]
3030e5c31af7Sopenharmony_ci
3031e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
3032e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
3033e5c31af7Sopenharmony_ci    structure.
3034e5c31af7Sopenharmony_ci  * pname:flags is a bitmask of elink:VkAttachmentDescriptionFlagBits
3035e5c31af7Sopenharmony_ci    specifying additional properties of the attachment.
3036e5c31af7Sopenharmony_ci  * pname:format is a elink:VkFormat value specifying the format of the
3037e5c31af7Sopenharmony_ci    image that will be used for the attachment.
3038e5c31af7Sopenharmony_ci  * pname:samples is a elink:VkSampleCountFlagBits value specifying the
3039e5c31af7Sopenharmony_ci    number of samples of the image.
3040e5c31af7Sopenharmony_ci  * pname:loadOp is a elink:VkAttachmentLoadOp value specifying how the
3041e5c31af7Sopenharmony_ci    contents of color and depth components of the attachment are treated at
3042e5c31af7Sopenharmony_ci    the beginning of the subpass where it is first used.
3043e5c31af7Sopenharmony_ci  * pname:storeOp is a elink:VkAttachmentStoreOp value specifying how the
3044e5c31af7Sopenharmony_ci    contents of color and depth components of the attachment are treated at
3045e5c31af7Sopenharmony_ci    the end of the subpass where it is last used.
3046e5c31af7Sopenharmony_ci  * pname:stencilLoadOp is a elink:VkAttachmentLoadOp value specifying how
3047e5c31af7Sopenharmony_ci    the contents of stencil components of the attachment are treated at the
3048e5c31af7Sopenharmony_ci    beginning of the subpass where it is first used.
3049e5c31af7Sopenharmony_ci  * pname:stencilStoreOp is a elink:VkAttachmentStoreOp value specifying how
3050e5c31af7Sopenharmony_ci    the contents of stencil components of the attachment are treated at the
3051e5c31af7Sopenharmony_ci    end of the last subpass where it is used.
3052e5c31af7Sopenharmony_ci  * pname:initialLayout is the layout the attachment image subresource will
3053e5c31af7Sopenharmony_ci    be in when a render pass instance begins.
3054e5c31af7Sopenharmony_ci  * pname:finalLayout is the layout the attachment image subresource will be
3055e5c31af7Sopenharmony_ci    transitioned to when a render pass instance ends.
3056e5c31af7Sopenharmony_ci
3057e5c31af7Sopenharmony_ciParameters defined by this structure with the same name as those in
3058e5c31af7Sopenharmony_cislink:VkAttachmentDescription have the identical effect to those parameters.
3059e5c31af7Sopenharmony_ci
3060e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
3061e5c31af7Sopenharmony_ciIf the <<features-separateDepthStencilLayouts,
3062e5c31af7Sopenharmony_cipname:separateDepthStencilLayouts>> feature is enabled, and pname:format is
3063e5c31af7Sopenharmony_cia depth/stencil format, pname:initialLayout and pname:finalLayout can: be
3064e5c31af7Sopenharmony_ciset to a layout that only specifies the layout of the depth aspect.
3065e5c31af7Sopenharmony_ci
3066e5c31af7Sopenharmony_ciIf the pname:pNext chain includes a
3067e5c31af7Sopenharmony_cislink:VkAttachmentDescriptionStencilLayout structure, then the
3068e5c31af7Sopenharmony_cipname:stencilInitialLayout and pname:stencilFinalLayout members specify the
3069e5c31af7Sopenharmony_ciinitial and final layouts of the stencil aspect of a depth/stencil format,
3070e5c31af7Sopenharmony_ciand pname:initialLayout and pname:finalLayout only apply to the depth
3071e5c31af7Sopenharmony_ciaspect.
3072e5c31af7Sopenharmony_ciFor depth-only formats, the slink:VkAttachmentDescriptionStencilLayout
3073e5c31af7Sopenharmony_cistructure is ignored.
3074e5c31af7Sopenharmony_ciFor stencil-only formats, the initial and final layouts of the stencil
3075e5c31af7Sopenharmony_ciaspect are taken from the slink:VkAttachmentDescriptionStencilLayout
3076e5c31af7Sopenharmony_cistructure if present, or pname:initialLayout and pname:finalLayout if not
3077e5c31af7Sopenharmony_cipresent.
3078e5c31af7Sopenharmony_ci
3079e5c31af7Sopenharmony_ciIf pname:format is a depth/stencil format, and either pname:initialLayout or
3080e5c31af7Sopenharmony_cipname:finalLayout does not specify a layout for the stencil aspect, then the
3081e5c31af7Sopenharmony_ciapplication must: specify the initial and final layouts of the stencil
3082e5c31af7Sopenharmony_ciaspect by including a slink:VkAttachmentDescriptionStencilLayout structure
3083e5c31af7Sopenharmony_ciin the pname:pNext chain.
3084e5c31af7Sopenharmony_ci
3085e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
3086e5c31af7Sopenharmony_ci
3087e5c31af7Sopenharmony_ci.Valid Usage
3088e5c31af7Sopenharmony_ci****
3089e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescription2-finalLayout-03061]]
3090e5c31af7Sopenharmony_ci    pname:finalLayout must: not be ename:VK_IMAGE_LAYOUT_UNDEFINED or
3091e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_PREINITIALIZED
3092e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescription2-format-03294]]
3093e5c31af7Sopenharmony_ci    If pname:format is a color format, pname:initialLayout must: not be
3094e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL,
3095e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL,
3096e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, or
3097e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL
3098e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescription2-format-03295]]
3099e5c31af7Sopenharmony_ci    If pname:format is a depth/stencil format, pname:initialLayout must: not
3100e5c31af7Sopenharmony_ci    be ename:VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL
3101e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescription2-format-03296]]
3102e5c31af7Sopenharmony_ci    If pname:format is a color format, pname:finalLayout must: not be
3103e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL,
3104e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL,
3105e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, or
3106e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL
3107e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescription2-format-03297]]
3108e5c31af7Sopenharmony_ci    If pname:format is a depth/stencil format, pname:finalLayout must: not
3109e5c31af7Sopenharmony_ci    be ename:VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL
3110e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
3111e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescription2-separateDepthStencilLayouts-03298]]
3112e5c31af7Sopenharmony_ci    If the <<features-separateDepthStencilLayouts,
3113e5c31af7Sopenharmony_ci    pname:separateDepthStencilLayouts>> feature is not enabled,
3114e5c31af7Sopenharmony_ci    pname:initialLayout must: not be
3115e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,
3116e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,
3117e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL or
3118e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
3119e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescription2-separateDepthStencilLayouts-03299]]
3120e5c31af7Sopenharmony_ci    If the <<features-separateDepthStencilLayouts,
3121e5c31af7Sopenharmony_ci    pname:separateDepthStencilLayouts>> feature is not enabled,
3122e5c31af7Sopenharmony_ci    pname:finalLayout must: not be
3123e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,
3124e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,
3125e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL or
3126e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
3127e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescription2-format-03300]]
3128e5c31af7Sopenharmony_ci    If pname:format is a color format, pname:initialLayout must: not be
3129e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,
3130e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,
3131e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL or
3132e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
3133e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescription2-format-03301]]
3134e5c31af7Sopenharmony_ci    If pname:format is a color format, pname:finalLayout must: not be
3135e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,
3136e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,
3137e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL or
3138e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
3139e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescription2-format-03302]]
3140e5c31af7Sopenharmony_ci    If pname:format is a depth/stencil format which includes both depth and
3141e5c31af7Sopenharmony_ci    stencil aspects, and pname:initialLayout is
3142e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or
3143e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, the pname:pNext chain
3144e5c31af7Sopenharmony_ci    must: include a slink:VkAttachmentDescriptionStencilLayout structure
3145e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescription2-format-03303]]
3146e5c31af7Sopenharmony_ci    If pname:format is a depth/stencil format which includes both depth and
3147e5c31af7Sopenharmony_ci    stencil aspects, and pname:finalLayout is
3148e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or
3149e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, the pname:pNext chain
3150e5c31af7Sopenharmony_ci    must: include a slink:VkAttachmentDescriptionStencilLayout structure
3151e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescription2-format-03304]]
3152e5c31af7Sopenharmony_ci    If pname:format is a depth/stencil format which includes only the depth
3153e5c31af7Sopenharmony_ci    aspect, pname:initialLayout must: not be
3154e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL or
3155e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
3156e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescription2-format-03305]]
3157e5c31af7Sopenharmony_ci    If pname:format is a depth/stencil format which includes only the depth
3158e5c31af7Sopenharmony_ci    aspect, pname:finalLayout must: not be
3159e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL or
3160e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
3161e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescription2-format-03306]]
3162e5c31af7Sopenharmony_ci    If pname:format is a depth/stencil format which includes only the
3163e5c31af7Sopenharmony_ci    stencil aspect, pname:initialLayout must: not be
3164e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or
3165e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL
3166e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescription2-format-03307]]
3167e5c31af7Sopenharmony_ci    If pname:format is a depth/stencil format which includes only the
3168e5c31af7Sopenharmony_ci    stencil aspect, pname:finalLayout must: not be
3169e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or
3170e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL
3171e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
3172e5c31af7Sopenharmony_ci****
3173e5c31af7Sopenharmony_ci
3174e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkAttachmentDescription2.txt[]
3175e5c31af7Sopenharmony_ci--
3176e5c31af7Sopenharmony_ci
3177e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
3178e5c31af7Sopenharmony_ci[open,refpage='VkAttachmentDescriptionStencilLayout',desc='Structure specifying an attachment description',type='structs',alias='VkAttachmentDescriptionStencilLayoutKHR']
3179e5c31af7Sopenharmony_ci--
3180e5c31af7Sopenharmony_ciThe sname:VkAttachmentDescriptionStencilLayout structure is defined as:
3181e5c31af7Sopenharmony_ci
3182e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkAttachmentDescriptionStencilLayout.txt[]
3183e5c31af7Sopenharmony_ci
3184e5c31af7Sopenharmony_ciifdef::VK_KHR_separate_depth_stencil_layouts[]
3185e5c31af7Sopenharmony_cior the equivalent
3186e5c31af7Sopenharmony_ci
3187e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkAttachmentDescriptionStencilLayoutKHR.txt[]
3188e5c31af7Sopenharmony_ciendif::VK_KHR_separate_depth_stencil_layouts[]
3189e5c31af7Sopenharmony_ci
3190e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
3191e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
3192e5c31af7Sopenharmony_ci    structure.
3193e5c31af7Sopenharmony_ci  * pname:stencilInitialLayout is the layout the stencil aspect of the
3194e5c31af7Sopenharmony_ci    attachment image subresource will be in when a render pass instance
3195e5c31af7Sopenharmony_ci    begins.
3196e5c31af7Sopenharmony_ci  * pname:stencilFinalLayout is the layout the stencil aspect of the
3197e5c31af7Sopenharmony_ci    attachment image subresource will be transitioned to when a render pass
3198e5c31af7Sopenharmony_ci    instance ends.
3199e5c31af7Sopenharmony_ci
3200e5c31af7Sopenharmony_ci.Valid Usage
3201e5c31af7Sopenharmony_ci****
3202e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescriptionStencilLayout-stencilInitialLayout-03308]]
3203e5c31af7Sopenharmony_ci    pname:stencilInitialLayout must: not be
3204e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
3205e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,
3206e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,
3207e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL,
3208e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL,
3209e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, or
3210e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL
3211e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescriptionStencilLayout-stencilFinalLayout-03309]]
3212e5c31af7Sopenharmony_ci    pname:stencilFinalLayout must: not be
3213e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
3214e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,
3215e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,
3216e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL,
3217e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL,
3218e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, or
3219e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL
3220e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentDescriptionStencilLayout-stencilFinalLayout-03310]]
3221e5c31af7Sopenharmony_ci    pname:stencilFinalLayout must: not be ename:VK_IMAGE_LAYOUT_UNDEFINED or
3222e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_PREINITIALIZED
3223e5c31af7Sopenharmony_ci****
3224e5c31af7Sopenharmony_ci
3225e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkAttachmentDescriptionStencilLayout.txt[]
3226e5c31af7Sopenharmony_ci--
3227e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
3228e5c31af7Sopenharmony_ci
3229e5c31af7Sopenharmony_ci[open,refpage='VkSubpassDescription2',desc='Structure specifying a subpass description',type='structs',alias='VkSubpassDescription2KHR']
3230e5c31af7Sopenharmony_ci--
3231e5c31af7Sopenharmony_ciThe sname:VkSubpassDescription2 structure is defined as:
3232e5c31af7Sopenharmony_ci
3233e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkSubpassDescription2.txt[]
3234e5c31af7Sopenharmony_ci
3235e5c31af7Sopenharmony_ciifdef::VK_KHR_create_renderpass2[]
3236e5c31af7Sopenharmony_cior the equivalent
3237e5c31af7Sopenharmony_ci
3238e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkSubpassDescription2KHR.txt[]
3239e5c31af7Sopenharmony_ciendif::VK_KHR_create_renderpass2[]
3240e5c31af7Sopenharmony_ci
3241e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
3242e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
3243e5c31af7Sopenharmony_ci    structure.
3244e5c31af7Sopenharmony_ci  * pname:flags is a bitmask of elink:VkSubpassDescriptionFlagBits
3245e5c31af7Sopenharmony_ci    specifying usage of the subpass.
3246e5c31af7Sopenharmony_ci  * pname:pipelineBindPoint is a elink:VkPipelineBindPoint value specifying
3247e5c31af7Sopenharmony_ci    the pipeline type supported for this subpass.
3248e5c31af7Sopenharmony_ci  * pname:viewMask is a bitfield of view indices describing which views
3249e5c31af7Sopenharmony_ci    rendering is broadcast to in this subpass, when multiview is enabled.
3250e5c31af7Sopenharmony_ci  * pname:inputAttachmentCount is the number of input attachments.
3251e5c31af7Sopenharmony_ci  * pname:pInputAttachments is a pointer to an array of
3252e5c31af7Sopenharmony_ci    slink:VkAttachmentReference2 structures defining the input attachments
3253e5c31af7Sopenharmony_ci    for this subpass and their layouts.
3254e5c31af7Sopenharmony_ci  * pname:colorAttachmentCount is the number of color attachments.
3255e5c31af7Sopenharmony_ci  * pname:pColorAttachments is a pointer to an array of
3256e5c31af7Sopenharmony_ci    pname:colorAttachmentCount slink:VkAttachmentReference2 structures
3257e5c31af7Sopenharmony_ci    defining the color attachments for this subpass and their layouts.
3258e5c31af7Sopenharmony_ci  * pname:pResolveAttachments is `NULL` or a pointer to an array of
3259e5c31af7Sopenharmony_ci    pname:colorAttachmentCount slink:VkAttachmentReference2 structures
3260e5c31af7Sopenharmony_ci    defining the resolve attachments for this subpass and their layouts.
3261e5c31af7Sopenharmony_ci  * pname:pDepthStencilAttachment is a pointer to a
3262e5c31af7Sopenharmony_ci    slink:VkAttachmentReference2 structure specifying the depth/stencil
3263e5c31af7Sopenharmony_ci    attachment for this subpass and its layout.
3264e5c31af7Sopenharmony_ci  * pname:preserveAttachmentCount is the number of preserved attachments.
3265e5c31af7Sopenharmony_ci  * pname:pPreserveAttachments is a pointer to an array of
3266e5c31af7Sopenharmony_ci    pname:preserveAttachmentCount render pass attachment indices identifying
3267e5c31af7Sopenharmony_ci    attachments that are not used by this subpass, but whose contents must:
3268e5c31af7Sopenharmony_ci    be preserved throughout the subpass.
3269e5c31af7Sopenharmony_ci
3270e5c31af7Sopenharmony_ciParameters defined by this structure with the same name as those in
3271e5c31af7Sopenharmony_cislink:VkSubpassDescription have the identical effect to those parameters.
3272e5c31af7Sopenharmony_ci
3273e5c31af7Sopenharmony_cipname:viewMask has the same effect for the described subpass as
3274e5c31af7Sopenharmony_cislink:VkRenderPassMultiviewCreateInfo::pname:pViewMasks has on each
3275e5c31af7Sopenharmony_cicorresponding subpass.
3276e5c31af7Sopenharmony_ci
3277e5c31af7Sopenharmony_ciifdef::VK_KHR_fragment_shading_rate[]
3278e5c31af7Sopenharmony_ciIf a slink:VkFragmentShadingRateAttachmentInfoKHR structure is included in
3279e5c31af7Sopenharmony_cithe pname:pNext chain, pname:pFragmentShadingRateAttachment is not `NULL`,
3280e5c31af7Sopenharmony_ciand its pname:attachment member is not ename:VK_ATTACHMENT_UNUSED, the
3281e5c31af7Sopenharmony_ciidentified attachment defines a fragment shading rate attachment for that
3282e5c31af7Sopenharmony_cisubpass.
3283e5c31af7Sopenharmony_ciendif::VK_KHR_fragment_shading_rate[]
3284e5c31af7Sopenharmony_ci
3285e5c31af7Sopenharmony_ci.Valid Usage
3286e5c31af7Sopenharmony_ci****
3287e5c31af7Sopenharmony_ciifndef::VK_HUAWEI_subpass_shading[]
3288e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription2-pipelineBindPoint-03062]]
3289e5c31af7Sopenharmony_ci    pname:pipelineBindPoint must: be ename:VK_PIPELINE_BIND_POINT_GRAPHICS
3290e5c31af7Sopenharmony_ciendif::VK_HUAWEI_subpass_shading[]
3291e5c31af7Sopenharmony_ciifdef::VK_HUAWEI_subpass_shading[]
3292e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription2-pipelineBindPoint-04953]]
3293e5c31af7Sopenharmony_ci    pname:pipelineBindPoint must: be ename:VK_PIPELINE_BIND_POINT_GRAPHICS
3294e5c31af7Sopenharmony_ci    or ename:VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI
3295e5c31af7Sopenharmony_ciendif::VK_HUAWEI_subpass_shading[]
3296e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription2-colorAttachmentCount-03063]]
3297e5c31af7Sopenharmony_ci    pname:colorAttachmentCount must: be less than or equal to
3298e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:maxColorAttachments
3299e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription2-loadOp-03064]]
3300e5c31af7Sopenharmony_ci    If the first use of an attachment in this render pass is as an input
3301e5c31af7Sopenharmony_ci    attachment, and the attachment is not also used as a color or
3302e5c31af7Sopenharmony_ci    depth/stencil attachment in the same subpass, then pname:loadOp must:
3303e5c31af7Sopenharmony_ci    not be ename:VK_ATTACHMENT_LOAD_OP_CLEAR
3304e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription2-pResolveAttachments-03065]]
3305e5c31af7Sopenharmony_ci    If pname:pResolveAttachments is not `NULL`, for each resolve attachment
3306e5c31af7Sopenharmony_ci    that does not have the value ename:VK_ATTACHMENT_UNUSED, the
3307e5c31af7Sopenharmony_ci    corresponding color attachment must: not have the value
3308e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_UNUSED
3309e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription2-pResolveAttachments-03066]]
3310e5c31af7Sopenharmony_ci    If pname:pResolveAttachments is not `NULL`, for each resolve attachment
3311e5c31af7Sopenharmony_ci    that is not ename:VK_ATTACHMENT_UNUSED, the corresponding color
3312e5c31af7Sopenharmony_ci    attachment must: not have a sample count of ename:VK_SAMPLE_COUNT_1_BIT
3313e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription2-pResolveAttachments-03067]]
3314e5c31af7Sopenharmony_ci    If pname:pResolveAttachments is not `NULL`, each resolve attachment that
3315e5c31af7Sopenharmony_ci    is not ename:VK_ATTACHMENT_UNUSED must: have a sample count of
3316e5c31af7Sopenharmony_ci    ename:VK_SAMPLE_COUNT_1_BIT
3317e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription2-pResolveAttachments-03068]]
3318e5c31af7Sopenharmony_ci    Any given element of pname:pResolveAttachments must: have the same
3319e5c31af7Sopenharmony_ci    elink:VkFormat as its corresponding color attachment
3320e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription2-pColorAttachments-03069]]
3321e5c31af7Sopenharmony_ci    All attachments in pname:pColorAttachments that are not
3322e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_UNUSED must: have the same sample count
3323e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription2-pInputAttachments-02897]]
3324e5c31af7Sopenharmony_ci    All attachments in pname:pInputAttachments that are not
3325e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_UNUSED must: have image formats whose
3326e5c31af7Sopenharmony_ci    <<potential-format-features, potential format features>> contain at
3327e5c31af7Sopenharmony_ci    least ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT or
3328e5c31af7Sopenharmony_ci    ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT
3329e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription2-pColorAttachments-02898]]
3330e5c31af7Sopenharmony_ci    All attachments in pname:pColorAttachments that are not
3331e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_UNUSED must: have image formats whose
3332e5c31af7Sopenharmony_ci    <<potential-format-features, potential format features>> contain
3333e5c31af7Sopenharmony_ci    ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT
3334e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription2-pResolveAttachments-02899]]
3335e5c31af7Sopenharmony_ci    All attachments in pname:pResolveAttachments that are not
3336e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_UNUSED must: have image formats whose
3337e5c31af7Sopenharmony_ci    <<potential-format-features, potential format features>> contain
3338e5c31af7Sopenharmony_ci    ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT
3339e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription2-pDepthStencilAttachment-02900]]
3340e5c31af7Sopenharmony_ci    If pname:pDepthStencilAttachment is not `NULL` and the attachment is not
3341e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_UNUSED then it must: have an image format whose
3342e5c31af7Sopenharmony_ci    <<potential-format-features, potential format features>> contain
3343e5c31af7Sopenharmony_ci    ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT
3344e5c31af7Sopenharmony_ciifdef::VK_AMD_mixed_attachment_samples[]
3345e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription2-pColorAttachments-03070]]
3346e5c31af7Sopenharmony_ci    If the `apiext:VK_AMD_mixed_attachment_samples` extension is enabled,
3347e5c31af7Sopenharmony_ci    all attachments in pname:pColorAttachments that are not
3348e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_UNUSED must: have a sample count that is smaller
3349e5c31af7Sopenharmony_ci    than or equal to the sample count of pname:pDepthStencilAttachment if it
3350e5c31af7Sopenharmony_ci    is not ename:VK_ATTACHMENT_UNUSED
3351e5c31af7Sopenharmony_ciendif::VK_AMD_mixed_attachment_samples[]
3352e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription2-pDepthStencilAttachment-03071]]
3353e5c31af7Sopenharmony_ci    If neither the `apiext:VK_AMD_mixed_attachment_samples` nor the
3354e5c31af7Sopenharmony_ci    `apiext:VK_NV_framebuffer_mixed_samples` extensions are enabled, and if
3355e5c31af7Sopenharmony_ci    pname:pDepthStencilAttachment is not ename:VK_ATTACHMENT_UNUSED and any
3356e5c31af7Sopenharmony_ci    attachments in pname:pColorAttachments are not
3357e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_UNUSED, they must: have the same sample count
3358e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription2-attachment-03073]]
3359e5c31af7Sopenharmony_ci    Each element of pname:pPreserveAttachments must: not be
3360e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_UNUSED
3361e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription2-pPreserveAttachments-03074]]
3362e5c31af7Sopenharmony_ci    Any given element of pname:pPreserveAttachments must: not also be an
3363e5c31af7Sopenharmony_ci    element of any other member of the subpass description
3364e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription2-layout-02528]]
3365e5c31af7Sopenharmony_ci    If any attachment is used by more than one slink:VkAttachmentReference2
3366e5c31af7Sopenharmony_ci    member, then each use must: use the same pname:layout
3367e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription2-None-04439]]
3368e5c31af7Sopenharmony_ci    Attachments must: follow the <<attachment-type-imagelayout, image layout
3369e5c31af7Sopenharmony_ci    requirements>> based on the type of attachment it is being used as
3370e5c31af7Sopenharmony_ciifdef::VK_NVX_multiview_per_view_attributes[]
3371e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription2-flags-03076]]
3372e5c31af7Sopenharmony_ci    If pname:flags includes
3373e5c31af7Sopenharmony_ci    ename:VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX, it must:
3374e5c31af7Sopenharmony_ci    also include ename:VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX
3375e5c31af7Sopenharmony_ciendif::VK_NVX_multiview_per_view_attributes[]
3376e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription2-attachment-02799]]
3377e5c31af7Sopenharmony_ci    If the pname:attachment member of any element of pname:pInputAttachments
3378e5c31af7Sopenharmony_ci    is not ename:VK_ATTACHMENT_UNUSED, then the pname:aspectMask member
3379e5c31af7Sopenharmony_ci    must: be a valid combination of elink:VkImageAspectFlagBits
3380e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription2-attachment-02800]]
3381e5c31af7Sopenharmony_ci    If the pname:attachment member of any element of pname:pInputAttachments
3382e5c31af7Sopenharmony_ci    is not ename:VK_ATTACHMENT_UNUSED, then the pname:aspectMask member
3383e5c31af7Sopenharmony_ci    must: not be `0`
3384e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription2-attachment-02801]]
3385e5c31af7Sopenharmony_ci    If the pname:attachment member of any element of pname:pInputAttachments
3386e5c31af7Sopenharmony_ci    is not ename:VK_ATTACHMENT_UNUSED, then the pname:aspectMask member
3387e5c31af7Sopenharmony_ci    must: not include ename:VK_IMAGE_ASPECT_METADATA_BIT
3388e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
3389e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription2-attachment-04563]]
3390e5c31af7Sopenharmony_ci    If the pname:attachment member of any element of pname:pInputAttachments
3391e5c31af7Sopenharmony_ci    is not ename:VK_ATTACHMENT_UNUSED, then the pname:aspectMask member
3392e5c31af7Sopenharmony_ci    must: not include `VK_IMAGE_ASPECT_MEMORY_PLANE__{ibit}__BIT_EXT` for
3393e5c31af7Sopenharmony_ci    any index _i_
3394e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
3395e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescription2-pDepthStencilAttachment-04440]]
3396e5c31af7Sopenharmony_ci    An attachment must: not be used in both pname:pDepthStencilAttachment
3397e5c31af7Sopenharmony_ci    and pname:pColorAttachments
3398e5c31af7Sopenharmony_ci****
3399e5c31af7Sopenharmony_ci
3400e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkSubpassDescription2.txt[]
3401e5c31af7Sopenharmony_ci--
3402e5c31af7Sopenharmony_ci
3403e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_depth_stencil_resolve[]
3404e5c31af7Sopenharmony_ci[open,refpage='VkSubpassDescriptionDepthStencilResolve',desc='Structure specifying depth/stencil resolve operations for a subpass',type='structs',alias='VkSubpassDescriptionDepthStencilResolveKHR']
3405e5c31af7Sopenharmony_ci--
3406e5c31af7Sopenharmony_ciIf the pname:pNext chain of sname:VkSubpassDescription2 includes a
3407e5c31af7Sopenharmony_cisname:VkSubpassDescriptionDepthStencilResolve structure, then that structure
3408e5c31af7Sopenharmony_cidescribes multisample resolve operations for the depth/stencil attachment in
3409e5c31af7Sopenharmony_cia subpass.
3410e5c31af7Sopenharmony_ci
3411e5c31af7Sopenharmony_ciThe sname:VkSubpassDescriptionDepthStencilResolve structure is defined as:
3412e5c31af7Sopenharmony_ci
3413e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkSubpassDescriptionDepthStencilResolve.txt[]
3414e5c31af7Sopenharmony_ci
3415e5c31af7Sopenharmony_ciifdef::VK_KHR_depth_stencil_resolve[]
3416e5c31af7Sopenharmony_cior the equivalent
3417e5c31af7Sopenharmony_ci
3418e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkSubpassDescriptionDepthStencilResolveKHR.txt[]
3419e5c31af7Sopenharmony_ciendif::VK_KHR_depth_stencil_resolve[]
3420e5c31af7Sopenharmony_ci
3421e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
3422e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
3423e5c31af7Sopenharmony_ci    structure.
3424e5c31af7Sopenharmony_ci  * pname:depthResolveMode is a elink:VkResolveModeFlagBits value describing
3425e5c31af7Sopenharmony_ci    the depth resolve mode.
3426e5c31af7Sopenharmony_ci  * pname:stencilResolveMode is a elink:VkResolveModeFlagBits value
3427e5c31af7Sopenharmony_ci    describing the stencil resolve mode.
3428e5c31af7Sopenharmony_ci  * pname:pDepthStencilResolveAttachment is `NULL` or a pointer to a
3429e5c31af7Sopenharmony_ci    slink:VkAttachmentReference2 structure defining the depth/stencil
3430e5c31af7Sopenharmony_ci    resolve attachment for this subpass and its layout.
3431e5c31af7Sopenharmony_ci
3432e5c31af7Sopenharmony_ciIf pname:pDepthStencilResolveAttachment is `NULL`, or if its attachment
3433e5c31af7Sopenharmony_ciindex is ename:VK_ATTACHMENT_UNUSED, it indicates that no depth/stencil
3434e5c31af7Sopenharmony_ciresolve attachment will be used in the subpass.
3435e5c31af7Sopenharmony_ci
3436e5c31af7Sopenharmony_ci.Valid Usage
3437e5c31af7Sopenharmony_ci****
3438e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescriptionDepthStencilResolve-pDepthStencilResolveAttachment-03177]]
3439e5c31af7Sopenharmony_ci    If pname:pDepthStencilResolveAttachment is not `NULL` and does not have
3440e5c31af7Sopenharmony_ci    the value ename:VK_ATTACHMENT_UNUSED, pname:pDepthStencilAttachment
3441e5c31af7Sopenharmony_ci    must: not be `NULL` or have the value ename:VK_ATTACHMENT_UNUSED
3442e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescriptionDepthStencilResolve-pDepthStencilResolveAttachment-03178]]
3443e5c31af7Sopenharmony_ci    If pname:pDepthStencilResolveAttachment is not `NULL` and does not have
3444e5c31af7Sopenharmony_ci    the value ename:VK_ATTACHMENT_UNUSED, pname:depthResolveMode and
3445e5c31af7Sopenharmony_ci    pname:stencilResolveMode must: not both be ename:VK_RESOLVE_MODE_NONE
3446e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescriptionDepthStencilResolve-pDepthStencilResolveAttachment-03179]]
3447e5c31af7Sopenharmony_ci    If pname:pDepthStencilResolveAttachment is not `NULL` and does not have
3448e5c31af7Sopenharmony_ci    the value ename:VK_ATTACHMENT_UNUSED, pname:pDepthStencilAttachment
3449e5c31af7Sopenharmony_ci    must: not have a sample count of ename:VK_SAMPLE_COUNT_1_BIT
3450e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescriptionDepthStencilResolve-pDepthStencilResolveAttachment-03180]]
3451e5c31af7Sopenharmony_ci    If pname:pDepthStencilResolveAttachment is not `NULL` and does not have
3452e5c31af7Sopenharmony_ci    the value ename:VK_ATTACHMENT_UNUSED,
3453e5c31af7Sopenharmony_ci    pname:pDepthStencilResolveAttachment must: have a sample count of
3454e5c31af7Sopenharmony_ci    ename:VK_SAMPLE_COUNT_1_BIT
3455e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescriptionDepthStencilResolve-pDepthStencilResolveAttachment-02651]]
3456e5c31af7Sopenharmony_ci    If pname:pDepthStencilResolveAttachment is not `NULL` and does not have
3457e5c31af7Sopenharmony_ci    the value ename:VK_ATTACHMENT_UNUSED then it must: have an image format
3458e5c31af7Sopenharmony_ci    whose <<potential-format-features, potential format features>> contain
3459e5c31af7Sopenharmony_ci    ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT
3460e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescriptionDepthStencilResolve-pDepthStencilResolveAttachment-03181]]
3461e5c31af7Sopenharmony_ci    If pname:pDepthStencilResolveAttachment is not `NULL` and does not have
3462e5c31af7Sopenharmony_ci    the value ename:VK_ATTACHMENT_UNUSED and elink:VkFormat of
3463e5c31af7Sopenharmony_ci    pname:pDepthStencilResolveAttachment has a depth component, then the
3464e5c31af7Sopenharmony_ci    elink:VkFormat of pname:pDepthStencilAttachment must: have a depth
3465e5c31af7Sopenharmony_ci    component with the same number of bits and numerical type
3466e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescriptionDepthStencilResolve-pDepthStencilResolveAttachment-03182]]
3467e5c31af7Sopenharmony_ci    If pname:pDepthStencilResolveAttachment is not `NULL` and does not have
3468e5c31af7Sopenharmony_ci    the value ename:VK_ATTACHMENT_UNUSED, and elink:VkFormat of
3469e5c31af7Sopenharmony_ci    pname:pDepthStencilResolveAttachment has a stencil component, then the
3470e5c31af7Sopenharmony_ci    elink:VkFormat of pname:pDepthStencilAttachment must: have a stencil
3471e5c31af7Sopenharmony_ci    component with the same number of bits and numerical type
3472e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescriptionDepthStencilResolve-depthResolveMode-03183]]
3473e5c31af7Sopenharmony_ci    If pname:pDepthStencilResolveAttachment is not `NULL` and does not have
3474e5c31af7Sopenharmony_ci    the value ename:VK_ATTACHMENT_UNUSED and the elink:VkFormat of
3475e5c31af7Sopenharmony_ci    pname:pDepthStencilResolveAttachment has a depth component, then the
3476e5c31af7Sopenharmony_ci    value of pname:depthResolveMode must: be one of the bits set in
3477e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDepthStencilResolveProperties::pname:supportedDepthResolveModes
3478e5c31af7Sopenharmony_ci    or ename:VK_RESOLVE_MODE_NONE
3479e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescriptionDepthStencilResolve-stencilResolveMode-03184]]
3480e5c31af7Sopenharmony_ci    If pname:pDepthStencilResolveAttachment is not `NULL` and does not have
3481e5c31af7Sopenharmony_ci    the value ename:VK_ATTACHMENT_UNUSED and the elink:VkFormat of
3482e5c31af7Sopenharmony_ci    pname:pDepthStencilResolveAttachment has a stencil component, then the
3483e5c31af7Sopenharmony_ci    value of pname:stencilResolveMode must: be one of the bits set in
3484e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDepthStencilResolveProperties::pname:supportedStencilResolveModes
3485e5c31af7Sopenharmony_ci    or ename:VK_RESOLVE_MODE_NONE
3486e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescriptionDepthStencilResolve-pDepthStencilResolveAttachment-03185]]
3487e5c31af7Sopenharmony_ci    If pname:pDepthStencilResolveAttachment is not `NULL` and does not have
3488e5c31af7Sopenharmony_ci    the value ename:VK_ATTACHMENT_UNUSED, the elink:VkFormat of
3489e5c31af7Sopenharmony_ci    pname:pDepthStencilResolveAttachment has both depth and stencil
3490e5c31af7Sopenharmony_ci    components,
3491e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDepthStencilResolveProperties::pname:independentResolve
3492e5c31af7Sopenharmony_ci    is ename:VK_FALSE, and
3493e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDepthStencilResolveProperties::pname:independentResolveNone
3494e5c31af7Sopenharmony_ci    is ename:VK_FALSE, then the values of pname:depthResolveMode and
3495e5c31af7Sopenharmony_ci    pname:stencilResolveMode must: be identical
3496e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDescriptionDepthStencilResolve-pDepthStencilResolveAttachment-03186]]
3497e5c31af7Sopenharmony_ci    If pname:pDepthStencilResolveAttachment is not `NULL` and does not have
3498e5c31af7Sopenharmony_ci    the value ename:VK_ATTACHMENT_UNUSED, the elink:VkFormat of
3499e5c31af7Sopenharmony_ci    pname:pDepthStencilResolveAttachment has both depth and stencil
3500e5c31af7Sopenharmony_ci    components,
3501e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDepthStencilResolveProperties::pname:independentResolve
3502e5c31af7Sopenharmony_ci    is ename:VK_FALSE and
3503e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDepthStencilResolveProperties::pname:independentResolveNone
3504e5c31af7Sopenharmony_ci    is ename:VK_TRUE, then the values of pname:depthResolveMode and
3505e5c31af7Sopenharmony_ci    pname:stencilResolveMode must: be identical or one of them must: be
3506e5c31af7Sopenharmony_ci    ename:VK_RESOLVE_MODE_NONE
3507e5c31af7Sopenharmony_ci****
3508e5c31af7Sopenharmony_ci
3509e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkSubpassDescriptionDepthStencilResolve.txt[]
3510e5c31af7Sopenharmony_ci--
3511e5c31af7Sopenharmony_ci
3512e5c31af7Sopenharmony_ci[open,refpage='VkResolveModeFlagBits',desc='Bitmask indicating supported depth and stencil resolve modes',type='enums',alias='VkResolveModeFlagBitsKHR']
3513e5c31af7Sopenharmony_ci--
3514e5c31af7Sopenharmony_ciPossible values of
3515e5c31af7Sopenharmony_cislink:VkSubpassDescriptionDepthStencilResolve::pname:depthResolveMode and
3516e5c31af7Sopenharmony_cipname:stencilResolveMode, specifying the depth and stencil resolve modes,
3517e5c31af7Sopenharmony_ciare:
3518e5c31af7Sopenharmony_ci
3519e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkResolveModeFlagBits.txt[]
3520e5c31af7Sopenharmony_ci
3521e5c31af7Sopenharmony_ciifdef::VK_KHR_depth_stencil_resolve[]
3522e5c31af7Sopenharmony_cior the equivalent
3523e5c31af7Sopenharmony_ci
3524e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkResolveModeFlagBitsKHR.txt[]
3525e5c31af7Sopenharmony_ciendif::VK_KHR_depth_stencil_resolve[]
3526e5c31af7Sopenharmony_ci
3527e5c31af7Sopenharmony_ci  * ename:VK_RESOLVE_MODE_NONE indicates that no resolve operation is done.
3528e5c31af7Sopenharmony_ci  * ename:VK_RESOLVE_MODE_SAMPLE_ZERO_BIT indicates that result of the
3529e5c31af7Sopenharmony_ci    resolve operation is equal to the value of sample 0.
3530e5c31af7Sopenharmony_ci  * ename:VK_RESOLVE_MODE_AVERAGE_BIT indicates that result of the resolve
3531e5c31af7Sopenharmony_ci    operation is the average of the sample values.
3532e5c31af7Sopenharmony_ci  * ename:VK_RESOLVE_MODE_MIN_BIT indicates that result of the resolve
3533e5c31af7Sopenharmony_ci    operation is the minimum of the sample values.
3534e5c31af7Sopenharmony_ci  * ename:VK_RESOLVE_MODE_MAX_BIT indicates that result of the resolve
3535e5c31af7Sopenharmony_ci    operation is the maximum of the sample values.
3536e5c31af7Sopenharmony_ci--
3537e5c31af7Sopenharmony_ci
3538e5c31af7Sopenharmony_ci[open,refpage='VkResolveModeFlags',desc='Bitmask of VkResolveModeFlagBits',type='flags',alias='VkResolveModeFlagsKHR']
3539e5c31af7Sopenharmony_ci--
3540e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkResolveModeFlags.txt[]
3541e5c31af7Sopenharmony_ci
3542e5c31af7Sopenharmony_ciifdef::VK_KHR_depth_stencil_resolve[]
3543e5c31af7Sopenharmony_cior the equivalent
3544e5c31af7Sopenharmony_ci
3545e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkResolveModeFlagsKHR.txt[]
3546e5c31af7Sopenharmony_ciendif::VK_KHR_depth_stencil_resolve[]
3547e5c31af7Sopenharmony_ci
3548e5c31af7Sopenharmony_citname:VkResolveModeFlags is a bitmask type for setting a mask of zero or
3549e5c31af7Sopenharmony_cimore elink:VkResolveModeFlagBits.
3550e5c31af7Sopenharmony_ci--
3551e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_depth_stencil_resolve[]
3552e5c31af7Sopenharmony_ci
3553e5c31af7Sopenharmony_ci
3554e5c31af7Sopenharmony_ciifdef::VK_KHR_fragment_shading_rate[]
3555e5c31af7Sopenharmony_ci[open,refpage='VkFragmentShadingRateAttachmentInfoKHR',desc='Structure specifying a fragment shading rate attachment for a subpass',type='structs']
3556e5c31af7Sopenharmony_ci--
3557e5c31af7Sopenharmony_ciThe sname:VkFragmentShadingRateAttachmentInfoKHR structure is defined as:
3558e5c31af7Sopenharmony_ci
3559e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkFragmentShadingRateAttachmentInfoKHR.txt[]
3560e5c31af7Sopenharmony_ci
3561e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
3562e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
3563e5c31af7Sopenharmony_ci    structure.
3564e5c31af7Sopenharmony_ci  * pname:pFragmentShadingRateAttachment is `NULL` or a pointer to a
3565e5c31af7Sopenharmony_ci    slink:VkAttachmentReference2 structure defining the fragment shading
3566e5c31af7Sopenharmony_ci    rate attachment for this subpass.
3567e5c31af7Sopenharmony_ci  * pname:shadingRateAttachmentTexelSize specifies the size of the portion
3568e5c31af7Sopenharmony_ci    of the framebuffer corresponding to each texel in
3569e5c31af7Sopenharmony_ci    pname:pFragmentShadingRateAttachment.
3570e5c31af7Sopenharmony_ci
3571e5c31af7Sopenharmony_ciIf no shading rate attachment is specified, or if this structure is not
3572e5c31af7Sopenharmony_cispecified, the implementation behaves as if a valid shading rate attachment
3573e5c31af7Sopenharmony_ciwas specified with all texels specifying a single pixel per fragment.
3574e5c31af7Sopenharmony_ci
3575e5c31af7Sopenharmony_ci.Valid Usage
3576e5c31af7Sopenharmony_ci****
3577e5c31af7Sopenharmony_ci  * [[VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-04524]]
3578e5c31af7Sopenharmony_ci    If pname:pFragmentShadingRateAttachment is not `NULL` and its
3579e5c31af7Sopenharmony_ci    pname:attachment member is not ename:VK_ATTACHMENT_UNUSED, its
3580e5c31af7Sopenharmony_ci    pname:layout member must: be equal to ename:VK_IMAGE_LAYOUT_GENERAL or
3581e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR
3582e5c31af7Sopenharmony_ci  * [[VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-04525]]
3583e5c31af7Sopenharmony_ci    If pname:pFragmentShadingRateAttachment is not `NULL` and its
3584e5c31af7Sopenharmony_ci    pname:attachment member is not ename:VK_ATTACHMENT_UNUSED,
3585e5c31af7Sopenharmony_ci    pname:shadingRateAttachmentTexelSize.width must: be a power of two value
3586e5c31af7Sopenharmony_ci  * [[VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-04526]]
3587e5c31af7Sopenharmony_ci    If pname:pFragmentShadingRateAttachment is not `NULL` and its
3588e5c31af7Sopenharmony_ci    pname:attachment member is not ename:VK_ATTACHMENT_UNUSED,
3589e5c31af7Sopenharmony_ci    pname:shadingRateAttachmentTexelSize.width must: be less than or equal
3590e5c31af7Sopenharmony_ci    to <<limits-maxFragmentShadingRateAttachmentTexelSize,
3591e5c31af7Sopenharmony_ci    pname:maxFragmentShadingRateAttachmentTexelSize.width>>
3592e5c31af7Sopenharmony_ci  * [[VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-04527]]
3593e5c31af7Sopenharmony_ci    If pname:pFragmentShadingRateAttachment is not `NULL` and its
3594e5c31af7Sopenharmony_ci    pname:attachment member is not ename:VK_ATTACHMENT_UNUSED,
3595e5c31af7Sopenharmony_ci    pname:shadingRateAttachmentTexelSize.width must: be greater than or
3596e5c31af7Sopenharmony_ci    equal to <<limits-minFragmentShadingRateAttachmentTexelSize,
3597e5c31af7Sopenharmony_ci    pname:minFragmentShadingRateAttachmentTexelSize.width>>
3598e5c31af7Sopenharmony_ci  * [[VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-04528]]
3599e5c31af7Sopenharmony_ci    If pname:pFragmentShadingRateAttachment is not `NULL` and its
3600e5c31af7Sopenharmony_ci    pname:attachment member is not ename:VK_ATTACHMENT_UNUSED,
3601e5c31af7Sopenharmony_ci    pname:shadingRateAttachmentTexelSize.height must: be a power of two
3602e5c31af7Sopenharmony_ci    value
3603e5c31af7Sopenharmony_ci  * [[VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-04529]]
3604e5c31af7Sopenharmony_ci    If pname:pFragmentShadingRateAttachment is not `NULL` and its
3605e5c31af7Sopenharmony_ci    pname:attachment member is not ename:VK_ATTACHMENT_UNUSED,
3606e5c31af7Sopenharmony_ci    pname:shadingRateAttachmentTexelSize.height must: be less than or equal
3607e5c31af7Sopenharmony_ci    to <<limits-maxFragmentShadingRateAttachmentTexelSize,
3608e5c31af7Sopenharmony_ci    pname:maxFragmentShadingRateAttachmentTexelSize.height>>
3609e5c31af7Sopenharmony_ci  * [[VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-04530]]
3610e5c31af7Sopenharmony_ci    If pname:pFragmentShadingRateAttachment is not `NULL` and its
3611e5c31af7Sopenharmony_ci    pname:attachment member is not ename:VK_ATTACHMENT_UNUSED,
3612e5c31af7Sopenharmony_ci    pname:shadingRateAttachmentTexelSize.height must: be greater than or
3613e5c31af7Sopenharmony_ci    equal to <<limits-minFragmentShadingRateAttachmentTexelSize,
3614e5c31af7Sopenharmony_ci    pname:minFragmentShadingRateAttachmentTexelSize.height>>
3615e5c31af7Sopenharmony_ci  * [[VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-04531]]
3616e5c31af7Sopenharmony_ci    If pname:pFragmentShadingRateAttachment is not `NULL` and its
3617e5c31af7Sopenharmony_ci    pname:attachment member is not ename:VK_ATTACHMENT_UNUSED, the quotient
3618e5c31af7Sopenharmony_ci    of pname:shadingRateAttachmentTexelSize.width and
3619e5c31af7Sopenharmony_ci    pname:shadingRateAttachmentTexelSize.height must: be less than or equal
3620e5c31af7Sopenharmony_ci    to <<limits-maxFragmentShadingRateAttachmentTexelSizeAspectRatio,
3621e5c31af7Sopenharmony_ci    pname:maxFragmentShadingRateAttachmentTexelSizeAspectRatio>>
3622e5c31af7Sopenharmony_ci  * [[VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-04532]]
3623e5c31af7Sopenharmony_ci    If pname:pFragmentShadingRateAttachment is not `NULL` and its
3624e5c31af7Sopenharmony_ci    pname:attachment member is not ename:VK_ATTACHMENT_UNUSED, the quotient
3625e5c31af7Sopenharmony_ci    of pname:shadingRateAttachmentTexelSize.height and
3626e5c31af7Sopenharmony_ci    pname:shadingRateAttachmentTexelSize.width must: be less than or equal
3627e5c31af7Sopenharmony_ci    to <<limits-maxFragmentShadingRateAttachmentTexelSizeAspectRatio,
3628e5c31af7Sopenharmony_ci    pname:maxFragmentShadingRateAttachmentTexelSizeAspectRatio>>
3629e5c31af7Sopenharmony_ci****
3630e5c31af7Sopenharmony_ci
3631e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkFragmentShadingRateAttachmentInfoKHR.txt[]
3632e5c31af7Sopenharmony_ci--
3633e5c31af7Sopenharmony_ciendif::VK_KHR_fragment_shading_rate[]
3634e5c31af7Sopenharmony_ci
3635e5c31af7Sopenharmony_ci[open,refpage='VkAttachmentReference2',desc='Structure specifying an attachment reference',type='structs',alias='VkAttachmentReference2KHR']
3636e5c31af7Sopenharmony_ci--
3637e5c31af7Sopenharmony_ciThe sname:VkAttachmentReference2 structure is defined as:
3638e5c31af7Sopenharmony_ci
3639e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkAttachmentReference2.txt[]
3640e5c31af7Sopenharmony_ci
3641e5c31af7Sopenharmony_ciifdef::VK_KHR_create_renderpass2[]
3642e5c31af7Sopenharmony_cior the equivalent
3643e5c31af7Sopenharmony_ci
3644e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkAttachmentReference2KHR.txt[]
3645e5c31af7Sopenharmony_ciendif::VK_KHR_create_renderpass2[]
3646e5c31af7Sopenharmony_ci
3647e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
3648e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
3649e5c31af7Sopenharmony_ci    structure.
3650e5c31af7Sopenharmony_ci  * pname:attachment is either an integer value identifying an attachment at
3651e5c31af7Sopenharmony_ci    the corresponding index in
3652e5c31af7Sopenharmony_ci    slink:VkRenderPassCreateInfo2::pname:pAttachments, or
3653e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_UNUSED to signify that this attachment is not used.
3654e5c31af7Sopenharmony_ci  * pname:layout is a elink:VkImageLayout value specifying the layout the
3655e5c31af7Sopenharmony_ci    attachment uses during the subpass.
3656e5c31af7Sopenharmony_ci  * pname:aspectMask is a mask of which aspect(s) can: be accessed within
3657e5c31af7Sopenharmony_ci    the specified subpass as an input attachment.
3658e5c31af7Sopenharmony_ci
3659e5c31af7Sopenharmony_ciParameters defined by this structure with the same name as those in
3660e5c31af7Sopenharmony_cislink:VkAttachmentReference have the identical effect to those parameters.
3661e5c31af7Sopenharmony_ci
3662e5c31af7Sopenharmony_cipname:aspectMask is ignored when this structure is used to describe anything
3663e5c31af7Sopenharmony_ciother than an input attachment reference.
3664e5c31af7Sopenharmony_ci
3665e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
3666e5c31af7Sopenharmony_ciIf the <<features-separateDepthStencilLayouts,
3667e5c31af7Sopenharmony_cipname:separateDepthStencilLayouts>> feature is enabled, and pname:attachment
3668e5c31af7Sopenharmony_cihas a depth/stencil format, pname:layout can: be set to a layout that only
3669e5c31af7Sopenharmony_cispecifies the layout of the depth aspect.
3670e5c31af7Sopenharmony_ci
3671e5c31af7Sopenharmony_ciIf pname:layout only specifies the layout of the depth aspect of the
3672e5c31af7Sopenharmony_ciattachment, the layout of the stencil aspect is specified by the
3673e5c31af7Sopenharmony_cipname:stencilLayout member of a slink:VkAttachmentReferenceStencilLayout
3674e5c31af7Sopenharmony_cistructure included in the pname:pNext chain.
3675e5c31af7Sopenharmony_ciOtherwise, pname:layout describes the layout for all relevant image aspects.
3676e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
3677e5c31af7Sopenharmony_ci
3678e5c31af7Sopenharmony_ci.Valid Usage
3679e5c31af7Sopenharmony_ci****
3680e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentReference2-layout-03077]]
3681e5c31af7Sopenharmony_ci    If pname:attachment is not ename:VK_ATTACHMENT_UNUSED, pname:layout
3682e5c31af7Sopenharmony_ci    must: not be ename:VK_IMAGE_LAYOUT_UNDEFINED,
3683e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_PREINITIALIZED, or
3684e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_PRESENT_SRC_KHR
3685e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
3686e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentReference2-separateDepthStencilLayouts-03313]]
3687e5c31af7Sopenharmony_ci    If the <<features-separateDepthStencilLayouts,
3688e5c31af7Sopenharmony_ci    pname:separateDepthStencilLayouts>> feature is not enabled, and
3689e5c31af7Sopenharmony_ci    pname:attachment is not ename:VK_ATTACHMENT_UNUSED, pname:layout must:
3690e5c31af7Sopenharmony_ci    not be ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,
3691e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,
3692e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or
3693e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL,
3694e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentReference2-attachment-04754]]
3695e5c31af7Sopenharmony_ci    If pname:attachment is not ename:VK_ATTACHMENT_UNUSED, and the format of
3696e5c31af7Sopenharmony_ci    the referenced attachment is a color format, pname:layout must: not be
3697e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,
3698e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,
3699e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL or
3700e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
3701e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentReference2-attachment-04755]]
3702e5c31af7Sopenharmony_ci    If pname:attachment is not ename:VK_ATTACHMENT_UNUSED, and the format of
3703e5c31af7Sopenharmony_ci    the referenced attachment is a depth/stencil format which includes both
3704e5c31af7Sopenharmony_ci    depth and stencil aspects, and pname:layout is
3705e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or
3706e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, the pname:pNext chain
3707e5c31af7Sopenharmony_ci    must: include a slink:VkAttachmentReferenceStencilLayout structure
3708e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentReference2-attachment-04756]]
3709e5c31af7Sopenharmony_ci    If pname:attachment is not ename:VK_ATTACHMENT_UNUSED, and the format of
3710e5c31af7Sopenharmony_ci    the referenced attachment is a depth/stencil format which includes only
3711e5c31af7Sopenharmony_ci    the depth aspect, pname:layout must: not be
3712e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL or
3713e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
3714e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentReference2-attachment-04757]]
3715e5c31af7Sopenharmony_ci    If pname:attachment is not ename:VK_ATTACHMENT_UNUSED, and the format of
3716e5c31af7Sopenharmony_ci    the referenced attachment is a depth/stencil format which includes only
3717e5c31af7Sopenharmony_ci    the stencil aspect, pname:layout must: not be
3718e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or
3719e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL
3720e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
3721e5c31af7Sopenharmony_ci****
3722e5c31af7Sopenharmony_ci
3723e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkAttachmentReference2.txt[]
3724e5c31af7Sopenharmony_ci--
3725e5c31af7Sopenharmony_ci
3726e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
3727e5c31af7Sopenharmony_ci[open,refpage='VkAttachmentReferenceStencilLayout',desc='Structure specifying an attachment description',type='structs',alias='VkAttachmentReferenceStencilLayoutKHR']
3728e5c31af7Sopenharmony_ci--
3729e5c31af7Sopenharmony_ciThe sname:VkAttachmentReferenceStencilLayout structure is defined as:
3730e5c31af7Sopenharmony_ci
3731e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkAttachmentReferenceStencilLayout.txt[]
3732e5c31af7Sopenharmony_ci
3733e5c31af7Sopenharmony_ciifdef::VK_KHR_separate_depth_stencil_layouts[]
3734e5c31af7Sopenharmony_cior the equivalent
3735e5c31af7Sopenharmony_ci
3736e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkAttachmentReferenceStencilLayoutKHR.txt[]
3737e5c31af7Sopenharmony_ciendif::VK_KHR_separate_depth_stencil_layouts[]
3738e5c31af7Sopenharmony_ci
3739e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
3740e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
3741e5c31af7Sopenharmony_ci    structure.
3742e5c31af7Sopenharmony_ci  * pname:stencilLayout is a elink:VkImageLayout value specifying the layout
3743e5c31af7Sopenharmony_ci    the stencil aspect of the attachment uses during the subpass.
3744e5c31af7Sopenharmony_ci
3745e5c31af7Sopenharmony_ci.Valid Usage
3746e5c31af7Sopenharmony_ci****
3747e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentReferenceStencilLayout-stencilLayout-03318]]
3748e5c31af7Sopenharmony_ci    pname:stencilLayout must: not be ename:VK_IMAGE_LAYOUT_UNDEFINED,
3749e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_PREINITIALIZED,
3750e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
3751e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,
3752e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,
3753e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL,
3754e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL,
3755e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL,
3756e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, or
3757e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_PRESENT_SRC_KHR
3758e5c31af7Sopenharmony_ci****
3759e5c31af7Sopenharmony_ci
3760e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkAttachmentReferenceStencilLayout.txt[]
3761e5c31af7Sopenharmony_ci--
3762e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
3763e5c31af7Sopenharmony_ci
3764e5c31af7Sopenharmony_ci[open,refpage='VkSubpassDependency2',desc='Structure specifying a subpass dependency',type='structs',alias='VkSubpassDependency2KHR']
3765e5c31af7Sopenharmony_ci--
3766e5c31af7Sopenharmony_ci:refpage: VkSubpassDependency2
3767e5c31af7Sopenharmony_ciThe sname:VkSubpassDependency2 structure is defined as:
3768e5c31af7Sopenharmony_ci
3769e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkSubpassDependency2.txt[]
3770e5c31af7Sopenharmony_ci
3771e5c31af7Sopenharmony_ciifdef::VK_KHR_create_renderpass2[]
3772e5c31af7Sopenharmony_cior the equivalent
3773e5c31af7Sopenharmony_ci
3774e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkSubpassDependency2KHR.txt[]
3775e5c31af7Sopenharmony_ciendif::VK_KHR_create_renderpass2[]
3776e5c31af7Sopenharmony_ci
3777e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
3778e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
3779e5c31af7Sopenharmony_ci    structure.
3780e5c31af7Sopenharmony_ci  * pname:srcSubpass is the subpass index of the first subpass in the
3781e5c31af7Sopenharmony_ci    dependency, or ename:VK_SUBPASS_EXTERNAL.
3782e5c31af7Sopenharmony_ci  * pname:dstSubpass is the subpass index of the second subpass in the
3783e5c31af7Sopenharmony_ci    dependency, or ename:VK_SUBPASS_EXTERNAL.
3784e5c31af7Sopenharmony_ci  * pname:srcStageMask is a bitmask of elink:VkPipelineStageFlagBits
3785e5c31af7Sopenharmony_ci    specifying the <<synchronization-pipeline-stages-masks, source stage
3786e5c31af7Sopenharmony_ci    mask>>.
3787e5c31af7Sopenharmony_ci  * pname:dstStageMask is a bitmask of elink:VkPipelineStageFlagBits
3788e5c31af7Sopenharmony_ci    specifying the <<synchronization-pipeline-stages-masks, destination
3789e5c31af7Sopenharmony_ci    stage mask>>
3790e5c31af7Sopenharmony_ci  * pname:srcAccessMask is a bitmask of elink:VkAccessFlagBits specifying a
3791e5c31af7Sopenharmony_ci    <<synchronization-access-masks, source access mask>>.
3792e5c31af7Sopenharmony_ci  * pname:dstAccessMask is a bitmask of elink:VkAccessFlagBits specifying a
3793e5c31af7Sopenharmony_ci    <<synchronization-access-masks, destination access mask>>.
3794e5c31af7Sopenharmony_ci  * pname:dependencyFlags is a bitmask of elink:VkDependencyFlagBits.
3795e5c31af7Sopenharmony_ci  * pname:viewOffset controls which views in the source subpass the views in
3796e5c31af7Sopenharmony_ci    the destination subpass depend on.
3797e5c31af7Sopenharmony_ci
3798e5c31af7Sopenharmony_ciParameters defined by this structure with the same name as those in
3799e5c31af7Sopenharmony_cislink:VkSubpassDependency have the identical effect to those parameters.
3800e5c31af7Sopenharmony_ci
3801e5c31af7Sopenharmony_cipname:viewOffset has the same effect for the described subpass dependency as
3802e5c31af7Sopenharmony_cislink:VkRenderPassMultiviewCreateInfo::pname:pViewOffsets has on each
3803e5c31af7Sopenharmony_cicorresponding subpass dependency.
3804e5c31af7Sopenharmony_ci
3805e5c31af7Sopenharmony_ciifdef::VK_KHR_synchronization2[]
3806e5c31af7Sopenharmony_ciIf a slink:VkMemoryBarrier2KHR structure is included in the pname:pNext
3807e5c31af7Sopenharmony_cichain, pname:srcStageMask, pname:dstStageMask, pname:srcAccessMask, and
3808e5c31af7Sopenharmony_cipname:dstAccessMask parameters are ignored.
3809e5c31af7Sopenharmony_ciThe synchronization and access scopes instead are defined by the parameters
3810e5c31af7Sopenharmony_ciof slink:VkMemoryBarrier2KHR.
3811e5c31af7Sopenharmony_ciendif::VK_KHR_synchronization2[]
3812e5c31af7Sopenharmony_ci
3813e5c31af7Sopenharmony_ci.Valid Usage
3814e5c31af7Sopenharmony_ci****
3815e5c31af7Sopenharmony_ci:stageMaskName: srcStageMask
3816e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/stage_mask_common.txt[]
3817e5c31af7Sopenharmony_ci
3818e5c31af7Sopenharmony_ci:stageMaskName: dstStageMask
3819e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/stage_mask_common.txt[]
3820e5c31af7Sopenharmony_ci
3821e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDependency2-srcSubpass-03084]]
3822e5c31af7Sopenharmony_ci    pname:srcSubpass must: be less than or equal to pname:dstSubpass, unless
3823e5c31af7Sopenharmony_ci    one of them is ename:VK_SUBPASS_EXTERNAL, to avoid cyclic dependencies
3824e5c31af7Sopenharmony_ci    and ensure a valid execution order
3825e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDependency2-srcSubpass-03085]]
3826e5c31af7Sopenharmony_ci    pname:srcSubpass and pname:dstSubpass must: not both be equal to
3827e5c31af7Sopenharmony_ci    ename:VK_SUBPASS_EXTERNAL
3828e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDependency2-srcSubpass-03087]]
3829e5c31af7Sopenharmony_ci    If pname:srcSubpass is equal to pname:dstSubpass and not all of the
3830e5c31af7Sopenharmony_ci    stages in pname:srcStageMask and pname:dstStageMask are
3831e5c31af7Sopenharmony_ci    <<synchronization-framebuffer-regions,framebuffer-space stages>>, the
3832e5c31af7Sopenharmony_ci    <<synchronization-pipeline-stages-order, logically latest>> pipeline
3833e5c31af7Sopenharmony_ci    stage in pname:srcStageMask must: be
3834e5c31af7Sopenharmony_ci    <<synchronization-pipeline-stages-order, logically earlier>> than or
3835e5c31af7Sopenharmony_ci    equal to the <<synchronization-pipeline-stages-order, logically
3836e5c31af7Sopenharmony_ci    earliest>> pipeline stage in pname:dstStageMask
3837e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDependency2-srcAccessMask-03088]]
3838e5c31af7Sopenharmony_ci    Any access flag included in pname:srcAccessMask must: be supported by
3839e5c31af7Sopenharmony_ci    one of the pipeline stages in pname:srcStageMask, as specified in the
3840e5c31af7Sopenharmony_ci    <<synchronization-access-types-supported, table of supported access
3841e5c31af7Sopenharmony_ci    types>>
3842e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDependency2-dstAccessMask-03089]]
3843e5c31af7Sopenharmony_ci    Any access flag included in pname:dstAccessMask must: be supported by
3844e5c31af7Sopenharmony_ci    one of the pipeline stages in pname:dstStageMask, as specified in the
3845e5c31af7Sopenharmony_ci    <<synchronization-access-types-supported, table of supported access
3846e5c31af7Sopenharmony_ci    types>>
3847e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDependency2-dependencyFlags-03090]]
3848e5c31af7Sopenharmony_ci    If pname:dependencyFlags includes ename:VK_DEPENDENCY_VIEW_LOCAL_BIT,
3849e5c31af7Sopenharmony_ci    pname:srcSubpass must: not be equal to ename:VK_SUBPASS_EXTERNAL
3850e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDependency2-dependencyFlags-03091]]
3851e5c31af7Sopenharmony_ci    If pname:dependencyFlags includes ename:VK_DEPENDENCY_VIEW_LOCAL_BIT,
3852e5c31af7Sopenharmony_ci    pname:dstSubpass must: not be equal to ename:VK_SUBPASS_EXTERNAL
3853e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDependency2-srcSubpass-02245]]
3854e5c31af7Sopenharmony_ci    If pname:srcSubpass equals pname:dstSubpass, and pname:srcStageMask and
3855e5c31af7Sopenharmony_ci    pname:dstStageMask both include a
3856e5c31af7Sopenharmony_ci    <<synchronization-framebuffer-regions,framebuffer-space stage>>, then
3857e5c31af7Sopenharmony_ci    pname:dependencyFlags must: include ename:VK_DEPENDENCY_BY_REGION_BIT
3858e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDependency2-viewOffset-02530]]
3859e5c31af7Sopenharmony_ci    If pname:viewOffset is not equal to `0`, pname:srcSubpass must: not be
3860e5c31af7Sopenharmony_ci    equal to pname:dstSubpass
3861e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassDependency2-dependencyFlags-03092]]
3862e5c31af7Sopenharmony_ci    If pname:dependencyFlags does not include
3863e5c31af7Sopenharmony_ci    ename:VK_DEPENDENCY_VIEW_LOCAL_BIT, pname:viewOffset must: be `0`
3864e5c31af7Sopenharmony_ci****
3865e5c31af7Sopenharmony_ci
3866e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkSubpassDependency2.txt[]
3867e5c31af7Sopenharmony_ci--
3868e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_create_renderpass2[]
3869e5c31af7Sopenharmony_ci
3870e5c31af7Sopenharmony_ci[open,refpage='vkDestroyRenderPass',desc='Destroy a render pass object',type='protos']
3871e5c31af7Sopenharmony_ci--
3872e5c31af7Sopenharmony_ciTo destroy a render pass, call:
3873e5c31af7Sopenharmony_ci
3874e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkDestroyRenderPass.txt[]
3875e5c31af7Sopenharmony_ci
3876e5c31af7Sopenharmony_ci  * pname:device is the logical device that destroys the render pass.
3877e5c31af7Sopenharmony_ci  * pname:renderPass is the handle of the render pass to destroy.
3878e5c31af7Sopenharmony_ci  * pname:pAllocator controls host memory allocation as described in the
3879e5c31af7Sopenharmony_ci    <<memory-allocation, Memory Allocation>> chapter.
3880e5c31af7Sopenharmony_ci
3881e5c31af7Sopenharmony_ci.Valid Usage
3882e5c31af7Sopenharmony_ci****
3883e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyRenderPass-renderPass-00873]]
3884e5c31af7Sopenharmony_ci    All submitted commands that refer to pname:renderPass must: have
3885e5c31af7Sopenharmony_ci    completed execution
3886e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyRenderPass-renderPass-00874]]
3887e5c31af7Sopenharmony_ci    If sname:VkAllocationCallbacks were provided when pname:renderPass was
3888e5c31af7Sopenharmony_ci    created, a compatible set of callbacks must: be provided here
3889e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyRenderPass-renderPass-00875]]
3890e5c31af7Sopenharmony_ci    If no sname:VkAllocationCallbacks were provided when pname:renderPass
3891e5c31af7Sopenharmony_ci    was created, pname:pAllocator must: be `NULL`
3892e5c31af7Sopenharmony_ci****
3893e5c31af7Sopenharmony_ci
3894e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkDestroyRenderPass.txt[]
3895e5c31af7Sopenharmony_ci--
3896e5c31af7Sopenharmony_ci
3897e5c31af7Sopenharmony_ci
3898e5c31af7Sopenharmony_ci[[renderpass-compatibility]]
3899e5c31af7Sopenharmony_ci== Render Pass Compatibility
3900e5c31af7Sopenharmony_ci
3901e5c31af7Sopenharmony_ciFramebuffers and graphics pipelines are created based on a specific render
3902e5c31af7Sopenharmony_cipass object.
3903e5c31af7Sopenharmony_ciThey must: only be used with that render pass object, or one compatible with
3904e5c31af7Sopenharmony_ciit.
3905e5c31af7Sopenharmony_ci
3906e5c31af7Sopenharmony_ciTwo attachment references are compatible if they have matching format and
3907e5c31af7Sopenharmony_cisample count, or are both ename:VK_ATTACHMENT_UNUSED or the pointer that
3908e5c31af7Sopenharmony_ciwould contain the reference is `NULL`.
3909e5c31af7Sopenharmony_ci
3910e5c31af7Sopenharmony_ciTwo arrays of attachment references are compatible if all corresponding
3911e5c31af7Sopenharmony_cipairs of attachments are compatible.
3912e5c31af7Sopenharmony_ciIf the arrays are of different lengths, attachment references not present in
3913e5c31af7Sopenharmony_cithe smaller array are treated as ename:VK_ATTACHMENT_UNUSED.
3914e5c31af7Sopenharmony_ci
3915e5c31af7Sopenharmony_ciTwo render passes are compatible if their corresponding color, input,
3916e5c31af7Sopenharmony_ciresolve, and depth/stencil attachment references are compatible and if they
3917e5c31af7Sopenharmony_ciare otherwise identical except for:
3918e5c31af7Sopenharmony_ci
3919e5c31af7Sopenharmony_ci  * Initial and final image layout in attachment descriptions
3920e5c31af7Sopenharmony_ci  * Load and store operations in attachment descriptions
3921e5c31af7Sopenharmony_ci  * Image layout in attachment references
3922e5c31af7Sopenharmony_ci
3923e5c31af7Sopenharmony_ciAs an additional special case, if two render passes have a single subpass,
3924e5c31af7Sopenharmony_cithe resolve attachment reference
3925e5c31af7Sopenharmony_ciifdef::VK_KHR_depth_stencil_resolve[]
3926e5c31af7Sopenharmony_ciand depth/stencil resolve mode
3927e5c31af7Sopenharmony_ciendif::VK_KHR_depth_stencil_resolve[]
3928e5c31af7Sopenharmony_cicompatibility requirements are ignored.
3929e5c31af7Sopenharmony_ci
3930e5c31af7Sopenharmony_ciA framebuffer is compatible with a render pass if it was created using the
3931e5c31af7Sopenharmony_cisame render pass or a compatible render pass.
3932e5c31af7Sopenharmony_ci
3933e5c31af7Sopenharmony_ci
3934e5c31af7Sopenharmony_ci== Framebuffers
3935e5c31af7Sopenharmony_ci
3936e5c31af7Sopenharmony_ci[open,refpage='VkFramebuffer',desc='Opaque handle to a framebuffer object',type='handles']
3937e5c31af7Sopenharmony_ci--
3938e5c31af7Sopenharmony_ciRender passes operate in conjunction with _framebuffers_.
3939e5c31af7Sopenharmony_ciFramebuffers represent a collection of specific memory attachments that a
3940e5c31af7Sopenharmony_cirender pass instance uses.
3941e5c31af7Sopenharmony_ci
3942e5c31af7Sopenharmony_ciFramebuffers are represented by sname:VkFramebuffer handles:
3943e5c31af7Sopenharmony_ci
3944e5c31af7Sopenharmony_ciinclude::{generated}/api/handles/VkFramebuffer.txt[]
3945e5c31af7Sopenharmony_ci--
3946e5c31af7Sopenharmony_ci
3947e5c31af7Sopenharmony_ci[open,refpage='vkCreateFramebuffer',desc='Create a new framebuffer object',type='protos']
3948e5c31af7Sopenharmony_ci--
3949e5c31af7Sopenharmony_ciTo create a framebuffer, call:
3950e5c31af7Sopenharmony_ci
3951e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCreateFramebuffer.txt[]
3952e5c31af7Sopenharmony_ci
3953e5c31af7Sopenharmony_ci  * pname:device is the logical device that creates the framebuffer.
3954e5c31af7Sopenharmony_ci  * pname:pCreateInfo is a pointer to a slink:VkFramebufferCreateInfo
3955e5c31af7Sopenharmony_ci    structure describing additional information about framebuffer creation.
3956e5c31af7Sopenharmony_ci  * pname:pAllocator controls host memory allocation as described in the
3957e5c31af7Sopenharmony_ci    <<memory-allocation, Memory Allocation>> chapter.
3958e5c31af7Sopenharmony_ci  * pname:pFramebuffer is a pointer to a slink:VkFramebuffer handle in which
3959e5c31af7Sopenharmony_ci    the resulting framebuffer object is returned.
3960e5c31af7Sopenharmony_ci
3961e5c31af7Sopenharmony_ci.Valid Usage
3962e5c31af7Sopenharmony_ci****
3963e5c31af7Sopenharmony_ci  * [[VUID-vkCreateFramebuffer-pCreateInfo-02777]]
3964e5c31af7Sopenharmony_ci    If pname:pCreateInfo->flags does not include
3965e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, and pname:attachmentCount is
3966e5c31af7Sopenharmony_ci    not `0`, each element of pname:pCreateInfo->pAttachments must: have been
3967e5c31af7Sopenharmony_ci    created on pname:device
3968e5c31af7Sopenharmony_ci****
3969e5c31af7Sopenharmony_ci
3970e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCreateFramebuffer.txt[]
3971e5c31af7Sopenharmony_ci--
3972e5c31af7Sopenharmony_ci
3973e5c31af7Sopenharmony_ci[open,refpage='VkFramebufferCreateInfo',desc='Structure specifying parameters of a newly created framebuffer',type='structs']
3974e5c31af7Sopenharmony_ci--
3975e5c31af7Sopenharmony_ciThe sname:VkFramebufferCreateInfo structure is defined as:
3976e5c31af7Sopenharmony_ci
3977e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkFramebufferCreateInfo.txt[]
3978e5c31af7Sopenharmony_ci
3979e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
3980e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
3981e5c31af7Sopenharmony_ci    structure.
3982e5c31af7Sopenharmony_ci  * pname:flags is a bitmask of elink:VkFramebufferCreateFlagBits
3983e5c31af7Sopenharmony_ci  * pname:renderPass is a render pass defining what render passes the
3984e5c31af7Sopenharmony_ci    framebuffer will be compatible with.
3985e5c31af7Sopenharmony_ci    See <<renderpass-compatibility,Render Pass Compatibility>> for details.
3986e5c31af7Sopenharmony_ci  * pname:attachmentCount is the number of attachments.
3987e5c31af7Sopenharmony_ci  * pname:pAttachments is a pointer to an array of slink:VkImageView
3988e5c31af7Sopenharmony_ci    handles, each of which will be used as the corresponding attachment in a
3989e5c31af7Sopenharmony_ci    render pass instance.
3990e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_imageless_framebuffer[]
3991e5c31af7Sopenharmony_ci    If pname:flags includes ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, this
3992e5c31af7Sopenharmony_ci    parameter is ignored.
3993e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_imageless_framebuffer[]
3994e5c31af7Sopenharmony_ci  * pname:width, pname:height and pname:layers define the dimensions of the
3995e5c31af7Sopenharmony_ci    framebuffer.
3996e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_multiview[]
3997e5c31af7Sopenharmony_ci    If the render pass uses multiview, then pname:layers must: be one and
3998e5c31af7Sopenharmony_ci    each attachment requires a number of layers that is greater than the
3999e5c31af7Sopenharmony_ci    maximum bit index set in the view mask in the subpasses in which it is
4000e5c31af7Sopenharmony_ci    used.
4001e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_multiview[]
4002e5c31af7Sopenharmony_ci
4003e5c31af7Sopenharmony_ciOther than the exceptions listed below, applications must: ensure that all
4004e5c31af7Sopenharmony_ciaccesses to memory that backs image subresources used as attachments in a
4005e5c31af7Sopenharmony_cigiven render pass instance either happen-before the
4006e5c31af7Sopenharmony_ci<<renderpass-load-store-ops, load operations>> for those attachments, or
4007e5c31af7Sopenharmony_cihappen-after the <<renderpass-load-store-ops, store operations>> for those
4008e5c31af7Sopenharmony_ciattachments.
4009e5c31af7Sopenharmony_ci
4010e5c31af7Sopenharmony_ci[[renderpass-attachment-nonattachment]]
4011e5c31af7Sopenharmony_ciThe exceptions to the general rule are:
4012e5c31af7Sopenharmony_ci
4013e5c31af7Sopenharmony_ci  * For depth/stencil attachments, an aspect can: be used separately as
4014e5c31af7Sopenharmony_ci    attachment and non-attachment if both accesses are read-only.
4015e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance2[]
4016e5c31af7Sopenharmony_ci  * For depth/stencil attachments, each aspect can: be used separately as
4017e5c31af7Sopenharmony_ci    attachment and non-attachment as long as the non-attachment accesses are
4018e5c31af7Sopenharmony_ci    also via an image subresource in either the
4019e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL layout
4020e5c31af7Sopenharmony_ci    or the ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL
4021e5c31af7Sopenharmony_ci    layout, and the attachment resource uses whichever of those two layouts
4022e5c31af7Sopenharmony_ci    the image accesses do not.
4023e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
4024e5c31af7Sopenharmony_ci
4025e5c31af7Sopenharmony_ciUse of non-attachment aspects in these cases is only well defined if the
4026e5c31af7Sopenharmony_ciattachment is used in the subpass where the non-attachment access is being
4027e5c31af7Sopenharmony_cimade, or the layout of the image subresource is constant throughout the
4028e5c31af7Sopenharmony_cientire render pass instance, including the pname:initialLayout and
4029e5c31af7Sopenharmony_cipname:finalLayout.
4030e5c31af7Sopenharmony_ci
4031e5c31af7Sopenharmony_ci[NOTE]
4032e5c31af7Sopenharmony_ci.Note
4033e5c31af7Sopenharmony_ci====
4034e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_maintenance2[]
4035e5c31af7Sopenharmony_ciThis restriction means
4036e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
4037e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance2[]
4038e5c31af7Sopenharmony_ciThese restrictions mean
4039e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
4040e5c31af7Sopenharmony_cithat the render pass has full knowledge of all uses of all of the
4041e5c31af7Sopenharmony_ciattachments, so that the implementation is able to make correct decisions
4042e5c31af7Sopenharmony_ciabout when and how to perform layout transitions, when to overlap execution
4043e5c31af7Sopenharmony_ciof subpasses, etc.
4044e5c31af7Sopenharmony_ci====
4045e5c31af7Sopenharmony_ci
4046e5c31af7Sopenharmony_ci[[renderpass-noattachments]]
4047e5c31af7Sopenharmony_ciIt is legal for a subpass to use no color or depth/stencil attachments,
4048e5c31af7Sopenharmony_cieither because it has no attachment references or because all of them are
4049e5c31af7Sopenharmony_ciename:VK_ATTACHMENT_UNUSED.
4050e5c31af7Sopenharmony_ciThis kind of subpass can: use shader side effects such as image stores and
4051e5c31af7Sopenharmony_ciatomics to produce an output.
4052e5c31af7Sopenharmony_ciIn this case, the subpass continues to use the pname:width, pname:height,
4053e5c31af7Sopenharmony_ciand pname:layers of the framebuffer to define the dimensions of the
4054e5c31af7Sopenharmony_cirendering area, and the pname:rasterizationSamples from each pipeline's
4055e5c31af7Sopenharmony_cislink:VkPipelineMultisampleStateCreateInfo to define the number of samples
4056e5c31af7Sopenharmony_ciused in rasterization; however, if
4057e5c31af7Sopenharmony_cislink:VkPhysicalDeviceFeatures::pname:variableMultisampleRate is
4058e5c31af7Sopenharmony_ciename:VK_FALSE, then all pipelines to be bound with the subpass must: have
4059e5c31af7Sopenharmony_cithe same value for
4060e5c31af7Sopenharmony_cislink:VkPipelineMultisampleStateCreateInfo::pname:rasterizationSamples.
4061e5c31af7Sopenharmony_ci
4062e5c31af7Sopenharmony_ci.Valid Usage
4063e5c31af7Sopenharmony_ci****
4064e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-attachmentCount-00876]]
4065e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE, pname:attachmentCount
4066e5c31af7Sopenharmony_ci    must: be equal to the attachment count specified in pname:renderPass
4067e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-flags-02778]]
4068e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE, pname:flags does not
4069e5c31af7Sopenharmony_ci    include ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, and
4070e5c31af7Sopenharmony_ci    pname:attachmentCount is not `0`, pname:pAttachments must: be a valid
4071e5c31af7Sopenharmony_ci    pointer to an array of pname:attachmentCount valid slink:VkImageView
4072e5c31af7Sopenharmony_ci    handles
4073e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-pAttachments-00877]]
4074e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:flags does not
4075e5c31af7Sopenharmony_ci    include ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of
4076e5c31af7Sopenharmony_ci    pname:pAttachments that is used as a color attachment or resolve
4077e5c31af7Sopenharmony_ci    attachment by pname:renderPass must: have been created with a
4078e5c31af7Sopenharmony_ci    pname:usage value including ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
4079e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-pAttachments-02633]]
4080e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:flags does not
4081e5c31af7Sopenharmony_ci    include ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of
4082e5c31af7Sopenharmony_ci    pname:pAttachments that is used as a depth/stencil attachment by
4083e5c31af7Sopenharmony_ci    pname:renderPass must: have been created with a pname:usage value
4084e5c31af7Sopenharmony_ci    including ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
4085e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_depth_stencil_resolve[]
4086e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-pAttachments-02634]]
4087e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:flags does not
4088e5c31af7Sopenharmony_ci    include ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of
4089e5c31af7Sopenharmony_ci    pname:pAttachments that is used as a depth/stencil resolve attachment by
4090e5c31af7Sopenharmony_ci    pname:renderPass must: have been created with a pname:usage value
4091e5c31af7Sopenharmony_ci    including ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
4092e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_depth_stencil_resolve[]
4093e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-pAttachments-00879]]
4094e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:renderpass is
4095e5c31af7Sopenharmony_ci    not dlink:VK_NULL_HANDLE, pname:flags does not include
4096e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of
4097e5c31af7Sopenharmony_ci    pname:pAttachments that is used as an input attachment by
4098e5c31af7Sopenharmony_ci    pname:renderPass must: have been created with a pname:usage value
4099e5c31af7Sopenharmony_ci    including ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT
4100e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map[]
4101e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-pAttachments-02552]]
4102e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE, each element of
4103e5c31af7Sopenharmony_ci    pname:pAttachments that is used as a fragment density map attachment by
4104e5c31af7Sopenharmony_ci    pname:renderPass must: not have been created with a pname:flags value
4105e5c31af7Sopenharmony_ci    including ename:VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT
4106e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-renderPass-02553]]
4107e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE, pname:renderPass has a
4108e5c31af7Sopenharmony_ci    fragment density map attachment, and
4109e5c31af7Sopenharmony_ci    <<features-fragmentDensityMapNonSubsampledImages,non-subsample image
4110e5c31af7Sopenharmony_ci    feature>> is not enabled, each element of pname:pAttachments must: have
4111e5c31af7Sopenharmony_ci    been created with a pname:flags value including
4112e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT unless that element is the
4113e5c31af7Sopenharmony_ci    fragment density map attachment
4114e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map[]
4115e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-pAttachments-00880]]
4116e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:flags does not
4117e5c31af7Sopenharmony_ci    include ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of
4118e5c31af7Sopenharmony_ci    pname:pAttachments must: have been created with a elink:VkFormat value
4119e5c31af7Sopenharmony_ci    that matches the elink:VkFormat specified by the corresponding
4120e5c31af7Sopenharmony_ci    sname:VkAttachmentDescription in pname:renderPass
4121e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-pAttachments-00881]]
4122e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:flags does not
4123e5c31af7Sopenharmony_ci    include ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of
4124e5c31af7Sopenharmony_ci    pname:pAttachments must: have been created with a pname:samples value
4125e5c31af7Sopenharmony_ci    that matches the pname:samples value specified by the corresponding
4126e5c31af7Sopenharmony_ci    sname:VkAttachmentDescription in pname:renderPass
4127e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-flags-04533]]
4128e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:flags does not
4129e5c31af7Sopenharmony_ci    include ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of
4130e5c31af7Sopenharmony_ci    pname:pAttachments that is used as an input, color, resolve, or
4131e5c31af7Sopenharmony_ci    depth/stencil attachment by pname:renderPass must: have been created
4132e5c31af7Sopenharmony_ci    with a slink:VkImageCreateInfo::pname:width greater than or equal to
4133e5c31af7Sopenharmony_ci    pname:width
4134e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-flags-04534]]
4135e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:flags does not
4136e5c31af7Sopenharmony_ci    include ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of
4137e5c31af7Sopenharmony_ci    pname:pAttachments that is used as an input, color, resolve, or
4138e5c31af7Sopenharmony_ci    depth/stencil attachment by pname:renderPass must: have been created
4139e5c31af7Sopenharmony_ci    with a slink:VkImageCreateInfo::pname:height greater than or equal to
4140e5c31af7Sopenharmony_ci    pname:height
4141e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-flags-04535]]
4142e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:flags does not
4143e5c31af7Sopenharmony_ci    include ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of
4144e5c31af7Sopenharmony_ci    pname:pAttachments that is used as an input, color, resolve, or
4145e5c31af7Sopenharmony_ci    depth/stencil attachment by pname:renderPass must: have been created
4146e5c31af7Sopenharmony_ci    with a slink:VkImageViewCreateInfo::pname:subresourceRange.layerCount
4147e5c31af7Sopenharmony_ci    greater than or equal to pname:layers
4148e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_multiview[]
4149e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-renderPass-04536]]
4150e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:renderPass was
4151e5c31af7Sopenharmony_ci    specified with non-zero view masks, each element of pname:pAttachments
4152e5c31af7Sopenharmony_ci    that is used as an input, color, resolve, or depth/stencil attachment by
4153e5c31af7Sopenharmony_ci    pname:renderPass must: have a pname:layerCount greater than the index of
4154e5c31af7Sopenharmony_ci    the most significant bit set in any of those view masks
4155e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_multiview[]
4156e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map[]
4157e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_multiview[]
4158e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-pAttachments-02744]]
4159e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE, an element of
4160e5c31af7Sopenharmony_ci    pname:pAttachments that is referenced by
4161e5c31af7Sopenharmony_ci    pname:fragmentDensityMapAttachment must: have a pname:layerCount equal
4162e5c31af7Sopenharmony_ci    to `1`
4163e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_multiview[]
4164e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_multiview[]
4165e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-renderPass-02746]]
4166e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:renderPass was
4167e5c31af7Sopenharmony_ci    specified with non-zero view masks, each element of pname:pAttachments
4168e5c31af7Sopenharmony_ci    that is referenced by pname:fragmentDensityMapAttachment must: have a
4169e5c31af7Sopenharmony_ci    pname:layerCount equal to `1` or greater than the index of the most
4170e5c31af7Sopenharmony_ci    significant bit set in any of those view masks
4171e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-renderPass-02747]]
4172e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:renderPass was
4173e5c31af7Sopenharmony_ci    not specified with non-zero view masks, each element of
4174e5c31af7Sopenharmony_ci    pname:pAttachments that is referenced by
4175e5c31af7Sopenharmony_ci    pname:fragmentDensityMapAttachment must: have a pname:layerCount equal
4176e5c31af7Sopenharmony_ci    to `1`
4177e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_multiview[]
4178e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-pAttachments-02555]]
4179e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:flags does not
4180e5c31af7Sopenharmony_ci    include ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, an element of
4181e5c31af7Sopenharmony_ci    pname:pAttachments that is referenced by
4182e5c31af7Sopenharmony_ci    pname:fragmentDensityMapAttachment must: have a width at least as large
4183e5c31af7Sopenharmony_ci    as
4184e5c31af7Sopenharmony_ci    latexmath:[\left\lceil{\frac{width}{maxFragmentDensityTexelSize_{width}}}\right\rceil]
4185e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-pAttachments-02556]]
4186e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:flags does not
4187e5c31af7Sopenharmony_ci    include ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, an element of
4188e5c31af7Sopenharmony_ci    pname:pAttachments that is referenced by
4189e5c31af7Sopenharmony_ci    pname:fragmentDensityMapAttachment must: have a height at least as large
4190e5c31af7Sopenharmony_ci    as
4191e5c31af7Sopenharmony_ci    latexmath:[\left\lceil{\frac{height}{maxFragmentDensityTexelSize_{height}}}\right\rceil]
4192e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map[]
4193e5c31af7Sopenharmony_ciifdef::VK_KHR_fragment_shading_rate[]
4194e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_multiview[]
4195e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-flags-04537]]
4196e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:flags does not
4197e5c31af7Sopenharmony_ci    include ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, and pname:renderPass
4198e5c31af7Sopenharmony_ci    was specified with non-zero view masks, each element of
4199e5c31af7Sopenharmony_ci    pname:pAttachments that is used as a
4200e5c31af7Sopenharmony_ci    <<primsrast-fragment-shading-rate-attachment,fragment shading rate
4201e5c31af7Sopenharmony_ci    attachment>> by pname:renderPass must: have a pname:layerCount that is
4202e5c31af7Sopenharmony_ci    either `1`, or greater than the index of the most significant bit set in
4203e5c31af7Sopenharmony_ci    any of those view masks
4204e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-flags-04538]]
4205e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:flags does not
4206e5c31af7Sopenharmony_ci    include ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, and pname:renderPass
4207e5c31af7Sopenharmony_ci    was not specified with non-zero view masks, each element of
4208e5c31af7Sopenharmony_ci    pname:pAttachments that is used as a
4209e5c31af7Sopenharmony_ci    <<primsrast-fragment-shading-rate-attachment,fragment shading rate
4210e5c31af7Sopenharmony_ci    attachment>> by pname:renderPass must: have a pname:layerCount that is
4211e5c31af7Sopenharmony_ci    either `1`, or greater than pname:layers
4212e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_multiview[]
4213e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-flags-04539]]
4214e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:flags does not
4215e5c31af7Sopenharmony_ci    include ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, an element of
4216e5c31af7Sopenharmony_ci    pname:pAttachments that is used as a
4217e5c31af7Sopenharmony_ci    <<primsrast-fragment-shading-rate-attachment, fragment shading rate
4218e5c31af7Sopenharmony_ci    attachment>> must: have a width at least as large as
4219e5c31af7Sopenharmony_ci    [eq]#{lceil}pname:width / code:texelWidth{rceil}#, where code:texelWidth
4220e5c31af7Sopenharmony_ci    is the largest value of pname:shadingRateAttachmentTexelSize.width in a
4221e5c31af7Sopenharmony_ci    slink:VkFragmentShadingRateAttachmentInfoKHR which references that
4222e5c31af7Sopenharmony_ci    attachment
4223e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-flags-04540]]
4224e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:flags does not
4225e5c31af7Sopenharmony_ci    include ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, an element of
4226e5c31af7Sopenharmony_ci    pname:pAttachments that is used as a
4227e5c31af7Sopenharmony_ci    <<primsrast-fragment-shading-rate-attachment, fragment shading rate
4228e5c31af7Sopenharmony_ci    attachment>> must: have a height at least as large as
4229e5c31af7Sopenharmony_ci    [eq]#{lceil}pname:height / code:texelHeight{rceil}#, where
4230e5c31af7Sopenharmony_ci    code:texelHeight is the largest value of
4231e5c31af7Sopenharmony_ci    pname:shadingRateAttachmentTexelSize.height in a
4232e5c31af7Sopenharmony_ci    slink:VkFragmentShadingRateAttachmentInfoKHR which references that
4233e5c31af7Sopenharmony_ci    attachment
4234e5c31af7Sopenharmony_ciendif::VK_KHR_fragment_shading_rate[]
4235e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-pAttachments-00883]]
4236e5c31af7Sopenharmony_ci    If pname:flags does not include
4237e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of
4238e5c31af7Sopenharmony_ci    pname:pAttachments must: only specify a single mip level
4239e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-pAttachments-00884]]
4240e5c31af7Sopenharmony_ci    If pname:flags does not include
4241e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of
4242e5c31af7Sopenharmony_ci    pname:pAttachments must: have been created with the identity swizzle
4243e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-width-00885]]
4244e5c31af7Sopenharmony_ci    pname:width must: be greater than `0`
4245e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-width-00886]]
4246e5c31af7Sopenharmony_ci    pname:width must: be less than or equal to
4247e5c31af7Sopenharmony_ci    <<limits-maxFramebufferWidth,pname:maxFramebufferWidth>>
4248e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-height-00887]]
4249e5c31af7Sopenharmony_ci    pname:height must: be greater than `0`
4250e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-height-00888]]
4251e5c31af7Sopenharmony_ci    pname:height must: be less than or equal to
4252e5c31af7Sopenharmony_ci    <<limits-maxFramebufferHeight,pname:maxFramebufferHeight>>
4253e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-layers-00889]]
4254e5c31af7Sopenharmony_ci    pname:layers must: be greater than `0`
4255e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-layers-00890]]
4256e5c31af7Sopenharmony_ci    pname:layers must: be less than or equal to
4257e5c31af7Sopenharmony_ci    <<limits-maxFramebufferLayers,pname:maxFramebufferLayers>>
4258e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_multiview[]
4259e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-renderPass-02531]]
4260e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:renderPass was
4261e5c31af7Sopenharmony_ci    specified with non-zero view masks, pname:layers must: be `1`
4262e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_multiview[]
4263e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance1[]
4264e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-pAttachments-00891]]
4265e5c31af7Sopenharmony_ci    If pname:flags does not include
4266e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of
4267e5c31af7Sopenharmony_ci    pname:pAttachments that is a 2D or 2D array image view taken from a 3D
4268e5c31af7Sopenharmony_ci    image must: not be a depth/stencil format
4269e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance1[]
4270e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_imageless_framebuffer[]
4271e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-flags-03189]]
4272e5c31af7Sopenharmony_ci    If the <<features-imagelessFramebuffer, imageless framebuffer>> feature
4273e5c31af7Sopenharmony_ci    is not enabled, pname:flags must: not include
4274e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT
4275e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-flags-03190]]
4276e5c31af7Sopenharmony_ci    If pname:flags includes ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the
4277e5c31af7Sopenharmony_ci    pname:pNext chain must: include a
4278e5c31af7Sopenharmony_ci    slink:VkFramebufferAttachmentsCreateInfo structure
4279e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-flags-03191]]
4280e5c31af7Sopenharmony_ci    If pname:flags includes ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the
4281e5c31af7Sopenharmony_ci    pname:attachmentImageInfoCount member of a
4282e5c31af7Sopenharmony_ci    slink:VkFramebufferAttachmentsCreateInfo structure in the pname:pNext
4283e5c31af7Sopenharmony_ci    chain must: be equal to either zero or pname:attachmentCount
4284e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-flags-04541]]
4285e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:flags includes
4286e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the pname:width member of any
4287e5c31af7Sopenharmony_ci    element of the pname:pAttachmentImageInfos member of a
4288e5c31af7Sopenharmony_ci    slink:VkFramebufferAttachmentsCreateInfo structure in the pname:pNext
4289e5c31af7Sopenharmony_ci    chain that is used as an input, color, resolve or depth/stencil
4290e5c31af7Sopenharmony_ci    attachment in pname:renderPass must: be greater than or equal to
4291e5c31af7Sopenharmony_ci    pname:width
4292e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-flags-04542]]
4293e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:flags includes
4294e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the pname:height member of
4295e5c31af7Sopenharmony_ci    any element of the pname:pAttachmentImageInfos member of a
4296e5c31af7Sopenharmony_ci    slink:VkFramebufferAttachmentsCreateInfo structure in the pname:pNext
4297e5c31af7Sopenharmony_ci    chain that is used as an input, color, resolve or depth/stencil
4298e5c31af7Sopenharmony_ci    attachment in pname:renderPass must: be greater than or equal to
4299e5c31af7Sopenharmony_ci    pname:height
4300e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map[]
4301e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-flags-03196]]
4302e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:flags includes
4303e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the pname:width member of any
4304e5c31af7Sopenharmony_ci    element of the pname:pAttachmentImageInfos member of a
4305e5c31af7Sopenharmony_ci    slink:VkFramebufferAttachmentsCreateInfo structure in the pname:pNext
4306e5c31af7Sopenharmony_ci    chain that is referenced by
4307e5c31af7Sopenharmony_ci    slink:VkRenderPassFragmentDensityMapCreateInfoEXT::pname:fragmentDensityMapAttachment
4308e5c31af7Sopenharmony_ci    in pname:renderPass must: be greater than or equal to
4309e5c31af7Sopenharmony_ci    latexmath:[\left\lceil{\frac{width}{maxFragmentDensityTexelSize_{width}}}\right\rceil]
4310e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-flags-03197]]
4311e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:flags includes
4312e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the pname:height member of
4313e5c31af7Sopenharmony_ci    any element of the pname:pAttachmentImageInfos member of a
4314e5c31af7Sopenharmony_ci    slink:VkFramebufferAttachmentsCreateInfo structure included in the
4315e5c31af7Sopenharmony_ci    pname:pNext chain that is referenced by
4316e5c31af7Sopenharmony_ci    slink:VkRenderPassFragmentDensityMapCreateInfoEXT::pname:fragmentDensityMapAttachment
4317e5c31af7Sopenharmony_ci    in pname:renderPass must: be greater than or equal to
4318e5c31af7Sopenharmony_ci    latexmath:[\left\lceil{\frac{height}{maxFragmentDensityTexelSize_{height}}}\right\rceil]
4319e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map[]
4320e5c31af7Sopenharmony_ciifdef::VK_KHR_fragment_shading_rate[]
4321e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-flags-04543]]
4322e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:flags includes
4323e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the pname:width member of any
4324e5c31af7Sopenharmony_ci    element of the pname:pAttachmentImageInfos member of a
4325e5c31af7Sopenharmony_ci    slink:VkFramebufferAttachmentsCreateInfo structure in the pname:pNext
4326e5c31af7Sopenharmony_ci    chain that is used as a <<primsrast-fragment-shading-rate-attachment,
4327e5c31af7Sopenharmony_ci    fragment shading rate attachment>> must: be greater than or equal to
4328e5c31af7Sopenharmony_ci    [eq]#{lceil}pname:width / code:texelWidth{rceil}#, where code:texelWidth
4329e5c31af7Sopenharmony_ci    is the largest value of pname:shadingRateAttachmentTexelSize.width in a
4330e5c31af7Sopenharmony_ci    slink:VkFragmentShadingRateAttachmentInfoKHR which references that
4331e5c31af7Sopenharmony_ci    attachment
4332e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-flags-04544]]
4333e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:flags includes
4334e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the pname:height member of
4335e5c31af7Sopenharmony_ci    any element of the pname:pAttachmentImageInfos member of a
4336e5c31af7Sopenharmony_ci    slink:VkFramebufferAttachmentsCreateInfo structure in the pname:pNext
4337e5c31af7Sopenharmony_ci    chain that is used as a <<primsrast-fragment-shading-rate-attachment,
4338e5c31af7Sopenharmony_ci    fragment shading rate attachment>> must: be greater than or equal to
4339e5c31af7Sopenharmony_ci    [eq]#{lceil}pname:height / code:texelHeight{rceil}#, where
4340e5c31af7Sopenharmony_ci    code:texelHeight is the largest value of
4341e5c31af7Sopenharmony_ci    pname:shadingRateAttachmentTexelSize.height in a
4342e5c31af7Sopenharmony_ci    slink:VkFragmentShadingRateAttachmentInfoKHR which references that
4343e5c31af7Sopenharmony_ci    attachment
4344e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-flags-04545]]
4345e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:flags includes
4346e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the pname:layerCount member
4347e5c31af7Sopenharmony_ci    of any element of the pname:pAttachmentImageInfos member of a
4348e5c31af7Sopenharmony_ci    slink:VkFramebufferAttachmentsCreateInfo structure in the pname:pNext
4349e5c31af7Sopenharmony_ci    chain that is used as a <<primsrast-fragment-shading-rate-attachment,
4350e5c31af7Sopenharmony_ci    fragment shading rate attachment>> must: be either `1`, or greater than
4351e5c31af7Sopenharmony_ci    or equal to pname:layers
4352e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-flags-04587]]
4353e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE, pname:flags includes
4354e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, and pname:renderPass was
4355e5c31af7Sopenharmony_ci    specified with non-zero view masks, each element of pname:pAttachments
4356e5c31af7Sopenharmony_ci    that is used as a <<primsrast-fragment-shading-rate-attachment,fragment
4357e5c31af7Sopenharmony_ci    shading rate attachment>> by pname:renderPass must: have a
4358e5c31af7Sopenharmony_ci    pname:layerCount that is either `1`, or greater than the index of the
4359e5c31af7Sopenharmony_ci    most significant bit set in any of those view masks
4360e5c31af7Sopenharmony_ciendif::VK_KHR_fragment_shading_rate[]
4361e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_multiview[]
4362e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-renderPass-03198]]
4363e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE, multiview is enabled
4364e5c31af7Sopenharmony_ci    for pname:renderPass, and pname:flags includes
4365e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the pname:layerCount member
4366e5c31af7Sopenharmony_ci    of any element of the pname:pAttachmentImageInfos member of a
4367e5c31af7Sopenharmony_ci    slink:VkFramebufferAttachmentsCreateInfo structure included in the
4368e5c31af7Sopenharmony_ci    pname:pNext chain used as an input, color, resolve, or depth/stencil
4369e5c31af7Sopenharmony_ci    attachment in pname:renderPass must: be greater than the maximum bit
4370e5c31af7Sopenharmony_ci    index set in the view mask in the subpasses in which it is used in
4371e5c31af7Sopenharmony_ci    pname:renderPass
4372e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-renderPass-04546]]
4373e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE, multiview is not
4374e5c31af7Sopenharmony_ci    enabled for pname:renderPass, and pname:flags includes
4375e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the pname:layerCount member
4376e5c31af7Sopenharmony_ci    of any element of the pname:pAttachmentImageInfos member of a
4377e5c31af7Sopenharmony_ci    slink:VkFramebufferAttachmentsCreateInfo structure included in the
4378e5c31af7Sopenharmony_ci    pname:pNext chain used as an input, color, resolve, or depth/stencil
4379e5c31af7Sopenharmony_ci    attachment in pname:renderPass must: be greater than or equal to
4380e5c31af7Sopenharmony_ci    pname:layers
4381e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_multiview[]
4382e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1+VK_KHR_multiview[]
4383e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-flags-04547]]
4384e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:flags includes
4385e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the pname:layerCount member
4386e5c31af7Sopenharmony_ci    of any element of the pname:pAttachmentImageInfos member of a
4387e5c31af7Sopenharmony_ci    slink:VkFramebufferAttachmentsCreateInfo structure included in the
4388e5c31af7Sopenharmony_ci    pname:pNext chain used as an input, color, resolve, or depth/stencil
4389e5c31af7Sopenharmony_ci    attachment in pname:pRenderPass must: be greater than or equal to
4390e5c31af7Sopenharmony_ci    pname:layers
4391e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1+VK_KHR_multiview[]
4392e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-flags-03201]]
4393e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:flags includes
4394e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the pname:usage member of any
4395e5c31af7Sopenharmony_ci    element of the pname:pAttachmentImageInfos member of a
4396e5c31af7Sopenharmony_ci    slink:VkFramebufferAttachmentsCreateInfo structure included in the
4397e5c31af7Sopenharmony_ci    pname:pNext chain that refers to an attachment used as a color
4398e5c31af7Sopenharmony_ci    attachment or resolve attachment by pname:renderPass must: include
4399e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
4400e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-flags-03202]]
4401e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:flags includes
4402e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the pname:usage member of any
4403e5c31af7Sopenharmony_ci    element of the pname:pAttachmentImageInfos member of a
4404e5c31af7Sopenharmony_ci    slink:VkFramebufferAttachmentsCreateInfo structure included in the
4405e5c31af7Sopenharmony_ci    pname:pNext chain that refers to an attachment used as a depth/stencil
4406e5c31af7Sopenharmony_ci    attachment by pname:renderPass must: include
4407e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
4408e5c31af7Sopenharmony_ciifdef::VK_KHR_depth_stencil_resolve[]
4409e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-flags-03203]]
4410e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:flags includes
4411e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the pname:usage member of any
4412e5c31af7Sopenharmony_ci    element of the pname:pAttachmentImageInfos member of a
4413e5c31af7Sopenharmony_ci    slink:VkFramebufferAttachmentsCreateInfo structure included in the
4414e5c31af7Sopenharmony_ci    pname:pNext chain that refers to an attachment used as a depth/stencil
4415e5c31af7Sopenharmony_ci    resolve attachment by pname:renderPass must: include
4416e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
4417e5c31af7Sopenharmony_ciendif::VK_KHR_depth_stencil_resolve[]
4418e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-flags-03204]]
4419e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:flags includes
4420e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the pname:usage member of any
4421e5c31af7Sopenharmony_ci    element of the pname:pAttachmentImageInfos member of a
4422e5c31af7Sopenharmony_ci    slink:VkFramebufferAttachmentsCreateInfo structure included in the
4423e5c31af7Sopenharmony_ci    pname:pNext chain that refers to an attachment used as an input
4424e5c31af7Sopenharmony_ci    attachment by pname:renderPass must: include
4425e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT
4426e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-flags-03205]]
4427e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:flags includes
4428e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, at least one element of the
4429e5c31af7Sopenharmony_ci    pname:pViewFormats member of any element of the
4430e5c31af7Sopenharmony_ci    pname:pAttachmentImageInfos member of a
4431e5c31af7Sopenharmony_ci    slink:VkFramebufferAttachmentsCreateInfo structure included in the
4432e5c31af7Sopenharmony_ci    pname:pNext chain must: be equal to the corresponding value of
4433e5c31af7Sopenharmony_ci    slink:VkAttachmentDescription::pname:format used to create
4434e5c31af7Sopenharmony_ci    pname:renderPass
4435e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_imageless_framebuffer[]
4436e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-flags-04113]]
4437e5c31af7Sopenharmony_ci    If pname:flags does not include
4438e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of
4439e5c31af7Sopenharmony_ci    pname:pAttachments must: have been created with
4440e5c31af7Sopenharmony_ci    slink:VkImageViewCreateInfo::pname:viewType not equal to
4441e5c31af7Sopenharmony_ci    ename:VK_IMAGE_VIEW_TYPE_3D
4442e5c31af7Sopenharmony_ciifdef::VK_KHR_fragment_shading_rate[]
4443e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-flags-04548]]
4444e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:flags does not
4445e5c31af7Sopenharmony_ci    include ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of
4446e5c31af7Sopenharmony_ci    pname:pAttachments that is used as a fragment shading rate attachment by
4447e5c31af7Sopenharmony_ci    pname:renderPass must: have been created with a pname:usage value
4448e5c31af7Sopenharmony_ci    including ename:VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
4449e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_imageless_framebuffer[]
4450e5c31af7Sopenharmony_ci  * [[VUID-VkFramebufferCreateInfo-flags-04549]]
4451e5c31af7Sopenharmony_ci    If pname:renderpass is not dlink:VK_NULL_HANDLE and pname:flags includes
4452e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the pname:usage member of any
4453e5c31af7Sopenharmony_ci    element of the pname:pAttachmentImageInfos member of a
4454e5c31af7Sopenharmony_ci    slink:VkFramebufferAttachmentsCreateInfo structure included in the
4455e5c31af7Sopenharmony_ci    pname:pNext chain that refers to an attachment used as a fragment
4456e5c31af7Sopenharmony_ci    shading rate attachment by pname:renderPass must: include
4457e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
4458e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_imageless_framebuffer[]
4459e5c31af7Sopenharmony_ciendif::VK_KHR_fragment_shading_rate[]
4460e5c31af7Sopenharmony_ci****
4461e5c31af7Sopenharmony_ci
4462e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkFramebufferCreateInfo.txt[]
4463e5c31af7Sopenharmony_ci--
4464e5c31af7Sopenharmony_ci
4465e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_imageless_framebuffer[]
4466e5c31af7Sopenharmony_ci[open,refpage='VkFramebufferAttachmentsCreateInfo',desc='Structure specifying parameters of images that will be used with a framebuffer',type='structs',alias='VkFramebufferAttachmentsCreateInfo']
4467e5c31af7Sopenharmony_ci--
4468e5c31af7Sopenharmony_ciThe sname:VkFramebufferAttachmentsCreateInfo structure is defined as:
4469e5c31af7Sopenharmony_ci
4470e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkFramebufferAttachmentsCreateInfo.txt[]
4471e5c31af7Sopenharmony_ci
4472e5c31af7Sopenharmony_ciifdef::VK_KHR_imageless_framebuffer[]
4473e5c31af7Sopenharmony_cior the equivalent
4474e5c31af7Sopenharmony_ci
4475e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkFramebufferAttachmentsCreateInfoKHR.txt[]
4476e5c31af7Sopenharmony_ciendif::VK_KHR_imageless_framebuffer[]
4477e5c31af7Sopenharmony_ci
4478e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
4479e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
4480e5c31af7Sopenharmony_ci    structure.
4481e5c31af7Sopenharmony_ci  * pname:attachmentImageInfoCount is the number of attachments being
4482e5c31af7Sopenharmony_ci    described.
4483e5c31af7Sopenharmony_ci  * pname:pAttachmentImageInfos is a pointer to an array of
4484e5c31af7Sopenharmony_ci    slink:VkFramebufferAttachmentImageInfo structures, each structure
4485e5c31af7Sopenharmony_ci    describing a number of parameters of the corresponding attachment in a
4486e5c31af7Sopenharmony_ci    render pass instance.
4487e5c31af7Sopenharmony_ci
4488e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkFramebufferAttachmentsCreateInfo.txt[]
4489e5c31af7Sopenharmony_ci--
4490e5c31af7Sopenharmony_ci
4491e5c31af7Sopenharmony_ci[open,refpage='VkFramebufferAttachmentImageInfo',desc='Structure specifying parameters of an image that will be used with a framebuffer',type='structs',alias='VkFramebufferAttachmentImageInfoKHR']
4492e5c31af7Sopenharmony_ci--
4493e5c31af7Sopenharmony_ciThe sname:VkFramebufferAttachmentImageInfo structure is defined as:
4494e5c31af7Sopenharmony_ci
4495e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkFramebufferAttachmentImageInfo.txt[]
4496e5c31af7Sopenharmony_ci
4497e5c31af7Sopenharmony_ciifdef::VK_KHR_imageless_framebuffer[]
4498e5c31af7Sopenharmony_cior the equivalent
4499e5c31af7Sopenharmony_ci
4500e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkFramebufferAttachmentImageInfoKHR.txt[]
4501e5c31af7Sopenharmony_ciendif::VK_KHR_imageless_framebuffer[]
4502e5c31af7Sopenharmony_ci
4503e5c31af7Sopenharmony_ci
4504e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
4505e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
4506e5c31af7Sopenharmony_ci    structure.
4507e5c31af7Sopenharmony_ci  * pname:flags is a bitmask of elink:VkImageCreateFlagBits, matching the
4508e5c31af7Sopenharmony_ci    value of slink:VkImageCreateInfo::pname:flags used to create an image
4509e5c31af7Sopenharmony_ci    that will be used with this framebuffer.
4510e5c31af7Sopenharmony_ci  * pname:usage is a bitmask of elink:VkImageUsageFlagBits, matching the
4511e5c31af7Sopenharmony_ci    value of slink:VkImageCreateInfo::pname:usage used to create an image
4512e5c31af7Sopenharmony_ci    used with this framebuffer.
4513e5c31af7Sopenharmony_ci  * pname:width is the width of the image view used for rendering.
4514e5c31af7Sopenharmony_ci  * pname:height is the height of the image view used for rendering.
4515e5c31af7Sopenharmony_ci  * pname:layerCount is the number of array layers of the image view used
4516e5c31af7Sopenharmony_ci    for rendering.
4517e5c31af7Sopenharmony_ci  * pname:viewFormatCount is the number of entries in the pname:pViewFormats
4518e5c31af7Sopenharmony_ci    array, matching the value of
4519e5c31af7Sopenharmony_ci    slink:VkImageFormatListCreateInfo::pname:viewFormatCount used to create
4520e5c31af7Sopenharmony_ci    an image used with this framebuffer.
4521e5c31af7Sopenharmony_ci  * pname:pViewFormats is a pointer to an array of elink:VkFormat values
4522e5c31af7Sopenharmony_ci    specifying all of the formats which can: be used when creating views of
4523e5c31af7Sopenharmony_ci    the image, matching the value of
4524e5c31af7Sopenharmony_ci    slink:VkImageFormatListCreateInfo::pname:pViewFormats used to create an
4525e5c31af7Sopenharmony_ci    image used with this framebuffer.
4526e5c31af7Sopenharmony_ci
4527e5c31af7Sopenharmony_ciImages that can: be used with the framebuffer when beginning a render pass,
4528e5c31af7Sopenharmony_cias specified by slink:VkRenderPassAttachmentBeginInfo, must: be created with
4529e5c31af7Sopenharmony_ciparameters that are identical to those specified here.
4530e5c31af7Sopenharmony_ci
4531e5c31af7Sopenharmony_ci
4532e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkFramebufferAttachmentImageInfo.txt[]
4533e5c31af7Sopenharmony_ci--
4534e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_imageless_framebuffer[]
4535e5c31af7Sopenharmony_ci
4536e5c31af7Sopenharmony_ci
4537e5c31af7Sopenharmony_ci[open,refpage='VkFramebufferCreateFlagBits',desc='Bitmask specifying framebuffer properties',type='enums']
4538e5c31af7Sopenharmony_ci--
4539e5c31af7Sopenharmony_ciBits which can: be set in slink:VkFramebufferCreateInfo::pname:flags to
4540e5c31af7Sopenharmony_cispecify options for framebuffers are:
4541e5c31af7Sopenharmony_ci
4542e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkFramebufferCreateFlagBits.txt[]
4543e5c31af7Sopenharmony_ci
4544e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_imageless_framebuffer[]
4545e5c31af7Sopenharmony_ci  * ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT specifies that image views are
4546e5c31af7Sopenharmony_ci    not specified, and only attachment compatibility information will be
4547e5c31af7Sopenharmony_ci    provided via a slink:VkFramebufferAttachmentImageInfo structure.
4548e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_imageless_framebuffer[]
4549e5c31af7Sopenharmony_ci
4550e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_2,VK_KHR_imageless_framebuffer[]
4551e5c31af7Sopenharmony_ci[NOTE]
4552e5c31af7Sopenharmony_ci.Note
4553e5c31af7Sopenharmony_ci====
4554e5c31af7Sopenharmony_ciAll bits for this type are defined by extensions, and none of those
4555e5c31af7Sopenharmony_ciextensions are enabled in this build of the specification.
4556e5c31af7Sopenharmony_ci====
4557e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_imageless_framebuffer[]
4558e5c31af7Sopenharmony_ci--
4559e5c31af7Sopenharmony_ci
4560e5c31af7Sopenharmony_ci[open,refpage='VkFramebufferCreateFlags',desc='Bitmask of VkFramebufferCreateFlagBits',type='flags']
4561e5c31af7Sopenharmony_ci--
4562e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkFramebufferCreateFlags.txt[]
4563e5c31af7Sopenharmony_ci
4564e5c31af7Sopenharmony_citname:VkFramebufferCreateFlags is a bitmask type for setting a mask of zero
4565e5c31af7Sopenharmony_cior more elink:VkFramebufferCreateFlagBits.
4566e5c31af7Sopenharmony_ci--
4567e5c31af7Sopenharmony_ci
4568e5c31af7Sopenharmony_ci[open,refpage='vkDestroyFramebuffer',desc='Destroy a framebuffer object',type='protos']
4569e5c31af7Sopenharmony_ci--
4570e5c31af7Sopenharmony_ciTo destroy a framebuffer, call:
4571e5c31af7Sopenharmony_ci
4572e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkDestroyFramebuffer.txt[]
4573e5c31af7Sopenharmony_ci
4574e5c31af7Sopenharmony_ci  * pname:device is the logical device that destroys the framebuffer.
4575e5c31af7Sopenharmony_ci  * pname:framebuffer is the handle of the framebuffer to destroy.
4576e5c31af7Sopenharmony_ci  * pname:pAllocator controls host memory allocation as described in the
4577e5c31af7Sopenharmony_ci    <<memory-allocation, Memory Allocation>> chapter.
4578e5c31af7Sopenharmony_ci
4579e5c31af7Sopenharmony_ci.Valid Usage
4580e5c31af7Sopenharmony_ci****
4581e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyFramebuffer-framebuffer-00892]]
4582e5c31af7Sopenharmony_ci    All submitted commands that refer to pname:framebuffer must: have
4583e5c31af7Sopenharmony_ci    completed execution
4584e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyFramebuffer-framebuffer-00893]]
4585e5c31af7Sopenharmony_ci    If sname:VkAllocationCallbacks were provided when pname:framebuffer was
4586e5c31af7Sopenharmony_ci    created, a compatible set of callbacks must: be provided here
4587e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyFramebuffer-framebuffer-00894]]
4588e5c31af7Sopenharmony_ci    If no sname:VkAllocationCallbacks were provided when pname:framebuffer
4589e5c31af7Sopenharmony_ci    was created, pname:pAllocator must: be `NULL`
4590e5c31af7Sopenharmony_ci****
4591e5c31af7Sopenharmony_ci
4592e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkDestroyFramebuffer.txt[]
4593e5c31af7Sopenharmony_ci--
4594e5c31af7Sopenharmony_ci
4595e5c31af7Sopenharmony_ci
4596e5c31af7Sopenharmony_ci[[renderpass-commands]]
4597e5c31af7Sopenharmony_ci== Render Pass Commands
4598e5c31af7Sopenharmony_ci
4599e5c31af7Sopenharmony_ciAn application records the commands for a render pass instance one subpass
4600e5c31af7Sopenharmony_ciat a time, by beginning a render pass instance, iterating over the subpasses
4601e5c31af7Sopenharmony_cito record commands for that subpass, and then ending the render pass
4602e5c31af7Sopenharmony_ciinstance.
4603e5c31af7Sopenharmony_ci
4604e5c31af7Sopenharmony_ci[open,refpage='vkCmdBeginRenderPass',desc='Begin a new render pass',type='protos']
4605e5c31af7Sopenharmony_ci--
4606e5c31af7Sopenharmony_ciTo begin a render pass instance, call:
4607e5c31af7Sopenharmony_ci
4608e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCmdBeginRenderPass.txt[]
4609e5c31af7Sopenharmony_ci
4610e5c31af7Sopenharmony_ci  * pname:commandBuffer is the command buffer in which to record the
4611e5c31af7Sopenharmony_ci    command.
4612e5c31af7Sopenharmony_ci  * pname:pRenderPassBegin is a pointer to a slink:VkRenderPassBeginInfo
4613e5c31af7Sopenharmony_ci    structure specifying the render pass to begin an instance of, and the
4614e5c31af7Sopenharmony_ci    framebuffer the instance uses.
4615e5c31af7Sopenharmony_ci  * pname:contents is a elink:VkSubpassContents value specifying how the
4616e5c31af7Sopenharmony_ci    commands in the first subpass will be provided.
4617e5c31af7Sopenharmony_ci
4618e5c31af7Sopenharmony_ciAfter beginning a render pass instance, the command buffer is ready to
4619e5c31af7Sopenharmony_cirecord the commands for the first subpass of that render pass.
4620e5c31af7Sopenharmony_ci
4621e5c31af7Sopenharmony_ci.Valid Usage
4622e5c31af7Sopenharmony_ci****
4623e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBeginRenderPass-initialLayout-00895]]
4624e5c31af7Sopenharmony_ci    If any of the pname:initialLayout or pname:finalLayout member of the
4625e5c31af7Sopenharmony_ci    sname:VkAttachmentDescription structures or the pname:layout member of
4626e5c31af7Sopenharmony_ci    the sname:VkAttachmentReference structures specified when creating the
4627e5c31af7Sopenharmony_ci    render pass specified in the pname:renderPass member of
4628e5c31af7Sopenharmony_ci    pname:pRenderPassBegin is ename:VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL
4629e5c31af7Sopenharmony_ci    then the corresponding attachment image view of the framebuffer
4630e5c31af7Sopenharmony_ci    specified in the pname:framebuffer member of pname:pRenderPassBegin
4631e5c31af7Sopenharmony_ci    must: have been created with a pname:usage value including
4632e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
4633e5c31af7Sopenharmony_ci// The VU below comes in an alternate version when the extension is
4634e5c31af7Sopenharmony_ci// enabled.
4635e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_maintenance2[]
4636e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBeginRenderPass-initialLayout-00896]]
4637e5c31af7Sopenharmony_ci    If any of the pname:initialLayout or pname:finalLayout member of the
4638e5c31af7Sopenharmony_ci    sname:VkAttachmentDescription structures or the pname:layout member of
4639e5c31af7Sopenharmony_ci    the sname:VkAttachmentReference structures specified when creating the
4640e5c31af7Sopenharmony_ci    render pass specified in the pname:renderPass member of
4641e5c31af7Sopenharmony_ci    pname:pRenderPassBegin is
4642e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, or
4643e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL then the
4644e5c31af7Sopenharmony_ci    corresponding attachment image view of the framebuffer specified in the
4645e5c31af7Sopenharmony_ci    pname:framebuffer member of pname:pRenderPassBegin must: have been
4646e5c31af7Sopenharmony_ci    created with a pname:usage value including
4647e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
4648e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
4649e5c31af7Sopenharmony_ci// The nested ifdefs are there in anticipation of the hoped-for day when the
4650e5c31af7Sopenharmony_ci// VU extractor and validation layers can handle VU with imbedded
4651e5c31af7Sopenharmony_ci// conditionals. They are commented out until then.
4652e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance2[]
4653e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBeginRenderPass-initialLayout-01758]]
4654e5c31af7Sopenharmony_ci    If any of the pname:initialLayout or pname:finalLayout member of the
4655e5c31af7Sopenharmony_ci    sname:VkAttachmentDescription structures or the pname:layout member of
4656e5c31af7Sopenharmony_ci    the sname:VkAttachmentReference structures specified when creating the
4657e5c31af7Sopenharmony_ci    render pass specified in the pname:renderPass member of
4658e5c31af7Sopenharmony_ci    pname:pRenderPassBegin is
4659e5c31af7Sopenharmony_ci// ifdef::VK_VERSION_1_1,VK_KHR_maintenance2[]
4660e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL,
4661e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL,
4662e5c31af7Sopenharmony_ci// endif::VK_VERSION_1_1,VK_KHR_maintenance2[]
4663e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, or
4664e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL then the
4665e5c31af7Sopenharmony_ci    corresponding attachment image view of the framebuffer specified in the
4666e5c31af7Sopenharmony_ci    pname:framebuffer member of pname:pRenderPassBegin must: have been
4667e5c31af7Sopenharmony_ci    created with a pname:usage value including
4668e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
4669e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
4670e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBeginRenderPass-initialLayout-02842]]
4671e5c31af7Sopenharmony_ci    If any of the pname:initialLayout or pname:finalLayout member of the
4672e5c31af7Sopenharmony_ci    sname:VkAttachmentDescription structures or the pname:layout member of
4673e5c31af7Sopenharmony_ci    the sname:VkAttachmentReference structures specified when creating the
4674e5c31af7Sopenharmony_ci    render pass specified in the pname:renderPass member of
4675e5c31af7Sopenharmony_ci    pname:pRenderPassBegin is
4676e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, or
4677e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,
4678e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or
4679e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL then the corresponding
4680e5c31af7Sopenharmony_ci    attachment image view of the framebuffer specified in the
4681e5c31af7Sopenharmony_ci    pname:framebuffer member of pname:pRenderPassBegin must: have been
4682e5c31af7Sopenharmony_ci    created with a pname:usage value including
4683e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
4684e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBeginRenderPass-stencilInitialLayout-02843]]
4685e5c31af7Sopenharmony_ci    If any of the pname:stencilInitialLayout or pname:stencilFinalLayout
4686e5c31af7Sopenharmony_ci    member of the sname:VkAttachmentDescriptionStencilLayout structures or
4687e5c31af7Sopenharmony_ci    the pname:stencilLayout member of the
4688e5c31af7Sopenharmony_ci    sname:VkAttachmentReferenceStencilLayout structures specified when
4689e5c31af7Sopenharmony_ci    creating the render pass specified in the pname:renderPass member of
4690e5c31af7Sopenharmony_ci    pname:pRenderPassBegin is
4691e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or
4692e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL then the corresponding
4693e5c31af7Sopenharmony_ci    attachment image view of the framebuffer specified in the
4694e5c31af7Sopenharmony_ci    pname:framebuffer member of pname:pRenderPassBegin must: have been
4695e5c31af7Sopenharmony_ci    created with a pname:usage value including
4696e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
4697e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
4698e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
4699e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBeginRenderPass-initialLayout-00897]]
4700e5c31af7Sopenharmony_ci    If any of the pname:initialLayout or pname:finalLayout member of the
4701e5c31af7Sopenharmony_ci    sname:VkAttachmentDescription structures or the pname:layout member of
4702e5c31af7Sopenharmony_ci    the sname:VkAttachmentReference structures specified when creating the
4703e5c31af7Sopenharmony_ci    render pass specified in the pname:renderPass member of
4704e5c31af7Sopenharmony_ci    pname:pRenderPassBegin is ename:VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
4705e5c31af7Sopenharmony_ci    then the corresponding attachment image view of the framebuffer
4706e5c31af7Sopenharmony_ci    specified in the pname:framebuffer member of pname:pRenderPassBegin
4707e5c31af7Sopenharmony_ci    must: have been created with a pname:usage value including
4708e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_SAMPLED_BIT or
4709e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT
4710e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBeginRenderPass-initialLayout-00898]]
4711e5c31af7Sopenharmony_ci    If any of the pname:initialLayout or pname:finalLayout member of the
4712e5c31af7Sopenharmony_ci    sname:VkAttachmentDescription structures or the pname:layout member of
4713e5c31af7Sopenharmony_ci    the sname:VkAttachmentReference structures specified when creating the
4714e5c31af7Sopenharmony_ci    render pass specified in the pname:renderPass member of
4715e5c31af7Sopenharmony_ci    pname:pRenderPassBegin is ename:VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL
4716e5c31af7Sopenharmony_ci    then the corresponding attachment image view of the framebuffer
4717e5c31af7Sopenharmony_ci    specified in the pname:framebuffer member of pname:pRenderPassBegin
4718e5c31af7Sopenharmony_ci    must: have been created with a pname:usage value including
4719e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_TRANSFER_SRC_BIT
4720e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBeginRenderPass-initialLayout-00899]]
4721e5c31af7Sopenharmony_ci    If any of the pname:initialLayout or pname:finalLayout member of the
4722e5c31af7Sopenharmony_ci    sname:VkAttachmentDescription structures or the pname:layout member of
4723e5c31af7Sopenharmony_ci    the sname:VkAttachmentReference structures specified when creating the
4724e5c31af7Sopenharmony_ci    render pass specified in the pname:renderPass member of
4725e5c31af7Sopenharmony_ci    pname:pRenderPassBegin is ename:VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
4726e5c31af7Sopenharmony_ci    then the corresponding attachment image view of the framebuffer
4727e5c31af7Sopenharmony_ci    specified in the pname:framebuffer member of pname:pRenderPassBegin
4728e5c31af7Sopenharmony_ci    must: have been created with a pname:usage value including
4729e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_TRANSFER_DST_BIT
4730e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBeginRenderPass-initialLayout-00900]]
4731e5c31af7Sopenharmony_ci    If the pname:initialLayout member of any of the
4732e5c31af7Sopenharmony_ci    sname:VkAttachmentDescription structures specified when creating the
4733e5c31af7Sopenharmony_ci    render pass specified in the pname:renderPass member of
4734e5c31af7Sopenharmony_ci    pname:pRenderPassBegin is not ename:VK_IMAGE_LAYOUT_UNDEFINED, then each
4735e5c31af7Sopenharmony_ci    such pname:initialLayout must: be equal to the current layout of the
4736e5c31af7Sopenharmony_ci    corresponding attachment image subresource of the framebuffer specified
4737e5c31af7Sopenharmony_ci    in the pname:framebuffer member of pname:pRenderPassBegin
4738e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBeginRenderPass-srcStageMask-06451]]
4739e5c31af7Sopenharmony_ci    The pname:srcStageMask members of any element of the pname:pDependencies
4740e5c31af7Sopenharmony_ci    member of slink:VkRenderPassCreateInfo used to create pname:renderPass
4741e5c31af7Sopenharmony_ci    must: be supported by the capabilities of the queue family identified by
4742e5c31af7Sopenharmony_ci    the pname:queueFamilyIndex member of the slink:VkCommandPoolCreateInfo
4743e5c31af7Sopenharmony_ci    used to create the command pool which pname:commandBuffer was allocated
4744e5c31af7Sopenharmony_ci    from
4745e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBeginRenderPass-dstStageMask-06452]]
4746e5c31af7Sopenharmony_ci    The pname:dstStageMask members of any element of the pname:pDependencies
4747e5c31af7Sopenharmony_ci    member of slink:VkRenderPassCreateInfo used to create pname:renderPass
4748e5c31af7Sopenharmony_ci    must: be supported by the capabilities of the queue family identified by
4749e5c31af7Sopenharmony_ci    the pname:queueFamilyIndex member of the slink:VkCommandPoolCreateInfo
4750e5c31af7Sopenharmony_ci    used to create the command pool which pname:commandBuffer was allocated
4751e5c31af7Sopenharmony_ci    from
4752e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBeginRenderPass-framebuffer-02532]]
4753e5c31af7Sopenharmony_ci    For any attachment in pname:framebuffer that is used by pname:renderPass
4754e5c31af7Sopenharmony_ci    and is bound to memory locations that are also bound to another
4755e5c31af7Sopenharmony_ci    attachment used by pname:renderPass, and if at least one of those uses
4756e5c31af7Sopenharmony_ci    causes either attachment to be written to, both attachments must: have
4757e5c31af7Sopenharmony_ci    had the ename:VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT set
4758e5c31af7Sopenharmony_ci****
4759e5c31af7Sopenharmony_ci
4760e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCmdBeginRenderPass.txt[]
4761e5c31af7Sopenharmony_ci--
4762e5c31af7Sopenharmony_ci
4763e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_create_renderpass2[]
4764e5c31af7Sopenharmony_ci[open,refpage='vkCmdBeginRenderPass2',desc='Begin a new render pass',type='protos',alias='vkCmdBeginRenderPass2KHR']
4765e5c31af7Sopenharmony_ci--
4766e5c31af7Sopenharmony_ciAlternatively to begin a render pass, call:
4767e5c31af7Sopenharmony_ci
4768e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2[]
4769e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCmdBeginRenderPass2.txt[]
4770e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2[]
4771e5c31af7Sopenharmony_ci
4772e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2+VK_KHR_create_renderpass2[or the equivalent command]
4773e5c31af7Sopenharmony_ci
4774e5c31af7Sopenharmony_ciifdef::VK_KHR_create_renderpass2[]
4775e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCmdBeginRenderPass2KHR.txt[]
4776e5c31af7Sopenharmony_ciendif::VK_KHR_create_renderpass2[]
4777e5c31af7Sopenharmony_ci
4778e5c31af7Sopenharmony_ci  * pname:commandBuffer is the command buffer in which to record the
4779e5c31af7Sopenharmony_ci    command.
4780e5c31af7Sopenharmony_ci  * pname:pRenderPassBegin is a pointer to a slink:VkRenderPassBeginInfo
4781e5c31af7Sopenharmony_ci    structure specifying the render pass to begin an instance of, and the
4782e5c31af7Sopenharmony_ci    framebuffer the instance uses.
4783e5c31af7Sopenharmony_ci  * pname:pSubpassBeginInfo is a pointer to a slink:VkSubpassBeginInfo
4784e5c31af7Sopenharmony_ci    structure containing information about the subpass which is about to
4785e5c31af7Sopenharmony_ci    begin rendering.
4786e5c31af7Sopenharmony_ci
4787e5c31af7Sopenharmony_ciAfter beginning a render pass instance, the command buffer is ready to
4788e5c31af7Sopenharmony_cirecord the commands for the first subpass of that render pass.
4789e5c31af7Sopenharmony_ci
4790e5c31af7Sopenharmony_ci.Valid Usage
4791e5c31af7Sopenharmony_ci****
4792e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBeginRenderPass2-framebuffer-02779]]
4793e5c31af7Sopenharmony_ci    Both the pname:framebuffer and pname:renderPass members of
4794e5c31af7Sopenharmony_ci    pname:pRenderPassBegin must: have been created on the same
4795e5c31af7Sopenharmony_ci    slink:VkDevice that pname:commandBuffer was allocated on
4796e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBeginRenderPass2-initialLayout-03094]]
4797e5c31af7Sopenharmony_ci    If any of the pname:initialLayout or pname:finalLayout member of the
4798e5c31af7Sopenharmony_ci    sname:VkAttachmentDescription structures or the pname:layout member of
4799e5c31af7Sopenharmony_ci    the sname:VkAttachmentReference structures specified when creating the
4800e5c31af7Sopenharmony_ci    render pass specified in the pname:renderPass member of
4801e5c31af7Sopenharmony_ci    pname:pRenderPassBegin is ename:VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL
4802e5c31af7Sopenharmony_ci    then the corresponding attachment image view of the framebuffer
4803e5c31af7Sopenharmony_ci    specified in the pname:framebuffer member of pname:pRenderPassBegin
4804e5c31af7Sopenharmony_ci    must: have been created with a pname:usage value including
4805e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
4806e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBeginRenderPass2-initialLayout-03096]]
4807e5c31af7Sopenharmony_ci    If any of the pname:initialLayout or pname:finalLayout member of the
4808e5c31af7Sopenharmony_ci    sname:VkAttachmentDescription structures or the pname:layout member of
4809e5c31af7Sopenharmony_ci    the sname:VkAttachmentReference structures specified when creating the
4810e5c31af7Sopenharmony_ci    render pass specified in the pname:renderPass member of
4811e5c31af7Sopenharmony_ci    pname:pRenderPassBegin is
4812e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL,
4813e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL,
4814e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, or
4815e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL then the
4816e5c31af7Sopenharmony_ci    corresponding attachment image view of the framebuffer specified in the
4817e5c31af7Sopenharmony_ci    pname:framebuffer member of pname:pRenderPassBegin must: have been
4818e5c31af7Sopenharmony_ci    created with a pname:usage value including
4819e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
4820e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
4821e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBeginRenderPass2-initialLayout-02844]]
4822e5c31af7Sopenharmony_ci    If any of the pname:initialLayout or pname:finalLayout member of the
4823e5c31af7Sopenharmony_ci    sname:VkAttachmentDescription structures or the pname:layout member of
4824e5c31af7Sopenharmony_ci    the sname:VkAttachmentReference structures specified when creating the
4825e5c31af7Sopenharmony_ci    render pass specified in the pname:renderPass member of
4826e5c31af7Sopenharmony_ci    pname:pRenderPassBegin is
4827e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, or
4828e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,
4829e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or
4830e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL then the corresponding
4831e5c31af7Sopenharmony_ci    attachment image view of the framebuffer specified in the
4832e5c31af7Sopenharmony_ci    pname:framebuffer member of pname:pRenderPassBegin must: have been
4833e5c31af7Sopenharmony_ci    created with a pname:usage value including
4834e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
4835e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBeginRenderPass2-stencilInitialLayout-02845]]
4836e5c31af7Sopenharmony_ci    If any of the pname:stencilInitialLayout or pname:stencilFinalLayout
4837e5c31af7Sopenharmony_ci    member of the sname:VkAttachmentDescriptionStencilLayout structures or
4838e5c31af7Sopenharmony_ci    the pname:stencilLayout member of the
4839e5c31af7Sopenharmony_ci    sname:VkAttachmentReferenceStencilLayout structures specified when
4840e5c31af7Sopenharmony_ci    creating the render pass specified in the pname:renderPass member of
4841e5c31af7Sopenharmony_ci    pname:pRenderPassBegin is
4842e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or
4843e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL then the corresponding
4844e5c31af7Sopenharmony_ci    attachment image view of the framebuffer specified in the
4845e5c31af7Sopenharmony_ci    pname:framebuffer member of pname:pRenderPassBegin must: have been
4846e5c31af7Sopenharmony_ci    created with a pname:usage value including
4847e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
4848e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
4849e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBeginRenderPass2-initialLayout-03097]]
4850e5c31af7Sopenharmony_ci    If any of the pname:initialLayout or pname:finalLayout member of the
4851e5c31af7Sopenharmony_ci    sname:VkAttachmentDescription structures or the pname:layout member of
4852e5c31af7Sopenharmony_ci    the sname:VkAttachmentReference structures specified when creating the
4853e5c31af7Sopenharmony_ci    render pass specified in the pname:renderPass member of
4854e5c31af7Sopenharmony_ci    pname:pRenderPassBegin is ename:VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
4855e5c31af7Sopenharmony_ci    then the corresponding attachment image view of the framebuffer
4856e5c31af7Sopenharmony_ci    specified in the pname:framebuffer member of pname:pRenderPassBegin
4857e5c31af7Sopenharmony_ci    must: have been created with a pname:usage value including
4858e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_SAMPLED_BIT or
4859e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT
4860e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBeginRenderPass2-initialLayout-03098]]
4861e5c31af7Sopenharmony_ci    If any of the pname:initialLayout or pname:finalLayout member of the
4862e5c31af7Sopenharmony_ci    sname:VkAttachmentDescription structures or the pname:layout member of
4863e5c31af7Sopenharmony_ci    the sname:VkAttachmentReference structures specified when creating the
4864e5c31af7Sopenharmony_ci    render pass specified in the pname:renderPass member of
4865e5c31af7Sopenharmony_ci    pname:pRenderPassBegin is ename:VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL
4866e5c31af7Sopenharmony_ci    then the corresponding attachment image view of the framebuffer
4867e5c31af7Sopenharmony_ci    specified in the pname:framebuffer member of pname:pRenderPassBegin
4868e5c31af7Sopenharmony_ci    must: have been created with a pname:usage value including
4869e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_TRANSFER_SRC_BIT
4870e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBeginRenderPass2-initialLayout-03099]]
4871e5c31af7Sopenharmony_ci    If any of the pname:initialLayout or pname:finalLayout member of the
4872e5c31af7Sopenharmony_ci    sname:VkAttachmentDescription structures or the pname:layout member of
4873e5c31af7Sopenharmony_ci    the sname:VkAttachmentReference structures specified when creating the
4874e5c31af7Sopenharmony_ci    render pass specified in the pname:renderPass member of
4875e5c31af7Sopenharmony_ci    pname:pRenderPassBegin is ename:VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
4876e5c31af7Sopenharmony_ci    then the corresponding attachment image view of the framebuffer
4877e5c31af7Sopenharmony_ci    specified in the pname:framebuffer member of pname:pRenderPassBegin
4878e5c31af7Sopenharmony_ci    must: have been created with a pname:usage value including
4879e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_TRANSFER_DST_BIT
4880e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBeginRenderPass2-initialLayout-03100]]
4881e5c31af7Sopenharmony_ci    If the pname:initialLayout member of any of the
4882e5c31af7Sopenharmony_ci    sname:VkAttachmentDescription structures specified when creating the
4883e5c31af7Sopenharmony_ci    render pass specified in the pname:renderPass member of
4884e5c31af7Sopenharmony_ci    pname:pRenderPassBegin is not ename:VK_IMAGE_LAYOUT_UNDEFINED, then each
4885e5c31af7Sopenharmony_ci    such pname:initialLayout must: be equal to the current layout of the
4886e5c31af7Sopenharmony_ci    corresponding attachment image subresource of the framebuffer specified
4887e5c31af7Sopenharmony_ci    in the pname:framebuffer member of pname:pRenderPassBegin
4888e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBeginRenderPass2-srcStageMask-06453]]
4889e5c31af7Sopenharmony_ci    The pname:srcStageMask members of any element of the pname:pDependencies
4890e5c31af7Sopenharmony_ci    member of slink:VkRenderPassCreateInfo used to create pname:renderPass
4891e5c31af7Sopenharmony_ci    must: be supported by the capabilities of the queue family identified by
4892e5c31af7Sopenharmony_ci    the pname:queueFamilyIndex member of the slink:VkCommandPoolCreateInfo
4893e5c31af7Sopenharmony_ci    used to create the command pool which pname:commandBuffer was allocated
4894e5c31af7Sopenharmony_ci    from
4895e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBeginRenderPass2-dstStageMask-06454]]
4896e5c31af7Sopenharmony_ci    The pname:dstStageMask members of any element of the pname:pDependencies
4897e5c31af7Sopenharmony_ci    member of slink:VkRenderPassCreateInfo used to create pname:renderPass
4898e5c31af7Sopenharmony_ci    must: be supported by the capabilities of the queue family identified by
4899e5c31af7Sopenharmony_ci    the pname:queueFamilyIndex member of the slink:VkCommandPoolCreateInfo
4900e5c31af7Sopenharmony_ci    used to create the command pool which pname:commandBuffer was allocated
4901e5c31af7Sopenharmony_ci    from
4902e5c31af7Sopenharmony_ci  * [[VUID-vkCmdBeginRenderPass2-framebuffer-02533]]
4903e5c31af7Sopenharmony_ci    For any attachment in pname:framebuffer that is used by pname:renderPass
4904e5c31af7Sopenharmony_ci    and is bound to memory locations that are also bound to another
4905e5c31af7Sopenharmony_ci    attachment used by pname:renderPass, and if at least one of those uses
4906e5c31af7Sopenharmony_ci    causes either attachment to be written to, both attachments must: have
4907e5c31af7Sopenharmony_ci    had the ename:VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT set
4908e5c31af7Sopenharmony_ci****
4909e5c31af7Sopenharmony_ci
4910e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCmdBeginRenderPass2.txt[]
4911e5c31af7Sopenharmony_ci--
4912e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_create_renderpass2[]
4913e5c31af7Sopenharmony_ci
4914e5c31af7Sopenharmony_ci[open,refpage='VkRenderPassBeginInfo',desc='Structure specifying render pass begin information',type='structs']
4915e5c31af7Sopenharmony_ci--
4916e5c31af7Sopenharmony_ciThe sname:VkRenderPassBeginInfo structure is defined as:
4917e5c31af7Sopenharmony_ci
4918e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkRenderPassBeginInfo.txt[]
4919e5c31af7Sopenharmony_ci
4920e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
4921e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
4922e5c31af7Sopenharmony_ci    structure.
4923e5c31af7Sopenharmony_ci  * pname:renderPass is the render pass to begin an instance of.
4924e5c31af7Sopenharmony_ci  * pname:framebuffer is the framebuffer containing the attachments that are
4925e5c31af7Sopenharmony_ci    used with the render pass.
4926e5c31af7Sopenharmony_ci  * pname:renderArea is the render area that is affected by the render pass
4927e5c31af7Sopenharmony_ci    instance, and is described in more detail below.
4928e5c31af7Sopenharmony_ci  * pname:clearValueCount is the number of elements in pname:pClearValues.
4929e5c31af7Sopenharmony_ci  * pname:pClearValues is a pointer to an array of pname:clearValueCount
4930e5c31af7Sopenharmony_ci    slink:VkClearValue structures containing clear values for each
4931e5c31af7Sopenharmony_ci    attachment, if the attachment uses a pname:loadOp value of
4932e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_LOAD_OP_CLEAR or if the attachment has a
4933e5c31af7Sopenharmony_ci    depth/stencil format and uses a pname:stencilLoadOp value of
4934e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_LOAD_OP_CLEAR.
4935e5c31af7Sopenharmony_ci    The array is indexed by attachment number.
4936e5c31af7Sopenharmony_ci    Only elements corresponding to cleared attachments are used.
4937e5c31af7Sopenharmony_ci    Other elements of pname:pClearValues are ignored.
4938e5c31af7Sopenharmony_ci
4939e5c31af7Sopenharmony_cipname:renderArea is the render area that is affected by the render pass
4940e5c31af7Sopenharmony_ciinstance.
4941e5c31af7Sopenharmony_ciThe effects of attachment load, store and multisample resolve operations are
4942e5c31af7Sopenharmony_cirestricted to the pixels whose x and y coordinates fall within the render
4943e5c31af7Sopenharmony_ciarea on all attachments.
4944e5c31af7Sopenharmony_ciThe render area extends to all layers of pname:framebuffer.
4945e5c31af7Sopenharmony_ciThe application must: ensure (using scissor if necessary) that all rendering
4946e5c31af7Sopenharmony_ciis contained within the render area.
4947e5c31af7Sopenharmony_ciifndef::VK_QCOM_render_pass_transform[]
4948e5c31af7Sopenharmony_ciThe render area must: be contained within the framebuffer dimensions.
4949e5c31af7Sopenharmony_ciendif::VK_QCOM_render_pass_transform[]
4950e5c31af7Sopenharmony_ciifdef::VK_QCOM_render_pass_transform[]
4951e5c31af7Sopenharmony_ciThe render area, after any transform specified by
4952e5c31af7Sopenharmony_cislink:VkRenderPassTransformBeginInfoQCOM::pname:transform is applied, must:
4953e5c31af7Sopenharmony_cibe contained within the framebuffer dimensions.
4954e5c31af7Sopenharmony_ciendif::VK_QCOM_render_pass_transform[]
4955e5c31af7Sopenharmony_ci
4956e5c31af7Sopenharmony_ciifdef::VK_QCOM_render_pass_transform[]
4957e5c31af7Sopenharmony_ciIf <<vertexpostproc-renderpass-transform, render pass transform>> is
4958e5c31af7Sopenharmony_cienabled, then pname:renderArea must: equal the framebuffer pre-transformed
4959e5c31af7Sopenharmony_cidimensions.
4960e5c31af7Sopenharmony_ciAfter pname:renderArea has been transformed by
4961e5c31af7Sopenharmony_cislink:VkRenderPassTransformBeginInfoQCOM::pname:transform, the resulting
4962e5c31af7Sopenharmony_cirender area must: be equal to the framebuffer dimensions.
4963e5c31af7Sopenharmony_ciendif::VK_QCOM_render_pass_transform[]
4964e5c31af7Sopenharmony_ci
4965e5c31af7Sopenharmony_ciifdef::VK_HUAWEI_subpass_shading[]
4966e5c31af7Sopenharmony_ciIf <<features-subpassShading, subpass shading>> is enabled, then
4967e5c31af7Sopenharmony_cipname:renderArea must: equal the framebuffer dimensions.
4968e5c31af7Sopenharmony_ciendif::VK_HUAWEI_subpass_shading[]
4969e5c31af7Sopenharmony_ci
4970e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_multiview[]
4971e5c31af7Sopenharmony_ci
4972e5c31af7Sopenharmony_ciWhen multiview is enabled, the resolve operation at the end of a subpass
4973e5c31af7Sopenharmony_ciapplies to all views in the view mask.
4974e5c31af7Sopenharmony_ci
4975e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_multiview[]
4976e5c31af7Sopenharmony_ci
4977e5c31af7Sopenharmony_ci[NOTE]
4978e5c31af7Sopenharmony_ci.Note
4979e5c31af7Sopenharmony_ci====
4980e5c31af7Sopenharmony_ciThere may: be a performance cost for using a render area smaller than the
4981e5c31af7Sopenharmony_ciframebuffer, unless it matches the render area granularity for the render
4982e5c31af7Sopenharmony_cipass.
4983e5c31af7Sopenharmony_ci====
4984e5c31af7Sopenharmony_ci
4985e5c31af7Sopenharmony_ci.Valid Usage
4986e5c31af7Sopenharmony_ci****
4987e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassBeginInfo-clearValueCount-00902]]
4988e5c31af7Sopenharmony_ci    pname:clearValueCount must: be greater than the largest attachment index
4989e5c31af7Sopenharmony_ci    in pname:renderPass specifying a pname:loadOp (or pname:stencilLoadOp,
4990e5c31af7Sopenharmony_ci    if the attachment has a depth/stencil format) of
4991e5c31af7Sopenharmony_ci    ename:VK_ATTACHMENT_LOAD_OP_CLEAR
4992e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassBeginInfo-clearValueCount-04962]]
4993e5c31af7Sopenharmony_ci    If pname:clearValueCount is not `0`, pname:pClearValues must: be a valid
4994e5c31af7Sopenharmony_ci    pointer to an array of pname:clearValueCount slink:VkClearValue unions
4995e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassBeginInfo-renderPass-00904]]
4996e5c31af7Sopenharmony_ci    pname:renderPass must: be <<renderpass-compatibility,compatible>> with
4997e5c31af7Sopenharmony_ci    the pname:renderPass member of the slink:VkFramebufferCreateInfo
4998e5c31af7Sopenharmony_ci    structure specified when creating pname:framebuffer
4999e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_device_group[]
5000e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassBeginInfo-renderArea-02846]]
5001e5c31af7Sopenharmony_ci    pname:renderArea.offset.x must: be greater than or equal to 0
5002e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassBeginInfo-renderArea-02847]]
5003e5c31af7Sopenharmony_ci    pname:renderArea.offset.y must: be greater than or equal to 0
5004e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassBeginInfo-renderArea-02848]]
5005e5c31af7Sopenharmony_ci    [eq]#pname:renderArea.offset.x {plus} pname:renderArea.extent.width#
5006e5c31af7Sopenharmony_ci    must: be less than or equal to
5007e5c31af7Sopenharmony_ci    slink:VkFramebufferCreateInfo::pname:width the pname:framebuffer was
5008e5c31af7Sopenharmony_ci    created with
5009e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassBeginInfo-renderArea-02849]]
5010e5c31af7Sopenharmony_ci    [eq]#pname:renderArea.offset.y {plus} pname:renderArea.extent.height#
5011e5c31af7Sopenharmony_ci    must: be less than or equal to
5012e5c31af7Sopenharmony_ci    slink:VkFramebufferCreateInfo::pname:height the pname:framebuffer was
5013e5c31af7Sopenharmony_ci    created with
5014e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_device_group[]
5015e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_device_group[]
5016e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassBeginInfo-pNext-02850]]
5017e5c31af7Sopenharmony_ci    If the pname:pNext chain does not contain
5018e5c31af7Sopenharmony_ci    slink:VkDeviceGroupRenderPassBeginInfo or its
5019e5c31af7Sopenharmony_ci    pname:deviceRenderAreaCount member is equal to 0,
5020e5c31af7Sopenharmony_ci    pname:renderArea.offset.x must: be greater than or equal to 0
5021e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassBeginInfo-pNext-02851]]
5022e5c31af7Sopenharmony_ci    If the pname:pNext chain does not contain
5023e5c31af7Sopenharmony_ci    slink:VkDeviceGroupRenderPassBeginInfo or its
5024e5c31af7Sopenharmony_ci    pname:deviceRenderAreaCount member is equal to 0,
5025e5c31af7Sopenharmony_ci    pname:renderArea.offset.y must: be greater than or equal to 0
5026e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassBeginInfo-pNext-02852]]
5027e5c31af7Sopenharmony_ci    If the pname:pNext chain does not contain
5028e5c31af7Sopenharmony_ci    slink:VkDeviceGroupRenderPassBeginInfo or its
5029e5c31af7Sopenharmony_ci    pname:deviceRenderAreaCount member is equal to 0,
5030e5c31af7Sopenharmony_ci    [eq]#pname:renderArea.offset.x {plus} pname:renderArea.extent.width#
5031e5c31af7Sopenharmony_ci    must: be less than or equal to
5032e5c31af7Sopenharmony_ci    slink:VkFramebufferCreateInfo::pname:width the pname:framebuffer was
5033e5c31af7Sopenharmony_ci    created with
5034e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassBeginInfo-pNext-02853]]
5035e5c31af7Sopenharmony_ci    If the pname:pNext chain does not contain
5036e5c31af7Sopenharmony_ci    slink:VkDeviceGroupRenderPassBeginInfo or its
5037e5c31af7Sopenharmony_ci    pname:deviceRenderAreaCount member is equal to 0,
5038e5c31af7Sopenharmony_ci    [eq]#pname:renderArea.offset.y {plus} pname:renderArea.extent.height#
5039e5c31af7Sopenharmony_ci    must: be less than or equal to
5040e5c31af7Sopenharmony_ci    slink:VkFramebufferCreateInfo::pname:height the pname:framebuffer was
5041e5c31af7Sopenharmony_ci    created with
5042e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassBeginInfo-pNext-02856]]
5043e5c31af7Sopenharmony_ci    If the pname:pNext chain contains
5044e5c31af7Sopenharmony_ci    slink:VkDeviceGroupRenderPassBeginInfo, [eq]#pname:offset.x {plus}
5045e5c31af7Sopenharmony_ci    pname:extent.width# of each element of pname:pDeviceRenderAreas must: be
5046e5c31af7Sopenharmony_ci    less than or equal to slink:VkFramebufferCreateInfo::pname:width the
5047e5c31af7Sopenharmony_ci    pname:framebuffer was created with
5048e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassBeginInfo-pNext-02857]]
5049e5c31af7Sopenharmony_ci    If the pname:pNext chain contains
5050e5c31af7Sopenharmony_ci    slink:VkDeviceGroupRenderPassBeginInfo, [eq]#pname:offset.y {plus}
5051e5c31af7Sopenharmony_ci    pname:extent.height# of each element of pname:pDeviceRenderAreas must:
5052e5c31af7Sopenharmony_ci    be less than or equal to slink:VkFramebufferCreateInfo::pname:height the
5053e5c31af7Sopenharmony_ci    pname:framebuffer was created with
5054e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_device_group[]
5055e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_imageless_framebuffer[]
5056e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassBeginInfo-framebuffer-03207]]
5057e5c31af7Sopenharmony_ci    If pname:framebuffer was created with a
5058e5c31af7Sopenharmony_ci    slink:VkFramebufferCreateInfo::pname:flags value that did not include
5059e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, and the pname:pNext chain
5060e5c31af7Sopenharmony_ci    includes a slink:VkRenderPassAttachmentBeginInfo structure, its
5061e5c31af7Sopenharmony_ci    pname:attachmentCount must: be zero
5062e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassBeginInfo-framebuffer-03208]]
5063e5c31af7Sopenharmony_ci    If pname:framebuffer was created with a
5064e5c31af7Sopenharmony_ci    slink:VkFramebufferCreateInfo::pname:flags value that included
5065e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the pname:attachmentCount of
5066e5c31af7Sopenharmony_ci    a slink:VkRenderPassAttachmentBeginInfo structure included in the
5067e5c31af7Sopenharmony_ci    pname:pNext chain must: be equal to the value of
5068e5c31af7Sopenharmony_ci    slink:VkFramebufferAttachmentsCreateInfo::pname:attachmentImageInfoCount
5069e5c31af7Sopenharmony_ci    used to create pname:framebuffer
5070e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassBeginInfo-framebuffer-02780]]
5071e5c31af7Sopenharmony_ci    If pname:framebuffer was created with a
5072e5c31af7Sopenharmony_ci    slink:VkFramebufferCreateInfo::pname:flags value that included
5073e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of the
5074e5c31af7Sopenharmony_ci    pname:pAttachments member of a slink:VkRenderPassAttachmentBeginInfo
5075e5c31af7Sopenharmony_ci    structure included in the pname:pNext chain must: have been created on
5076e5c31af7Sopenharmony_ci    the same slink:VkDevice as pname:framebuffer and pname:renderPass
5077e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassBeginInfo-framebuffer-03209]]
5078e5c31af7Sopenharmony_ci    If pname:framebuffer was created with a
5079e5c31af7Sopenharmony_ci    slink:VkFramebufferCreateInfo::pname:flags value that included
5080e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of the
5081e5c31af7Sopenharmony_ci    pname:pAttachments member of a slink:VkRenderPassAttachmentBeginInfo
5082e5c31af7Sopenharmony_ci    structure included in the pname:pNext chain must: be a slink:VkImageView
5083e5c31af7Sopenharmony_ci    of an image created with a value of slink:VkImageCreateInfo::pname:flags
5084e5c31af7Sopenharmony_ci    equal to the pname:flags member of the corresponding element of
5085e5c31af7Sopenharmony_ci    slink:VkFramebufferAttachmentsCreateInfo::pname:pAttachmentImageInfos
5086e5c31af7Sopenharmony_ci    used to create pname:framebuffer
5087e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassBeginInfo-framebuffer-04627]]
5088e5c31af7Sopenharmony_ci    If pname:framebuffer was created with a
5089e5c31af7Sopenharmony_ci    slink:VkFramebufferCreateInfo::pname:flags value that included
5090e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of the
5091e5c31af7Sopenharmony_ci    pname:pAttachments member of a slink:VkRenderPassAttachmentBeginInfo
5092e5c31af7Sopenharmony_ci    structure included in the pname:pNext chain must: be a slink:VkImageView
5093e5c31af7Sopenharmony_ci    with <<resources-image-inherited-usage, an inherited usage>> equal to
5094e5c31af7Sopenharmony_ci    the pname:usage member of the corresponding element of
5095e5c31af7Sopenharmony_ci    slink:VkFramebufferAttachmentsCreateInfo::pname:pAttachmentImageInfos
5096e5c31af7Sopenharmony_ci    used to create pname:framebuffer
5097e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassBeginInfo-framebuffer-03211]]
5098e5c31af7Sopenharmony_ci    If pname:framebuffer was created with a
5099e5c31af7Sopenharmony_ci    slink:VkFramebufferCreateInfo::pname:flags value that included
5100e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of the
5101e5c31af7Sopenharmony_ci    pname:pAttachments member of a slink:VkRenderPassAttachmentBeginInfo
5102e5c31af7Sopenharmony_ci    structure included in the pname:pNext chain must: be a slink:VkImageView
5103e5c31af7Sopenharmony_ci    with a width equal to the pname:width member of the corresponding
5104e5c31af7Sopenharmony_ci    element of
5105e5c31af7Sopenharmony_ci    slink:VkFramebufferAttachmentsCreateInfo::pname:pAttachmentImageInfos
5106e5c31af7Sopenharmony_ci    used to create pname:framebuffer
5107e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassBeginInfo-framebuffer-03212]]
5108e5c31af7Sopenharmony_ci    If pname:framebuffer was created with a
5109e5c31af7Sopenharmony_ci    slink:VkFramebufferCreateInfo::pname:flags value that included
5110e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of the
5111e5c31af7Sopenharmony_ci    pname:pAttachments member of a slink:VkRenderPassAttachmentBeginInfo
5112e5c31af7Sopenharmony_ci    structure included in the pname:pNext chain must: be a slink:VkImageView
5113e5c31af7Sopenharmony_ci    with a height equal to the pname:height member of the corresponding
5114e5c31af7Sopenharmony_ci    element of
5115e5c31af7Sopenharmony_ci    slink:VkFramebufferAttachmentsCreateInfo::pname:pAttachmentImageInfos
5116e5c31af7Sopenharmony_ci    used to create pname:framebuffer
5117e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassBeginInfo-framebuffer-03213]]
5118e5c31af7Sopenharmony_ci    If pname:framebuffer was created with a
5119e5c31af7Sopenharmony_ci    slink:VkFramebufferCreateInfo::pname:flags value that included
5120e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of the
5121e5c31af7Sopenharmony_ci    pname:pAttachments member of a slink:VkRenderPassAttachmentBeginInfo
5122e5c31af7Sopenharmony_ci    structure included in the pname:pNext chain must: be a slink:VkImageView
5123e5c31af7Sopenharmony_ci    of an image created with a value of
5124e5c31af7Sopenharmony_ci    slink:VkImageViewCreateInfo::pname:subresourceRange.layerCount equal to
5125e5c31af7Sopenharmony_ci    the pname:layerCount member of the corresponding element of
5126e5c31af7Sopenharmony_ci    slink:VkFramebufferAttachmentsCreateInfo::pname:pAttachmentImageInfos
5127e5c31af7Sopenharmony_ci    used to create pname:framebuffer
5128e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassBeginInfo-framebuffer-03214]]
5129e5c31af7Sopenharmony_ci    If pname:framebuffer was created with a
5130e5c31af7Sopenharmony_ci    slink:VkFramebufferCreateInfo::pname:flags value that included
5131e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of the
5132e5c31af7Sopenharmony_ci    pname:pAttachments member of a slink:VkRenderPassAttachmentBeginInfo
5133e5c31af7Sopenharmony_ci    structure included in the pname:pNext chain must: be a slink:VkImageView
5134e5c31af7Sopenharmony_ci    of an image created with a value of
5135e5c31af7Sopenharmony_ci    slink:VkImageFormatListCreateInfo::pname:viewFormatCount equal to the
5136e5c31af7Sopenharmony_ci    pname:viewFormatCount member of the corresponding element of
5137e5c31af7Sopenharmony_ci    slink:VkFramebufferAttachmentsCreateInfo::pname:pAttachmentImageInfos
5138e5c31af7Sopenharmony_ci    used to create pname:framebuffer
5139e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassBeginInfo-framebuffer-03215]]
5140e5c31af7Sopenharmony_ci    If pname:framebuffer was created with a
5141e5c31af7Sopenharmony_ci    slink:VkFramebufferCreateInfo::pname:flags value that included
5142e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of the
5143e5c31af7Sopenharmony_ci    pname:pAttachments member of a slink:VkRenderPassAttachmentBeginInfo
5144e5c31af7Sopenharmony_ci    structure included in the pname:pNext chain must: be a slink:VkImageView
5145e5c31af7Sopenharmony_ci    of an image created with a set of elements in
5146e5c31af7Sopenharmony_ci    slink:VkImageFormatListCreateInfo::pname:pViewFormats equal to the set
5147e5c31af7Sopenharmony_ci    of elements in the pname:pViewFormats member of the corresponding
5148e5c31af7Sopenharmony_ci    element of
5149e5c31af7Sopenharmony_ci    slink:VkFramebufferAttachmentsCreateInfo::pname:pAttachmentImageInfos
5150e5c31af7Sopenharmony_ci    used to create pname:framebuffer
5151e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassBeginInfo-framebuffer-03216]]
5152e5c31af7Sopenharmony_ci    If pname:framebuffer was created with a
5153e5c31af7Sopenharmony_ci    slink:VkFramebufferCreateInfo::pname:flags value that included
5154e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of the
5155e5c31af7Sopenharmony_ci    pname:pAttachments member of a slink:VkRenderPassAttachmentBeginInfo
5156e5c31af7Sopenharmony_ci    structure included in the pname:pNext chain must: be a slink:VkImageView
5157e5c31af7Sopenharmony_ci    of an image created with a value of
5158e5c31af7Sopenharmony_ci    slink:VkImageViewCreateInfo::pname:format equal to the corresponding
5159e5c31af7Sopenharmony_ci    value of slink:VkAttachmentDescription::pname:format in pname:renderPass
5160e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassBeginInfo-framebuffer-03217]]
5161e5c31af7Sopenharmony_ci    If pname:framebuffer was created with a
5162e5c31af7Sopenharmony_ci    slink:VkFramebufferCreateInfo::pname:flags value that included
5163e5c31af7Sopenharmony_ci    ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of the
5164e5c31af7Sopenharmony_ci    pname:pAttachments member of a slink:VkRenderPassAttachmentBeginInfo
5165e5c31af7Sopenharmony_ci    structure included in the pname:pNext chain must: be a slink:VkImageView
5166e5c31af7Sopenharmony_ci    of an image created with a value of
5167e5c31af7Sopenharmony_ci    slink:VkImageCreateInfo::pname:samples equal to the corresponding value
5168e5c31af7Sopenharmony_ci    of slink:VkAttachmentDescription::pname:samples in pname:renderPass
5169e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_imageless_framebuffer[]
5170e5c31af7Sopenharmony_ciifdef::VK_QCOM_render_pass_transform[]
5171e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassBeginInfo-pNext-02869]]
5172e5c31af7Sopenharmony_ci    If the pname:pNext chain includes
5173e5c31af7Sopenharmony_ci    slink:VkRenderPassTransformBeginInfoQCOM, pname:renderArea.offset must:
5174e5c31af7Sopenharmony_ci    equal (0,0)
5175e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassBeginInfo-pNext-02870]]
5176e5c31af7Sopenharmony_ci    If the pname:pNext chain includes
5177e5c31af7Sopenharmony_ci    slink:VkRenderPassTransformBeginInfoQCOM, pname:renderArea.extent
5178e5c31af7Sopenharmony_ci    transformed by slink:VkRenderPassTransformBeginInfoQCOM::pname:transform
5179e5c31af7Sopenharmony_ci    must: equal the pname:framebuffer dimensions
5180e5c31af7Sopenharmony_ciendif::VK_QCOM_render_pass_transform[]
5181e5c31af7Sopenharmony_ci****
5182e5c31af7Sopenharmony_ci
5183e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkRenderPassBeginInfo.txt[]
5184e5c31af7Sopenharmony_ci--
5185e5c31af7Sopenharmony_ci
5186e5c31af7Sopenharmony_ciifdef::VK_EXT_sample_locations[]
5187e5c31af7Sopenharmony_ci[open,refpage='VkRenderPassSampleLocationsBeginInfoEXT',desc='Structure specifying sample locations to use for the layout transition of custom sample locations compatible depth/stencil attachments',type='structs']
5188e5c31af7Sopenharmony_ci--
5189e5c31af7Sopenharmony_ciThe image layout of the depth aspect of a depth/stencil attachment referring
5190e5c31af7Sopenharmony_cito an image created with
5191e5c31af7Sopenharmony_ciename:VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT is dependent
5192e5c31af7Sopenharmony_cion the last sample locations used to render to the image subresource, thus
5193e5c31af7Sopenharmony_cipreserving the contents of such depth/stencil attachments across subpass
5194e5c31af7Sopenharmony_ciboundaries requires the application to specify these sample locations
5195e5c31af7Sopenharmony_ciwhenever a layout transition of the attachment may: occur.
5196e5c31af7Sopenharmony_ciThis information can: be provided by adding a
5197e5c31af7Sopenharmony_cisname:VkRenderPassSampleLocationsBeginInfoEXT structure to the pname:pNext
5198e5c31af7Sopenharmony_cichain of sname:VkRenderPassBeginInfo.
5199e5c31af7Sopenharmony_ci
5200e5c31af7Sopenharmony_ciThe sname:VkRenderPassSampleLocationsBeginInfoEXT structure is defined as:
5201e5c31af7Sopenharmony_ci
5202e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkRenderPassSampleLocationsBeginInfoEXT.txt[]
5203e5c31af7Sopenharmony_ci
5204e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
5205e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
5206e5c31af7Sopenharmony_ci    structure.
5207e5c31af7Sopenharmony_ci  * pname:attachmentInitialSampleLocationsCount is the number of elements in
5208e5c31af7Sopenharmony_ci    the pname:pAttachmentInitialSampleLocations array.
5209e5c31af7Sopenharmony_ci  * pname:pAttachmentInitialSampleLocations is a pointer to an array of
5210e5c31af7Sopenharmony_ci    pname:attachmentInitialSampleLocationsCount
5211e5c31af7Sopenharmony_ci    slink:VkAttachmentSampleLocationsEXT structures specifying the
5212e5c31af7Sopenharmony_ci    attachment indices and their corresponding sample location state.
5213e5c31af7Sopenharmony_ci    Each element of pname:pAttachmentInitialSampleLocations can: specify the
5214e5c31af7Sopenharmony_ci    sample location state to use in the automatic layout transition
5215e5c31af7Sopenharmony_ci    performed to transition a depth/stencil attachment from the initial
5216e5c31af7Sopenharmony_ci    layout of the attachment to the image layout specified for the
5217e5c31af7Sopenharmony_ci    attachment in the first subpass using it.
5218e5c31af7Sopenharmony_ci  * pname:postSubpassSampleLocationsCount is the number of elements in the
5219e5c31af7Sopenharmony_ci    pname:pPostSubpassSampleLocations array.
5220e5c31af7Sopenharmony_ci  * pname:pPostSubpassSampleLocations is a pointer to an array of
5221e5c31af7Sopenharmony_ci    pname:postSubpassSampleLocationsCount slink:VkSubpassSampleLocationsEXT
5222e5c31af7Sopenharmony_ci    structures specifying the subpass indices and their corresponding sample
5223e5c31af7Sopenharmony_ci    location state.
5224e5c31af7Sopenharmony_ci    Each element of pname:pPostSubpassSampleLocations can: specify the
5225e5c31af7Sopenharmony_ci    sample location state to use in the automatic layout transition
5226e5c31af7Sopenharmony_ci    performed to transition the depth/stencil attachment used by the
5227e5c31af7Sopenharmony_ci    specified subpass to the image layout specified in a dependent subpass
5228e5c31af7Sopenharmony_ci    or to the final layout of the attachment in case the specified subpass
5229e5c31af7Sopenharmony_ci    is the last subpass using that attachment.
5230e5c31af7Sopenharmony_ci    In addition, if
5231e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceSampleLocationsPropertiesEXT::pname:variableSampleLocations
5232e5c31af7Sopenharmony_ci    is ename:VK_FALSE, each element of pname:pPostSubpassSampleLocations
5233e5c31af7Sopenharmony_ci    must: specify the sample location state that matches the sample
5234e5c31af7Sopenharmony_ci    locations used by all pipelines that will be bound to a command buffer
5235e5c31af7Sopenharmony_ci    during the specified subpass.
5236e5c31af7Sopenharmony_ci    If pname:variableSampleLocations is ename:VK_TRUE, the sample locations
5237e5c31af7Sopenharmony_ci    used for rasterization do not depend on
5238e5c31af7Sopenharmony_ci    pname:pPostSubpassSampleLocations.
5239e5c31af7Sopenharmony_ci
5240e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkRenderPassSampleLocationsBeginInfoEXT.txt[]
5241e5c31af7Sopenharmony_ci--
5242e5c31af7Sopenharmony_ci
5243e5c31af7Sopenharmony_ci[open,refpage='VkAttachmentSampleLocationsEXT',desc='Structure specifying the sample locations state to use in the initial layout transition of attachments',type='structs']
5244e5c31af7Sopenharmony_ci--
5245e5c31af7Sopenharmony_ciThe sname:VkAttachmentSampleLocationsEXT structure is defined as:
5246e5c31af7Sopenharmony_ci
5247e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkAttachmentSampleLocationsEXT.txt[]
5248e5c31af7Sopenharmony_ci
5249e5c31af7Sopenharmony_ci  * pname:attachmentIndex is the index of the attachment for which the
5250e5c31af7Sopenharmony_ci    sample locations state is provided.
5251e5c31af7Sopenharmony_ci  * pname:sampleLocationsInfo is the sample locations state to use for the
5252e5c31af7Sopenharmony_ci    layout transition of the given attachment from the initial layout of the
5253e5c31af7Sopenharmony_ci    attachment to the image layout specified for the attachment in the first
5254e5c31af7Sopenharmony_ci    subpass using it.
5255e5c31af7Sopenharmony_ci
5256e5c31af7Sopenharmony_ciIf the image referenced by the framebuffer attachment at index
5257e5c31af7Sopenharmony_cipname:attachmentIndex was not created with
5258e5c31af7Sopenharmony_ciename:VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT then the
5259e5c31af7Sopenharmony_civalues specified in pname:sampleLocationsInfo are ignored.
5260e5c31af7Sopenharmony_ci
5261e5c31af7Sopenharmony_ci.Valid Usage
5262e5c31af7Sopenharmony_ci****
5263e5c31af7Sopenharmony_ci  * [[VUID-VkAttachmentSampleLocationsEXT-attachmentIndex-01531]]
5264e5c31af7Sopenharmony_ci    pname:attachmentIndex must: be less than the pname:attachmentCount
5265e5c31af7Sopenharmony_ci    specified in slink:VkRenderPassCreateInfo the render pass specified by
5266e5c31af7Sopenharmony_ci    slink:VkRenderPassBeginInfo::pname:renderPass was created with
5267e5c31af7Sopenharmony_ci****
5268e5c31af7Sopenharmony_ci
5269e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkAttachmentSampleLocationsEXT.txt[]
5270e5c31af7Sopenharmony_ci--
5271e5c31af7Sopenharmony_ci
5272e5c31af7Sopenharmony_ci[open,refpage='VkSubpassSampleLocationsEXT',desc='Structure specifying the sample locations state to use for layout transitions of attachments performed after a given subpass',type='structs']
5273e5c31af7Sopenharmony_ci--
5274e5c31af7Sopenharmony_ciThe sname:VkSubpassSampleLocationsEXT structure is defined as:
5275e5c31af7Sopenharmony_ci
5276e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkSubpassSampleLocationsEXT.txt[]
5277e5c31af7Sopenharmony_ci
5278e5c31af7Sopenharmony_ci  * pname:subpassIndex is the index of the subpass for which the sample
5279e5c31af7Sopenharmony_ci    locations state is provided.
5280e5c31af7Sopenharmony_ci  * pname:sampleLocationsInfo is the sample locations state to use for the
5281e5c31af7Sopenharmony_ci    layout transition of the depth/stencil attachment away from the image
5282e5c31af7Sopenharmony_ci    layout the attachment is used with in the subpass specified in
5283e5c31af7Sopenharmony_ci    pname:subpassIndex.
5284e5c31af7Sopenharmony_ci
5285e5c31af7Sopenharmony_ciIf the image referenced by the depth/stencil attachment used in the subpass
5286e5c31af7Sopenharmony_ciidentified by pname:subpassIndex was not created with
5287e5c31af7Sopenharmony_ciename:VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT or if the
5288e5c31af7Sopenharmony_cisubpass does not use a depth/stencil attachment, and
5289e5c31af7Sopenharmony_cislink:VkPhysicalDeviceSampleLocationsPropertiesEXT::pname:variableSampleLocations
5290e5c31af7Sopenharmony_ciis ename:VK_TRUE then the values specified in pname:sampleLocationsInfo are
5291e5c31af7Sopenharmony_ciignored.
5292e5c31af7Sopenharmony_ci
5293e5c31af7Sopenharmony_ci.Valid Usage
5294e5c31af7Sopenharmony_ci****
5295e5c31af7Sopenharmony_ci  * [[VUID-VkSubpassSampleLocationsEXT-subpassIndex-01532]]
5296e5c31af7Sopenharmony_ci    pname:subpassIndex must: be less than the pname:subpassCount specified
5297e5c31af7Sopenharmony_ci    in slink:VkRenderPassCreateInfo the render pass specified by
5298e5c31af7Sopenharmony_ci    slink:VkRenderPassBeginInfo::pname:renderPass was created with
5299e5c31af7Sopenharmony_ci****
5300e5c31af7Sopenharmony_ci
5301e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkSubpassSampleLocationsEXT.txt[]
5302e5c31af7Sopenharmony_ci--
5303e5c31af7Sopenharmony_ciendif::VK_EXT_sample_locations[]
5304e5c31af7Sopenharmony_ci
5305e5c31af7Sopenharmony_ciifdef::VK_QCOM_render_pass_transform[]
5306e5c31af7Sopenharmony_ci[open,refpage='VkRenderPassTransformBeginInfoQCOM',desc='Structure describing transform parameters of a render pass instance',type='structs']
5307e5c31af7Sopenharmony_ci--
5308e5c31af7Sopenharmony_ciTo begin a render pass instance with <<vertexpostproc-renderpass-transform,
5309e5c31af7Sopenharmony_cirender pass transform>> enabled, add the
5310e5c31af7Sopenharmony_cislink:VkRenderPassTransformBeginInfoQCOM to the pname:pNext chain of
5311e5c31af7Sopenharmony_cislink:VkRenderPassBeginInfo structure passed to the
5312e5c31af7Sopenharmony_ciflink:vkCmdBeginRenderPass command specifying the render pass transform.
5313e5c31af7Sopenharmony_ci
5314e5c31af7Sopenharmony_ciThe sname:VkRenderPassTransformBeginInfoQCOM structure is defined as:
5315e5c31af7Sopenharmony_ci
5316e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkRenderPassTransformBeginInfoQCOM.txt[]
5317e5c31af7Sopenharmony_ci
5318e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
5319e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
5320e5c31af7Sopenharmony_ci    structure.
5321e5c31af7Sopenharmony_ci  * pname:transform is a elink:VkSurfaceTransformFlagBitsKHR value
5322e5c31af7Sopenharmony_ci    describing the transform to be applied to rasterization.
5323e5c31af7Sopenharmony_ci
5324e5c31af7Sopenharmony_ci.Valid Usage
5325e5c31af7Sopenharmony_ci****
5326e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassTransformBeginInfoQCOM-transform-02871]]
5327e5c31af7Sopenharmony_ci    pname:transform must: be ename:VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR,
5328e5c31af7Sopenharmony_ci    ename:VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR,
5329e5c31af7Sopenharmony_ci    ename:VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, or
5330e5c31af7Sopenharmony_ci    ename:VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR
5331e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassTransformBeginInfoQCOM-flags-02872]]
5332e5c31af7Sopenharmony_ci    The pname:renderpass must: have been created with
5333e5c31af7Sopenharmony_ci    slink:VkRenderPassCreateInfo::pname:flags containing
5334e5c31af7Sopenharmony_ci    ename:VK_RENDER_PASS_CREATE_TRANSFORM_BIT_QCOM
5335e5c31af7Sopenharmony_ci****
5336e5c31af7Sopenharmony_ci
5337e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkRenderPassTransformBeginInfoQCOM.txt[]
5338e5c31af7Sopenharmony_ci--
5339e5c31af7Sopenharmony_ciendif::VK_QCOM_render_pass_transform[]
5340e5c31af7Sopenharmony_ci
5341e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_create_renderpass2[]
5342e5c31af7Sopenharmony_ci[open,refpage='VkSubpassBeginInfo',desc='Structure specifying subpass begin information',type='structs',alias='VkSubpassBeginInfoKHR']
5343e5c31af7Sopenharmony_ci--
5344e5c31af7Sopenharmony_ciThe sname:VkSubpassBeginInfo structure is defined as:
5345e5c31af7Sopenharmony_ci
5346e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkSubpassBeginInfo.txt[]
5347e5c31af7Sopenharmony_ci
5348e5c31af7Sopenharmony_ciifdef::VK_KHR_create_renderpass2[]
5349e5c31af7Sopenharmony_cior the equivalent
5350e5c31af7Sopenharmony_ci
5351e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkSubpassBeginInfoKHR.txt[]
5352e5c31af7Sopenharmony_ciendif::VK_KHR_create_renderpass2[]
5353e5c31af7Sopenharmony_ci
5354e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
5355e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
5356e5c31af7Sopenharmony_ci    structure.
5357e5c31af7Sopenharmony_ci  * pname:contents is a elink:VkSubpassContents value specifying how the
5358e5c31af7Sopenharmony_ci    commands in the next subpass will be provided.
5359e5c31af7Sopenharmony_ci
5360e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkSubpassBeginInfo.txt[]
5361e5c31af7Sopenharmony_ci--
5362e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_create_renderpass2[]
5363e5c31af7Sopenharmony_ci
5364e5c31af7Sopenharmony_ci[open,refpage='VkSubpassContents',desc='Specify how commands in the first subpass of a render pass are provided',type='enums']
5365e5c31af7Sopenharmony_ci--
5366e5c31af7Sopenharmony_ciPossible values of flink:vkCmdBeginRenderPass::pname:contents, specifying
5367e5c31af7Sopenharmony_cihow the commands in the first subpass will be provided, are:
5368e5c31af7Sopenharmony_ci
5369e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkSubpassContents.txt[]
5370e5c31af7Sopenharmony_ci
5371e5c31af7Sopenharmony_ci  * ename:VK_SUBPASS_CONTENTS_INLINE specifies that the contents of the
5372e5c31af7Sopenharmony_ci    subpass will be recorded inline in the primary command buffer, and
5373e5c31af7Sopenharmony_ci    secondary command buffers must: not be executed within the subpass.
5374e5c31af7Sopenharmony_ci  * ename:VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS specifies that the
5375e5c31af7Sopenharmony_ci    contents are recorded in secondary command buffers that will be called
5376e5c31af7Sopenharmony_ci    from the primary command buffer, and flink:vkCmdExecuteCommands is the
5377e5c31af7Sopenharmony_ci    only valid command on the command buffer until flink:vkCmdNextSubpass or
5378e5c31af7Sopenharmony_ci    flink:vkCmdEndRenderPass.
5379e5c31af7Sopenharmony_ci--
5380e5c31af7Sopenharmony_ci
5381e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_device_group[]
5382e5c31af7Sopenharmony_ci[open,refpage='VkDeviceGroupRenderPassBeginInfo',desc='Set the initial device mask and render areas for a render pass instance',type='structs']
5383e5c31af7Sopenharmony_ci--
5384e5c31af7Sopenharmony_ciIf the pname:pNext chain of slink:VkRenderPassBeginInfo
5385e5c31af7Sopenharmony_ciifdef::VK_KHR_dynamic_rendering[or slink:VkRenderingInfoKHR]
5386e5c31af7Sopenharmony_ciincludes a sname:VkDeviceGroupRenderPassBeginInfo structure, then that
5387e5c31af7Sopenharmony_cistructure includes a device mask and set of render areas for the render pass
5388e5c31af7Sopenharmony_ciinstance.
5389e5c31af7Sopenharmony_ci
5390e5c31af7Sopenharmony_ciThe sname:VkDeviceGroupRenderPassBeginInfo structure is defined as:
5391e5c31af7Sopenharmony_ci
5392e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDeviceGroupRenderPassBeginInfo.txt[]
5393e5c31af7Sopenharmony_ci
5394e5c31af7Sopenharmony_ciifdef::VK_KHR_device_group[]
5395e5c31af7Sopenharmony_cior the equivalent
5396e5c31af7Sopenharmony_ci
5397e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDeviceGroupRenderPassBeginInfoKHR.txt[]
5398e5c31af7Sopenharmony_ciendif::VK_KHR_device_group[]
5399e5c31af7Sopenharmony_ci
5400e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
5401e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
5402e5c31af7Sopenharmony_ci    structure.
5403e5c31af7Sopenharmony_ci  * pname:deviceMask is the device mask for the render pass instance.
5404e5c31af7Sopenharmony_ci  * pname:deviceRenderAreaCount is the number of elements in the
5405e5c31af7Sopenharmony_ci    pname:pDeviceRenderAreas array.
5406e5c31af7Sopenharmony_ci  * pname:pDeviceRenderAreas is a pointer to an array of slink:VkRect2D
5407e5c31af7Sopenharmony_ci    structures defining the render area for each physical device.
5408e5c31af7Sopenharmony_ci
5409e5c31af7Sopenharmony_ciThe pname:deviceMask serves several purposes.
5410e5c31af7Sopenharmony_ciIt is an upper bound on the set of physical devices that can: be used during
5411e5c31af7Sopenharmony_cithe render pass instance, and the initial device mask when the render pass
5412e5c31af7Sopenharmony_ciinstance begins.
5413e5c31af7Sopenharmony_ciIn addition, commands transitioning to the next subpass in a render pass
5414e5c31af7Sopenharmony_ciinstance and commands ending the render pass instance, and, accordingly
5415e5c31af7Sopenharmony_cirender pass attachment load, store, and resolve operations and subpass
5416e5c31af7Sopenharmony_cidependencies corresponding to the render pass instance, are executed on the
5417e5c31af7Sopenharmony_ciphysical devices included in the device mask provided here.
5418e5c31af7Sopenharmony_ci
5419e5c31af7Sopenharmony_ciIf pname:deviceRenderAreaCount is not zero, then the elements of
5420e5c31af7Sopenharmony_cipname:pDeviceRenderAreas override the value of
5421e5c31af7Sopenharmony_cislink:VkRenderPassBeginInfo::pname:renderArea, and provide a render area
5422e5c31af7Sopenharmony_cispecific to each physical device.
5423e5c31af7Sopenharmony_ciThese render areas serve the same purpose as
5424e5c31af7Sopenharmony_cislink:VkRenderPassBeginInfo::pname:renderArea, including controlling the
5425e5c31af7Sopenharmony_ciregion of attachments that are cleared by ename:VK_ATTACHMENT_LOAD_OP_CLEAR
5426e5c31af7Sopenharmony_ciand that are resolved into resolve attachments.
5427e5c31af7Sopenharmony_ci
5428e5c31af7Sopenharmony_ciIf this structure is not present, the render pass instance's device mask is
5429e5c31af7Sopenharmony_cithe value of slink:VkDeviceGroupCommandBufferBeginInfo::pname:deviceMask.
5430e5c31af7Sopenharmony_ciIf this structure is not present or if pname:deviceRenderAreaCount is zero,
5431e5c31af7Sopenharmony_cislink:VkRenderPassBeginInfo::pname:renderArea is used for all physical
5432e5c31af7Sopenharmony_cidevices.
5433e5c31af7Sopenharmony_ci
5434e5c31af7Sopenharmony_ci.Valid Usage
5435e5c31af7Sopenharmony_ci****
5436e5c31af7Sopenharmony_ci  * [[VUID-VkDeviceGroupRenderPassBeginInfo-deviceMask-00905]]
5437e5c31af7Sopenharmony_ci    pname:deviceMask must: be a valid device mask value
5438e5c31af7Sopenharmony_ci  * [[VUID-VkDeviceGroupRenderPassBeginInfo-deviceMask-00906]]
5439e5c31af7Sopenharmony_ci    pname:deviceMask must: not be zero
5440e5c31af7Sopenharmony_ci  * [[VUID-VkDeviceGroupRenderPassBeginInfo-deviceMask-00907]]
5441e5c31af7Sopenharmony_ci    pname:deviceMask must: be a subset of the command buffer's initial
5442e5c31af7Sopenharmony_ci    device mask
5443e5c31af7Sopenharmony_ci  * [[VUID-VkDeviceGroupRenderPassBeginInfo-deviceRenderAreaCount-00908]]
5444e5c31af7Sopenharmony_ci    pname:deviceRenderAreaCount must: either be zero or equal to the number
5445e5c31af7Sopenharmony_ci    of physical devices in the logical device
5446e5c31af7Sopenharmony_ci  * [[VUID-VkDeviceGroupRenderPassBeginInfo-offset-06166]]
5447e5c31af7Sopenharmony_ci    The pname:offset.x member of any element of pname:pDeviceRenderAreas
5448e5c31af7Sopenharmony_ci    must: be greater than or equal to 0
5449e5c31af7Sopenharmony_ci  * [[VUID-VkDeviceGroupRenderPassBeginInfo-offset-06167]]
5450e5c31af7Sopenharmony_ci    The pname:offset.y member of any element of pname:pDeviceRenderAreas
5451e5c31af7Sopenharmony_ci    must: be greater than or equal to 0
5452e5c31af7Sopenharmony_ci  * [[VUID-VkDeviceGroupRenderPassBeginInfo-offset-06168]]
5453e5c31af7Sopenharmony_ci    The sum of the pname:offset.x and pname:extent.width members of any
5454e5c31af7Sopenharmony_ci    element of pname:pDeviceRenderAreas must: be less than or equal to
5455e5c31af7Sopenharmony_ci    <<limits-maxFramebufferWidth, pname:maxFramebufferWidth>>
5456e5c31af7Sopenharmony_ci  * [[VUID-VkDeviceGroupRenderPassBeginInfo-offset-06169]]
5457e5c31af7Sopenharmony_ci    The sum of the pname:offset.y and pname:extent.height members of any
5458e5c31af7Sopenharmony_ci    element of pname:pDeviceRenderAreas must: be less than or equal to
5459e5c31af7Sopenharmony_ci    <<limits-maxFramebufferHeight, pname:maxFramebufferHeight>>
5460e5c31af7Sopenharmony_ci****
5461e5c31af7Sopenharmony_ci
5462e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDeviceGroupRenderPassBeginInfo.txt[]
5463e5c31af7Sopenharmony_ci--
5464e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_device_group[]
5465e5c31af7Sopenharmony_ci
5466e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_imageless_framebuffer[]
5467e5c31af7Sopenharmony_ci[open,refpage='VkRenderPassAttachmentBeginInfo',desc='Structure specifying images to be used as framebuffer attachments',type='structs',alias='VkRenderPassAttachmentBeginInfoKHR']
5468e5c31af7Sopenharmony_ci--
5469e5c31af7Sopenharmony_ciThe sname:VkRenderPassAttachmentBeginInfo structure is defined as:
5470e5c31af7Sopenharmony_ci
5471e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkRenderPassAttachmentBeginInfo.txt[]
5472e5c31af7Sopenharmony_ci
5473e5c31af7Sopenharmony_ciifdef::VK_KHR_imageless_framebuffer[]
5474e5c31af7Sopenharmony_cior the equivalent
5475e5c31af7Sopenharmony_ci
5476e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkRenderPassAttachmentBeginInfoKHR.txt[]
5477e5c31af7Sopenharmony_ciendif::VK_KHR_imageless_framebuffer[]
5478e5c31af7Sopenharmony_ci
5479e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
5480e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
5481e5c31af7Sopenharmony_ci    structure.
5482e5c31af7Sopenharmony_ci  * pname:attachmentCount is the number of attachments.
5483e5c31af7Sopenharmony_ci  * pname:pAttachments is a pointer to an array of sname:VkImageView
5484e5c31af7Sopenharmony_ci    handles, each of which will be used as the corresponding attachment in
5485e5c31af7Sopenharmony_ci    the render pass instance.
5486e5c31af7Sopenharmony_ci
5487e5c31af7Sopenharmony_ci.Valid Usage
5488e5c31af7Sopenharmony_ci****
5489e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassAttachmentBeginInfo-pAttachments-03218]]
5490e5c31af7Sopenharmony_ci    Each element of pname:pAttachments must: only specify a single mip level
5491e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassAttachmentBeginInfo-pAttachments-03219]]
5492e5c31af7Sopenharmony_ci    Each element of pname:pAttachments must: have been created with the
5493e5c31af7Sopenharmony_ci    identity swizzle
5494e5c31af7Sopenharmony_ci  * [[VUID-VkRenderPassAttachmentBeginInfo-pAttachments-04114]]
5495e5c31af7Sopenharmony_ci    Each element of pname:pAttachments must: have been created with
5496e5c31af7Sopenharmony_ci    slink:VkImageViewCreateInfo::pname:viewType not equal to
5497e5c31af7Sopenharmony_ci    ename:VK_IMAGE_VIEW_TYPE_3D
5498e5c31af7Sopenharmony_ci****
5499e5c31af7Sopenharmony_ci
5500e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkRenderPassAttachmentBeginInfo.txt[]
5501e5c31af7Sopenharmony_ci--
5502e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_imageless_framebuffer[]
5503e5c31af7Sopenharmony_ci
5504e5c31af7Sopenharmony_ci[open,refpage='vkGetRenderAreaGranularity',desc='Returns the granularity for optimal render area',type='protos']
5505e5c31af7Sopenharmony_ci--
5506e5c31af7Sopenharmony_ciTo query the render area granularity, call:
5507e5c31af7Sopenharmony_ci
5508e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetRenderAreaGranularity.txt[]
5509e5c31af7Sopenharmony_ci
5510e5c31af7Sopenharmony_ci  * pname:device is the logical device that owns the render pass.
5511e5c31af7Sopenharmony_ci  * pname:renderPass is a handle to a render pass.
5512e5c31af7Sopenharmony_ci  * pname:pGranularity is a pointer to a slink:VkExtent2D structure in which
5513e5c31af7Sopenharmony_ci    the granularity is returned.
5514e5c31af7Sopenharmony_ci
5515e5c31af7Sopenharmony_ciThe conditions leading to an optimal pname:renderArea are:
5516e5c31af7Sopenharmony_ci
5517e5c31af7Sopenharmony_ci  * the pname:offset.x member in pname:renderArea is a multiple of the
5518e5c31af7Sopenharmony_ci    pname:width member of the returned slink:VkExtent2D (the horizontal
5519e5c31af7Sopenharmony_ci    granularity).
5520e5c31af7Sopenharmony_ci  * the pname:offset.y member in pname:renderArea is a multiple of the
5521e5c31af7Sopenharmony_ci    pname:height member of the returned slink:VkExtent2D (the vertical
5522e5c31af7Sopenharmony_ci    granularity).
5523e5c31af7Sopenharmony_ci  * either the pname:extent.width member in pname:renderArea is a multiple
5524e5c31af7Sopenharmony_ci    of the horizontal granularity or pname:offset.x+pname:extent.width is
5525e5c31af7Sopenharmony_ci    equal to the pname:width of the pname:framebuffer in the
5526e5c31af7Sopenharmony_ci    slink:VkRenderPassBeginInfo.
5527e5c31af7Sopenharmony_ci  * either the pname:extent.height member in pname:renderArea is a multiple
5528e5c31af7Sopenharmony_ci    of the vertical granularity or pname:offset.y+pname:extent.height is
5529e5c31af7Sopenharmony_ci    equal to the pname:height of the pname:framebuffer in the
5530e5c31af7Sopenharmony_ci    slink:VkRenderPassBeginInfo.
5531e5c31af7Sopenharmony_ci
5532e5c31af7Sopenharmony_ciSubpass dependencies are not affected by the render area, and apply to the
5533e5c31af7Sopenharmony_cientire image subresources attached to the framebuffer as specified in the
5534e5c31af7Sopenharmony_cidescription of <<renderpass-layout-transitions,automatic layout
5535e5c31af7Sopenharmony_citransitions>>.
5536e5c31af7Sopenharmony_ciSimilarly, pipeline barriers are valid even if their effect extends outside
5537e5c31af7Sopenharmony_cithe render area.
5538e5c31af7Sopenharmony_ci
5539e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetRenderAreaGranularity.txt[]
5540e5c31af7Sopenharmony_ci--
5541e5c31af7Sopenharmony_ci
5542e5c31af7Sopenharmony_ci[open,refpage='vkCmdNextSubpass',desc='Transition to the next subpass of a render pass',type='protos']
5543e5c31af7Sopenharmony_ci--
5544e5c31af7Sopenharmony_ciTo transition to the next subpass in the render pass instance after
5545e5c31af7Sopenharmony_cirecording the commands for a subpass, call:
5546e5c31af7Sopenharmony_ci
5547e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCmdNextSubpass.txt[]
5548e5c31af7Sopenharmony_ci
5549e5c31af7Sopenharmony_ci  * pname:commandBuffer is the command buffer in which to record the
5550e5c31af7Sopenharmony_ci    command.
5551e5c31af7Sopenharmony_ci  * pname:contents specifies how the commands in the next subpass will be
5552e5c31af7Sopenharmony_ci    provided, in the same fashion as the corresponding parameter of
5553e5c31af7Sopenharmony_ci    flink:vkCmdBeginRenderPass.
5554e5c31af7Sopenharmony_ci
5555e5c31af7Sopenharmony_ciThe subpass index for a render pass begins at zero when
5556e5c31af7Sopenharmony_cifname:vkCmdBeginRenderPass is recorded, and increments each time
5557e5c31af7Sopenharmony_cifname:vkCmdNextSubpass is recorded.
5558e5c31af7Sopenharmony_ci
5559e5c31af7Sopenharmony_ciMoving to the next subpass automatically performs any multisample resolve
5560e5c31af7Sopenharmony_cioperations in the subpass being ended.
5561e5c31af7Sopenharmony_ciEnd-of-subpass multisample resolves are treated as color attachment writes
5562e5c31af7Sopenharmony_cifor the purposes of synchronization.
5563e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_depth_stencil_resolve[]
5564e5c31af7Sopenharmony_ciThis applies to resolve operations for both color and depth/stencil
5565e5c31af7Sopenharmony_ciattachments.
5566e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_depth_stencil_resolve[]
5567e5c31af7Sopenharmony_ciThat is, they are considered to execute in the
5568e5c31af7Sopenharmony_ciename:VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT pipeline stage and their
5569e5c31af7Sopenharmony_ciwrites are synchronized with ename:VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT.
5570e5c31af7Sopenharmony_ciSynchronization between rendering within a subpass and any resolve
5571e5c31af7Sopenharmony_cioperations at the end of the subpass occurs automatically, without need for
5572e5c31af7Sopenharmony_ciexplicit dependencies or pipeline barriers.
5573e5c31af7Sopenharmony_ciHowever, if the resolve attachment is also used in a different subpass, an
5574e5c31af7Sopenharmony_ciexplicit dependency is needed.
5575e5c31af7Sopenharmony_ci
5576e5c31af7Sopenharmony_ciAfter transitioning to the next subpass, the application can: record the
5577e5c31af7Sopenharmony_cicommands for that subpass.
5578e5c31af7Sopenharmony_ci
5579e5c31af7Sopenharmony_ci.Valid Usage
5580e5c31af7Sopenharmony_ci****
5581e5c31af7Sopenharmony_ci  * [[VUID-vkCmdNextSubpass-None-00909]]
5582e5c31af7Sopenharmony_ci    The current subpass index must: be less than the number of subpasses in
5583e5c31af7Sopenharmony_ci    the render pass minus one
5584e5c31af7Sopenharmony_ciifdef::VK_EXT_transform_feedback[]
5585e5c31af7Sopenharmony_ci  * [[VUID-vkCmdNextSubpass-None-02349]]
5586e5c31af7Sopenharmony_ci    This command must: not be recorded when transform feedback is active
5587e5c31af7Sopenharmony_ciendif::VK_EXT_transform_feedback[]
5588e5c31af7Sopenharmony_ci****
5589e5c31af7Sopenharmony_ci
5590e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCmdNextSubpass.txt[]
5591e5c31af7Sopenharmony_ci--
5592e5c31af7Sopenharmony_ci
5593e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_create_renderpass2[]
5594e5c31af7Sopenharmony_ci[open,refpage='vkCmdNextSubpass2',desc='Transition to the next subpass of a render pass',type='protos',alias='vkCmdNextSubpass2KHR']
5595e5c31af7Sopenharmony_ci--
5596e5c31af7Sopenharmony_ciTo transition to the next subpass in the render pass instance after
5597e5c31af7Sopenharmony_cirecording the commands for a subpass, call:
5598e5c31af7Sopenharmony_ci
5599e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2[]
5600e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCmdNextSubpass2.txt[]
5601e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2[]
5602e5c31af7Sopenharmony_ci
5603e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2+VK_KHR_create_renderpass2[or the equivalent command]
5604e5c31af7Sopenharmony_ci
5605e5c31af7Sopenharmony_ciifdef::VK_KHR_create_renderpass2[]
5606e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCmdNextSubpass2KHR.txt[]
5607e5c31af7Sopenharmony_ciendif::VK_KHR_create_renderpass2[]
5608e5c31af7Sopenharmony_ci
5609e5c31af7Sopenharmony_ci  * pname:commandBuffer is the command buffer in which to record the
5610e5c31af7Sopenharmony_ci    command.
5611e5c31af7Sopenharmony_ci  * pname:pSubpassBeginInfo is a pointer to a slink:VkSubpassBeginInfo
5612e5c31af7Sopenharmony_ci    structure containing information about the subpass which is about to
5613e5c31af7Sopenharmony_ci    begin rendering.
5614e5c31af7Sopenharmony_ci  * pname:pSubpassEndInfo is a pointer to a slink:VkSubpassEndInfo structure
5615e5c31af7Sopenharmony_ci    containing information about how the previous subpass will be ended.
5616e5c31af7Sopenharmony_ci
5617e5c31af7Sopenharmony_cifname:vkCmdNextSubpass2 is semantically identical to flink:vkCmdNextSubpass,
5618e5c31af7Sopenharmony_ciexcept that it is extensible, and that pname:contents is provided as part of
5619e5c31af7Sopenharmony_cian extensible structure instead of as a flat parameter.
5620e5c31af7Sopenharmony_ci
5621e5c31af7Sopenharmony_ci.Valid Usage
5622e5c31af7Sopenharmony_ci****
5623e5c31af7Sopenharmony_ci  * [[VUID-vkCmdNextSubpass2-None-03102]]
5624e5c31af7Sopenharmony_ci    The current subpass index must: be less than the number of subpasses in
5625e5c31af7Sopenharmony_ci    the render pass minus one
5626e5c31af7Sopenharmony_ciifdef::VK_EXT_transform_feedback[]
5627e5c31af7Sopenharmony_ci  * [[VUID-vkCmdNextSubpass2-None-02350]]
5628e5c31af7Sopenharmony_ci    This command must: not be recorded when transform feedback is active
5629e5c31af7Sopenharmony_ciendif::VK_EXT_transform_feedback[]
5630e5c31af7Sopenharmony_ci****
5631e5c31af7Sopenharmony_ci
5632e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCmdNextSubpass2.txt[]
5633e5c31af7Sopenharmony_ci--
5634e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_create_renderpass2[]
5635e5c31af7Sopenharmony_ci
5636e5c31af7Sopenharmony_ci[open,refpage='vkCmdEndRenderPass',desc='End the current render pass',type='protos']
5637e5c31af7Sopenharmony_ci--
5638e5c31af7Sopenharmony_ciTo record a command to end a render pass instance after recording the
5639e5c31af7Sopenharmony_cicommands for the last subpass, call:
5640e5c31af7Sopenharmony_ci
5641e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCmdEndRenderPass.txt[]
5642e5c31af7Sopenharmony_ci
5643e5c31af7Sopenharmony_ci  * pname:commandBuffer is the command buffer in which to end the current
5644e5c31af7Sopenharmony_ci    render pass instance.
5645e5c31af7Sopenharmony_ci
5646e5c31af7Sopenharmony_ciEnding a render pass instance performs any multisample resolve operations on
5647e5c31af7Sopenharmony_cithe final subpass.
5648e5c31af7Sopenharmony_ci
5649e5c31af7Sopenharmony_ci.Valid Usage
5650e5c31af7Sopenharmony_ci****
5651e5c31af7Sopenharmony_ci  * [[VUID-vkCmdEndRenderPass-None-00910]]
5652e5c31af7Sopenharmony_ci    The current subpass index must: be equal to the number of subpasses in
5653e5c31af7Sopenharmony_ci    the render pass minus one
5654e5c31af7Sopenharmony_ciifdef::VK_EXT_transform_feedback[]
5655e5c31af7Sopenharmony_ci  * [[VUID-vkCmdEndRenderPass-None-02351]]
5656e5c31af7Sopenharmony_ci    This command must: not be recorded when transform feedback is active
5657e5c31af7Sopenharmony_ciendif::VK_EXT_transform_feedback[]
5658e5c31af7Sopenharmony_ciifdef::VK_KHR_dynamic_rendering[]
5659e5c31af7Sopenharmony_ci  * [[VUID-vkCmdEndRenderPass-None-06170]]
5660e5c31af7Sopenharmony_ci    The current render pass instance must: not have been begun with
5661e5c31af7Sopenharmony_ci    flink:vkCmdBeginRenderingKHR
5662e5c31af7Sopenharmony_ciendif::VK_KHR_dynamic_rendering[]
5663e5c31af7Sopenharmony_ci****
5664e5c31af7Sopenharmony_ci
5665e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCmdEndRenderPass.txt[]
5666e5c31af7Sopenharmony_ci--
5667e5c31af7Sopenharmony_ci
5668e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_create_renderpass2[]
5669e5c31af7Sopenharmony_ci[open,refpage='vkCmdEndRenderPass2',desc='End the current render pass',type='protos',alias='vkCmdEndRenderPass2KHR']
5670e5c31af7Sopenharmony_ci--
5671e5c31af7Sopenharmony_ciTo record a command to end a render pass instance after recording the
5672e5c31af7Sopenharmony_cicommands for the last subpass, call:
5673e5c31af7Sopenharmony_ci
5674e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2[]
5675e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCmdEndRenderPass2.txt[]
5676e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2[]
5677e5c31af7Sopenharmony_ci
5678e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2+VK_KHR_create_renderpass2[or the equivalent command]
5679e5c31af7Sopenharmony_ci
5680e5c31af7Sopenharmony_ciifdef::VK_KHR_create_renderpass2[]
5681e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCmdEndRenderPass2KHR.txt[]
5682e5c31af7Sopenharmony_ciendif::VK_KHR_create_renderpass2[]
5683e5c31af7Sopenharmony_ci
5684e5c31af7Sopenharmony_ci  * pname:commandBuffer is the command buffer in which to end the current
5685e5c31af7Sopenharmony_ci    render pass instance.
5686e5c31af7Sopenharmony_ci  * pname:pSubpassEndInfo is a pointer to a slink:VkSubpassEndInfo structure
5687e5c31af7Sopenharmony_ci    containing information about how the previous subpass will be ended.
5688e5c31af7Sopenharmony_ci
5689e5c31af7Sopenharmony_cifname:vkCmdEndRenderPass2 is semantically identical to
5690e5c31af7Sopenharmony_ciflink:vkCmdEndRenderPass, except that it is extensible.
5691e5c31af7Sopenharmony_ci
5692e5c31af7Sopenharmony_ci.Valid Usage
5693e5c31af7Sopenharmony_ci****
5694e5c31af7Sopenharmony_ci  * [[VUID-vkCmdEndRenderPass2-None-03103]]
5695e5c31af7Sopenharmony_ci    The current subpass index must: be equal to the number of subpasses in
5696e5c31af7Sopenharmony_ci    the render pass minus one
5697e5c31af7Sopenharmony_ciifdef::VK_EXT_transform_feedback[]
5698e5c31af7Sopenharmony_ci  * [[VUID-vkCmdEndRenderPass2-None-02352]]
5699e5c31af7Sopenharmony_ci    This command must: not be recorded when transform feedback is active
5700e5c31af7Sopenharmony_ciendif::VK_EXT_transform_feedback[]
5701e5c31af7Sopenharmony_ciifdef::VK_KHR_dynamic_rendering[]
5702e5c31af7Sopenharmony_ci  * [[VUID-vkCmdEndRenderPass2-None-06171]]
5703e5c31af7Sopenharmony_ci    The current render pass instance must: not have been begun with
5704e5c31af7Sopenharmony_ci    flink:vkCmdBeginRenderingKHR
5705e5c31af7Sopenharmony_ciendif::VK_KHR_dynamic_rendering[]
5706e5c31af7Sopenharmony_ci****
5707e5c31af7Sopenharmony_ci
5708e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCmdEndRenderPass2.txt[]
5709e5c31af7Sopenharmony_ci--
5710e5c31af7Sopenharmony_ci
5711e5c31af7Sopenharmony_ci[open,refpage='VkSubpassEndInfo',desc='Structure specifying subpass end information',type='structs',alias='VkSubpassEndInfoKHR']
5712e5c31af7Sopenharmony_ci--
5713e5c31af7Sopenharmony_ciThe sname:VkSubpassEndInfo structure is defined as:
5714e5c31af7Sopenharmony_ci
5715e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkSubpassEndInfo.txt[]
5716e5c31af7Sopenharmony_ci
5717e5c31af7Sopenharmony_ciifdef::VK_KHR_create_renderpass2[]
5718e5c31af7Sopenharmony_cior the equivalent
5719e5c31af7Sopenharmony_ci
5720e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkSubpassEndInfoKHR.txt[]
5721e5c31af7Sopenharmony_ciendif::VK_KHR_create_renderpass2[]
5722e5c31af7Sopenharmony_ci
5723e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
5724e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
5725e5c31af7Sopenharmony_ci    structure.
5726e5c31af7Sopenharmony_ci
5727e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkSubpassEndInfo.txt[]
5728e5c31af7Sopenharmony_ci--
5729e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_create_renderpass2[]
5730