blob: 7a8ccd93aa4a592c2437d65bb1ac56ed6dd81421 [file] [log] [blame]
Lionel Landwerlin2d9f5632022-01-08 01:12:47 +02001/* Copyright (c) 2015-2022 The Khronos Group Inc.
2 * Copyright (c) 2015-2022 Valve Corporation
3 * Copyright (c) 2015-2022 LunarG, Inc.
4 * Copyright (C) 2015-2022 Google Inc.
stusmithedc4e392021-12-24 15:22:16 +00005 * Modifications Copyright (C) 2020-2022 Advanced Micro Devices, Inc. All rights reserved.
Jasper St. Pierre512613a2019-04-08 16:25:23 -07006 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 *
19 * Author: Cody Northrop <cnorthrop@google.com>
20 * Author: Michael Lentine <mlentine@google.com>
21 * Author: Tobin Ehlis <tobine@google.com>
22 * Author: Chia-I Wu <olv@google.com>
23 * Author: Chris Forbes <chrisf@ijw.co.nz>
24 * Author: Mark Lobodzinski <mark@lunarg.com>
25 * Author: Ian Elliott <ianelliott@google.com>
26 * Author: Dave Houlton <daveh@lunarg.com>
27 * Author: Dustin Graves <dustin@lunarg.com>
28 * Author: Jeremy Hayes <jeremy@lunarg.com>
29 * Author: Jon Ashburn <jon@lunarg.com>
30 * Author: Karl Schultz <karl@lunarg.com>
31 * Author: Mark Young <marky@lunarg.com>
32 * Author: Mike Schuchardt <mikes@lunarg.com>
33 * Author: Mike Weiblen <mikew@lunarg.com>
34 * Author: Tony Barbour <tony@LunarG.com>
35 * Author: John Zulauf <jzulauf@lunarg.com>
36 * Author: Shannon McPherson <shannon@lunarg.com>
Jeremy Kniagere6827432020-04-01 09:05:56 -060037 * Author: Jeremy Kniager <jeremyk@lunarg.com>
Mark Lobodzinskiddf43612020-11-17 11:28:02 -070038 * Author: Nathaniel Cesario <nathaniel@lunarg.com>
Tobias Hector6663c9b2020-11-05 10:18:02 +000039 * Author: Tobias Hector <tobias.hector@amd.com>
Jasper St. Pierre512613a2019-04-08 16:25:23 -070040 */
41
Jasper St. Pierre512613a2019-04-08 16:25:23 -070042#include "chassis.h"
43#include "core_validation.h"
44
Spencer Fricke507600b2020-03-22 13:23:06 -070045// clang-format off
Mark Lobodzinskiddf43612020-11-17 11:28:02 -070046struct DispatchVuidsCmdDraw : DrawDispatchVuid {
47 DispatchVuidsCmdDraw() : DrawDispatchVuid() {
Mark Lobodzinskiddf43612020-11-17 11:28:02 -070048 pipeline_bound = "VUID-vkCmdDraw-None-02700";
49 dynamic_state = "VUID-vkCmdDraw-commandBuffer-02701";
50 vertex_binding = "VUID-vkCmdDraw-None-04007";
51 vertex_binding_null = "VUID-vkCmdDraw-None-04008";
52 compatible_pipeline = "VUID-vkCmdDraw-None-02697";
53 render_pass_compatible = "VUID-vkCmdDraw-renderPass-02684";
54 subpass_index = "VUID-vkCmdDraw-subpass-02685";
55 sample_location = "VUID-vkCmdDraw-sampleLocationsEnable-02689";
56 linear_sampler = "VUID-vkCmdDraw-magFilter-04553";
57 cubic_sampler = "VUID-vkCmdDraw-None-02692";
58 viewport_count = "VUID-vkCmdDraw-viewportCount-03417";
59 scissor_count = "VUID-vkCmdDraw-scissorCount-03418";
60 viewport_scissor_count = "VUID-vkCmdDraw-viewportCount-03419";
61 primitive_topology = "VUID-vkCmdDraw-primitiveTopology-03420";
62 corner_sampled_address_mode = "VUID-vkCmdDraw-flags-02696";
63 subpass_input = "VUID-vkCmdDraw-None-02686";
64 imageview_atomic = "VUID-vkCmdDraw-None-02691";
Piers Daniella7f93b62021-11-20 12:32:04 -070065 push_constants_set = "VUID-vkCmdDraw-maintenance4-06425";
ziga-lunarg498b7e72022-03-12 00:33:37 +010066 image_subresources_render_pass_write = "VUID-vkCmdDraw-None-06537";
67 image_subresources_subpass_read = "VUID-vkCmdDraw-None-06538";
68 image_subresources_subpass_write = "VUID-vkCmdDraw-None-06539";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -070069 descriptor_valid = "VUID-vkCmdDraw-None-02699";
70 sampler_imageview_type = "VUID-vkCmdDraw-None-02702";
71 sampler_implicitLod_dref_proj = "VUID-vkCmdDraw-None-02703";
72 sampler_bias_offset = "VUID-vkCmdDraw-None-02704";
73 vertex_binding_attribute = "VUID-vkCmdDraw-None-02721";
74 dynamic_state_setting_commands = "VUID-vkCmdDraw-None-02859";
sfricke-samsung962d6f02021-04-03 20:28:59 -070075 rasterization_samples = "VUID-vkCmdDraw-rasterizationSamples-04740";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -070076 unprotected_command_buffer = "VUID-vkCmdDraw-commandBuffer-02707";
77 protected_command_buffer = "VUID-vkCmdDraw-commandBuffer-02712";
78 max_multiview_instance_index = "VUID-vkCmdDraw-maxMultiviewInstanceIndex-02688";
Mark Lobodzinskif786b412020-11-30 12:16:17 -070079 img_filter_cubic = "VUID-vkCmdDraw-None-02693";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -070080 filter_cubic = "VUID-vkCmdDraw-filterCubic-02694";
81 filter_cubic_min_max = "VUID-vkCmdDraw-filterCubicMinmax-02695";
Tobias Hector6663c9b2020-11-05 10:18:02 +000082 viewport_count_primitive_shading_rate = "VUID-vkCmdDraw-primitiveFragmentShadingRateWithMultipleViewports-04552";
Vikram Kushwahaa57b0c32021-04-19 12:21:46 -070083 patch_control_points = "VUID-vkCmdDraw-None-04875";
84 rasterizer_discard_enable = "VUID-vkCmdDraw-None-04876";
85 depth_bias_enable = "VUID-vkCmdDraw-None-04877";
86 logic_op = "VUID-vkCmdDraw-logicOp-04878";
87 primitive_restart_enable = "VUID-vkCmdDraw-None-04879";
Piers Daniell924cd832021-05-18 13:48:47 -060088 vertex_input_binding_stride = "VUID-vkCmdDraw-pStrides-04884";
89 vertex_input = kVUID_Core_CmdDraw_VertexInput;
ziga-lunarg8d62f952021-08-30 16:47:25 +020090 blend_enable = "VUID-vkCmdDraw-blendEnable-04727";
Aaron Hagan92a44f82021-11-19 09:34:56 -050091 dynamic_rendering_view_mask = "VUID-vkCmdDraw-viewMask-06178";
92 dynamic_rendering_color_count = "VUID-vkCmdDraw-colorAttachmentCount-06179";
93 dynamic_rendering_color_formats = "VUID-vkCmdDraw-colorAttachmentCount-06180";
94 dynamic_rendering_depth_format = "VUID-vkCmdDraw-pDepthAttachment-06181";
95 dynamic_rendering_stencil_format = "VUID-vkCmdDraw-pStencilAttachment-06182";
96 dynamic_rendering_fsr = "VUID-vkCmdDraw-imageView-06183";
97 dynamic_rendering_fdm = "VUID-vkCmdDraw-imageView-06184";
Aaron Hagan09a0e172021-11-19 21:18:33 -050098 dynamic_rendering_color_sample = "VUID-vkCmdDraw-colorAttachmentCount-06185";
99 dynamic_rendering_depth_sample = "VUID-vkCmdDraw-pDepthAttachment-06186";
100 dynamic_rendering_stencil_sample = "VUID-vkCmdDraw-pStencilAttachment-06187";
101 dynamic_rendering_multi_sample = "VUID-vkCmdDraw-colorAttachmentCount-06188";
Aaron Haganaca50442021-12-07 22:26:29 -0500102 dynamic_rendering_06189 = "VUID-vkCmdDraw-pDepthAttachment-06189";
103 dynamic_rendering_06190 = "VUID-vkCmdDraw-pStencilAttachment-06190";
104 dynamic_rendering_06198 = "VUID-vkCmdDraw-renderPass-06198";
Lionel Landwerlin88423cb2021-12-07 15:31:02 +0200105 storage_image_read_without_format = "VUID-vkCmdDraw-OpTypeImage-06424";
106 storage_image_write_without_format = "VUID-vkCmdDraw-OpTypeImage-06423";
Lionel Landwerlincdbe8682021-12-08 15:10:37 +0200107 depth_compare_sample = "VUID-vkCmdDraw-None-06479";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700108 }
109};
110
Tony-LunarG4490de42021-06-21 15:49:19 -0600111struct DispatchVuidsCmdDrawMultiEXT : DrawDispatchVuid {
112 DispatchVuidsCmdDrawMultiEXT() : DrawDispatchVuid() {
113 pipeline_bound = "VUID-vkCmdDrawMultiEXT-None-02700";
114 dynamic_state = "VUID-vkCmdDrawMultiEXT-commandBuffer-02701";
115 vertex_binding = "VUID-vkCmdDrawMultiEXT-None-04007";
116 vertex_binding_null = "VUID-vkCmdDrawMultiEXT-None-04008";
117 compatible_pipeline = "VUID-vkCmdDrawMultiEXT-None-02697";
118 render_pass_compatible = "VUID-vkCmdDrawMultiEXT-renderPass-02684";
119 subpass_index = "VUID-vkCmdDrawMultiEXT-subpass-02685";
120 sample_location = "VUID-vkCmdDrawMultiEXT-sampleLocationsEnable-02689";
121 linear_sampler = "VUID-vkCmdDrawMultiEXT-magFilter-04553";
122 cubic_sampler = "VUID-vkCmdDrawMultiEXT-None-02692";
123 viewport_count = "VUID-vkCmdDrawMultiEXT-viewportCount-03417";
124 scissor_count = "VUID-vkCmdDrawMultiEXT-scissorCount-03418";
125 viewport_scissor_count = "VUID-vkCmdDrawMultiEXT-viewportCount-03419";
126 primitive_topology = "VUID-vkCmdDrawMultiEXT-primitiveTopology-03420";
127 corner_sampled_address_mode = "VUID-vkCmdDrawMultiEXT-flags-02696";
128 subpass_input = "VUID-vkCmdDrawMultiEXT-None-02686";
129 imageview_atomic = "VUID-vkCmdDrawMultiEXT-None-02691";
Piers Daniella7f93b62021-11-20 12:32:04 -0700130 push_constants_set = "VUID-vkCmdDrawMultiEXT-maintenance4-06425";
ziga-lunarg498b7e72022-03-12 00:33:37 +0100131 image_subresources_render_pass_write = "VUID-vkCmdDrawMultiEXT-None-06537";
132 image_subresources_subpass_read = "VUID-vkCmdDrawMultiEXT-None-06538";
133 image_subresources_subpass_write = "VUID-vkCmdDrawMultiEXT-None-06539";
Tony-LunarG4490de42021-06-21 15:49:19 -0600134 descriptor_valid = "VUID-vkCmdDrawMultiEXT-None-02699";
135 sampler_imageview_type = "VUID-vkCmdDrawMultiEXT-None-02702";
136 sampler_implicitLod_dref_proj = "VUID-vkCmdDrawMultiEXT-None-02703";
137 sampler_bias_offset = "VUID-vkCmdDrawMultiEXT-None-02704";
138 vertex_binding_attribute = "VUID-vkCmdDrawMultiEXT-None-02721";
139 dynamic_state_setting_commands = "VUID-vkCmdDrawMultiEXT-None-02859";
140 rasterization_samples = "VUID-vkCmdDrawMultiEXT-rasterizationSamples-04740";
141 unprotected_command_buffer = "VUID-vkCmdDrawMultiEXT-commandBuffer-02707";
142 protected_command_buffer = "VUID-vkCmdDrawMultiEXT-commandBuffer-02712";
143 max_multiview_instance_index = "VUID-vkCmdDrawMultiEXT-maxMultiviewInstanceIndex-02688";
144 img_filter_cubic = "VUID-vkCmdDrawMultiEXT-None-02693";
145 filter_cubic = "VUID-vkCmdDrawMultiEXT-filterCubic-02694";
146 filter_cubic_min_max = "VUID-vkCmdDrawMultiEXT-filterCubicMinmax-02695";
147 viewport_count_primitive_shading_rate = "VUID-vkCmdDrawMultiEXT-primitiveFragmentShadingRateWithMultipleViewports-04552";
148 patch_control_points = "VUID-vkCmdDrawMultiEXT-None-04875";
149 rasterizer_discard_enable = "VUID-vkCmdDrawMultiEXT-None-04876";
150 depth_bias_enable = "VUID-vkCmdDrawMultiEXT-None-04877";
151 logic_op = "VUID-vkCmdDrawMultiEXT-logicOp-04878";
152 primitive_restart_enable = "VUID-vkCmdDrawMultiEXT-None-04879";
153 vertex_input_binding_stride = "VUID-vkCmdDrawMultiEXT-pStrides-04884";
154 vertex_input = kVUID_Core_CmdDrawMultiEXT_VertexInput;
ziga-lunarg8d62f952021-08-30 16:47:25 +0200155 blend_enable = "VUID-vkCmdDrawMultiEXT-blendEnable-04727";
Aaron Hagan92a44f82021-11-19 09:34:56 -0500156 dynamic_rendering_view_mask = "VUID-vkCmdDrawMultiEXT-viewMask-06178";
157 dynamic_rendering_color_count = "VUID-vkCmdDrawMultiEXT-colorAttachmentCount-06179";
158 dynamic_rendering_color_formats = "VUID-vkCmdDrawMultiEXT-colorAttachmentCount-06180";
159 dynamic_rendering_depth_format = "VUID-vkCmdDrawMultiEXT-pDepthAttachment-06181";
160 dynamic_rendering_stencil_format = "VUID-vkCmdDrawMultiEXT-pStencilAttachment-06182";
161 dynamic_rendering_fsr = "VUID-vkCmdDrawMultiEXT-imageView-06183";
162 dynamic_rendering_fdm = "VUID-vkCmdDrawMultiEXT-imageView-06184";
Aaron Hagan09a0e172021-11-19 21:18:33 -0500163 dynamic_rendering_color_sample = "VUID-vkCmdDrawMultiEXT-colorAttachmentCount-06185";
164 dynamic_rendering_depth_sample = "VUID-vkCmdDrawMultiEXT-pDepthAttachment-06186";
165 dynamic_rendering_stencil_sample = "VUID-vkCmdDrawMultiEXT-pStencilAttachment-06187";
166 dynamic_rendering_multi_sample = "VUID-vkCmdDrawMultiEXT-colorAttachmentCount-06188";
Aaron Haganaca50442021-12-07 22:26:29 -0500167 dynamic_rendering_06189 = "VUID-vkCmdDrawMultiEXT-pDepthAttachment-06189";
168 dynamic_rendering_06190 = "VUID-vkCmdDrawMultiEXT-pStencilAttachment-06190";
169 dynamic_rendering_06198 = "VUID-vkCmdDrawMultiEXT-renderPass-06198";
Lionel Landwerlin88423cb2021-12-07 15:31:02 +0200170 storage_image_read_without_format = "VUID-vkCmdDrawMultiEXT-OpTypeImage-06424";
171 storage_image_write_without_format = "VUID-vkCmdDrawMultiEXT-OpTypeImage-06423";
Lionel Landwerlincdbe8682021-12-08 15:10:37 +0200172 depth_compare_sample = "VUID-vkCmdDrawMultiEXT-None-06479";
Tony-LunarG4490de42021-06-21 15:49:19 -0600173 }
174};
175
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700176struct DispatchVuidsCmdDrawIndexed : DrawDispatchVuid {
177 DispatchVuidsCmdDrawIndexed() : DrawDispatchVuid() {
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700178 pipeline_bound = "VUID-vkCmdDrawIndexed-None-02700";
179 dynamic_state = "VUID-vkCmdDrawIndexed-commandBuffer-02701";
180 vertex_binding = "VUID-vkCmdDrawIndexed-None-04007";
181 vertex_binding_null = "VUID-vkCmdDrawIndexed-None-04008";
182 compatible_pipeline = "VUID-vkCmdDrawIndexed-None-02697";
183 render_pass_compatible = "VUID-vkCmdDrawIndexed-renderPass-02684";
184 subpass_index = "VUID-vkCmdDrawIndexed-subpass-02685";
185 sample_location = "VUID-vkCmdDrawIndexed-sampleLocationsEnable-02689";
186 linear_sampler = "VUID-vkCmdDrawIndexed-magFilter-04553";
187 cubic_sampler = "VUID-vkCmdDrawIndexed-None-02692";
188 viewport_count = "VUID-vkCmdDrawIndexed-viewportCount-03417";
189 scissor_count = "VUID-vkCmdDrawIndexed-scissorCount-03418";
190 viewport_scissor_count = "VUID-vkCmdDrawIndexed-viewportCount-03419";
191 primitive_topology = "VUID-vkCmdDrawIndexed-primitiveTopology-03420";
192 corner_sampled_address_mode = "VUID-vkCmdDrawIndexed-flags-02696";
193 subpass_input = "VUID-vkCmdDrawIndexed-None-02686";
194 imageview_atomic = "VUID-vkCmdDrawIndexed-None-02691";
Piers Daniella7f93b62021-11-20 12:32:04 -0700195 push_constants_set = "VUID-vkCmdDrawIndexed-maintenance4-06425";
ziga-lunarg498b7e72022-03-12 00:33:37 +0100196 image_subresources_render_pass_write = "VUID-vkCmdDrawIndexed-None-06537";
197 image_subresources_subpass_read = "VUID-vkCmdDrawIndexed-None-06538";
198 image_subresources_subpass_write = "VUID-vkCmdDrawIndexed-None-06539";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700199 descriptor_valid = "VUID-vkCmdDrawIndexed-None-02699";
200 sampler_imageview_type = "VUID-vkCmdDrawIndexed-None-02702";
201 sampler_implicitLod_dref_proj = "VUID-vkCmdDrawIndexed-None-02703";
202 sampler_bias_offset = "VUID-vkCmdDrawIndexed-None-02704";
203 vertex_binding_attribute = "VUID-vkCmdDrawIndexed-None-02721";
204 dynamic_state_setting_commands = "VUID-vkCmdDrawIndexed-None-02859";
sfricke-samsung962d6f02021-04-03 20:28:59 -0700205 rasterization_samples = "VUID-vkCmdDrawIndexed-rasterizationSamples-04740";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700206 unprotected_command_buffer = "VUID-vkCmdDrawIndexed-commandBuffer-02707";
207 protected_command_buffer = "VUID-vkCmdDrawIndexed-commandBuffer-02712";
208 max_multiview_instance_index = "VUID-vkCmdDrawIndexed-maxMultiviewInstanceIndex-02688";
Mark Lobodzinskif786b412020-11-30 12:16:17 -0700209 img_filter_cubic = "VUID-vkCmdDrawIndexed-None-02693";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700210 filter_cubic = "VUID-vkCmdDrawIndexed-filterCubic-02694";
211 filter_cubic_min_max = "VUID-vkCmdDrawIndexed-filterCubicMinmax-02695";
Tobias Hector6663c9b2020-11-05 10:18:02 +0000212 viewport_count_primitive_shading_rate = "VUID-vkCmdDrawIndexed-primitiveFragmentShadingRateWithMultipleViewports-04552";
Piers Daniell924cd832021-05-18 13:48:47 -0600213 patch_control_points = "VUID-vkCmdDrawIndexed-None-04875";
214 rasterizer_discard_enable = "VUID-vkCmdDrawIndexed-None-04876";
215 depth_bias_enable = "VUID-vkCmdDrawIndexed-None-04877";
216 logic_op = "VUID-vkCmdDrawIndexed-logicOp-04878";
217 primitive_restart_enable = "VUID-vkCmdDrawIndexed-None-04879";
218 vertex_input_binding_stride = "VUID-vkCmdDrawIndexed-pStrides-04884";
219 vertex_input = kVUID_Core_CmdDrawIndexed_VertexInput;
ziga-lunarg8d62f952021-08-30 16:47:25 +0200220 blend_enable = "VUID-vkCmdDrawIndexed-blendEnable-04727";
Aaron Hagan92a44f82021-11-19 09:34:56 -0500221 dynamic_rendering_view_mask = "VUID-vkCmdDrawIndexed-viewMask-06178";
222 dynamic_rendering_color_count = "VUID-vkCmdDrawIndexed-colorAttachmentCount-06179";
223 dynamic_rendering_color_formats = "VUID-vkCmdDrawIndexed-colorAttachmentCount-06180";
224 dynamic_rendering_depth_format = "VUID-vkCmdDrawIndexed-pDepthAttachment-06181";
225 dynamic_rendering_stencil_format = "VUID-vkCmdDrawIndexed-pStencilAttachment-06182";
226 dynamic_rendering_fsr = "VUID-vkCmdDrawIndexed-imageView-06183";
227 dynamic_rendering_fdm = "VUID-vkCmdDrawIndexed-imageView-06184";
Aaron Hagan09a0e172021-11-19 21:18:33 -0500228 dynamic_rendering_color_sample = "VUID-vkCmdDrawIndexed-colorAttachmentCount-06185";
229 dynamic_rendering_depth_sample = "VUID-vkCmdDrawIndexed-pDepthAttachment-06186";
230 dynamic_rendering_stencil_sample = "VUID-vkCmdDrawIndexed-pStencilAttachment-06187";
231 dynamic_rendering_multi_sample = "VUID-vkCmdDrawIndexed-colorAttachmentCount-06188";
Aaron Haganaca50442021-12-07 22:26:29 -0500232 dynamic_rendering_06189 = "VUID-vkCmdDrawIndexed-pDepthAttachment-06189";
233 dynamic_rendering_06190 = "VUID-vkCmdDrawIndexed-pStencilAttachment-06190";
234 dynamic_rendering_06198 = "VUID-vkCmdDrawIndexed-renderPass-06198";
Lionel Landwerlin88423cb2021-12-07 15:31:02 +0200235 storage_image_read_without_format = "VUID-vkCmdDrawIndexed-OpTypeImage-06424";
236 storage_image_write_without_format = "VUID-vkCmdDrawIndexed-OpTypeImage-06423";
Lionel Landwerlincdbe8682021-12-08 15:10:37 +0200237 depth_compare_sample = "VUID-vkCmdDrawIndexed-None-06479";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700238 }
239};
240
Tony-LunarG4490de42021-06-21 15:49:19 -0600241struct DispatchVuidsCmdDrawMultiIndexedEXT : DrawDispatchVuid {
242 DispatchVuidsCmdDrawMultiIndexedEXT() : DrawDispatchVuid() {
Lionel Landwerlin45e981c2021-12-07 15:29:40 +0200243 pipeline_bound = "VUID-vkCmdDrawMultiIndexedEXT-None-02700";
244 dynamic_state = "VUID-vkCmdDrawMultiIndexedEXT-commandBuffer-02701";
245 vertex_binding = "VUID-vkCmdDrawMultiIndexedEXT-None-04007";
246 vertex_binding_null = "VUID-vkCmdDrawMultiIndexedEXT-None-04008";
247 compatible_pipeline = "VUID-vkCmdDrawMultiIndexedEXT-None-02697";
248 render_pass_compatible = "VUID-vkCmdDrawMultiIndexedEXT-renderPass-02684";
249 subpass_index = "VUID-vkCmdDrawMultiIndexedEXT-subpass-02685";
250 sample_location = "VUID-vkCmdDrawMultiIndexedEXT-sampleLocationsEnable-02689";
251 linear_sampler = "VUID-vkCmdDrawMultiIndexedEXT-magFilter-04553";
252 cubic_sampler = "VUID-vkCmdDrawMultiIndexedEXT-None-02692";
253 viewport_count = "VUID-vkCmdDrawMultiIndexedEXT-viewportCount-03417";
254 scissor_count = "VUID-vkCmdDrawMultiIndexedEXT-scissorCount-03418";
255 viewport_scissor_count = "VUID-vkCmdDrawMultiIndexedEXT-viewportCount-03419";
256 primitive_topology = "VUID-vkCmdDrawMultiIndexedEXT-primitiveTopology-03420";
257 corner_sampled_address_mode = "VUID-vkCmdDrawMultiIndexedEXT-flags-02696";
258 subpass_input = "VUID-vkCmdDrawMultiIndexedEXT-None-02686";
259 imageview_atomic = "VUID-vkCmdDrawMultiIndexedEXT-None-02691";
260 push_constants_set = "VUID-vkCmdDrawMultiIndexedEXT-maintenance4-06425";
ziga-lunarg498b7e72022-03-12 00:33:37 +0100261 image_subresources_render_pass_write = "VUID-vkCmdDrawMultiIndexedEXT-None-06537";
262 image_subresources_subpass_read = "VUID-vkCmdDrawMultiIndexedEXT-None-06538";
263 image_subresources_subpass_write = "VUID-vkCmdDrawMultiIndexedEXT-None-06539";
Lionel Landwerlin45e981c2021-12-07 15:29:40 +0200264 descriptor_valid = "VUID-vkCmdDrawMultiIndexedEXT-None-02699";
265 sampler_imageview_type = "VUID-vkCmdDrawMultiIndexedEXT-None-02702";
266 sampler_implicitLod_dref_proj = "VUID-vkCmdDrawMultiIndexedEXT-None-02703";
267 sampler_bias_offset = "VUID-vkCmdDrawMultiIndexedEXT-None-02704";
268 vertex_binding_attribute = "VUID-vkCmdDrawMultiIndexedEXT-None-02721";
269 dynamic_state_setting_commands = "VUID-vkCmdDrawMultiIndexedEXT-None-02859";
270 rasterization_samples = "VUID-vkCmdDrawMultiIndexedEXT-rasterizationSamples-04740";
271 unprotected_command_buffer = "VUID-vkCmdDrawMultiIndexedEXT-commandBuffer-02707";
272 protected_command_buffer = "VUID-vkCmdDrawMultiIndexedEXT-commandBuffer-02712";
273 max_multiview_instance_index = "VUID-vkCmdDrawMultiIndexedEXT-maxMultiviewInstanceIndex-02688";
274 img_filter_cubic = "VUID-vkCmdDrawMultiIndexedEXT-None-02693";
275 filter_cubic = "VUID-vkCmdDrawMultiIndexedEXT-filterCubic-02694";
276 filter_cubic_min_max = "VUID-vkCmdDrawMultiIndexedEXT-filterCubicMinmax-02695";
Tony-LunarG4490de42021-06-21 15:49:19 -0600277 viewport_count_primitive_shading_rate = "VUID-vkCmdDrawMultiIndexedEXT-primitiveFragmentShadingRateWithMultipleViewports-04552";
Lionel Landwerlin45e981c2021-12-07 15:29:40 +0200278 patch_control_points = "VUID-vkCmdDrawMultiIndexedEXT-None-04875";
279 rasterizer_discard_enable = "VUID-vkCmdDrawMultiIndexedEXT-None-04876";
280 depth_bias_enable = "VUID-vkCmdDrawMultiIndexedEXT-None-04877";
281 logic_op = "VUID-vkCmdDrawMultiIndexedEXT-logicOp-04878";
282 primitive_restart_enable = "VUID-vkCmdDrawMultiIndexedEXT-None-04879";
283 vertex_input_binding_stride = "VUID-vkCmdDrawMultiIndexedEXT-pStrides-04884";
284 vertex_input = kVUID_Core_CmdDrawMultiIndexedEXT_VertexInput;
285 blend_enable = "VUID-vkCmdDrawMultiIndexedEXT-blendEnable-04727";
286 dynamic_rendering_view_mask = "VUID-vkCmdDrawMultiIndexedEXT-viewMask-06178";
287 dynamic_rendering_color_count = "VUID-vkCmdDrawMultiIndexedEXT-colorAttachmentCount-06179";
288 dynamic_rendering_color_formats = "VUID-vkCmdDrawMultiIndexedEXT-colorAttachmentCount-06180";
289 dynamic_rendering_depth_format = "VUID-vkCmdDrawMultiIndexedEXT-pDepthAttachment-06181";
290 dynamic_rendering_stencil_format = "VUID-vkCmdDrawMultiIndexedEXT-pStencilAttachment-06182";
291 dynamic_rendering_fsr = "VUID-vkCmdDrawMultiIndexedEXT-imageView-06183";
292 dynamic_rendering_fdm = "VUID-vkCmdDrawMultiIndexedEXT-imageView-06184";
293 dynamic_rendering_color_sample = "VUID-vkCmdDrawMultiIndexedEXT-colorAttachmentCount-06185";
294 dynamic_rendering_depth_sample = "VUID-vkCmdDrawMultiIndexedEXT-pDepthAttachment-06186";
295 dynamic_rendering_stencil_sample = "VUID-vkCmdDrawMultiIndexedEXT-pStencilAttachment-06187";
296 dynamic_rendering_multi_sample = "VUID-vkCmdDrawMultiIndexedEXT-colorAttachmentCount-06188";
297 dynamic_rendering_06189 = "VUID-vkCmdDrawIndexedIndirect-pDepthAttachment-06189";
298 dynamic_rendering_06190 = "VUID-vkCmdDrawIndexedIndirect-pStencilAttachment-06190";
299 dynamic_rendering_06198 = "VUID-vkCmdDrawIndexedIndirect-renderPass-06198";
Lionel Landwerlin88423cb2021-12-07 15:31:02 +0200300 storage_image_read_without_format = "VUID-vkCmdDrawMultiIndexedEXT-OpTypeImage-06424";
301 storage_image_write_without_format = "VUID-vkCmdDrawMultiIndexedEXT-OpTypeImage-06423";
Lionel Landwerlincdbe8682021-12-08 15:10:37 +0200302 depth_compare_sample = "VUID-vkCmdDrawMultiIndexedEXT-None-06479";
Tony-LunarG4490de42021-06-21 15:49:19 -0600303 }
304};
305
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700306struct DispatchVuidsCmdDrawIndirect : DrawDispatchVuid {
307 DispatchVuidsCmdDrawIndirect() : DrawDispatchVuid() {
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700308 pipeline_bound = "VUID-vkCmdDrawIndirect-None-02700";
309 dynamic_state = "VUID-vkCmdDrawIndirect-commandBuffer-02701";
310 vertex_binding = "VUID-vkCmdDrawIndirect-None-04007";
311 vertex_binding_null = "VUID-vkCmdDrawIndirect-None-04008";
312 compatible_pipeline = "VUID-vkCmdDrawIndirect-None-02697";
313 render_pass_compatible = "VUID-vkCmdDrawIndirect-renderPass-02684";
314 subpass_index = "VUID-vkCmdDrawIndirect-subpass-02685";
315 sample_location = "VUID-vkCmdDrawIndirect-sampleLocationsEnable-02689";
316 linear_sampler = "VUID-vkCmdDrawIndirect-magFilter-04553";
317 cubic_sampler = "VUID-vkCmdDrawIndirect-None-02692";
318 indirect_protected_cb = "VUID-vkCmdDrawIndirect-commandBuffer-02711";
319 indirect_contiguous_memory = "VUID-vkCmdDrawIndirect-buffer-02708";
320 indirect_buffer_bit = "VUID-vkCmdDrawIndirect-buffer-02709";
321 viewport_count = "VUID-vkCmdDrawIndirect-viewportCount-03417";
322 scissor_count = "VUID-vkCmdDrawIndirect-scissorCount-03418";
323 viewport_scissor_count = "VUID-vkCmdDrawIndirect-viewportCount-03419";
324 primitive_topology = "VUID-vkCmdDrawIndirect-primitiveTopology-03420";
325 corner_sampled_address_mode = "VUID-vkCmdDrawIndirect-flags-02696";
326 subpass_input = "VUID-vkCmdDrawIndirect-None-02686";
327 imageview_atomic = "VUID-vkCmdDrawIndirect-None-02691";
Piers Daniella7f93b62021-11-20 12:32:04 -0700328 push_constants_set = "VUID-vkCmdDrawIndirect-maintenance4-06425";
ziga-lunarg498b7e72022-03-12 00:33:37 +0100329 image_subresources_render_pass_write = "VUID-vkCmdDrawIndirect-None-06537";
330 image_subresources_subpass_read = "VUID-vkCmdDrawIndirect-None-06538";
331 image_subresources_subpass_write = "VUID-vkCmdDrawIndirect-None-06539";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700332 descriptor_valid = "VUID-vkCmdDrawIndirect-None-02699";
333 sampler_imageview_type = "VUID-vkCmdDrawIndirect-None-02702";
334 sampler_implicitLod_dref_proj = "VUID-vkCmdDrawIndirect-None-02703";
335 sampler_bias_offset = "VUID-vkCmdDrawIndirect-None-02704";
336 vertex_binding_attribute = "VUID-vkCmdDrawIndirect-None-02721";
337 dynamic_state_setting_commands = "VUID-vkCmdDrawIndirect-None-02859";
sfricke-samsung962d6f02021-04-03 20:28:59 -0700338 rasterization_samples = "VUID-vkCmdDrawIndirect-rasterizationSamples-04740";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700339 unprotected_command_buffer = "VUID-vkCmdDrawIndirect-commandBuffer-02707";
340 max_multiview_instance_index = "VUID-vkCmdDrawIndirect-maxMultiviewInstanceIndex-02688";
Mark Lobodzinskif786b412020-11-30 12:16:17 -0700341 img_filter_cubic = "VUID-vkCmdDrawIndirect-None-02693";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700342 filter_cubic = "VUID-vkCmdDrawIndirect-filterCubic-02694";
343 filter_cubic_min_max = "VUID-vkCmdDrawIndirect-filterCubicMinmax-02695";
Tobias Hector6663c9b2020-11-05 10:18:02 +0000344 viewport_count_primitive_shading_rate = "VUID-vkCmdDrawIndirect-primitiveFragmentShadingRateWithMultipleViewports-04552";
Piers Daniell924cd832021-05-18 13:48:47 -0600345 patch_control_points = "VUID-vkCmdDrawIndirect-None-04875";
346 rasterizer_discard_enable = "VUID-vkCmdDrawIndirect-None-04876";
347 depth_bias_enable = "VUID-vkCmdDrawIndirect-None-04877";
348 logic_op = "VUID-vkCmdDrawIndirect-logicOp-04878";
349 primitive_restart_enable = "VUID-vkCmdDrawIndirect-None-04879";
350 vertex_input_binding_stride = "VUID-vkCmdDrawIndirect-pStrides-04884";
351 vertex_input = kVUID_Core_CmdDrawIndirect_VertexInput;
ziga-lunarg8d62f952021-08-30 16:47:25 +0200352 blend_enable = "VUID-vkCmdDrawIndirect-blendEnable-04727";
Aaron Hagan92a44f82021-11-19 09:34:56 -0500353 dynamic_rendering_view_mask = "VUID-vkCmdDrawIndirect-viewMask-06178";
354 dynamic_rendering_color_count = "VUID-vkCmdDrawIndirect-colorAttachmentCount-06179";
355 dynamic_rendering_color_formats = "VUID-vkCmdDrawIndirect-colorAttachmentCount-06180";
356 dynamic_rendering_depth_format = "VUID-vkCmdDrawIndirect-pDepthAttachment-06181";
357 dynamic_rendering_stencil_format = "VUID-vkCmdDrawIndirect-pStencilAttachment-06182";
358 dynamic_rendering_fsr = "VUID-vkCmdDrawIndirect-imageView-06183";
359 dynamic_rendering_fdm = "VUID-vkCmdDrawIndirect-imageView-06184";
Aaron Hagan09a0e172021-11-19 21:18:33 -0500360 dynamic_rendering_color_sample = "VUID-vkCmdDrawIndirect-colorAttachmentCount-06185";
361 dynamic_rendering_depth_sample = "VUID-vkCmdDrawIndirect-pDepthAttachment-06186";
362 dynamic_rendering_stencil_sample = "VUID-vkCmdDrawIndirect-pStencilAttachment-06187";
363 dynamic_rendering_multi_sample = "VUID-vkCmdDrawIndirect-colorAttachmentCount-06188";
Aaron Haganaca50442021-12-07 22:26:29 -0500364 dynamic_rendering_06189 = "VUID-vkCmdDrawIndirect-pDepthAttachment-06189";
365 dynamic_rendering_06190 = "VUID-vkCmdDrawIndirect-pStencilAttachment-06190";
366 dynamic_rendering_06198 = "VUID-vkCmdDrawIndirect-renderPass-06198";
Lionel Landwerlin88423cb2021-12-07 15:31:02 +0200367 storage_image_read_without_format = "VUID-vkCmdDrawIndirect-OpTypeImage-06424";
368 storage_image_write_without_format = "VUID-vkCmdDrawIndirect-OpTypeImage-06423";
Lionel Landwerlincdbe8682021-12-08 15:10:37 +0200369 depth_compare_sample = "VUID-vkCmdDrawIndirect-None-06479";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700370 }
371};
372
373struct DispatchVuidsCmdDrawIndexedIndirect : DrawDispatchVuid {
374 DispatchVuidsCmdDrawIndexedIndirect() : DrawDispatchVuid() {
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700375 pipeline_bound = "VUID-vkCmdDrawIndexedIndirect-None-02700";
376 dynamic_state = "VUID-vkCmdDrawIndexedIndirect-commandBuffer-02701";
377 vertex_binding = "VUID-vkCmdDrawIndexedIndirect-None-04007";
378 vertex_binding_null = "VUID-vkCmdDrawIndexedIndirect-None-04008";
379 compatible_pipeline = "VUID-vkCmdDrawIndexedIndirect-None-02697";
380 render_pass_compatible = "VUID-vkCmdDrawIndexedIndirect-renderPass-02684";
381 subpass_index = "VUID-vkCmdDrawIndexedIndirect-subpass-02685";
382 sample_location = "VUID-vkCmdDrawIndexedIndirect-sampleLocationsEnable-02689";
383 linear_sampler = "VUID-vkCmdDrawIndexedIndirect-magFilter-04553";
384 cubic_sampler = "VUID-vkCmdDrawIndexedIndirect-None-02692";
385 indirect_protected_cb = "VUID-vkCmdDrawIndexedIndirect-commandBuffer-02711";
386 indirect_contiguous_memory = "VUID-vkCmdDrawIndexedIndirect-buffer-02708";
387 indirect_buffer_bit = "VUID-vkCmdDrawIndexedIndirect-buffer-02709";
388 viewport_count = "VUID-vkCmdDrawIndexedIndirect-viewportCount-03417";
389 scissor_count = "VUID-vkCmdDrawIndexedIndirect-scissorCount-03418";
390 viewport_scissor_count = "VUID-vkCmdDrawIndexedIndirect-viewportCount-03419";
391 primitive_topology = "VUID-vkCmdDrawIndexedIndirect-primitiveTopology-03420";
392 corner_sampled_address_mode = "VUID-vkCmdDrawIndexedIndirect-flags-02696";
393 subpass_input = "VUID-vkCmdDrawIndexedIndirect-None-02686";
394 imageview_atomic = "VUID-vkCmdDrawIndexedIndirect-None-02691";
Piers Daniella7f93b62021-11-20 12:32:04 -0700395 push_constants_set = "VUID-vkCmdDrawIndexedIndirect-maintenance4-06425";
ziga-lunarg498b7e72022-03-12 00:33:37 +0100396 image_subresources_render_pass_write = "VUID-vkCmdDrawIndexedIndirect-None-06537";
397 image_subresources_subpass_read = "VUID-vkCmdDrawIndexedIndirect-None-06538";
398 image_subresources_subpass_write = "VUID-vkCmdDrawIndexedIndirect-None-06539";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700399 descriptor_valid = "VUID-vkCmdDrawIndexedIndirect-None-02699";
400 sampler_imageview_type = "VUID-vkCmdDrawIndexedIndirect-None-02702";
401 sampler_implicitLod_dref_proj = "VUID-vkCmdDrawIndexedIndirect-None-02703";
402 sampler_bias_offset = "VUID-vkCmdDrawIndexedIndirect-None-02704";
403 vertex_binding_attribute = "VUID-vkCmdDrawIndexedIndirect-None-02721";
404 dynamic_state_setting_commands = "VUID-vkCmdDrawIndexedIndirect-None-02859";
sfricke-samsung962d6f02021-04-03 20:28:59 -0700405 rasterization_samples = "VUID-vkCmdDrawIndexedIndirect-rasterizationSamples-04740";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700406 unprotected_command_buffer = "VUID-vkCmdDrawIndexedIndirect-commandBuffer-02707";
407 max_multiview_instance_index = "VUID-vkCmdDrawIndexedIndirect-maxMultiviewInstanceIndex-02688";
Mark Lobodzinskif786b412020-11-30 12:16:17 -0700408 img_filter_cubic = "VUID-vkCmdDrawIndexedIndirect-None-02693";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700409 filter_cubic = "VUID-vkCmdDrawIndexedIndirect-filterCubic-02694";
410 filter_cubic_min_max = "VUID-vkCmdDrawIndexedIndirect-filterCubicMinmax-02695";
Tobias Hector6663c9b2020-11-05 10:18:02 +0000411 viewport_count_primitive_shading_rate = "VUID-vkCmdDrawIndexedIndirect-primitiveFragmentShadingRateWithMultipleViewports-04552";
Piers Daniell924cd832021-05-18 13:48:47 -0600412 patch_control_points = "VUID-vkCmdDrawIndexedIndirect-None-04875";
413 rasterizer_discard_enable = "VUID-vkCmdDrawIndexedIndirect-None-04876";
414 depth_bias_enable = "VUID-vkCmdDrawIndexedIndirect-None-04877";
415 logic_op = "VUID-vkCmdDrawIndexedIndirect-logicOp-04878";
416 primitive_restart_enable = "VUID-vkCmdDrawIndexedIndirect-None-04879";
417 vertex_input_binding_stride = "VUID-vkCmdDrawIndexedIndirect-pStrides-04884";
418 vertex_input = kVUID_Core_CmdDrawIndexedIndirect_VertexInput;
ziga-lunarg8d62f952021-08-30 16:47:25 +0200419 blend_enable = "VUID-vkCmdDrawIndexedIndirect-blendEnable-04727";
Aaron Hagan92a44f82021-11-19 09:34:56 -0500420 dynamic_rendering_view_mask = "VUID-vkCmdDrawIndexedIndirect-viewMask-06178";
421 dynamic_rendering_color_count = "VUID-vkCmdDrawIndexedIndirect-colorAttachmentCount-06179";
422 dynamic_rendering_color_formats = "VUID-vkCmdDrawIndexedIndirect-colorAttachmentCount-06180";
423 dynamic_rendering_depth_format = "VUID-vkCmdDrawIndexedIndirect-pDepthAttachment-06181";
424 dynamic_rendering_stencil_format = "VUID-vkCmdDrawIndexedIndirect-pStencilAttachment-06182";
425 dynamic_rendering_fsr = "VUID-vkCmdDrawIndexedIndirect-imageView-06183";
426 dynamic_rendering_fdm = "VUID-vkCmdDrawIndexedIndirect-imageView-06184";
Aaron Hagan09a0e172021-11-19 21:18:33 -0500427 dynamic_rendering_color_sample = "VUID-vkCmdDrawIndexedIndirect-colorAttachmentCount-06185";
428 dynamic_rendering_depth_sample = "VUID-vkCmdDrawIndexedIndirect-pDepthAttachment-06186";
429 dynamic_rendering_stencil_sample = "VUID-vkCmdDrawIndexedIndirect-pStencilAttachment-06187";
430 dynamic_rendering_multi_sample = "VUID-vkCmdDrawIndexedIndirect-colorAttachmentCount-06188";
Aaron Haganaca50442021-12-07 22:26:29 -0500431 dynamic_rendering_06189 = "VUID-vkCmdDrawIndexedIndirect-pDepthAttachment-06189";
432 dynamic_rendering_06190 = "VUID-vkCmdDrawIndexedIndirect-pStencilAttachment-06190";
433 dynamic_rendering_06198 = "VUID-vkCmdDrawIndexedIndirect-renderPass-06198";
Lionel Landwerlin88423cb2021-12-07 15:31:02 +0200434 storage_image_read_without_format = "VUID-vkCmdDrawIndexedIndirect-OpTypeImage-06424";
435 storage_image_write_without_format = "VUID-vkCmdDrawIndexedIndirect-OpTypeImage-06423";
Lionel Landwerlincdbe8682021-12-08 15:10:37 +0200436 depth_compare_sample = "VUID-vkCmdDrawIndexedIndirect-None-06479";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700437 }
438};
439
440struct DispatchVuidsCmdDispatch : DrawDispatchVuid {
441 DispatchVuidsCmdDispatch() : DrawDispatchVuid() {
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700442 pipeline_bound = "VUID-vkCmdDispatch-None-02700";
Mark Lobodzinski02d37552020-12-28 13:29:46 -0700443 dynamic_state = "VUID-vkCmdDispatch-commandBuffer-02701";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700444 compatible_pipeline = "VUID-vkCmdDispatch-None-02697";
445 linear_sampler = "VUID-vkCmdDispatch-magFilter-04553";
446 cubic_sampler = "VUID-vkCmdDispatch-None-02692";
447 corner_sampled_address_mode = "VUID-vkCmdDispatch-flags-02696";
448 imageview_atomic = "VUID-vkCmdDispatch-None-02691";
Piers Daniella7f93b62021-11-20 12:32:04 -0700449 push_constants_set = "VUID-vkCmdDispatch-maintenance4-06425";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700450 descriptor_valid = "VUID-vkCmdDispatch-None-02699";
451 sampler_imageview_type = "VUID-vkCmdDispatch-None-02702";
452 sampler_implicitLod_dref_proj = "VUID-vkCmdDispatch-None-02703";
453 sampler_bias_offset = "VUID-vkCmdDispatch-None-02704";
454 dynamic_state_setting_commands = "VUID-vkCmdDispatch-None-02859";
455 unprotected_command_buffer = "VUID-vkCmdDispatch-commandBuffer-02707";
456 protected_command_buffer = "VUID-vkCmdDispatch-commandBuffer-02712";
Mark Lobodzinskif786b412020-11-30 12:16:17 -0700457 img_filter_cubic = "VUID-vkCmdDispatch-None-02693";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700458 filter_cubic = "VUID-vkCmdDispatch-filterCubic-02694";
459 filter_cubic_min_max = "VUID-vkCmdDispatch-filterCubicMinmax-02695";
Lionel Landwerlin88423cb2021-12-07 15:31:02 +0200460 storage_image_read_without_format = "VUID-vkCmdDispatch-OpTypeImage-06424";
461 storage_image_write_without_format = "VUID-vkCmdDispatch-OpTypeImage-06423";
Lionel Landwerlincdbe8682021-12-08 15:10:37 +0200462 depth_compare_sample = "VUID-vkCmdDispatch-None-06479";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700463 }
464};
465
466struct DispatchVuidsCmdDispatchIndirect : DrawDispatchVuid {
467 DispatchVuidsCmdDispatchIndirect() : DrawDispatchVuid() {
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700468 pipeline_bound = "VUID-vkCmdDispatchIndirect-None-02700";
Mark Lobodzinski02d37552020-12-28 13:29:46 -0700469 dynamic_state = "VUID-vkCmdDispatchIndirect-commandBuffer-02701";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700470 compatible_pipeline = "VUID-vkCmdDispatchIndirect-None-02697";
471 linear_sampler = "VUID-vkCmdDispatchIndirect-magFilter-04553";
472 cubic_sampler = "VUID-vkCmdDispatchIndirect-None-02692";
473 indirect_protected_cb = "VUID-vkCmdDispatchIndirect-commandBuffer-02711";
474 indirect_contiguous_memory = "VUID-vkCmdDispatchIndirect-buffer-02708";
475 indirect_buffer_bit = "VUID-vkCmdDispatchIndirect-buffer-02709";
476 corner_sampled_address_mode = "VUID-vkCmdDispatchIndirect-flags-02696";
477 imageview_atomic = "VUID-vkCmdDispatchIndirect-None-02691";
Piers Daniella7f93b62021-11-20 12:32:04 -0700478 push_constants_set = "VUID-vkCmdDispatchIndirect-maintenance4-06425";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700479 descriptor_valid = "VUID-vkCmdDispatchIndirect-None-02699";
480 sampler_imageview_type = "VUID-vkCmdDispatchIndirect-None-02702";
481 sampler_implicitLod_dref_proj = "VUID-vkCmdDispatchIndirect-None-02703";
482 sampler_bias_offset = "VUID-vkCmdDispatchIndirect-None-02704";
483 dynamic_state_setting_commands = "VUID-vkCmdDispatchIndirect-None-02859";
484 unprotected_command_buffer = "VUID-vkCmdDispatchIndirect-commandBuffer-02707";
Mark Lobodzinskif786b412020-11-30 12:16:17 -0700485 img_filter_cubic = "VUID-vkCmdDispatchIndirect-None-02693";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700486 filter_cubic = "VUID-vkCmdDispatchIndirect-filterCubic-02694";
487 filter_cubic_min_max = "VUID-vkCmdDispatchIndirect-filterCubicMinmax-02695";
Lionel Landwerlin88423cb2021-12-07 15:31:02 +0200488 storage_image_read_without_format = "VUID-vkCmdDispatchIndirect-OpTypeImage-06424";
489 storage_image_write_without_format = "VUID-vkCmdDispatchIndirect-OpTypeImage-06423";
Lionel Landwerlincdbe8682021-12-08 15:10:37 +0200490 depth_compare_sample = "VUID-vkCmdDispatchIndirect-None-06479";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700491 }
492};
493
494struct DispatchVuidsCmdDrawIndirectCount : DrawDispatchVuid {
495 DispatchVuidsCmdDrawIndirectCount() : DrawDispatchVuid() {
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700496 pipeline_bound = "VUID-vkCmdDrawIndirectCount-None-02700";
497 dynamic_state = "VUID-vkCmdDrawIndirectCount-commandBuffer-02701";
498 vertex_binding = "VUID-vkCmdDrawIndirectCount-None-04007";
499 vertex_binding_null = "VUID-vkCmdDrawIndirectCount-None-04008";
500 compatible_pipeline = "VUID-vkCmdDrawIndirectCount-None-02697";
501 render_pass_compatible = "VUID-vkCmdDrawIndirectCount-renderPass-02684";
502 subpass_index = "VUID-vkCmdDrawIndirectCount-subpass-02685";
503 sample_location = "VUID-vkCmdDrawIndirectCount-sampleLocationsEnable-02689";
504 linear_sampler = "VUID-vkCmdDrawIndirectCount-magFilter-04553";
505 cubic_sampler = "VUID-vkCmdDrawIndirectCount-None-02692";
506 indirect_protected_cb = "VUID-vkCmdDrawIndirectCount-commandBuffer-02711";
507 indirect_contiguous_memory = "VUID-vkCmdDrawIndirectCount-buffer-02708";
508 indirect_buffer_bit = "VUID-vkCmdDrawIndirectCount-buffer-02709";
509 viewport_count = "VUID-vkCmdDrawIndirectCount-viewportCount-03417";
510 scissor_count = "VUID-vkCmdDrawIndirectCount-scissorCount-03418";
511 viewport_scissor_count = "VUID-vkCmdDrawIndirectCount-viewportCount-03419";
512 primitive_topology = "VUID-vkCmdDrawIndirectCount-primitiveTopology-03420";
513 corner_sampled_address_mode = "VUID-vkCmdDrawIndirectCount-flags-02696";
514 subpass_input = "VUID-vkCmdDrawIndirectCount-None-02686";
515 imageview_atomic = "VUID-vkCmdDrawIndirectCount-None-02691";
Piers Daniella7f93b62021-11-20 12:32:04 -0700516 push_constants_set = "VUID-vkCmdDrawIndirectCount-maintenance4-06425";
ziga-lunarg498b7e72022-03-12 00:33:37 +0100517 image_subresources_render_pass_write = "VUID-vkCmdDrawIndirectCount-None-06537";
518 image_subresources_subpass_read = "VUID-vkCmdDrawIndirectCount-None-06538";
519 image_subresources_subpass_write = "VUID-vkCmdDrawIndirectCount-None-06539";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700520 descriptor_valid = "VUID-vkCmdDrawIndirectCount-None-02699";
521 sampler_imageview_type = "VUID-vkCmdDrawIndirectCount-None-02702";
522 sampler_implicitLod_dref_proj = "VUID-vkCmdDrawIndirectCount-None-02703";
523 sampler_bias_offset = "VUID-vkCmdDrawIndirectCount-None-02704";
524 vertex_binding_attribute = "VUID-vkCmdDrawIndirectCount-None-02721";
525 dynamic_state_setting_commands = "VUID-vkCmdDrawIndirectCount-None-02859";
sfricke-samsung962d6f02021-04-03 20:28:59 -0700526 rasterization_samples = "VUID-vkCmdDrawIndirectCount-rasterizationSamples-04740";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700527 unprotected_command_buffer = "VUID-vkCmdDrawIndirectCount-commandBuffer-02707";
528 max_multiview_instance_index = "VUID-vkCmdDrawIndirectCount-maxMultiviewInstanceIndex-02688";
Mark Lobodzinskif786b412020-11-30 12:16:17 -0700529 img_filter_cubic = "VUID-vkCmdDrawIndirectCount-None-02693";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700530 filter_cubic = "VUID-vkCmdDrawIndirectCount-filterCubic-02694";
531 filter_cubic_min_max = "VUID-vkCmdDrawIndirectCount-filterCubicMinmax-02695";
Tobias Hector6663c9b2020-11-05 10:18:02 +0000532 viewport_count_primitive_shading_rate = "VUID-vkCmdDrawIndirectCount-primitiveFragmentShadingRateWithMultipleViewports-04552";
Piers Daniell924cd832021-05-18 13:48:47 -0600533 patch_control_points = "VUID-vkCmdDrawIndirectCount-None-04875";
534 rasterizer_discard_enable = "VUID-vkCmdDrawIndirectCount-None-04876";
535 depth_bias_enable = "VUID-vkCmdDrawIndirectCount-None-04877";
536 logic_op = "VUID-vkCmdDrawIndirectCount-logicOp-04878";
537 primitive_restart_enable = "VUID-vkCmdDrawIndirectCount-None-04879";
538 vertex_input_binding_stride = "VUID-vkCmdDrawIndirectCount-pStrides-04884";
539 vertex_input = kVUID_Core_CmdDrawIndirectCount_VertexInput;
ziga-lunarg8d62f952021-08-30 16:47:25 +0200540 blend_enable = "VUID-vkCmdDrawIndirectCount-blendEnable-04727";
stusmithedc4e392021-12-24 15:22:16 +0000541 dynamic_rendering_view_mask = "VUID-vkCmdDrawIndirectCount-viewMask-06178";
542 dynamic_rendering_color_count = "VUID-vkCmdDrawIndirectCount-colorAttachmentCount-06179";
543 dynamic_rendering_color_formats = "VUID-vkCmdDrawIndirectCount-colorAttachmentCount-06180";
544 dynamic_rendering_depth_format = "VUID-vkCmdDrawIndirectCount-pDepthAttachment-06181";
545 dynamic_rendering_stencil_format = "VUID-vkCmdDrawIndirectCount-pStencilAttachment-06182";
546 dynamic_rendering_fsr = "VUID-vkCmdDrawIndirectCount-imageView-06183";
547 dynamic_rendering_fdm = "VUID-vkCmdDrawIndirectCount-imageView-06184";
548 dynamic_rendering_color_sample = "VUID-vkCmdDrawIndirectCount-colorAttachmentCount-06185";
549 dynamic_rendering_depth_sample = "VUID-vkCmdDrawIndirectCount-pDepthAttachment-06186";
550 dynamic_rendering_stencil_sample = "VUID-vkCmdDrawIndirectCount-pStencilAttachment-06187";
551 dynamic_rendering_multi_sample = "VUID-vkCmdDrawIndirectCount-colorAttachmentCount-06188";
552 dynamic_rendering_06189 = "VUID-vkCmdDrawIndirectCount-pDepthAttachment-06189";
553 dynamic_rendering_06190 = "VUID-vkCmdDrawIndirectCount-pStencilAttachment-06190";
554 dynamic_rendering_06198 = "VUID-vkCmdDrawIndirectCount-renderPass-06198";
Lionel Landwerlin88423cb2021-12-07 15:31:02 +0200555 storage_image_read_without_format = "VUID-vkCmdDrawIndirectCount-OpTypeImage-06424";
556 storage_image_write_without_format = "VUID-vkCmdDrawIndirectCount-OpTypeImage-06423";
Lionel Landwerlincdbe8682021-12-08 15:10:37 +0200557 depth_compare_sample = "VUID-vkCmdDrawIndirectCount-None-06479";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700558 }
559};
560
561struct DispatchVuidsCmdDrawIndexedIndirectCount : DrawDispatchVuid {
562 DispatchVuidsCmdDrawIndexedIndirectCount() : DrawDispatchVuid() {
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700563 pipeline_bound = "VUID-vkCmdDrawIndexedIndirectCount-None-02700";
564 dynamic_state = "VUID-vkCmdDrawIndexedIndirectCount-commandBuffer-02701";
565 vertex_binding = "VUID-vkCmdDrawIndexedIndirectCount-None-04007";
566 vertex_binding_null = "VUID-vkCmdDrawIndexedIndirectCount-None-04008";
567 compatible_pipeline = "VUID-vkCmdDrawIndexedIndirectCount-None-02697";
568 render_pass_compatible = "VUID-vkCmdDrawIndexedIndirectCount-renderPass-02684";
569 subpass_index = "VUID-vkCmdDrawIndexedIndirectCount-subpass-02685";
570 sample_location = "VUID-vkCmdDrawIndexedIndirectCount-sampleLocationsEnable-02689";
571 linear_sampler = "VUID-vkCmdDrawIndexedIndirectCount-magFilter-04553";
572 cubic_sampler = "VUID-vkCmdDrawIndexedIndirectCount-None-02692";
573 indirect_protected_cb = "VUID-vkCmdDrawIndexedIndirectCount-commandBuffer-02711";
574 indirect_contiguous_memory = "VUID-vkCmdDrawIndexedIndirectCount-buffer-02708";
575 indirect_buffer_bit = "VUID-vkCmdDrawIndexedIndirectCount-buffer-02709";
576 viewport_count = "VUID-vkCmdDrawIndexedIndirectCount-viewportCount-03417";
577 scissor_count = "VUID-vkCmdDrawIndexedIndirectCount-scissorCount-03418";
578 viewport_scissor_count = "VUID-vkCmdDrawIndexedIndirectCount-viewportCount-03419";
579 primitive_topology = "VUID-vkCmdDrawIndexedIndirectCount-primitiveTopology-03420";
580 corner_sampled_address_mode = "VUID-vkCmdDrawIndexedIndirectCount-flags-02696";
581 subpass_input = "VUID-vkCmdDrawIndexedIndirectCount-None-02686";
582 imageview_atomic = "VUID-vkCmdDrawIndexedIndirectCount-None-02691";
Piers Daniella7f93b62021-11-20 12:32:04 -0700583 push_constants_set = "VUID-vkCmdDrawIndexedIndirectCount-maintenance4-06425";
ziga-lunarg498b7e72022-03-12 00:33:37 +0100584 image_subresources_render_pass_write = "VUID-vkCmdDrawIndexedIndirectCount-None-06537";
585 image_subresources_subpass_read = "VUID-vkCmdDrawIndexedIndirectCount-None-06538";
586 image_subresources_subpass_write = "VUID-vkCmdDrawIndexedIndirectCount-None-06539";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700587 descriptor_valid = "VUID-vkCmdDrawIndexedIndirectCount-None-02699";
588 sampler_imageview_type = "VUID-vkCmdDrawIndexedIndirectCount-None-02702";
589 sampler_implicitLod_dref_proj = "VUID-vkCmdDrawIndexedIndirectCount-None-02703";
590 sampler_bias_offset = "VUID-vkCmdDrawIndexedIndirectCount-None-02704";
591 vertex_binding_attribute = "VUID-vkCmdDrawIndexedIndirectCount-None-02721";
592 dynamic_state_setting_commands = "VUID-vkCmdDrawIndexedIndirectCount-None-02859";
sfricke-samsung962d6f02021-04-03 20:28:59 -0700593 rasterization_samples = "VUID-vkCmdDrawIndexedIndirectCount-rasterizationSamples-04740";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700594 unprotected_command_buffer = "VUID-vkCmdDrawIndexedIndirectCount-commandBuffer-02707";
595 max_multiview_instance_index = "VUID-vkCmdDrawIndexedIndirectCount-maxMultiviewInstanceIndex-02688";
Mark Lobodzinskif786b412020-11-30 12:16:17 -0700596 img_filter_cubic = "VUID-vkCmdDrawIndexedIndirectCount-None-02693";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700597 filter_cubic = "VUID-vkCmdDrawIndexedIndirectCount-filterCubic-02694";
598 filter_cubic_min_max = "VUID-vkCmdDrawIndexedIndirectCount-filterCubicMinmax-02695";
Tobias Hector6663c9b2020-11-05 10:18:02 +0000599 viewport_count_primitive_shading_rate = "VUID-vkCmdDrawIndexedIndirectCount-primitiveFragmentShadingRateWithMultipleViewports-04552";
Piers Daniell924cd832021-05-18 13:48:47 -0600600 patch_control_points = "VUID-vkCmdDrawIndexedIndirectCount-None-04875";
601 rasterizer_discard_enable = "VUID-vkCmdDrawIndexedIndirectCount-None-04876";
602 depth_bias_enable = "VUID-vkCmdDrawIndexedIndirectCount-None-04877";
603 logic_op = "VUID-vkCmdDrawIndexedIndirectCount-logicOp-04878";
604 primitive_restart_enable = "VUID-vkCmdDrawIndexedIndirectCount-None-04879";
605 vertex_input_binding_stride = "VUID-vkCmdDrawIndexedIndirectCount-pStrides-04884";
606 vertex_input = kVUID_Core_CmdDrawIndexedIndirectCount_VertexInput;
ziga-lunarg8d62f952021-08-30 16:47:25 +0200607 blend_enable = "VUID-vkCmdDrawIndexedIndirectCount-blendEnable-04727";
Aaron Haganaca50442021-12-07 22:26:29 -0500608 dynamic_rendering_view_mask = "VUID-vkCmdDrawIndexedIndirectCount-viewMask-06178";
609 dynamic_rendering_color_count = "VUID-vkCmdDrawIndexedIndirectCount-colorAttachmentCount-06179";
610 dynamic_rendering_color_formats = "VUID-vkCmdDrawIndexedIndirectCount-colorAttachmentCount-06180";
611 dynamic_rendering_depth_format = "VUID-vkCmdDrawIndexedIndirectCount-pDepthAttachment-06181";
612 dynamic_rendering_stencil_format = "VUID-vkCmdDrawIndexedIndirectCount-pStencilAttachment-06182";
613 dynamic_rendering_fsr = "VUID-vkCmdDrawIndexedIndirectCount-imageView-06183";
614 dynamic_rendering_fdm = "VUID-vkCmdDrawIndexedIndirectCount-imageView-06184";
615 dynamic_rendering_color_sample = "VUID-vkCmdDrawIndexedIndirectCount-colorAttachmentCount-06185";
616 dynamic_rendering_depth_sample = "VUID-vkCmdDrawIndexedIndirectCount-pDepthAttachment-06186";
617 dynamic_rendering_stencil_sample = "VUID-vkCmdDrawIndexedIndirectCount-pStencilAttachment-06187";
618 dynamic_rendering_multi_sample = "VUID-vkCmdDrawIndexedIndirectCount-colorAttachmentCount-06188";
619 dynamic_rendering_06189 = "VUID-vkCmdDrawIndexedIndirectCount-pDepthAttachment-06189";
620 dynamic_rendering_06190 = "VUID-vkCmdDrawIndexedIndirectCount-pStencilAttachment-06190";
621 dynamic_rendering_06198 = "VUID-vkCmdDrawIndexedIndirectCount-renderPass-06198";
Lionel Landwerlin88423cb2021-12-07 15:31:02 +0200622 storage_image_read_without_format = "VUID-vkCmdDrawIndexedIndirectCount-OpTypeImage-06424";
623 storage_image_write_without_format = "VUID-vkCmdDrawIndexedIndirectCount-OpTypeImage-06423";
Lionel Landwerlincdbe8682021-12-08 15:10:37 +0200624 depth_compare_sample = "VUID-vkCmdDrawIndexedIndirectCount-None-06479";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700625 }
626};
627
628struct DispatchVuidsCmdTraceRaysNV: DrawDispatchVuid {
629 DispatchVuidsCmdTraceRaysNV() : DrawDispatchVuid() {
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700630 pipeline_bound = "VUID-vkCmdTraceRaysNV-None-02700";
631 dynamic_state = "VUID-vkCmdTraceRaysNV-commandBuffer-02701";
632 compatible_pipeline = "VUID-vkCmdTraceRaysNV-None-02697";
633 linear_sampler = "VUID-vkCmdTraceRaysNV-magFilter-04553";
634 cubic_sampler = "VUID-vkCmdTraceRaysNV-None-02692";
635 corner_sampled_address_mode = "VUID-vkCmdTraceRaysNV-flags-02696";
636 imageview_atomic = "VUID-vkCmdTraceRaysNV-None-02691";
Piers Daniella7f93b62021-11-20 12:32:04 -0700637 push_constants_set = "VUID-vkCmdTraceRaysNV-maintenance4-06425";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700638 descriptor_valid = "VUID-vkCmdTraceRaysNV-None-02699";
639 sampler_imageview_type = "VUID-vkCmdTraceRaysNV-None-02702";
640 sampler_implicitLod_dref_proj = "VUID-vkCmdTraceRaysNV-None-02703";
641 sampler_bias_offset = "VUID-vkCmdTraceRaysNV-None-02704";
642 dynamic_state_setting_commands = "VUID-vkCmdTraceRaysNV-None-02859";
643 unprotected_command_buffer = "VUID-vkCmdTraceRaysNV-commandBuffer-02707";
sfricke-samsunga3c47d12021-09-30 13:34:54 -0700644 ray_query_protected_cb = "VUID-vkCmdTraceRaysNV-commandBuffer-04624";
Mark Lobodzinskif786b412020-11-30 12:16:17 -0700645 img_filter_cubic = "VUID-vkCmdTraceRaysNV-None-02693";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700646 filter_cubic = "VUID-vkCmdTraceRaysNV-filterCubic-02694";
647 filter_cubic_min_max = "VUID-vkCmdTraceRaysNV-filterCubicMinmax-02695";
Lionel Landwerlin88423cb2021-12-07 15:31:02 +0200648 storage_image_read_without_format = "VUID-vkCmdTraceRaysNV-OpTypeImage-06424";
649 storage_image_write_without_format = "VUID-vkCmdTraceRaysNV-OpTypeImage-06423";
Lionel Landwerlincdbe8682021-12-08 15:10:37 +0200650 depth_compare_sample = "VUID-vkCmdTraceRaysNV-None-06479";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700651 }
652};
653
654struct DispatchVuidsCmdTraceRaysKHR: DrawDispatchVuid {
655 DispatchVuidsCmdTraceRaysKHR() : DrawDispatchVuid() {
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700656 pipeline_bound = "VUID-vkCmdTraceRaysKHR-None-02700";
657 dynamic_state = "VUID-vkCmdTraceRaysKHR-commandBuffer-02701";
658 compatible_pipeline = "VUID-vkCmdTraceRaysKHR-None-02697";
659 linear_sampler = "VUID-vkCmdTraceRaysKHR-magFilter-04553";
660 cubic_sampler = "VUID-vkCmdTraceRaysKHR-None-02692";
661 corner_sampled_address_mode = "VUID-vkCmdTraceRaysKHR-flags-02696";
662 imageview_atomic = "VUID-vkCmdTraceRaysKHR-None-02691";
Piers Daniella7f93b62021-11-20 12:32:04 -0700663 push_constants_set = "VUID-vkCmdTraceRaysKHR-maintenance4-06425";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700664 descriptor_valid = "VUID-vkCmdTraceRaysKHR-None-02699";
665 sampler_imageview_type = "VUID-vkCmdTraceRaysKHR-None-02702";
666 sampler_implicitLod_dref_proj = "VUID-vkCmdTraceRaysKHR-None-02703";
667 sampler_bias_offset = "VUID-vkCmdTraceRaysKHR-None-02704";
668 dynamic_state_setting_commands = "VUID-vkCmdTraceRaysKHR-None-02859";
669 unprotected_command_buffer = "VUID-vkCmdTraceRaysKHR-commandBuffer-02707";
sfricke-samsunga3c47d12021-09-30 13:34:54 -0700670 ray_query_protected_cb = "VUID-vkCmdTraceRaysKHR-commandBuffer-04625";
Mark Lobodzinskif786b412020-11-30 12:16:17 -0700671 img_filter_cubic = "VUID-vkCmdTraceRaysKHR-None-02693";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700672 filter_cubic = "VUID-vkCmdTraceRaysKHR-filterCubic-02694";
673 filter_cubic_min_max = "VUID-vkCmdTraceRaysKHR-filterCubicMinmax-02695";
Lionel Landwerlin88423cb2021-12-07 15:31:02 +0200674 storage_image_read_without_format = "VUID-vkCmdTraceRaysKHR-OpTypeImage-06424";
675 storage_image_write_without_format = "VUID-vkCmdTraceRaysKHR-OpTypeImage-06423";
Lionel Landwerlincdbe8682021-12-08 15:10:37 +0200676 depth_compare_sample = "VUID-vkCmdTraceRaysKHR-None-06479";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700677 }
678};
679
680struct DispatchVuidsCmdTraceRaysIndirectKHR: DrawDispatchVuid {
681 DispatchVuidsCmdTraceRaysIndirectKHR() : DrawDispatchVuid() {
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700682 pipeline_bound = "VUID-vkCmdTraceRaysIndirectKHR-None-02700";
683 dynamic_state = "VUID-vkCmdTraceRaysIndirectKHR-commandBuffer-02701";
684 compatible_pipeline = "VUID-vkCmdTraceRaysIndirectKHR-None-02697";
685 linear_sampler = "VUID-vkCmdTraceRaysIndirectKHR-magFilter-04553";
686 cubic_sampler = "VUID-vkCmdTraceRaysIndirectKHR-None-02692";
Shannon McPherson57255a62020-12-23 16:00:54 -0700687 indirect_contiguous_memory = "VUID-vkCmdTraceRaysIndirectKHR-indirectDeviceAddress-03632";
688 indirect_buffer_bit = "VUID-vkCmdTraceRaysIndirectKHR-indirectDeviceAddress-03633";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700689 corner_sampled_address_mode = "VUID-vkCmdTraceRaysIndirectKHR-flags-02696";
690 imageview_atomic = "VUID-vkCmdTraceRaysIndirectKHR-None-02691";
Piers Daniella7f93b62021-11-20 12:32:04 -0700691 push_constants_set = "VUID-vkCmdTraceRaysIndirectKHR-maintenance4-06425";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700692 descriptor_valid = "VUID-vkCmdTraceRaysIndirectKHR-None-02699";
693 sampler_imageview_type = "VUID-vkCmdTraceRaysIndirectKHR-None-02702";
694 sampler_implicitLod_dref_proj = "VUID-vkCmdTraceRaysIndirectKHR-None-02703";
695 sampler_bias_offset = "VUID-vkCmdTraceRaysIndirectKHR-None-02704";
696 dynamic_state_setting_commands = "VUID-vkCmdTraceRaysIndirectKHR-None-02859";
697 unprotected_command_buffer = "VUID-vkCmdTraceRaysIndirectKHR-commandBuffer-02707";
sfricke-samsunga3c47d12021-09-30 13:34:54 -0700698 ray_query_protected_cb = "VUID-vkCmdTraceRaysIndirectKHR-commandBuffer-03635";
Mark Lobodzinskif786b412020-11-30 12:16:17 -0700699 img_filter_cubic = "VUID-vkCmdTraceRaysIndirectKHR-None-02693";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700700 filter_cubic = "VUID-vkCmdTraceRaysIndirectKHR-filterCubic-02694";
701 filter_cubic_min_max = "VUID-vkCmdTraceRaysIndirectKHR-filterCubicMinmax-02695";
Lionel Landwerlin88423cb2021-12-07 15:31:02 +0200702 storage_image_read_without_format = "VUID-vkCmdTraceRaysIndirectKHR-OpTypeImage-06424";
703 storage_image_write_without_format = "VUID-vkCmdTraceRaysIndirectKHR-OpTypeImage-06423";
Lionel Landwerlincdbe8682021-12-08 15:10:37 +0200704 depth_compare_sample = "VUID-vkCmdTraceRaysIndirectKHR-None-06479";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700705 }
706};
707
708struct DispatchVuidsCmdDrawMeshTasksNV: DrawDispatchVuid {
709 DispatchVuidsCmdDrawMeshTasksNV() : DrawDispatchVuid() {
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700710 pipeline_bound = "VUID-vkCmdDrawMeshTasksNV-None-02700";
711 dynamic_state = "VUID-vkCmdDrawMeshTasksNV-commandBuffer-02701";
712 compatible_pipeline = "VUID-vkCmdDrawMeshTasksNV-None-02697";
713 render_pass_compatible = "VUID-vkCmdDrawMeshTasksNV-renderPass-02684";
714 subpass_index = "VUID-vkCmdDrawMeshTasksNV-subpass-02685";
715 sample_location = "VUID-vkCmdDrawMeshTasksNV-sampleLocationsEnable-02689";
716 linear_sampler = "VUID-vkCmdDrawMeshTasksNV-magFilter-04553";
717 cubic_sampler = "VUID-vkCmdDrawMeshTasksNV-None-02692";
718 viewport_count = "VUID-vkCmdDrawMeshTasksNV-viewportCount-03417";
719 scissor_count = "VUID-vkCmdDrawMeshTasksNV-scissorCount-03418";
720 viewport_scissor_count = "VUID-vkCmdDrawMeshTasksNV-viewportCount-03419";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700721 corner_sampled_address_mode = "VUID-vkCmdDrawMeshTasksNV-flags-02696";
722 subpass_input = "VUID-vkCmdDrawMeshTasksNV-None-02686";
723 imageview_atomic = "VUID-vkCmdDrawMeshTasksNV-None-02691";
Piers Daniella7f93b62021-11-20 12:32:04 -0700724 push_constants_set = "VUID-vkCmdDrawMeshTasksNV-maintenance4-06425";
ziga-lunarg498b7e72022-03-12 00:33:37 +0100725 image_subresources_render_pass_write = "VUID-vkCmdDrawMeshTasksNV-None-06537";
726 image_subresources_subpass_read = "VUID-vkCmdDrawMeshTasksNV-None-06538";
727 image_subresources_subpass_write = "VUID-vkCmdDrawMeshTasksNV-None-06539";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700728 descriptor_valid = "VUID-vkCmdDrawMeshTasksNV-None-02699";
729 sampler_imageview_type = "VUID-vkCmdDrawMeshTasksNV-None-02702";
730 sampler_implicitLod_dref_proj = "VUID-vkCmdDrawMeshTasksNV-None-02703";
731 sampler_bias_offset = "VUID-vkCmdDrawMeshTasksNV-None-02704";
732 dynamic_state_setting_commands = "VUID-vkCmdDrawMeshTasksNV-None-02859";
sfricke-samsung962d6f02021-04-03 20:28:59 -0700733 rasterization_samples = "VUID-vkCmdDrawMeshTasksNV-rasterizationSamples-04740";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700734 unprotected_command_buffer = "VUID-vkCmdDrawMeshTasksNV-commandBuffer-02707";
735 max_multiview_instance_index = "VUID-vkCmdDrawMeshTasksNV-maxMultiviewInstanceIndex-02688";
Mark Lobodzinskif786b412020-11-30 12:16:17 -0700736 img_filter_cubic = "VUID-vkCmdDrawMeshTasksNV-None-02693";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700737 filter_cubic = "VUID-vkCmdDrawMeshTasksNV-filterCubic-02694";
738 filter_cubic_min_max = "VUID-vkCmdDrawMeshTasksNV-filterCubicMinmax-02695";
Tobias Hector6663c9b2020-11-05 10:18:02 +0000739 viewport_count_primitive_shading_rate = "VUID-vkCmdDrawMeshTasksNV-primitiveFragmentShadingRateWithMultipleViewports-04552";
Piers Daniell924cd832021-05-18 13:48:47 -0600740 rasterizer_discard_enable = "VUID-vkCmdDrawMeshTasksNV-None-04876";
741 depth_bias_enable = "VUID-vkCmdDrawMeshTasksNV-None-04877";
742 logic_op = "VUID-vkCmdDrawMeshTasksNV-logicOp-04878";
Piers Daniell924cd832021-05-18 13:48:47 -0600743 vertex_input = kVUID_Core_CmdDrawMeshTasksNV_VertexInput;
ziga-lunarg8d62f952021-08-30 16:47:25 +0200744 blend_enable = "VUID-vkCmdDrawMeshTasksNV-blendEnable-04727";
stusmithedc4e392021-12-24 15:22:16 +0000745 dynamic_rendering_view_mask = "VUID-vkCmdDrawMeshTasksNV-viewMask-06178";
746 dynamic_rendering_color_count = "VUID-vkCmdDrawMeshTasksNV-colorAttachmentCount-06179";
747 dynamic_rendering_color_formats = "VUID-vkCmdDrawMeshTasksNV-colorAttachmentCount-06180";
748 dynamic_rendering_depth_format = "VUID-vkCmdDrawMeshTasksNV-pDepthAttachment-06181";
749 dynamic_rendering_stencil_format = "VUID-vkCmdDrawMeshTasksNV-pStencilAttachment-06182";
750 dynamic_rendering_fsr = "VUID-vkCmdDrawMeshTasksNV-imageView-06183";
751 dynamic_rendering_fdm = "VUID-vkCmdDrawMeshTasksNV-imageView-06184";
752 dynamic_rendering_color_sample = "VUID-vkCmdDrawMeshTasksNV-colorAttachmentCount-06185";
753 dynamic_rendering_depth_sample = "VUID-vkCmdDrawMeshTasksNV-pDepthAttachment-06186";
754 dynamic_rendering_stencil_sample = "VUID-vkCmdDrawMeshTasksNV-pStencilAttachment-06187";
755 dynamic_rendering_multi_sample = "VUID-vkCmdDrawMeshTasksNV-colorAttachmentCount-06188";
756 dynamic_rendering_06189 = "VUID-vkCmdDrawMeshTasksNV-pDepthAttachment-06189";
757 dynamic_rendering_06190 = "VUID-vkCmdDrawMeshTasksNV-pStencilAttachment-06190";
758 dynamic_rendering_06198 = "VUID-vkCmdDrawMeshTasksNV-renderPass-06198";
Lionel Landwerlin88423cb2021-12-07 15:31:02 +0200759 storage_image_read_without_format = "VUID-vkCmdDrawMeshTasksNV-OpTypeImage-06424";
760 storage_image_write_without_format = "VUID-vkCmdDrawMeshTasksNV-OpTypeImage-06423";
Lionel Landwerlincdbe8682021-12-08 15:10:37 +0200761 depth_compare_sample = "VUID-vkCmdDrawMeshTasksNV-None-06479";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700762 }
763};
764
765struct DispatchVuidsCmdDrawMeshTasksIndirectNV: DrawDispatchVuid {
766 DispatchVuidsCmdDrawMeshTasksIndirectNV() : DrawDispatchVuid() {
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700767 pipeline_bound = "VUID-vkCmdDrawMeshTasksIndirectNV-None-02700";
768 dynamic_state = "VUID-vkCmdDrawMeshTasksIndirectNV-commandBuffer-02701";
769 compatible_pipeline = "VUID-vkCmdDrawMeshTasksIndirectNV-None-02697";
770 render_pass_compatible = "VUID-vkCmdDrawMeshTasksIndirectNV-renderPass-02684";
771 subpass_index = "VUID-vkCmdDrawMeshTasksIndirectNV-subpass-02685";
772 sample_location = "VUID-vkCmdDrawMeshTasksIndirectNV-sampleLocationsEnable-02689";
773 linear_sampler = "VUID-vkCmdDrawMeshTasksIndirectNV-magFilter-04553";
774 cubic_sampler = "VUID-vkCmdDrawMeshTasksIndirectNV-None-02692";
775 indirect_protected_cb = "VUID-vkCmdDrawMeshTasksIndirectNV-commandBuffer-02711";
776 indirect_contiguous_memory = "VUID-vkCmdDrawMeshTasksIndirectNV-buffer-02708";
777 indirect_buffer_bit = "VUID-vkCmdDrawMeshTasksIndirectNV-buffer-02709";
778 viewport_count = "VUID-vkCmdDrawMeshTasksIndirectNV-viewportCount-03417";
779 scissor_count = "VUID-vkCmdDrawMeshTasksIndirectNV-scissorCount-03418";
780 viewport_scissor_count = "VUID-vkCmdDrawMeshTasksIndirectNV-viewportCount-03419";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700781 corner_sampled_address_mode = "VUID-vkCmdDrawMeshTasksIndirectNV-flags-02696";
782 subpass_input = "VUID-vkCmdDrawMeshTasksIndirectNV-None-02686";
783 imageview_atomic = "VUID-vkCmdDrawMeshTasksIndirectNV-None-02691";
Piers Daniella7f93b62021-11-20 12:32:04 -0700784 push_constants_set = "VUID-vkCmdDrawMeshTasksIndirectNV-maintenance4-06425";
ziga-lunarg498b7e72022-03-12 00:33:37 +0100785 image_subresources_render_pass_write = "VUID-vkCmdDrawMeshTasksIndirectNV-None-06537";
786 image_subresources_subpass_read = "VUID-vkCmdDrawMeshTasksIndirectNV-None-06538";
787 image_subresources_subpass_write = "VUID-vkCmdDrawMeshTasksIndirectNV-None-06539";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700788 descriptor_valid = "VUID-vkCmdDrawMeshTasksIndirectNV-None-02699";
789 sampler_imageview_type = "VUID-vkCmdDrawMeshTasksIndirectNV-None-02702";
790 sampler_implicitLod_dref_proj = "VUID-vkCmdDrawMeshTasksIndirectNV-None-02703";
791 sampler_bias_offset = "VUID-vkCmdDrawMeshTasksIndirectNV-None-02704";
792 dynamic_state_setting_commands = "VUID-vkCmdDrawMeshTasksIndirectNV-None-02859";
sfricke-samsung962d6f02021-04-03 20:28:59 -0700793 rasterization_samples = "VUID-vkCmdDrawMeshTasksIndirectNV-rasterizationSamples-04740";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700794 unprotected_command_buffer = "VUID-vkCmdDrawMeshTasksIndirectNV-commandBuffer-02707";
795 max_multiview_instance_index = "VUID-vkCmdDrawMeshTasksIndirectNV-maxMultiviewInstanceIndex-02688";
Mark Lobodzinskif786b412020-11-30 12:16:17 -0700796 img_filter_cubic = "VUID-vkCmdDrawMeshTasksIndirectNV-None-02693";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700797 filter_cubic = "VUID-vkCmdDrawMeshTasksIndirectNV-filterCubic-02694";
798 filter_cubic_min_max = "VUID-vkCmdDrawMeshTasksIndirectNV-filterCubicMinmax-02695";
Tobias Hector6663c9b2020-11-05 10:18:02 +0000799 viewport_count_primitive_shading_rate = "VUID-vkCmdDrawMeshTasksIndirectNV-primitiveFragmentShadingRateWithMultipleViewports-04552";
Piers Daniell924cd832021-05-18 13:48:47 -0600800 rasterizer_discard_enable = "VUID-vkCmdDrawMeshTasksIndirectNV-None-04876";
801 depth_bias_enable = "VUID-vkCmdDrawMeshTasksIndirectNV-None-04877";
802 logic_op = "VUID-vkCmdDrawMeshTasksIndirectNV-logicOp-04878";
Piers Daniell924cd832021-05-18 13:48:47 -0600803 vertex_input = kVUID_Core_CmdDrawMeshTasksIndirectNV_VertexInput;
ziga-lunarg8d62f952021-08-30 16:47:25 +0200804 blend_enable = "VUID-vkCmdDrawMeshTasksIndirectNV-blendEnable-04727";
stusmithedc4e392021-12-24 15:22:16 +0000805 dynamic_rendering_view_mask = "VUID-vkCmdDrawMeshTasksIndirectNV-viewMask-06178";
806 dynamic_rendering_color_count = "VUID-vkCmdDrawMeshTasksIndirectNV-colorAttachmentCount-06179";
807 dynamic_rendering_color_formats = "VUID-vkCmdDrawMeshTasksIndirectNV-colorAttachmentCount-06180";
808 dynamic_rendering_depth_format = "VUID-vkCmdDrawMeshTasksIndirectNV-pDepthAttachment-06181";
809 dynamic_rendering_stencil_format = "VUID-vkCmdDrawMeshTasksIndirectNV-pStencilAttachment-06182";
810 dynamic_rendering_fsr = "VUID-vkCmdDrawMeshTasksIndirectNV-imageView-06183";
811 dynamic_rendering_fdm = "VUID-vkCmdDrawMeshTasksIndirectNV-imageView-06184";
812 dynamic_rendering_color_sample = "VUID-vkCmdDrawMeshTasksIndirectNV-colorAttachmentCount-06185";
813 dynamic_rendering_depth_sample = "VUID-vkCmdDrawMeshTasksIndirectNV-pDepthAttachment-06186";
814 dynamic_rendering_stencil_sample = "VUID-vkCmdDrawMeshTasksIndirectNV-pStencilAttachment-06187";
815 dynamic_rendering_multi_sample = "VUID-vkCmdDrawMeshTasksIndirectNV-colorAttachmentCount-06188";
816 dynamic_rendering_06189 = "VUID-vkCmdDrawMeshTasksIndirectNV-pDepthAttachment-06189";
817 dynamic_rendering_06190 = "VUID-vkCmdDrawMeshTasksIndirectNV-pStencilAttachment-06190";
818 dynamic_rendering_06198 = "VUID-vkCmdDrawMeshTasksIndirectNV-renderPass-06198";
Lionel Landwerlin88423cb2021-12-07 15:31:02 +0200819 storage_image_read_without_format = "VUID-vkCmdDrawMeshTasksIndirectNV-OpTypeImage-06424";
820 storage_image_write_without_format = "VUID-vkCmdDrawMeshTasksIndirectNV-OpTypeImage-06423";
Lionel Landwerlincdbe8682021-12-08 15:10:37 +0200821 depth_compare_sample = "VUID-vkCmdDrawMeshTasksIndirectNV-None-06479";
Aaron Hagan80034ea2021-12-23 11:24:09 -0500822 dynamic_rendering_view_mask = "VUID-vkCmdDrawMeshTasksIndirectNV-viewMask-06178";
823 dynamic_rendering_color_count = "VUID-vkCmdDrawMeshTasksIndirectNV-colorAttachmentCount-06179";
824 dynamic_rendering_color_formats = "VUID-vkCmdDrawMeshTasksIndirectNV-colorAttachmentCount-06180";
825 dynamic_rendering_depth_format = "VUID-vkCmdDrawMeshTasksIndirectNV-pDepthAttachment-06181";
826 dynamic_rendering_stencil_format = "VUID-vkCmdDrawMeshTasksIndirectNV-pStencilAttachment-06182";
827 dynamic_rendering_fsr = "VUID-vkCmdDrawMeshTasksIndirectNV-imageView-06183";
828 dynamic_rendering_fdm = "VUID-vkCmdDrawMeshTasksIndirectNV-imageView-06184";
829 dynamic_rendering_color_sample = "VUID-vkCmdDrawMeshTasksIndirectNV-colorAttachmentCount-06185";
830 dynamic_rendering_depth_sample = "VUID-vkCmdDrawMeshTasksIndirectNV-pDepthAttachment-06186";
831 dynamic_rendering_stencil_sample = "VUID-vkCmdDrawMeshTasksIndirectNV-pStencilAttachment-06187";
Jeremy Gebben09c1a072022-02-08 09:42:47 -0700832 dynamic_rendering_multi_sample = "VUID-vkCmdDrawMeshTasksIndirectNV-colorAttachmentCount-06188";
Aaron Hagan80034ea2021-12-23 11:24:09 -0500833 dynamic_rendering_06189 = "VUID-vkCmdDrawMeshTasksIndirectNV-pDepthAttachment-06189";
834 dynamic_rendering_06190 = "VUID-vkCmdDrawMeshTasksIndirectNV-pStencilAttachment-06190";
835 dynamic_rendering_06198 = "VUID-vkCmdDrawMeshTasksIndirectNV-renderPass-06198";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700836 }
837};
838
839struct DispatchVuidsCmdDrawMeshTasksIndirectCountNV : DrawDispatchVuid {
840 DispatchVuidsCmdDrawMeshTasksIndirectCountNV() : DrawDispatchVuid() {
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700841 pipeline_bound = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02700";
842 dynamic_state = "VUID-vkCmdDrawMeshTasksIndirectCountNV-commandBuffer-02701";
843 compatible_pipeline = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02697";
844 render_pass_compatible = "VUID-vkCmdDrawMeshTasksIndirectCountNV-renderPass-02684";
845 subpass_index = "VUID-vkCmdDrawMeshTasksIndirectCountNV-subpass-02685";
846 sample_location = "VUID-vkCmdDrawMeshTasksIndirectCountNV-sampleLocationsEnable-02689";
847 linear_sampler = "VUID-vkCmdDrawMeshTasksIndirectCountNV-magFilter-04553";
848 cubic_sampler = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02692";
849 indirect_protected_cb = "VUID-vkCmdDrawMeshTasksIndirectCountNV-commandBuffer-02711";
850 indirect_contiguous_memory = "VUID-vkCmdDrawMeshTasksIndirectCountNV-buffer-02708";
851 indirect_buffer_bit = "VUID-vkCmdDrawMeshTasksIndirectCountNV-buffer-02709";
852 viewport_count = "VUID-vkCmdDrawMeshTasksIndirectCountNV-viewportCount-03417";
853 scissor_count = "VUID-vkCmdDrawMeshTasksIndirectCountNV-scissorCount-03418";
854 viewport_scissor_count = "VUID-vkCmdDrawMeshTasksIndirectCountNV-viewportCount-03419";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700855 corner_sampled_address_mode = "VUID-vkCmdDrawMeshTasksIndirectCountNV-flags-02696";
856 subpass_input = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02686";
857 imageview_atomic = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02691";
Piers Daniella7f93b62021-11-20 12:32:04 -0700858 push_constants_set = "VUID-vkCmdDrawMeshTasksIndirectCountNV-maintenance4-06425";
ziga-lunarg498b7e72022-03-12 00:33:37 +0100859 image_subresources_render_pass_write = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-06537";
860 image_subresources_subpass_read = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-06538";
861 image_subresources_subpass_write = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-06539";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700862 descriptor_valid = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02699";
863 sampler_imageview_type = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02702";
864 sampler_implicitLod_dref_proj = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02703";
865 sampler_bias_offset = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02704";
866 dynamic_state_setting_commands = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02859";
sfricke-samsung962d6f02021-04-03 20:28:59 -0700867 rasterization_samples = "VUID-vkCmdDrawMeshTasksIndirectCountNV-rasterizationSamples-04740";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700868 unprotected_command_buffer = "VUID-vkCmdDrawMeshTasksIndirectCountNV-commandBuffer-02707";
869 max_multiview_instance_index = "VUID-vkCmdDrawMeshTasksIndirectCountNV-maxMultiviewInstanceIndex-02688";
Mark Lobodzinskif786b412020-11-30 12:16:17 -0700870 img_filter_cubic = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02693";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700871 filter_cubic = "VUID-vkCmdDrawMeshTasksIndirectCountNV-filterCubic-02694";
872 filter_cubic_min_max = "VUID-vkCmdDrawMeshTasksIndirectCountNV-filterCubicMinmax-02695";
Tobias Hector6663c9b2020-11-05 10:18:02 +0000873 viewport_count_primitive_shading_rate = "VUID-vkCmdDrawMeshTasksIndirectCountNV-primitiveFragmentShadingRateWithMultipleViewports-04552";
Piers Daniell924cd832021-05-18 13:48:47 -0600874 rasterizer_discard_enable = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-04876";
875 depth_bias_enable = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-04877";
876 logic_op = "VUID-vkCmdDrawMeshTasksIndirectCountNV-logicOp-04878";
Piers Daniell924cd832021-05-18 13:48:47 -0600877 vertex_input = kVUID_Core_CmdDrawMeshTasksIndirectCountNV_VertexInput;
ziga-lunarg8d62f952021-08-30 16:47:25 +0200878 blend_enable = "VUID-vkCmdDrawMeshTasksIndirectCountNV-blendEnable-04727";
stusmithedc4e392021-12-24 15:22:16 +0000879 dynamic_rendering_view_mask = "VUID-vkCmdDrawMeshTasksIndirectCountNV-viewMask-06178";
880 dynamic_rendering_color_count = "VUID-vkCmdDrawMeshTasksIndirectCountNV-colorAttachmentCount-06179";
881 dynamic_rendering_color_formats = "VUID-vkCmdDrawMeshTasksIndirectCountNV-colorAttachmentCount-06180";
882 dynamic_rendering_depth_format = "VUID-vkCmdDrawMeshTasksIndirectCountNV-pDepthAttachment-06181";
883 dynamic_rendering_stencil_format = "VUID-vkCmdDrawMeshTasksIndirectCountNV-pStencilAttachment-06182";
884 dynamic_rendering_fsr = "VUID-vkCmdDrawMeshTasksIndirectCountNV-imageView-06183";
885 dynamic_rendering_fdm = "VUID-vkCmdDrawMeshTasksIndirectCountNV-imageView-06184";
886 dynamic_rendering_color_sample = "VUID-vkCmdDrawMeshTasksIndirectCountNV-colorAttachmentCount-06185";
887 dynamic_rendering_depth_sample = "VUID-vkCmdDrawMeshTasksIndirectCountNV-pDepthAttachment-06186";
888 dynamic_rendering_stencil_sample = "VUID-vkCmdDrawMeshTasksIndirectCountNV-pStencilAttachment-06187";
889 dynamic_rendering_multi_sample = "VUID-vkCmdDrawMeshTasksIndirectCountNV-colorAttachmentCount-06188";
890 dynamic_rendering_06189 = "VUID-vkCmdDrawMeshTasksIndirectCountNV-pDepthAttachment-06189";
891 dynamic_rendering_06190 = "VUID-vkCmdDrawMeshTasksIndirectCountNV-pStencilAttachment-06190";
892 dynamic_rendering_06198 = "VUID-vkCmdDrawMeshTasksIndirectCountNV-renderPass-06198";
Lionel Landwerlin88423cb2021-12-07 15:31:02 +0200893 storage_image_read_without_format = "VUID-vkCmdDrawMeshTasksIndirectCountNV-OpTypeImage-06424";
894 storage_image_write_without_format = "VUID-vkCmdDrawMeshTasksIndirectCountNV-OpTypeImage-06423";
Lionel Landwerlincdbe8682021-12-08 15:10:37 +0200895 depth_compare_sample = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-06479";
Aaron Hagan80034ea2021-12-23 11:24:09 -0500896 dynamic_rendering_view_mask = "VUID-vkCmdDrawMeshTasksIndirectCountNV-viewMask-06178";
897 dynamic_rendering_color_count = "VUID-vkCmdDrawMeshTasksIndirectCountNV-colorAttachmentCount-06179";
898 dynamic_rendering_color_formats = "VUID-vkCmdDrawMeshTasksIndirectCountNV-colorAttachmentCount-06180";
899 dynamic_rendering_depth_format = "VUID-vkCmdDrawMeshTasksIndirectCountNV-pDepthAttachment-06181";
900 dynamic_rendering_stencil_format = "VUID-vkCmdDrawMeshTasksIndirectCountNV-pStencilAttachment-06182";
901 dynamic_rendering_fsr = "VUID-vkCmdDrawMeshTasksIndirectCountNV-imageView-06183";
902 dynamic_rendering_fdm = "VUID-vkCmdDrawMeshTasksIndirectCountNV-imageView-06184";
903 dynamic_rendering_color_sample = "VUID-vkCmdDrawMeshTasksIndirectCountNV-colorAttachmentCount-06185";
904 dynamic_rendering_depth_sample = "VUID-vkCmdDrawMeshTasksIndirectCountNV-pDepthAttachment-06186";
905 dynamic_rendering_stencil_sample = "VUID-vkCmdDrawMeshTasksIndirectCountNV-pStencilAttachment-06187";
Jeremy Gebben09c1a072022-02-08 09:42:47 -0700906 dynamic_rendering_multi_sample = "VUID-vkCmdDrawMeshTasksIndirectCountNV-colorAttachmentCount-06188";
Aaron Hagan80034ea2021-12-23 11:24:09 -0500907 dynamic_rendering_06189 = "VUID-vkCmdDrawMeshTasksIndirectCountNV-pDepthAttachment-06189";
908 dynamic_rendering_06190 = "VUID-vkCmdDrawMeshTasksIndirectCountNV-pStencilAttachment-06190";
909 dynamic_rendering_06198 = "VUID-vkCmdDrawMeshTasksIndirectCountNV-renderPass-06198";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700910 }
911};
912
913struct DispatchVuidsCmdDrawIndirectByteCountEXT: DrawDispatchVuid {
914 DispatchVuidsCmdDrawIndirectByteCountEXT() : DrawDispatchVuid() {
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700915 pipeline_bound = "VUID-vkCmdDrawIndirectByteCountEXT-None-02700";
916 dynamic_state = "VUID-vkCmdDrawIndirectByteCountEXT-commandBuffer-02701";
917 vertex_binding = "VUID-vkCmdDrawIndirectByteCountEXT-None-04007";
918 vertex_binding_null = "VUID-vkCmdDrawIndirectByteCountEXT-None-04008";
919 compatible_pipeline = "VUID-vkCmdDrawIndirectByteCountEXT-None-02697";
920 render_pass_compatible = "VUID-vkCmdDrawIndirectByteCountEXT-renderPass-02684";
921 subpass_index = "VUID-vkCmdDrawIndirectByteCountEXT-subpass-02685";
922 sample_location = "VUID-vkCmdDrawIndirectByteCountEXT-sampleLocationsEnable-02689";
923 linear_sampler = "VUID-vkCmdDrawIndirectByteCountEXT-magFilter-04553";
924 cubic_sampler = "VUID-vkCmdDrawIndirectByteCountEXT-None-02692";
925 indirect_protected_cb = "VUID-vkCmdDrawIndirectByteCountEXT-commandBuffer-02646";
sfricke-samsungb091d4e2021-04-18 23:15:59 -0700926 indirect_contiguous_memory = "VUID-vkCmdDrawIndirectByteCountEXT-counterBuffer-04567",
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700927 indirect_buffer_bit = "VUID-vkCmdDrawIndirectByteCountEXT-counterBuffer-02290";
928 viewport_count = "VUID-vkCmdDrawIndirectByteCountEXT-viewportCount-03417";
929 scissor_count = "VUID-vkCmdDrawIndirectByteCountEXT-scissorCount-03418";
930 viewport_scissor_count = "VUID-vkCmdDrawIndirectByteCountEXT-viewportCount-03419";
931 primitive_topology = "VUID-vkCmdDrawIndirectByteCountEXT-primitiveTopology-03420";
932 corner_sampled_address_mode = "VUID-vkCmdDrawIndirectByteCountEXT-flags-02696";
933 subpass_input = "VUID-vkCmdDrawIndirectByteCountEXT-None-02686";
934 imageview_atomic = "VUID-vkCmdDrawIndirectByteCountEXT-None-02691";
Piers Daniella7f93b62021-11-20 12:32:04 -0700935 push_constants_set = "VUID-vkCmdDrawIndirectByteCountEXT-maintenance4-06425";
ziga-lunarg498b7e72022-03-12 00:33:37 +0100936 image_subresources_render_pass_write = "VUID-vkCmdDrawIndirectByteCountEXT-None-06537";
937 image_subresources_subpass_read = "VUID-vkCmdDrawIndirectByteCountEXT-None-06538";
938 image_subresources_subpass_write = "VUID-vkCmdDrawIndirectByteCountEXT-None-06539";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700939 descriptor_valid = "VUID-vkCmdDrawIndirectByteCountEXT-None-02699";
940 sampler_imageview_type = "VUID-vkCmdDrawIndirectByteCountEXT-None-02702";
941 sampler_implicitLod_dref_proj = "VUID-vkCmdDrawIndirectByteCountEXT-None-02703";
942 sampler_bias_offset = "VUID-vkCmdDrawIndirectByteCountEXT-None-02704";
943 vertex_binding_attribute = "VUID-vkCmdDrawIndirectByteCountEXT-None-02721";
944 dynamic_state_setting_commands = "VUID-vkCmdDrawIndirectByteCountEXT-None-02859";
sfricke-samsung962d6f02021-04-03 20:28:59 -0700945 rasterization_samples = "VUID-vkCmdDrawIndirectByteCountEXT-rasterizationSamples-04740";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700946 unprotected_command_buffer = "VUID-vkCmdDrawIndirectByteCountEXT-commandBuffer-02707";
947 max_multiview_instance_index = "VUID-vkCmdDrawIndirectByteCountEXT-maxMultiviewInstanceIndex-02688";
Mark Lobodzinskif786b412020-11-30 12:16:17 -0700948 img_filter_cubic = "VUID-vkCmdDrawIndirectByteCountEXT-None-02693";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700949 filter_cubic = "VUID-vkCmdDrawIndirectByteCountEXT-filterCubic-02694";
950 filter_cubic_min_max = "VUID-vkCmdDrawIndirectByteCountEXT-filterCubicMinmax-02695";
Tobias Hector6663c9b2020-11-05 10:18:02 +0000951 viewport_count_primitive_shading_rate = "VUID-vkCmdDrawIndirectByteCountEXT-primitiveFragmentShadingRateWithMultipleViewports-04552";
Piers Daniell924cd832021-05-18 13:48:47 -0600952 patch_control_points = "VUID-vkCmdDrawIndirectByteCountEXT-None-04875";
953 rasterizer_discard_enable = "VUID-vkCmdDrawIndirectByteCountEXT-None-04876";
954 depth_bias_enable = "VUID-vkCmdDrawIndirectByteCountEXT-None-04877";
955 logic_op = "VUID-vkCmdDrawIndirectByteCountEXT-logicOp-04878";
956 primitive_restart_enable = "VUID-vkCmdDrawIndirectByteCountEXT-None-04879";
957 vertex_input_binding_stride = "VUID-vkCmdDrawIndirectByteCountEXT-pStrides-04884";
958 vertex_input = kVUID_Core_CmdDrawIndirectByteCountEXT_VertexInput;
ziga-lunarg8d62f952021-08-30 16:47:25 +0200959 blend_enable = "VUID-vkCmdDrawIndirectByteCountEXT-blendEnable-04727";
stusmithedc4e392021-12-24 15:22:16 +0000960 dynamic_rendering_view_mask = "VUID-vkCmdDrawIndirectByteCountEXT-viewMask-06178";
961 dynamic_rendering_color_count = "VUID-vkCmdDrawIndirectByteCountEXT-colorAttachmentCount-06179";
962 dynamic_rendering_color_formats = "VUID-vkCmdDrawIndirectByteCountEXT-colorAttachmentCount-06180";
963 dynamic_rendering_depth_format = "VUID-vkCmdDrawIndirectByteCountEXT-pDepthAttachment-06181";
964 dynamic_rendering_stencil_format = "VUID-vkCmdDrawIndirectByteCountEXT-pStencilAttachment-06182";
965 dynamic_rendering_fsr = "VUID-vkCmdDrawIndirectByteCountEXT-imageView-06183";
966 dynamic_rendering_fdm = "VUID-vkCmdDrawIndirectByteCountEXT-imageView-06184";
967 dynamic_rendering_color_sample = "VUID-vkCmdDrawIndirectByteCountEXT-colorAttachmentCount-06185";
968 dynamic_rendering_depth_sample = "VUID-vkCmdDrawIndirectByteCountEXT-pDepthAttachment-06186";
969 dynamic_rendering_stencil_sample = "VUID-vkCmdDrawIndirectByteCountEXT-pStencilAttachment-06187";
970 dynamic_rendering_multi_sample = "VUID-vkCmdDrawIndirectByteCountEXT-colorAttachmentCount-06188";
971 dynamic_rendering_06189 = "VUID-vkCmdDrawIndirectByteCountEXT-pDepthAttachment-06189";
972 dynamic_rendering_06190 = "VUID-vkCmdDrawIndirectByteCountEXT-pStencilAttachment-06190";
973 dynamic_rendering_06198 = "VUID-vkCmdDrawIndirectByteCountEXT-renderPass-06198";
Lionel Landwerlin88423cb2021-12-07 15:31:02 +0200974 storage_image_read_without_format = "VUID-vkCmdDrawIndirectByteCountEXT-OpTypeImage-06424";
975 storage_image_write_without_format = "VUID-vkCmdDrawIndirectByteCountEXT-OpTypeImage-06423";
Lionel Landwerlincdbe8682021-12-08 15:10:37 +0200976 depth_compare_sample = "VUID-vkCmdDrawIndirectByteCountEXT-None-06479";
Aaron Hagan80034ea2021-12-23 11:24:09 -0500977 dynamic_rendering_view_mask = "VUID-vkCmdDrawIndirectByteCountEXT-viewMask-06178";
978 dynamic_rendering_color_count = "VUID-vkCmdDrawIndirectByteCountEXT-colorAttachmentCount-06179";
979 dynamic_rendering_color_formats = "VUID-vkCmdDrawIndirectByteCountEXT-colorAttachmentCount-06180";
980 dynamic_rendering_depth_format = "VUID-vkCmdDrawIndirectByteCountEXT-pDepthAttachment-06181";
981 dynamic_rendering_stencil_format = "VUID-vkCmdDrawIndirectByteCountEXT-pStencilAttachment-06182";
982 dynamic_rendering_fsr = "VUID-vkCmdDrawIndirectByteCountEXT-imageView-06183";
983 dynamic_rendering_fdm = "VUID-vkCmdDrawIndirectByteCountEXT-imageView-06184";
984 dynamic_rendering_color_sample = "VUID-vkCmdDrawIndirectByteCountEXT-colorAttachmentCount-06185";
985 dynamic_rendering_depth_sample = "VUID-vkCmdDrawIndirectByteCountEXT-pDepthAttachment-06186";
986 dynamic_rendering_stencil_sample = "VUID-vkCmdDrawIndirectByteCountEXT-pStencilAttachment-06187";
Jeremy Gebben09c1a072022-02-08 09:42:47 -0700987 dynamic_rendering_multi_sample = "VUID-vkCmdDrawIndirectByteCountEXT-colorAttachmentCount-06188";
Aaron Hagan80034ea2021-12-23 11:24:09 -0500988 dynamic_rendering_06189 = "VUID-vkCmdDrawIndirectByteCountEXT-pDepthAttachment-06189";
989 dynamic_rendering_06190 = "VUID-vkCmdDrawIndirectByteCountEXT-pStencilAttachment-06190";
990 dynamic_rendering_06198 = "VUID-vkCmdDrawIndirectByteCountEXT-renderPass-06198";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700991 }
992};
993
994struct DispatchVuidsCmdDispatchBase: DrawDispatchVuid {
995 DispatchVuidsCmdDispatchBase() : DrawDispatchVuid() {
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700996 pipeline_bound = "VUID-vkCmdDispatchBase-None-02700";
Mark Lobodzinski02d37552020-12-28 13:29:46 -0700997 dynamic_state = "VUID-vkCmdDispatchBase-commandBuffer-02701";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -0700998 compatible_pipeline = "VUID-vkCmdDispatchBase-None-02697";
999 linear_sampler = "VUID-vkCmdDispatchBase-magFilter-04553";
1000 cubic_sampler = "VUID-vkCmdDispatchBase-None-02692";
1001 corner_sampled_address_mode = "VUID-vkCmdDispatchBase-flags-02696";
1002 imageview_atomic = "VUID-vkCmdDispatchBase-None-02691";
Piers Daniella7f93b62021-11-20 12:32:04 -07001003 push_constants_set = "VUID-vkCmdDispatchBase-maintenance4-06425";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -07001004 descriptor_valid = "VUID-vkCmdDispatchBase-None-02699";
1005 sampler_imageview_type = "VUID-vkCmdDispatchBase-None-02702";
1006 sampler_implicitLod_dref_proj = "VUID-vkCmdDispatchBase-None-02703";
1007 sampler_bias_offset = "VUID-vkCmdDispatchBase-None-02704";
1008 dynamic_state_setting_commands = "VUID-vkCmdDispatchBase-None-02859";
1009 unprotected_command_buffer = "VUID-vkCmdDispatchBase-commandBuffer-02707";
sfricke-samsunge79d0892021-06-17 08:56:22 -07001010 protected_command_buffer = "VUID-vkCmdDispatchBase-commandBuffer-02712";
Mark Lobodzinskif786b412020-11-30 12:16:17 -07001011 img_filter_cubic = "VUID-vkCmdDispatchBase-None-02693";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -07001012 filter_cubic = "VUID-vkCmdDispatchBase-filterCubic-02694";
1013 filter_cubic_min_max = "VUID-vkCmdDispatchBase-filterCubicMinmax-02695";
Lionel Landwerlin88423cb2021-12-07 15:31:02 +02001014 storage_image_read_without_format = "VUID-vkCmdDispatchBase-OpTypeImage-06424";
1015 storage_image_write_without_format = "VUID-vkCmdDispatchBase-OpTypeImage-06423";
Lionel Landwerlincdbe8682021-12-08 15:10:37 +02001016 depth_compare_sample = "VUID-vkCmdDispatchBase-None-06479";
Mark Lobodzinskiddf43612020-11-17 11:28:02 -07001017 }
1018};
1019
1020// This LUT is created to allow a static listing of each VUID that is covered by drawdispatch commands
Nathaniel Cesarioce9b4812020-12-17 08:55:28 -07001021static const std::map<CMD_TYPE, DrawDispatchVuid> kDrawdispatchVuid = {
Mark Lobodzinskiddf43612020-11-17 11:28:02 -07001022 {CMD_DRAW, DispatchVuidsCmdDraw()},
Tony-LunarG4490de42021-06-21 15:49:19 -06001023 {CMD_DRAWMULTIEXT, DispatchVuidsCmdDrawMultiEXT()},
Mark Lobodzinskiddf43612020-11-17 11:28:02 -07001024 {CMD_DRAWINDEXED, DispatchVuidsCmdDrawIndexed()},
Tony-LunarG4490de42021-06-21 15:49:19 -06001025 {CMD_DRAWMULTIINDEXEDEXT, DispatchVuidsCmdDrawMultiIndexedEXT()},
Mark Lobodzinskiddf43612020-11-17 11:28:02 -07001026 {CMD_DRAWINDIRECT, DispatchVuidsCmdDrawIndirect()},
1027 {CMD_DRAWINDEXEDINDIRECT, DispatchVuidsCmdDrawIndexedIndirect()},
1028 {CMD_DISPATCH, DispatchVuidsCmdDispatch()},
1029 {CMD_DISPATCHINDIRECT, DispatchVuidsCmdDispatchIndirect()},
1030 {CMD_DRAWINDIRECTCOUNT, DispatchVuidsCmdDrawIndirectCount()},
sfricke-samsung85584a72021-09-30 21:43:38 -07001031 {CMD_DRAWINDIRECTCOUNTKHR, DispatchVuidsCmdDrawIndirectCount()},
Mark Lobodzinskiddf43612020-11-17 11:28:02 -07001032 {CMD_DRAWINDEXEDINDIRECTCOUNT, DispatchVuidsCmdDrawIndexedIndirectCount()},
sfricke-samsung85584a72021-09-30 21:43:38 -07001033 {CMD_DRAWINDEXEDINDIRECTCOUNTKHR, DispatchVuidsCmdDrawIndexedIndirectCount()},
Mark Lobodzinskiddf43612020-11-17 11:28:02 -07001034 {CMD_TRACERAYSNV, DispatchVuidsCmdTraceRaysNV()},
1035 {CMD_TRACERAYSKHR, DispatchVuidsCmdTraceRaysKHR()},
1036 {CMD_TRACERAYSINDIRECTKHR, DispatchVuidsCmdTraceRaysIndirectKHR()},
1037 {CMD_DRAWMESHTASKSNV, DispatchVuidsCmdDrawMeshTasksNV()},
1038 {CMD_DRAWMESHTASKSINDIRECTNV, DispatchVuidsCmdDrawMeshTasksIndirectNV()},
1039 {CMD_DRAWMESHTASKSINDIRECTCOUNTNV, DispatchVuidsCmdDrawMeshTasksIndirectCountNV()},
1040 {CMD_DRAWINDIRECTBYTECOUNTEXT, DispatchVuidsCmdDrawIndirectByteCountEXT()},
1041 {CMD_DISPATCHBASE, DispatchVuidsCmdDispatchBase()},
sfricke-samsung85584a72021-09-30 21:43:38 -07001042 {CMD_DISPATCHBASEKHR, DispatchVuidsCmdDispatchBase()},
Spencer Fricke507600b2020-03-22 13:23:06 -07001043 // Used if invalid cmd_type is used
Mark Lobodzinskiddf43612020-11-17 11:28:02 -07001044 {CMD_NONE, DrawDispatchVuid()}
Spencer Fricke507600b2020-03-22 13:23:06 -07001045};
1046// clang-format on
1047
1048// Getter function to provide kVUIDUndefined in case an invalid cmd_type is passed in
1049const DrawDispatchVuid &CoreChecks::GetDrawDispatchVuid(CMD_TYPE cmd_type) const {
Nathaniel Cesarioce9b4812020-12-17 08:55:28 -07001050 if (kDrawdispatchVuid.find(cmd_type) != kDrawdispatchVuid.cend()) {
1051 return kDrawdispatchVuid.at(cmd_type);
Spencer Fricke507600b2020-03-22 13:23:06 -07001052 } else {
Nathaniel Cesarioce9b4812020-12-17 08:55:28 -07001053 return kDrawdispatchVuid.at(CMD_NONE);
Spencer Fricke507600b2020-03-22 13:23:06 -07001054 }
1055}
1056
Jasper St. Pierre512613a2019-04-08 16:25:23 -07001057// Generic function to handle validation for all CmdDraw* type functions
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001058bool CoreChecks::ValidateCmdDrawType(const CMD_BUFFER_STATE &cb_state, bool indexed, VkPipelineBindPoint bind_point,
sfricke-samsung85584a72021-09-30 21:43:38 -07001059 CMD_TYPE cmd_type) const {
Jasper St. Pierre512613a2019-04-08 16:25:23 -07001060 bool skip = false;
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001061 skip |= ValidateCmd(&cb_state, cmd_type);
1062 skip |= ValidateCmdBufDrawState(&cb_state, cmd_type, indexed, bind_point);
1063 skip |= ValidateCmdRayQueryState(&cb_state, cmd_type, bind_point);
Jasper St. Pierre512613a2019-04-08 16:25:23 -07001064 return skip;
1065}
1066
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001067bool CoreChecks::ValidateCmdDrawInstance(const CMD_BUFFER_STATE &cb_node, uint32_t instanceCount, uint32_t firstInstance,
sfricke-samsung85584a72021-09-30 21:43:38 -07001068 CMD_TYPE cmd_type) const {
locke-lunarg3fa463a2020-10-23 16:39:04 -06001069 bool skip = false;
1070 const DrawDispatchVuid vuid = GetDrawDispatchVuid(cmd_type);
sfricke-samsung85584a72021-09-30 21:43:38 -07001071 const char *caller = CommandTypeString(cmd_type);
locke-lunarg3fa463a2020-10-23 16:39:04 -06001072
1073 // Verify maxMultiviewInstanceIndex
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001074 if (cb_node.activeRenderPass && cb_node.activeRenderPass->renderPass() && enabled_features.multiview_features.multiview &&
locke-lunarg3fa463a2020-10-23 16:39:04 -06001075 ((instanceCount + firstInstance) > phys_dev_ext_props.multiview_props.maxMultiviewInstanceIndex)) {
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001076 LogObjectList objlist(cb_node.Handle());
1077 objlist.add(cb_node.activeRenderPass->Handle());
locke-lunarg3fa463a2020-10-23 16:39:04 -06001078 skip |= LogError(objlist, vuid.max_multiview_instance_index,
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001079 "%s: renderpass %s multiview is enabled, and maxMultiviewInstanceIndex: %" PRIu32
1080 ", but instanceCount: %" PRIu32 "and firstInstance: %" PRIu32 ".",
1081 caller, report_data->FormatHandle(cb_node.activeRenderPass->Handle()).c_str(),
locke-lunarg3fa463a2020-10-23 16:39:04 -06001082 phys_dev_ext_props.multiview_props.maxMultiviewInstanceIndex, instanceCount, firstInstance);
1083 }
1084 return skip;
1085}
1086
Jasper St. Pierre512613a2019-04-08 16:25:23 -07001087bool CoreChecks::PreCallValidateCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount,
Jeff Bolz5c801d12019-10-09 10:38:45 -05001088 uint32_t firstVertex, uint32_t firstInstance) const {
locke-lunarg3fa463a2020-10-23 16:39:04 -06001089 bool skip = false;
Jeremy Gebbenb68fa022022-01-28 10:08:37 -07001090 auto cb_state = GetRead<CMD_BUFFER_STATE>(commandBuffer);
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001091 skip |= ValidateCmdDrawInstance(*cb_state, instanceCount, firstInstance, CMD_DRAW);
1092 skip |= ValidateCmdDrawType(*cb_state, false, VK_PIPELINE_BIND_POINT_GRAPHICS, CMD_DRAW);
locke-lunarg3fa463a2020-10-23 16:39:04 -06001093 return skip;
Jasper St. Pierre512613a2019-04-08 16:25:23 -07001094}
1095
Tony-LunarG4490de42021-06-21 15:49:19 -06001096bool CoreChecks::PreCallValidateCmdDrawMultiEXT(VkCommandBuffer commandBuffer, uint32_t drawCount,
1097 const VkMultiDrawInfoEXT *pVertexInfo, uint32_t instanceCount,
1098 uint32_t firstInstance, uint32_t stride) const {
1099 bool skip = false;
1100 if (!enabled_features.multi_draw_features.multiDraw) {
1101 skip |= LogError(commandBuffer, "VUID-vkCmdDrawMultiEXT-None-04933",
1102 "vkCmdDrawMultiEXT(): The multiDraw feature must be enabled to "
1103 "call this command.");
1104 }
1105 if (drawCount > phys_dev_ext_props.multi_draw_props.maxMultiDrawCount) {
1106 skip |= LogError(commandBuffer, "VUID-vkCmdDrawMultiEXT-drawCount-04934",
1107 "vkCmdDrawMultiEXT(): parameter, uint32_t drawCount (%" PRIu32
1108 ") must be less than VkPhysicalDeviceMultiDrawPropertiesEXT::maxMultiDrawCount (%" PRIu32 ").",
1109 drawCount, phys_dev_ext_props.multi_draw_props.maxMultiDrawCount);
1110 }
Jeremy Gebbenb68fa022022-01-28 10:08:37 -07001111 auto cb_state = GetRead<CMD_BUFFER_STATE>(commandBuffer);
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001112 skip |= ValidateCmdDrawInstance(*cb_state, instanceCount, firstInstance, CMD_DRAWMULTIEXT);
1113 skip |= ValidateCmdDrawType(*cb_state, false, VK_PIPELINE_BIND_POINT_GRAPHICS, CMD_DRAWMULTIEXT);
Tony-LunarG4490de42021-06-21 15:49:19 -06001114 return skip;
1115}
1116
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001117bool CoreChecks::ValidateCmdDrawIndexedBufferSize(const CMD_BUFFER_STATE &cb_state, uint32_t indexCount, uint32_t firstIndex,
1118 const char *caller, const char *first_index_vuid) const {
Tony-LunarG4490de42021-06-21 15:49:19 -06001119 bool skip = false;
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001120 if (cb_state.status & CBSTATUS_INDEX_BUFFER_BOUND) {
Tony-LunarG4490de42021-06-21 15:49:19 -06001121 unsigned int index_size = 0;
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001122 const auto &index_buffer_binding = cb_state.index_buffer_binding;
Tony-LunarG4490de42021-06-21 15:49:19 -06001123 if (index_buffer_binding.index_type == VK_INDEX_TYPE_UINT16) {
1124 index_size = 2;
1125 }
1126 else if (index_buffer_binding.index_type == VK_INDEX_TYPE_UINT32) {
1127 index_size = 4;
1128 }
1129 else if (index_buffer_binding.index_type == VK_INDEX_TYPE_UINT8_EXT) {
1130 index_size = 1;
1131 }
1132 VkDeviceSize end_offset = (index_size * (static_cast<VkDeviceSize>(firstIndex) + indexCount)) + index_buffer_binding.offset;
1133 if (end_offset > index_buffer_binding.size) {
1134 skip |= LogError(index_buffer_binding.buffer_state->buffer(), first_index_vuid,
1135 "%s: index size (%u) * (firstIndex (%u) + indexCount (%u)) "
1136 "+ binding offset (%" PRIuLEAST64 ") = an ending offset of %" PRIuLEAST64
1137 " bytes, which is greater than the index buffer size (%" PRIuLEAST64 ").",
1138 caller, index_size, firstIndex, indexCount, index_buffer_binding.offset, end_offset,
1139 index_buffer_binding.size);
1140 }
1141 }
1142 return skip;
1143}
1144
Jasper St. Pierre512613a2019-04-08 16:25:23 -07001145bool CoreChecks::PreCallValidateCmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount,
Jeff Bolz5c801d12019-10-09 10:38:45 -05001146 uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance) const {
locke-lunarg3fa463a2020-10-23 16:39:04 -06001147 bool skip = false;
Jeremy Gebbenb68fa022022-01-28 10:08:37 -07001148 auto cb_state = GetRead<CMD_BUFFER_STATE>(commandBuffer);
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001149 skip |= ValidateCmdDrawInstance(*cb_state, instanceCount, firstInstance, CMD_DRAWINDEXED);
1150 skip |= ValidateCmdDrawType(*cb_state, true, VK_PIPELINE_BIND_POINT_GRAPHICS, CMD_DRAWINDEXED);
1151 skip |= ValidateCmdDrawIndexedBufferSize(*cb_state, indexCount, firstIndex, "vkCmdDrawIndexed()",
Tony-LunarG4490de42021-06-21 15:49:19 -06001152 "VUID-vkCmdDrawIndexed-firstIndex-04932");
1153 return skip;
1154}
1155
1156bool CoreChecks::PreCallValidateCmdDrawMultiIndexedEXT(VkCommandBuffer commandBuffer, uint32_t drawCount,
1157 const VkMultiDrawIndexedInfoEXT *pIndexInfo, uint32_t instanceCount,
1158 uint32_t firstInstance, uint32_t stride,
1159 const int32_t *pVertexOffset) const {
1160 bool skip = false;
1161 if (!enabled_features.multi_draw_features.multiDraw) {
1162 skip |= LogError(commandBuffer, "VUID-vkCmdDrawMultiIndexedEXT-None-04937",
1163 "vkCmdDrawMultiIndexedEXT(): The multiDraw feature must be enabled to "
1164 "call this command.");
1165 }
1166 if (drawCount > phys_dev_ext_props.multi_draw_props.maxMultiDrawCount) {
1167 skip |= LogError(commandBuffer, "VUID-vkCmdDrawMultiIndexedEXT-drawCount-04939",
1168 "vkCmdDrawMultiIndexedEXT(): parameter, uint32_t drawCount (0x%" PRIu32
1169 ") must be less than VkPhysicalDeviceMultiDrawPropertiesEXT::maxMultiDrawCount (0x%" PRIu32 ").",
1170 drawCount, phys_dev_ext_props.multi_draw_props.maxMultiDrawCount);
1171 }
Jeremy Gebbenb68fa022022-01-28 10:08:37 -07001172 auto cb_state = GetRead<CMD_BUFFER_STATE>(commandBuffer);
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001173 skip |= ValidateCmdDrawInstance(*cb_state, instanceCount, firstInstance, CMD_DRAWMULTIINDEXEDEXT);
1174 skip |= ValidateCmdDrawType(*cb_state, true, VK_PIPELINE_BIND_POINT_GRAPHICS, CMD_DRAWMULTIINDEXEDEXT);
Ricardo Garcia27a26f52021-07-13 15:52:14 +02001175 const auto info_bytes = reinterpret_cast<const char *>(pIndexInfo);
Tony-LunarG4490de42021-06-21 15:49:19 -06001176 for (uint32_t i = 0; i < drawCount; i++) {
Ricardo Garcia27a26f52021-07-13 15:52:14 +02001177 const auto info_ptr = reinterpret_cast<const VkMultiDrawIndexedInfoEXT *>(info_bytes + i * stride);
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001178 skip |= ValidateCmdDrawIndexedBufferSize(*cb_state, info_ptr->indexCount, info_ptr->firstIndex,
Tony-LunarG4490de42021-06-21 15:49:19 -06001179 "vkCmdDrawMultiIndexedEXT()", "VUID-vkCmdDrawMultiIndexedEXT-firstIndex-04938");
Jasper St. Pierre512613a2019-04-08 16:25:23 -07001180 }
1181 return skip;
1182}
1183
Tony-LunarGc0c3df52020-11-20 13:47:10 -07001184bool CoreChecks::PreCallValidateCmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
1185 uint32_t drawCount, uint32_t stride) const {
Jeremy Gebbenb68fa022022-01-28 10:08:37 -07001186 auto cb_state = GetRead<CMD_BUFFER_STATE>(commandBuffer);
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001187 bool skip = ValidateCmdDrawType(*cb_state, false, VK_PIPELINE_BIND_POINT_GRAPHICS, CMD_DRAWINDIRECT);
Jeremy Gebbenf4449392022-01-28 10:09:10 -07001188 auto buffer_state = Get<BUFFER_STATE>(buffer);
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001189 skip |= ValidateIndirectCmd(*cb_state, *buffer_state, CMD_DRAWINDIRECT);
Tony-LunarGc0c3df52020-11-20 13:47:10 -07001190 if (drawCount > 1) {
Lockee68ac652019-05-06 10:17:33 -06001191 skip |= ValidateCmdDrawStrideWithStruct(commandBuffer, "VUID-vkCmdDrawIndirect-drawCount-00476", stride,
1192 "VkDrawIndirectCommand", sizeof(VkDrawIndirectCommand));
Tony-LunarGc0c3df52020-11-20 13:47:10 -07001193 skip |= ValidateCmdDrawStrideWithBuffer(commandBuffer, "VUID-vkCmdDrawIndirect-drawCount-00488", stride,
1194 "VkDrawIndirectCommand", sizeof(VkDrawIndirectCommand), drawCount, offset,
Jeremy Gebben9f537102021-10-05 16:37:12 -06001195 buffer_state.get());
Tony-LunarGc0c3df52020-11-20 13:47:10 -07001196 } else if ((drawCount == 1) && (offset + sizeof(VkDrawIndirectCommand)) > buffer_state->createInfo.size) {
1197 skip |= LogError(commandBuffer, "VUID-vkCmdDrawIndirect-drawCount-00487",
Jeremy Gebbenda6b48f2021-05-13 10:46:18 -06001198 "CmdDrawIndirect: drawCount equals 1 and (offset + sizeof(VkDrawIndirectCommand)) (%" PRIu64 ") is not less than "
1199 "or equal to the size of buffer (%" PRIu64 ").",
Tony-LunarGc0c3df52020-11-20 13:47:10 -07001200 (offset + sizeof(VkDrawIndirectCommand)), buffer_state->createInfo.size);
Lockee68ac652019-05-06 10:17:33 -06001201 }
Jasper St. Pierre512613a2019-04-08 16:25:23 -07001202 // TODO: If the drawIndirectFirstInstance feature is not enabled, all the firstInstance members of the
1203 // VkDrawIndirectCommand structures accessed by this command must be 0, which will require access to the contents of 'buffer'.
1204 return skip;
1205}
1206
Jasper St. Pierre512613a2019-04-08 16:25:23 -07001207bool CoreChecks::PreCallValidateCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
Tony-LunarGc0c3df52020-11-20 13:47:10 -07001208 uint32_t drawCount, uint32_t stride) const {
Jeremy Gebbenb68fa022022-01-28 10:08:37 -07001209 auto cb_state = GetRead<CMD_BUFFER_STATE>(commandBuffer);
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001210 bool skip = ValidateCmdDrawType(*cb_state, true, VK_PIPELINE_BIND_POINT_GRAPHICS, CMD_DRAWINDEXEDINDIRECT);
Jeremy Gebbenf4449392022-01-28 10:09:10 -07001211 auto buffer_state = Get<BUFFER_STATE>(buffer);
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001212 skip |= ValidateIndirectCmd(*cb_state, *buffer_state, CMD_DRAWINDEXEDINDIRECT);
Tony-LunarGc0c3df52020-11-20 13:47:10 -07001213 if (drawCount > 1) {
Lockee68ac652019-05-06 10:17:33 -06001214 skip |= ValidateCmdDrawStrideWithStruct(commandBuffer, "VUID-vkCmdDrawIndexedIndirect-drawCount-00528", stride,
1215 "VkDrawIndexedIndirectCommand", sizeof(VkDrawIndexedIndirectCommand));
1216 skip |= ValidateCmdDrawStrideWithBuffer(commandBuffer, "VUID-vkCmdDrawIndexedIndirect-drawCount-00540", stride,
Tony-LunarGc0c3df52020-11-20 13:47:10 -07001217 "VkDrawIndexedIndirectCommand", sizeof(VkDrawIndexedIndirectCommand), drawCount,
Jeremy Gebben9f537102021-10-05 16:37:12 -06001218 offset, buffer_state.get());
Tony-LunarGc0c3df52020-11-20 13:47:10 -07001219 } else if ((drawCount == 1) && (offset + sizeof(VkDrawIndexedIndirectCommand)) > buffer_state->createInfo.size) {
1220 skip |= LogError(
1221 commandBuffer, "VUID-vkCmdDrawIndexedIndirect-drawCount-00539",
Jeremy Gebbenda6b48f2021-05-13 10:46:18 -06001222 "CmdDrawIndexedIndirect: drawCount equals 1 and (offset + sizeof(VkDrawIndexedIndirectCommand)) (%" PRIu64 ") is not less than "
1223 "or equal to the size of buffer (%" PRIu64 ").",
Tony-LunarGc0c3df52020-11-20 13:47:10 -07001224 (offset + sizeof(VkDrawIndexedIndirectCommand)), buffer_state->createInfo.size);
Lockee68ac652019-05-06 10:17:33 -06001225 }
Jasper St. Pierre512613a2019-04-08 16:25:23 -07001226 // TODO: If the drawIndirectFirstInstance feature is not enabled, all the firstInstance members of the
1227 // VkDrawIndexedIndirectCommand structures accessed by this command must be 0, which will require access to the contents of
1228 // 'buffer'.
1229 return skip;
1230}
1231
Jeff Bolz5c801d12019-10-09 10:38:45 -05001232bool CoreChecks::PreCallValidateCmdDispatch(VkCommandBuffer commandBuffer, uint32_t x, uint32_t y, uint32_t z) const {
Lockef39c0772019-04-03 14:40:02 -06001233 bool skip = false;
Jeremy Gebbenb68fa022022-01-28 10:08:37 -07001234 auto cb_state = GetRead<CMD_BUFFER_STATE>(commandBuffer);
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001235 skip |= ValidateCmdDrawType(*cb_state, false, VK_PIPELINE_BIND_POINT_COMPUTE, CMD_DISPATCH);
Lockef39c0772019-04-03 14:40:02 -06001236 return skip;
Jasper St. Pierre512613a2019-04-08 16:25:23 -07001237}
1238
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001239bool CoreChecks::ValidateBaseGroups(const CMD_BUFFER_STATE &cb_state, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ,
Tony-LunarGf825e6d2020-12-16 13:05:17 -07001240 const char *apiName) const {
1241 bool skip = false;
1242 if (baseGroupX || baseGroupY || baseGroupZ) {
Tony-LunarGf825e6d2020-12-16 13:05:17 -07001243 const auto lv_bind_point = ConvertToLvlBindPoint(VK_PIPELINE_BIND_POINT_COMPUTE);
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001244 const auto *pipeline_state = cb_state.lastBound[lv_bind_point].pipeline_state;
Jeremy Gebben11af9792021-08-20 10:20:09 -06001245 if (pipeline_state && !(pipeline_state->GetPipelineCreateFlags() & VK_PIPELINE_CREATE_DISPATCH_BASE)) {
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001246 skip |= LogError(cb_state.Handle(), "VUID-vkCmdDispatchBase-baseGroupX-00427",
Tony-LunarGf825e6d2020-12-16 13:05:17 -07001247 "%s(): If any of baseGroupX, baseGroupY, or baseGroupZ are not zero, then the bound compute pipeline "
1248 "must have been created with the VK_PIPELINE_CREATE_DISPATCH_BASE flag",
1249 apiName);
1250 }
1251 }
1252 return skip;
1253}
1254
locke-lunarg25b6c352020-08-06 17:44:18 -06001255bool CoreChecks::PreCallValidateCmdDispatchBase(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY,
1256 uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY,
1257 uint32_t groupCountZ) const {
1258 bool skip = false;
Jeremy Gebbenb68fa022022-01-28 10:08:37 -07001259 auto cb_state = GetRead<CMD_BUFFER_STATE>(commandBuffer);
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001260 skip |= ValidateCmdDrawType(*cb_state, false, VK_PIPELINE_BIND_POINT_COMPUTE, CMD_DISPATCHBASE);
1261 skip |= ValidateBaseGroups(*cb_state, baseGroupX, baseGroupY, baseGroupZ, "vkCmdDispatchBase()");
locke-lunarg25b6c352020-08-06 17:44:18 -06001262 return skip;
1263}
1264
1265bool CoreChecks::PreCallValidateCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY,
1266 uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY,
1267 uint32_t groupCountZ) const {
1268 bool skip = false;
Jeremy Gebbenb68fa022022-01-28 10:08:37 -07001269 auto cb_state = GetRead<CMD_BUFFER_STATE>(commandBuffer);
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001270 skip |= ValidateCmdDrawType(*cb_state, false, VK_PIPELINE_BIND_POINT_COMPUTE, CMD_DISPATCHBASEKHR);
1271 skip |= ValidateBaseGroups(*cb_state, baseGroupX, baseGroupY, baseGroupZ, "vkCmdDispatchBaseKHR()");
locke-lunarg25b6c352020-08-06 17:44:18 -06001272 return skip;
1273}
1274
Jeff Bolz5c801d12019-10-09 10:38:45 -05001275bool CoreChecks::PreCallValidateCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset) const {
Jeremy Gebbenb68fa022022-01-28 10:08:37 -07001276 auto cb_state = GetRead<CMD_BUFFER_STATE>(commandBuffer);
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001277 bool skip = ValidateCmdDrawType(*cb_state, false, VK_PIPELINE_BIND_POINT_COMPUTE, CMD_DISPATCHINDIRECT);
Jeremy Gebbenf4449392022-01-28 10:09:10 -07001278 auto buffer_state = Get<BUFFER_STATE>(buffer);
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001279 skip |= ValidateIndirectCmd(*cb_state, *buffer_state, CMD_DISPATCHINDIRECT);
Tony-LunarGda555b52021-01-06 13:43:49 -07001280 if ((offset + sizeof(VkDispatchIndirectCommand)) > buffer_state->createInfo.size) {
1281 skip |= LogError(commandBuffer, "VUID-vkCmdDispatchIndirect-offset-00407",
1282 "vkCmdDispatchIndirect(): The sum of offset and the size of VkDispatchIndirectCommand is greater than the "
1283 "size of the buffer");
1284 }
Jasper St. Pierre512613a2019-04-08 16:25:23 -07001285 return skip;
1286}
Tony-LunarGa74d3fe2019-11-22 15:43:20 -07001287bool CoreChecks::ValidateCmdDrawIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
1288 VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount,
sfricke-samsung85584a72021-09-30 21:43:38 -07001289 uint32_t stride, CMD_TYPE cmd_type) const {
Jasper St. Pierre512613a2019-04-08 16:25:23 -07001290 bool skip = false;
sfricke-samsung85584a72021-09-30 21:43:38 -07001291 const char *apiName = CommandTypeString(cmd_type);
Nathaniel Cesario7f231f12021-03-25 12:10:58 -06001292 if ((device_extensions.vk_khr_draw_indirect_count != kEnabledByCreateinfo) &&
1293 ((api_version >= VK_API_VERSION_1_2) && (enabled_features.core12.drawIndirectCount == VK_FALSE))) {
Shannon McPherson2c793ba2020-08-28 12:13:24 -06001294 skip |= LogError(commandBuffer, "VUID-vkCmdDrawIndirectCount-None-04445",
sfricke-samsung27c70722020-05-02 08:42:39 -07001295 "%s(): Starting in Vulkan 1.2 the VkPhysicalDeviceVulkan12Features::drawIndirectCount must be enabled to "
1296 "call this command.",
1297 apiName);
1298 }
AndreyVK_D3Db2753e12021-07-21 12:24:03 +03001299 skip |= ValidateCmdDrawStrideWithStruct(commandBuffer, "VUID-vkCmdDrawIndirectCount-stride-03110", stride,
1300 "VkDrawIndirectCommand", sizeof(VkDrawIndirectCommand));
Lockee68ac652019-05-06 10:17:33 -06001301 if (maxDrawCount > 1) {
Jeremy Gebbenf4449392022-01-28 10:09:10 -07001302 auto buffer_state = Get<BUFFER_STATE>(buffer);
AndreyVK_D3Db2753e12021-07-21 12:24:03 +03001303 skip |= ValidateCmdDrawStrideWithBuffer(commandBuffer, "VUID-vkCmdDrawIndirectCount-maxDrawCount-03111", stride,
1304 "VkDrawIndirectCommand", sizeof(VkDrawIndirectCommand), maxDrawCount, offset,
Jeremy Gebben9f537102021-10-05 16:37:12 -06001305 buffer_state.get());
Jasper St. Pierre512613a2019-04-08 16:25:23 -07001306 }
1307
Jeremy Gebbenb68fa022022-01-28 10:08:37 -07001308 auto cb_state = GetRead<CMD_BUFFER_STATE>(commandBuffer);
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001309 skip |= ValidateCmdDrawType(*cb_state, false, VK_PIPELINE_BIND_POINT_GRAPHICS, cmd_type);
Jeremy Gebbenf4449392022-01-28 10:09:10 -07001310 auto buffer_state = Get<BUFFER_STATE>(buffer);
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001311 skip |= ValidateIndirectCmd(*cb_state, *buffer_state, cmd_type);
Jeremy Gebbenf4449392022-01-28 10:09:10 -07001312 auto count_buffer_state = Get<BUFFER_STATE>(countBuffer);
Jeremy Gebben9f537102021-10-05 16:37:12 -06001313 skip |= ValidateMemoryIsBoundToBuffer(count_buffer_state.get(), apiName, "VUID-vkCmdDrawIndirectCount-countBuffer-02714");
Tony-LunarG83544c72020-01-17 12:30:19 -07001314 skip |=
Jeremy Gebben9f537102021-10-05 16:37:12 -06001315 ValidateBufferUsageFlags(count_buffer_state.get(), VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT, true,
Tony-LunarG83544c72020-01-17 12:30:19 -07001316 "VUID-vkCmdDrawIndirectCount-countBuffer-02715", apiName, "VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT");
Jasper St. Pierre512613a2019-04-08 16:25:23 -07001317 return skip;
1318}
1319
Tony-LunarGa74d3fe2019-11-22 15:43:20 -07001320bool CoreChecks::PreCallValidateCmdDrawIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
1321 VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount,
1322 uint32_t stride) const {
Tony-LunarG83544c72020-01-17 12:30:19 -07001323 return ValidateCmdDrawIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride,
sfricke-samsung85584a72021-09-30 21:43:38 -07001324 CMD_DRAWINDIRECTCOUNTKHR);
Tony-LunarGa74d3fe2019-11-22 15:43:20 -07001325}
1326
1327bool CoreChecks::PreCallValidateCmdDrawIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
1328 VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount,
1329 uint32_t stride) const {
Tony-LunarG83544c72020-01-17 12:30:19 -07001330 return ValidateCmdDrawIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride,
sfricke-samsung85584a72021-09-30 21:43:38 -07001331 CMD_DRAWINDIRECTCOUNT);
Tony-LunarGa74d3fe2019-11-22 15:43:20 -07001332}
1333
1334bool CoreChecks::ValidateCmdDrawIndexedIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
1335 VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount,
sfricke-samsung85584a72021-09-30 21:43:38 -07001336 uint32_t stride, CMD_TYPE cmd_type) const {
Jasper St. Pierre512613a2019-04-08 16:25:23 -07001337 bool skip = false;
sfricke-samsung85584a72021-09-30 21:43:38 -07001338 const char *apiName = CommandTypeString(cmd_type);
Nathaniel Cesario7f231f12021-03-25 12:10:58 -06001339 if ((device_extensions.vk_khr_draw_indirect_count != kEnabledByCreateinfo) &&
1340 ((api_version >= VK_API_VERSION_1_2) && (enabled_features.core12.drawIndirectCount == VK_FALSE))) {
Shannon McPherson2c793ba2020-08-28 12:13:24 -06001341 skip |= LogError(commandBuffer, "VUID-vkCmdDrawIndexedIndirectCount-None-04445",
sfricke-samsung27c70722020-05-02 08:42:39 -07001342 "%s(): Starting in Vulkan 1.2 the VkPhysicalDeviceVulkan12Features::drawIndirectCount must be enabled to "
1343 "call this command.",
1344 apiName);
1345 }
AndreyVK_D3Db2753e12021-07-21 12:24:03 +03001346 skip |= ValidateCmdDrawStrideWithStruct(commandBuffer, "VUID-vkCmdDrawIndexedIndirectCount-stride-03142", stride,
1347 "VkDrawIndexedIndirectCommand", sizeof(VkDrawIndexedIndirectCommand));
Jeremy Gebbenf4449392022-01-28 10:09:10 -07001348 auto buffer_state = Get<BUFFER_STATE>(buffer);
Lockee68ac652019-05-06 10:17:33 -06001349 if (maxDrawCount > 1) {
Mike Schuchardt65847d92019-12-20 13:50:47 -08001350 skip |= ValidateCmdDrawStrideWithBuffer(commandBuffer, "VUID-vkCmdDrawIndexedIndirectCount-maxDrawCount-03143", stride,
AndreyVK_D3Db2753e12021-07-21 12:24:03 +03001351 "VkDrawIndexedIndirectCommand", sizeof(VkDrawIndexedIndirectCommand), maxDrawCount,
Jeremy Gebben9f537102021-10-05 16:37:12 -06001352 offset, buffer_state.get());
Jasper St. Pierre512613a2019-04-08 16:25:23 -07001353 }
Jeremy Gebbenb68fa022022-01-28 10:08:37 -07001354 auto cb_state = GetRead<CMD_BUFFER_STATE>(commandBuffer);
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001355 skip |= ValidateCmdDrawType(*cb_state, true, VK_PIPELINE_BIND_POINT_GRAPHICS, cmd_type);
1356 skip |= ValidateIndirectCmd(*cb_state, *buffer_state, cmd_type);
Jeremy Gebbenf4449392022-01-28 10:09:10 -07001357 auto count_buffer_state = Get<BUFFER_STATE>(countBuffer);
Jeremy Gebben9f537102021-10-05 16:37:12 -06001358 skip |=
1359 ValidateMemoryIsBoundToBuffer(count_buffer_state.get(), apiName, "VUID-vkCmdDrawIndexedIndirectCount-countBuffer-02714");
1360 skip |= ValidateBufferUsageFlags(count_buffer_state.get(), VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT, true,
sfricke-samsungf692b972020-05-02 08:00:45 -07001361 "VUID-vkCmdDrawIndexedIndirectCount-countBuffer-02715", apiName,
Mike Schuchardt65847d92019-12-20 13:50:47 -08001362 "VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT");
Jasper St. Pierre512613a2019-04-08 16:25:23 -07001363 return skip;
1364}
1365
Tony-LunarGa74d3fe2019-11-22 15:43:20 -07001366bool CoreChecks::PreCallValidateCmdDrawIndexedIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
1367 VkBuffer countBuffer, VkDeviceSize countBufferOffset,
1368 uint32_t maxDrawCount, uint32_t stride) const {
sfricke-samsungf692b972020-05-02 08:00:45 -07001369 return ValidateCmdDrawIndexedIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride,
sfricke-samsung85584a72021-09-30 21:43:38 -07001370 CMD_DRAWINDEXEDINDIRECTCOUNTKHR);
Tony-LunarGa74d3fe2019-11-22 15:43:20 -07001371}
1372
1373bool CoreChecks::PreCallValidateCmdDrawIndexedIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
1374 VkBuffer countBuffer, VkDeviceSize countBufferOffset,
1375 uint32_t maxDrawCount, uint32_t stride) const {
sfricke-samsungf692b972020-05-02 08:00:45 -07001376 return ValidateCmdDrawIndexedIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride,
sfricke-samsung85584a72021-09-30 21:43:38 -07001377 CMD_DRAWINDEXEDINDIRECTCOUNT);
Tony-LunarGa74d3fe2019-11-22 15:43:20 -07001378}
1379
locke-lunarg9a16ebb2020-07-30 16:56:33 -06001380bool CoreChecks::PreCallValidateCmdDrawIndirectByteCountEXT(VkCommandBuffer commandBuffer, uint32_t instanceCount,
1381 uint32_t firstInstance, VkBuffer counterBuffer,
1382 VkDeviceSize counterBufferOffset, uint32_t counterOffset,
1383 uint32_t vertexStride) const {
sfricke-samsungd5e9adb2020-10-26 03:59:29 -07001384 bool skip = false;
Tony-LunarG2c94ba82020-11-05 14:21:40 -07001385 if (!enabled_features.transform_feedback_features.transformFeedback) {
1386 skip |= LogError(commandBuffer, "VUID-vkCmdDrawIndirectByteCountEXT-transformFeedback-02287",
1387 "%s: transformFeedback feature is not enabled.", "vkCmdDrawIndirectByteCountEXT()");
1388 }
sfricke-samsung45996a42021-09-16 13:45:27 -07001389 if (IsExtEnabled(device_extensions.vk_ext_transform_feedback) &&
1390 !phys_dev_ext_props.transform_feedback_props.transformFeedbackDraw) {
sfricke-samsungba459bd2020-12-06 23:20:04 -08001391 skip |= LogError(commandBuffer, "VUID-vkCmdDrawIndirectByteCountEXT-transformFeedbackDraw-02288",
Tony-LunarG2c94ba82020-11-05 14:21:40 -07001392 "%s: VkPhysicalDeviceTransformFeedbackPropertiesEXT::transformFeedbackDraw is not supported",
1393 "vkCmdDrawIndirectByteCountEXT()");
1394 }
Jeremy Gebbenb68fa022022-01-28 10:08:37 -07001395 auto cb_state = GetRead<CMD_BUFFER_STATE>(commandBuffer);
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001396 skip |= ValidateCmdDrawInstance(*cb_state, instanceCount, firstInstance, CMD_DRAWINDIRECTBYTECOUNTEXT);
1397 skip |= ValidateCmdDrawType(*cb_state, false, VK_PIPELINE_BIND_POINT_GRAPHICS, CMD_DRAWINDIRECTBYTECOUNTEXT);
Jeremy Gebbenf4449392022-01-28 10:09:10 -07001398 auto counter_buffer_state = Get<BUFFER_STATE>(counterBuffer);
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001399 skip |= ValidateIndirectCmd(*cb_state, *counter_buffer_state, CMD_DRAWINDIRECTBYTECOUNTEXT);
sfricke-samsungd5e9adb2020-10-26 03:59:29 -07001400 return skip;
locke-lunarg9a16ebb2020-07-30 16:56:33 -06001401}
1402
Jeff Bolzf6e872c2019-10-22 12:17:28 -05001403bool CoreChecks::PreCallValidateCmdTraceRaysNV(VkCommandBuffer commandBuffer, VkBuffer raygenShaderBindingTableBuffer,
1404 VkDeviceSize raygenShaderBindingOffset, VkBuffer missShaderBindingTableBuffer,
1405 VkDeviceSize missShaderBindingOffset, VkDeviceSize missShaderBindingStride,
1406 VkBuffer hitShaderBindingTableBuffer, VkDeviceSize hitShaderBindingOffset,
1407 VkDeviceSize hitShaderBindingStride, VkBuffer callableShaderBindingTableBuffer,
1408 VkDeviceSize callableShaderBindingOffset, VkDeviceSize callableShaderBindingStride,
1409 uint32_t width, uint32_t height, uint32_t depth) const {
Jeremy Gebbenb68fa022022-01-28 10:08:37 -07001410 auto cb_state = GetRead<CMD_BUFFER_STATE>(commandBuffer);
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001411 bool skip = ValidateCmdDrawType(*cb_state, true, VK_PIPELINE_BIND_POINT_RAY_TRACING_NV, CMD_TRACERAYSNV);
Jeremy Gebbenb20a8242021-11-05 15:14:43 -06001412 auto callable_shader_buffer_state = Get<BUFFER_STATE>(callableShaderBindingTableBuffer);
sourav parmard1521802020-06-07 21:49:02 -07001413 if (callable_shader_buffer_state && callableShaderBindingOffset >= callable_shader_buffer_state->createInfo.size) {
1414 skip |= LogError(commandBuffer, "VUID-vkCmdTraceRaysNV-callableShaderBindingOffset-02461",
1415 "vkCmdTraceRaysNV: callableShaderBindingOffset %" PRIu64
1416 " must be less than the size of callableShaderBindingTableBuffer %" PRIu64 " .",
1417 callableShaderBindingOffset, callable_shader_buffer_state->createInfo.size);
1418 }
Jeremy Gebbenb20a8242021-11-05 15:14:43 -06001419 auto hit_shader_buffer_state = Get<BUFFER_STATE>(hitShaderBindingTableBuffer);
sourav parmard1521802020-06-07 21:49:02 -07001420 if (hit_shader_buffer_state && hitShaderBindingOffset >= hit_shader_buffer_state->createInfo.size) {
1421 skip |= LogError(commandBuffer, "VUID-vkCmdTraceRaysNV-hitShaderBindingOffset-02459",
1422 "vkCmdTraceRaysNV: hitShaderBindingOffset %" PRIu64
1423 " must be less than the size of hitShaderBindingTableBuffer %" PRIu64 " .",
1424 hitShaderBindingOffset, hit_shader_buffer_state->createInfo.size);
1425 }
Jeremy Gebbenb20a8242021-11-05 15:14:43 -06001426 auto miss_shader_buffer_state = Get<BUFFER_STATE>(missShaderBindingTableBuffer);
sourav parmard1521802020-06-07 21:49:02 -07001427 if (miss_shader_buffer_state && missShaderBindingOffset >= miss_shader_buffer_state->createInfo.size) {
1428 skip |= LogError(commandBuffer, "VUID-vkCmdTraceRaysNV-missShaderBindingOffset-02457",
1429 "vkCmdTraceRaysNV: missShaderBindingOffset %" PRIu64
baldurk751594b2020-09-09 09:41:02 +01001430 " must be less than the size of missShaderBindingTableBuffer %" PRIu64 " .",
sourav parmard1521802020-06-07 21:49:02 -07001431 missShaderBindingOffset, miss_shader_buffer_state->createInfo.size);
1432 }
Jeremy Gebbenb20a8242021-11-05 15:14:43 -06001433 auto raygen_shader_buffer_state = Get<BUFFER_STATE>(raygenShaderBindingTableBuffer);
sourav parmard1521802020-06-07 21:49:02 -07001434 if (raygenShaderBindingOffset >= raygen_shader_buffer_state->createInfo.size) {
1435 skip |= LogError(commandBuffer, "VUID-vkCmdTraceRaysNV-raygenShaderBindingOffset-02455",
1436 "vkCmdTraceRaysNV: raygenShaderBindingOffset %" PRIu64
baldurk751594b2020-09-09 09:41:02 +01001437 " must be less than the size of raygenShaderBindingTableBuffer %" PRIu64 " .",
sourav parmard1521802020-06-07 21:49:02 -07001438 raygenShaderBindingOffset, raygen_shader_buffer_state->createInfo.size);
1439 }
sourav parmarcd5fb182020-07-17 12:58:44 -07001440
sourav parmar30e19392020-12-02 16:57:21 -08001441 const auto lv_bind_point = ConvertToLvlBindPoint(VK_PIPELINE_BIND_POINT_RAY_TRACING_NV);
1442 const PIPELINE_STATE *pipeline_state = cb_state->lastBound[lv_bind_point].pipeline_state;
Jeremy Gebben14b0d1a2021-05-15 20:15:41 -06001443 if (!pipeline_state || (pipeline_state && !pipeline_state->pipeline())) {
sourav parmar30e19392020-12-02 16:57:21 -08001444 skip |= LogError(device, "VUID-vkCmdTraceRaysNV-None-02700",
1445 "vkCmdTraceRaysKHR: A valid pipeline must be bound to the pipeline bind point used by this command.");
sourav parmarcd5fb182020-07-17 12:58:44 -07001446 }
Jeff Bolzf6e872c2019-10-22 12:17:28 -05001447 return skip;
1448}
1449
Jeff Bolz443c2ca2020-03-19 12:11:51 -05001450bool CoreChecks::PreCallValidateCmdTraceRaysKHR(VkCommandBuffer commandBuffer,
sourav parmarcd5fb182020-07-17 12:58:44 -07001451 const VkStridedDeviceAddressRegionKHR *pRaygenShaderBindingTable,
1452 const VkStridedDeviceAddressRegionKHR *pMissShaderBindingTable,
1453 const VkStridedDeviceAddressRegionKHR *pHitShaderBindingTable,
1454 const VkStridedDeviceAddressRegionKHR *pCallableShaderBindingTable, uint32_t width,
Jeff Bolz443c2ca2020-03-19 12:11:51 -05001455 uint32_t height, uint32_t depth) const {
Jeremy Gebbenb68fa022022-01-28 10:08:37 -07001456 auto cb_state = GetRead<CMD_BUFFER_STATE>(commandBuffer);
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001457 bool skip = ValidateCmdDrawType(*cb_state, true, VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR, CMD_TRACERAYSKHR);
Shannon McPherson9caca052020-11-25 11:34:38 -07001458 const auto lv_bind_point = ConvertToLvlBindPoint(VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR);
1459 const PIPELINE_STATE *pipeline_state = cb_state->lastBound[lv_bind_point].pipeline_state;
Jeremy Gebben14b0d1a2021-05-15 20:15:41 -06001460 if (!pipeline_state || (pipeline_state && !pipeline_state->pipeline())) {
sourav parmarcd5fb182020-07-17 12:58:44 -07001461 skip |= LogError(device, "VUID-vkCmdTraceRaysKHR-None-02700",
1462 "vkCmdTraceRaysKHR: A valid pipeline must be bound to the pipeline bind point used by this command.");
1463 } else { // bound to valid RT pipeline
Jeremy Gebben11af9792021-08-20 10:20:09 -06001464 if (pipeline_state->GetPipelineCreateFlags() & VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR) {
sourav parmarcd5fb182020-07-17 12:58:44 -07001465 if (!pHitShaderBindingTable->deviceAddress) {
1466 skip |= LogError(device, "VUID-vkCmdTraceRaysKHR-flags-03697",
1467 "vkCmdTraceRaysKHR: If the currently bound ray tracing pipeline was created with flags "
1468 "that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, the "
1469 "deviceAddress member of pHitShaderBindingTable must not be zero.");
1470 }
1471 if (!pHitShaderBindingTable || pHitShaderBindingTable->size == 0 || pHitShaderBindingTable->stride == 0) {
1472 skip |= LogError(device, "VUID-vkCmdTraceRaysKHR-flags-03514",
1473 "vkCmdTraceRaysKHR: If the currently bound ray tracing pipeline was created with "
1474 "flags that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, "
1475 "entries in pHitShaderBindingTable accessed as a result of this command in order to "
1476 "execute an intersection shader must not be set to zero.");
1477 }
1478 }
Jeremy Gebben11af9792021-08-20 10:20:09 -06001479 if (pipeline_state->GetPipelineCreateFlags() & VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR) {
sourav parmarcd5fb182020-07-17 12:58:44 -07001480 if (!pHitShaderBindingTable->deviceAddress) {
1481 skip |= LogError(device, "VUID-vkCmdTraceRaysKHR-flags-03696",
1482 "vkCmdTraceRaysKHR: If the currently bound ray tracing pipeline was created with flags "
1483 "that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, the "
1484 "deviceAddress member of pHitShaderBindingTable must not be zero.");
1485 }
1486 if (!pHitShaderBindingTable || pHitShaderBindingTable->size == 0 || pHitShaderBindingTable->stride == 0) {
1487 skip |= LogError(device, "VUID-vkCmdTraceRaysKHR-flags-03513",
1488 "vkCmdTraceRaysKHR: If the currently bound ray tracing pipeline was created with "
1489 "flags that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, "
1490 "entries in pHitShaderBindingTable accessed as a result of this command in order to "
1491 "execute a closest hit shader must not be set to zero.");
1492 }
1493 }
Jeremy Gebben11af9792021-08-20 10:20:09 -06001494 if (pipeline_state->GetPipelineCreateFlags() & VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR) {
sourav parmarcd5fb182020-07-17 12:58:44 -07001495 if (!pHitShaderBindingTable || pHitShaderBindingTable->size == 0 || pHitShaderBindingTable->stride == 0) {
1496 skip |= LogError(device, "VUID-vkCmdTraceRaysKHR-flags-03512",
1497 "vkCmdTraceRaysKHR: If the currently bound ray tracing pipeline was created with "
1498 "flags that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR, "
1499 "entries in pHitShaderBindingTable accessed as a result of this command in order to "
1500 "execute an any hit shader must not be set to zero.");
1501 }
1502 }
1503 }
Jeff Bolz443c2ca2020-03-19 12:11:51 -05001504 return skip;
1505}
1506
Jeff Bolz443c2ca2020-03-19 12:11:51 -05001507bool CoreChecks::PreCallValidateCmdTraceRaysIndirectKHR(VkCommandBuffer commandBuffer,
sourav parmarcd5fb182020-07-17 12:58:44 -07001508 const VkStridedDeviceAddressRegionKHR *pRaygenShaderBindingTable,
1509 const VkStridedDeviceAddressRegionKHR *pMissShaderBindingTable,
1510 const VkStridedDeviceAddressRegionKHR *pHitShaderBindingTable,
1511 const VkStridedDeviceAddressRegionKHR *pCallableShaderBindingTable,
1512 VkDeviceAddress indirectDeviceAddress) const {
Jeremy Gebbenb68fa022022-01-28 10:08:37 -07001513 auto cb_state = GetRead<CMD_BUFFER_STATE>(commandBuffer);
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001514 bool skip = ValidateCmdDrawType(*cb_state, true, VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR, CMD_TRACERAYSINDIRECTKHR);
Shannon McPherson9caca052020-11-25 11:34:38 -07001515 const auto lv_bind_point = ConvertToLvlBindPoint(VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR);
Jeremy Gebbenb20a8242021-11-05 15:14:43 -06001516 const auto *pipeline_state = cb_state->lastBound[lv_bind_point].pipeline_state;
Jeremy Gebben14b0d1a2021-05-15 20:15:41 -06001517 if (!pipeline_state || (pipeline_state && !pipeline_state->pipeline())) {
sourav parmarcd5fb182020-07-17 12:58:44 -07001518 skip |=
1519 LogError(device, "VUID-vkCmdTraceRaysIndirectKHR-None-02700",
1520 "vkCmdTraceRaysIndirectKHR: A valid pipeline must be bound to the pipeline bind point used by this command.");
1521 } else { // valid bind point
Jeremy Gebben11af9792021-08-20 10:20:09 -06001522 if (pipeline_state->GetPipelineCreateFlags() & VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR) {
sourav parmarcd5fb182020-07-17 12:58:44 -07001523 if (!pHitShaderBindingTable || pHitShaderBindingTable->deviceAddress == 0) {
1524 skip |= LogError(device, "VUID-vkCmdTraceRaysIndirectKHR-flags-03697",
1525 "vkCmdTraceRaysIndirectKHR: If the currently bound ray tracing pipeline was created with "
1526 "flags that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, the "
1527 "deviceAddress member of pHitShaderBindingTable must not be zero.");
1528 }
1529 if (!pHitShaderBindingTable || pHitShaderBindingTable->size == 0 || pHitShaderBindingTable->stride == 0) {
1530 skip |= LogError(device, "VUID-vkCmdTraceRaysIndirectKHR-flags-03514",
1531 "vkCmdTraceRaysIndirectKHR: If the currently bound ray tracing pipeline was created with "
1532 "flags that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, "
1533 "entries in pHitShaderBindingTable accessed as a result of this command in order to "
1534 "execute an intersection shader must not be set to zero.");
1535 }
1536 }
Jeremy Gebben11af9792021-08-20 10:20:09 -06001537 if (pipeline_state->GetPipelineCreateFlags() & VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR) {
sourav parmarcd5fb182020-07-17 12:58:44 -07001538 if (!pHitShaderBindingTable || pHitShaderBindingTable->deviceAddress == 0) {
1539 skip |= LogError(device, "VUID-vkCmdTraceRaysIndirectKHR-flags-03696",
1540 "vkCmdTraceRaysIndirectKHR:If the currently bound ray tracing pipeline was created with "
1541 "flags that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, "
1542 "the deviceAddress member of pHitShaderBindingTable must not be zero.");
1543 }
1544 if (!pHitShaderBindingTable || pHitShaderBindingTable->size == 0 || pHitShaderBindingTable->stride == 0) {
1545 skip |= LogError(device, "VUID-vkCmdTraceRaysIndirectKHR-flags-03513",
1546 "vkCmdTraceRaysIndirectKHR: If the currently bound ray tracing pipeline was created with "
1547 "flags that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, "
1548 "entries in pHitShaderBindingTable accessed as a result of this command in order to "
1549 "execute a closest hit shader must not be set to zero.");
1550 }
1551 }
Jeremy Gebben11af9792021-08-20 10:20:09 -06001552 if (pipeline_state->GetPipelineCreateFlags() & VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR) {
sourav parmarcd5fb182020-07-17 12:58:44 -07001553 if (!pHitShaderBindingTable || pHitShaderBindingTable->size == 0 || pHitShaderBindingTable->stride == 0) {
1554 skip |= LogError(device, "VUID-vkCmdTraceRaysIndirectKHR-flags-03512",
1555 "vkCmdTraceRaysIndirectKHR: If the currently bound ray tracing pipeline was created with "
1556 "flags that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR, "
1557 "entries in pHitShaderBindingTable accessed as a result of this command in order to "
1558 "execute an any hit shader must not be set to zero.");
1559 }
1560 }
1561 }
Jeff Bolz443c2ca2020-03-19 12:11:51 -05001562 return skip;
1563}
1564
Jeff Bolz5c801d12019-10-09 10:38:45 -05001565bool CoreChecks::PreCallValidateCmdDrawMeshTasksNV(VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask) const {
Jeremy Gebbenb68fa022022-01-28 10:08:37 -07001566 auto cb_state = GetRead<CMD_BUFFER_STATE>(commandBuffer);
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001567 bool skip = ValidateCmdDrawType(*cb_state, false, VK_PIPELINE_BIND_POINT_GRAPHICS, CMD_DRAWMESHTASKSNV);
Jasper St. Pierre512613a2019-04-08 16:25:23 -07001568 return skip;
1569}
1570
Jasper St. Pierre512613a2019-04-08 16:25:23 -07001571bool CoreChecks::PreCallValidateCmdDrawMeshTasksIndirectNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
Jeff Bolz5c801d12019-10-09 10:38:45 -05001572 uint32_t drawCount, uint32_t stride) const {
Jeremy Gebbenb68fa022022-01-28 10:08:37 -07001573 auto cb_state = GetRead<CMD_BUFFER_STATE>(commandBuffer);
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001574 bool skip = ValidateCmdDrawType(*cb_state, false, VK_PIPELINE_BIND_POINT_GRAPHICS, CMD_DRAWMESHTASKSINDIRECTNV);
Jeremy Gebbenf4449392022-01-28 10:09:10 -07001575 auto buffer_state = Get<BUFFER_STATE>(buffer);
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001576 skip |= ValidateIndirectCmd(*cb_state, *buffer_state, CMD_DRAWMESHTASKSINDIRECTNV);
Lockee68ac652019-05-06 10:17:33 -06001577 if (drawCount > 1) {
Lockee68ac652019-05-06 10:17:33 -06001578 skip |= ValidateCmdDrawStrideWithBuffer(commandBuffer, "VUID-vkCmdDrawMeshTasksIndirectNV-drawCount-02157", stride,
1579 "VkDrawMeshTasksIndirectCommandNV", sizeof(VkDrawMeshTasksIndirectCommandNV),
Jeremy Gebben9f537102021-10-05 16:37:12 -06001580 drawCount, offset, buffer_state.get());
Lockee68ac652019-05-06 10:17:33 -06001581 }
Jasper St. Pierre512613a2019-04-08 16:25:23 -07001582 return skip;
1583}
1584
Jasper St. Pierre512613a2019-04-08 16:25:23 -07001585bool CoreChecks::PreCallValidateCmdDrawMeshTasksIndirectCountNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
1586 VkBuffer countBuffer, VkDeviceSize countBufferOffset,
Jeff Bolz5c801d12019-10-09 10:38:45 -05001587 uint32_t maxDrawCount, uint32_t stride) const {
Jeremy Gebbenb68fa022022-01-28 10:08:37 -07001588 auto cb_state = GetRead<CMD_BUFFER_STATE>(commandBuffer);
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001589 bool skip = ValidateCmdDrawType(*cb_state, false, VK_PIPELINE_BIND_POINT_GRAPHICS, CMD_DRAWMESHTASKSINDIRECTCOUNTNV);
Jeremy Gebbenf4449392022-01-28 10:09:10 -07001590 auto buffer_state = Get<BUFFER_STATE>(buffer);
1591 auto count_buffer_state = Get<BUFFER_STATE>(countBuffer);
Jeremy Gebbene5361dd2021-11-18 14:23:56 -07001592 skip |= ValidateIndirectCmd(*cb_state, *buffer_state, CMD_DRAWMESHTASKSINDIRECTCOUNTNV);
Jeremy Gebben9f537102021-10-05 16:37:12 -06001593 skip |= ValidateMemoryIsBoundToBuffer(count_buffer_state.get(), "vkCmdDrawMeshTasksIndirectCountNV()",
Shannon McPhersonde3eeba2019-04-30 16:53:59 -06001594 "VUID-vkCmdDrawMeshTasksIndirectCountNV-countBuffer-02714");
Jeremy Gebben9f537102021-10-05 16:37:12 -06001595 skip |= ValidateBufferUsageFlags(count_buffer_state.get(), VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT, true,
sfricke-samsungf692b972020-05-02 08:00:45 -07001596 "VUID-vkCmdDrawMeshTasksIndirectCountNV-countBuffer-02715",
1597 "vkCmdDrawMeshTasksIndirectCountNV()", "VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT");
Lockee68ac652019-05-06 10:17:33 -06001598 skip |= ValidateCmdDrawStrideWithStruct(commandBuffer, "VUID-vkCmdDrawMeshTasksIndirectCountNV-stride-02182", stride,
1599 "VkDrawMeshTasksIndirectCommandNV", sizeof(VkDrawMeshTasksIndirectCommandNV));
1600 if (maxDrawCount > 1) {
1601 skip |= ValidateCmdDrawStrideWithBuffer(commandBuffer, "VUID-vkCmdDrawMeshTasksIndirectCountNV-maxDrawCount-02183", stride,
1602 "VkDrawMeshTasksIndirectCommandNV", sizeof(VkDrawMeshTasksIndirectCommandNV),
Jeremy Gebben9f537102021-10-05 16:37:12 -06001603 maxDrawCount, offset, buffer_state.get());
Lockee68ac652019-05-06 10:17:33 -06001604 }
Jasper St. Pierre512613a2019-04-08 16:25:23 -07001605 return skip;
1606}