• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2019-2024 The Khronos Group Inc.
2//
3// SPDX-License-Identifier: CC-BY-4.0
4
5// Common Valid Usage
6// Common to vkCmdPipelineBarrier* commands
7ifndef::VK_KHR_multiview,VK_VERSION_1_1[]
8  * [[VUID-{refpage}-pDependencies-02285]]
9    If fname:{refpage} is called within a render pass instance using a
10    slink:VkRenderPass object, the render pass must: have been created with
11    at least one subpass dependency that expresses a dependency from the
12    current subpass to itself, does not include
13    ename:VK_DEPENDENCY_BY_REGION_BIT if this command does not, and has
14    <<synchronization-dependencies-scopes, synchronization scopes>> and
15    <<synchronization-dependencies-access-scopes, access scopes>> that are
16    all supersets of the scopes defined in this command
17endif::VK_KHR_multiview,VK_VERSION_1_1[]
18ifdef::VK_KHR_multiview,VK_VERSION_1_1[]
19  * [[VUID-{refpage}-None-07889]]
20    If fname:{refpage} is called within a render pass instance using a
21    slink:VkRenderPass object, the render pass must: have been created with
22    at least one subpass dependency that expresses a dependency from the
23    current subpass to itself, does not include
24    ename:VK_DEPENDENCY_BY_REGION_BIT if this command does not, does not
25    include ename:VK_DEPENDENCY_VIEW_LOCAL_BIT if this command does not, and
26    has <<synchronization-dependencies-scopes, synchronization scopes>> and
27    <<synchronization-dependencies-access-scopes, access scopes>> that are
28    all supersets of the scopes defined in this command
29endif::VK_KHR_multiview,VK_VERSION_1_1[]
30  * [[VUID-{refpage}-bufferMemoryBarrierCount-01178]]
31    If fname:{refpage} is called within a render pass instance using a
32    slink:VkRenderPass object, it must: not include any buffer memory
33    barriers
34  * [[VUID-{refpage}-image-04073]]
35    If fname:{refpage} is called within a render pass instance using a
36    slink:VkRenderPass object, the pname:image member of any image memory
37    barrier included in this command must: be an attachment used in the
38    current subpass both as an input attachment, and as either a color,
39ifdef::VK_ANDROID_external_format_resolve[]
40    color resolve,
41endif::VK_ANDROID_external_format_resolve[]
42    or depth/stencil attachment
43ifdef::VK_ANDROID_external_format_resolve[]
44  * [[VUID-{refpage}-image-09373]]
45    If fname:{refpage} is called within a render pass instance using a
46    slink:VkRenderPass object, and the pname:image member of any image
47    memory barrier is a color resolve attachment, the corresponding color
48    attachment must: be ename:VK_ATTACHMENT_UNUSED
49  * [[VUID-{refpage}-image-09374]]
50    If fname:{refpage} is called within a render pass instance using a
51    slink:VkRenderPass object, and the pname:image member of any image
52    memory barrier is a color resolve attachment, it must: have been created
53    with a non-zero slink:VkExternalFormatANDROID::pname:externalFormat
54    value
55endif::VK_ANDROID_external_format_resolve[]
56  * [[VUID-{refpage}-oldLayout-01181]]
57    If fname:{refpage} is called within a render pass instance, the
58    pname:oldLayout and pname:newLayout members of any image memory barrier
59    included in this command must: be equal
60  * [[VUID-{refpage}-srcQueueFamilyIndex-01182]]
61    If fname:{refpage} is called within a render pass instance, the
62    pname:srcQueueFamilyIndex and pname:dstQueueFamilyIndex members of any
63    memory barrier included in this command must: be equal
64  * [[VUID-{refpage}-None-07890]]
65    If fname:{refpage} is called within a render pass instance, and the
66    source stage masks of any memory barriers include
67    <<synchronization-framebuffer-regions, framebuffer-space stages>>,
68    destination stage masks of all memory barriers must: only include
69    <<synchronization-framebuffer-regions, framebuffer-space stages>>
70  * [[VUID-{refpage}-dependencyFlags-07891]]
71    If fname:{refpage} is called within a render pass instance, and and the
72    source stage masks of any memory barriers include
73    <<synchronization-framebuffer-regions, framebuffer-space stages>>, then
74    pname:dependencyFlags must: include ename:VK_DEPENDENCY_BY_REGION_BIT
75  * [[VUID-{refpage}-None-07892]]
76    If fname:{refpage} is called within a render pass instance, the source
77    and destination stage masks of any memory barriers must: only include
78    graphics pipeline stages
79ifdef::VK_VERSION_1_1,VK_KHR_multiview[]
80  * [[VUID-{refpage}-dependencyFlags-01186]]
81    If fname:{refpage} is called outside of a render pass instance, the
82    dependency flags must: not include ename:VK_DEPENDENCY_VIEW_LOCAL_BIT
83  * [[VUID-{refpage}-None-07893]]
84    If fname:{refpage} is called inside a render pass instance, and there is
85    more than one view in the current subpass, dependency flags must:
86    include ename:VK_DEPENDENCY_VIEW_LOCAL_BIT
87endif::VK_VERSION_1_1,VK_KHR_multiview[]
88ifdef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
89  * [[VUID-{refpage}-shaderTileImageColorReadAccess-08718]]
90    If fname:{refpage} is called within a render pass instance
91ifdef::VK_EXT_shader_tile_image[]
92    and none of the <<features-shaderTileImageColorReadAccess,
93    pname:shaderTileImageColorReadAccess>>,
94    <<features-shaderTileImageDepthReadAccess,
95    pname:shaderTileImageDepthReadAccess>>,
96    <<features-shaderTileImageStencilReadAccess,
97    pname:shaderTileImageStencilReadAccess>> features are enabled,
98endif::VK_EXT_shader_tile_image[]
99    the render pass must: not have been started with
100    flink:vkCmdBeginRendering
101ifdef::VK_EXT_shader_tile_image[]
102  * [[VUID-{refpage}-None-08719]]
103    If fname:{refpage} is called within a render pass instance started with
104    flink:vkCmdBeginRendering, it must: adhere to the restrictions in
105    <<synchronization-pipeline-barriers-explicit-renderpass-tileimage,
106    Explicit Render Pass Tile Image Access Synchronization>>
107endif::VK_EXT_shader_tile_image[]
108endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
109// Common Valid Usage
110