Lionel Landwerlin | 2d9f563 | 2022-01-08 01:12:47 +0200 | [diff] [blame] | 1 | /* 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. |
Shannon McPherson | cfb16b5 | 2021-01-04 14:24:40 -0700 | [diff] [blame] | 5 | * Modifications Copyright (C) 2020-2021 Advanced Micro Devices, Inc. All rights reserved. |
Jasper St. Pierre | 512613a | 2019-04-08 16:25:23 -0700 | [diff] [blame] | 6 | * |
| 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 Kniager | e682743 | 2020-04-01 09:05:56 -0600 | [diff] [blame] | 37 | * Author: Jeremy Kniager <jeremyk@lunarg.com> |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 38 | * Author: Nathaniel Cesario <nathaniel@lunarg.com> |
Tobias Hector | 6663c9b | 2020-11-05 10:18:02 +0000 | [diff] [blame] | 39 | * Author: Tobias Hector <tobias.hector@amd.com> |
Jasper St. Pierre | 512613a | 2019-04-08 16:25:23 -0700 | [diff] [blame] | 40 | */ |
| 41 | |
Jasper St. Pierre | 512613a | 2019-04-08 16:25:23 -0700 | [diff] [blame] | 42 | #include "chassis.h" |
| 43 | #include "core_validation.h" |
| 44 | |
Spencer Fricke | 507600b | 2020-03-22 13:23:06 -0700 | [diff] [blame] | 45 | // clang-format off |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 46 | struct DispatchVuidsCmdDraw : DrawDispatchVuid { |
| 47 | DispatchVuidsCmdDraw() : DrawDispatchVuid() { |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 48 | 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 Daniell | a7f93b6 | 2021-11-20 12:32:04 -0700 | [diff] [blame] | 65 | push_constants_set = "VUID-vkCmdDraw-maintenance4-06425"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 66 | image_subresources = "VUID-vkCmdDraw-None-04584"; |
| 67 | descriptor_valid = "VUID-vkCmdDraw-None-02699"; |
| 68 | sampler_imageview_type = "VUID-vkCmdDraw-None-02702"; |
| 69 | sampler_implicitLod_dref_proj = "VUID-vkCmdDraw-None-02703"; |
| 70 | sampler_bias_offset = "VUID-vkCmdDraw-None-02704"; |
| 71 | vertex_binding_attribute = "VUID-vkCmdDraw-None-02721"; |
| 72 | dynamic_state_setting_commands = "VUID-vkCmdDraw-None-02859"; |
sfricke-samsung | 962d6f0 | 2021-04-03 20:28:59 -0700 | [diff] [blame] | 73 | rasterization_samples = "VUID-vkCmdDraw-rasterizationSamples-04740"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 74 | unprotected_command_buffer = "VUID-vkCmdDraw-commandBuffer-02707"; |
| 75 | protected_command_buffer = "VUID-vkCmdDraw-commandBuffer-02712"; |
| 76 | max_multiview_instance_index = "VUID-vkCmdDraw-maxMultiviewInstanceIndex-02688"; |
Mark Lobodzinski | f786b41 | 2020-11-30 12:16:17 -0700 | [diff] [blame] | 77 | img_filter_cubic = "VUID-vkCmdDraw-None-02693"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 78 | filter_cubic = "VUID-vkCmdDraw-filterCubic-02694"; |
| 79 | filter_cubic_min_max = "VUID-vkCmdDraw-filterCubicMinmax-02695"; |
Tobias Hector | 6663c9b | 2020-11-05 10:18:02 +0000 | [diff] [blame] | 80 | viewport_count_primitive_shading_rate = "VUID-vkCmdDraw-primitiveFragmentShadingRateWithMultipleViewports-04552"; |
Vikram Kushwaha | a57b0c3 | 2021-04-19 12:21:46 -0700 | [diff] [blame] | 81 | patch_control_points = "VUID-vkCmdDraw-None-04875"; |
| 82 | rasterizer_discard_enable = "VUID-vkCmdDraw-None-04876"; |
| 83 | depth_bias_enable = "VUID-vkCmdDraw-None-04877"; |
| 84 | logic_op = "VUID-vkCmdDraw-logicOp-04878"; |
| 85 | primitive_restart_enable = "VUID-vkCmdDraw-None-04879"; |
Piers Daniell | 924cd83 | 2021-05-18 13:48:47 -0600 | [diff] [blame] | 86 | vertex_input_binding_stride = "VUID-vkCmdDraw-pStrides-04884"; |
| 87 | vertex_input = kVUID_Core_CmdDraw_VertexInput; |
ziga-lunarg | 8d62f95 | 2021-08-30 16:47:25 +0200 | [diff] [blame] | 88 | blend_enable = "VUID-vkCmdDraw-blendEnable-04727"; |
Aaron Hagan | 92a44f8 | 2021-11-19 09:34:56 -0500 | [diff] [blame] | 89 | dynamic_rendering_view_mask = "VUID-vkCmdDraw-viewMask-06178"; |
| 90 | dynamic_rendering_color_count = "VUID-vkCmdDraw-colorAttachmentCount-06179"; |
| 91 | dynamic_rendering_color_formats = "VUID-vkCmdDraw-colorAttachmentCount-06180"; |
| 92 | dynamic_rendering_depth_format = "VUID-vkCmdDraw-pDepthAttachment-06181"; |
| 93 | dynamic_rendering_stencil_format = "VUID-vkCmdDraw-pStencilAttachment-06182"; |
| 94 | dynamic_rendering_fsr = "VUID-vkCmdDraw-imageView-06183"; |
| 95 | dynamic_rendering_fdm = "VUID-vkCmdDraw-imageView-06184"; |
Aaron Hagan | 09a0e17 | 2021-11-19 21:18:33 -0500 | [diff] [blame] | 96 | dynamic_rendering_color_sample = "VUID-vkCmdDraw-colorAttachmentCount-06185"; |
| 97 | dynamic_rendering_depth_sample = "VUID-vkCmdDraw-pDepthAttachment-06186"; |
| 98 | dynamic_rendering_stencil_sample = "VUID-vkCmdDraw-pStencilAttachment-06187"; |
| 99 | dynamic_rendering_multi_sample = "VUID-vkCmdDraw-colorAttachmentCount-06188"; |
Aaron Hagan | aca5044 | 2021-12-07 22:26:29 -0500 | [diff] [blame] | 100 | dynamic_rendering_06189 = "VUID-vkCmdDraw-pDepthAttachment-06189"; |
| 101 | dynamic_rendering_06190 = "VUID-vkCmdDraw-pStencilAttachment-06190"; |
| 102 | dynamic_rendering_06198 = "VUID-vkCmdDraw-renderPass-06198"; |
Lionel Landwerlin | 88423cb | 2021-12-07 15:31:02 +0200 | [diff] [blame^] | 103 | storage_image_read_without_format = "VUID-vkCmdDraw-OpTypeImage-06424"; |
| 104 | storage_image_write_without_format = "VUID-vkCmdDraw-OpTypeImage-06423"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 105 | } |
| 106 | }; |
| 107 | |
Tony-LunarG | 4490de4 | 2021-06-21 15:49:19 -0600 | [diff] [blame] | 108 | struct DispatchVuidsCmdDrawMultiEXT : DrawDispatchVuid { |
| 109 | DispatchVuidsCmdDrawMultiEXT() : DrawDispatchVuid() { |
| 110 | pipeline_bound = "VUID-vkCmdDrawMultiEXT-None-02700"; |
| 111 | dynamic_state = "VUID-vkCmdDrawMultiEXT-commandBuffer-02701"; |
| 112 | vertex_binding = "VUID-vkCmdDrawMultiEXT-None-04007"; |
| 113 | vertex_binding_null = "VUID-vkCmdDrawMultiEXT-None-04008"; |
| 114 | compatible_pipeline = "VUID-vkCmdDrawMultiEXT-None-02697"; |
| 115 | render_pass_compatible = "VUID-vkCmdDrawMultiEXT-renderPass-02684"; |
| 116 | subpass_index = "VUID-vkCmdDrawMultiEXT-subpass-02685"; |
| 117 | sample_location = "VUID-vkCmdDrawMultiEXT-sampleLocationsEnable-02689"; |
| 118 | linear_sampler = "VUID-vkCmdDrawMultiEXT-magFilter-04553"; |
| 119 | cubic_sampler = "VUID-vkCmdDrawMultiEXT-None-02692"; |
| 120 | viewport_count = "VUID-vkCmdDrawMultiEXT-viewportCount-03417"; |
| 121 | scissor_count = "VUID-vkCmdDrawMultiEXT-scissorCount-03418"; |
| 122 | viewport_scissor_count = "VUID-vkCmdDrawMultiEXT-viewportCount-03419"; |
| 123 | primitive_topology = "VUID-vkCmdDrawMultiEXT-primitiveTopology-03420"; |
| 124 | corner_sampled_address_mode = "VUID-vkCmdDrawMultiEXT-flags-02696"; |
| 125 | subpass_input = "VUID-vkCmdDrawMultiEXT-None-02686"; |
| 126 | imageview_atomic = "VUID-vkCmdDrawMultiEXT-None-02691"; |
Piers Daniell | a7f93b6 | 2021-11-20 12:32:04 -0700 | [diff] [blame] | 127 | push_constants_set = "VUID-vkCmdDrawMultiEXT-maintenance4-06425"; |
Tony-LunarG | 4490de4 | 2021-06-21 15:49:19 -0600 | [diff] [blame] | 128 | image_subresources = "VUID-vkCmdDrawMultiEXT-None-04584"; |
| 129 | descriptor_valid = "VUID-vkCmdDrawMultiEXT-None-02699"; |
| 130 | sampler_imageview_type = "VUID-vkCmdDrawMultiEXT-None-02702"; |
| 131 | sampler_implicitLod_dref_proj = "VUID-vkCmdDrawMultiEXT-None-02703"; |
| 132 | sampler_bias_offset = "VUID-vkCmdDrawMultiEXT-None-02704"; |
| 133 | vertex_binding_attribute = "VUID-vkCmdDrawMultiEXT-None-02721"; |
| 134 | dynamic_state_setting_commands = "VUID-vkCmdDrawMultiEXT-None-02859"; |
| 135 | rasterization_samples = "VUID-vkCmdDrawMultiEXT-rasterizationSamples-04740"; |
| 136 | unprotected_command_buffer = "VUID-vkCmdDrawMultiEXT-commandBuffer-02707"; |
| 137 | protected_command_buffer = "VUID-vkCmdDrawMultiEXT-commandBuffer-02712"; |
| 138 | max_multiview_instance_index = "VUID-vkCmdDrawMultiEXT-maxMultiviewInstanceIndex-02688"; |
| 139 | img_filter_cubic = "VUID-vkCmdDrawMultiEXT-None-02693"; |
| 140 | filter_cubic = "VUID-vkCmdDrawMultiEXT-filterCubic-02694"; |
| 141 | filter_cubic_min_max = "VUID-vkCmdDrawMultiEXT-filterCubicMinmax-02695"; |
| 142 | viewport_count_primitive_shading_rate = "VUID-vkCmdDrawMultiEXT-primitiveFragmentShadingRateWithMultipleViewports-04552"; |
| 143 | patch_control_points = "VUID-vkCmdDrawMultiEXT-None-04875"; |
| 144 | rasterizer_discard_enable = "VUID-vkCmdDrawMultiEXT-None-04876"; |
| 145 | depth_bias_enable = "VUID-vkCmdDrawMultiEXT-None-04877"; |
| 146 | logic_op = "VUID-vkCmdDrawMultiEXT-logicOp-04878"; |
| 147 | primitive_restart_enable = "VUID-vkCmdDrawMultiEXT-None-04879"; |
| 148 | vertex_input_binding_stride = "VUID-vkCmdDrawMultiEXT-pStrides-04884"; |
| 149 | vertex_input = kVUID_Core_CmdDrawMultiEXT_VertexInput; |
ziga-lunarg | 8d62f95 | 2021-08-30 16:47:25 +0200 | [diff] [blame] | 150 | blend_enable = "VUID-vkCmdDrawMultiEXT-blendEnable-04727"; |
Aaron Hagan | 92a44f8 | 2021-11-19 09:34:56 -0500 | [diff] [blame] | 151 | dynamic_rendering_view_mask = "VUID-vkCmdDrawMultiEXT-viewMask-06178"; |
| 152 | dynamic_rendering_color_count = "VUID-vkCmdDrawMultiEXT-colorAttachmentCount-06179"; |
| 153 | dynamic_rendering_color_formats = "VUID-vkCmdDrawMultiEXT-colorAttachmentCount-06180"; |
| 154 | dynamic_rendering_depth_format = "VUID-vkCmdDrawMultiEXT-pDepthAttachment-06181"; |
| 155 | dynamic_rendering_stencil_format = "VUID-vkCmdDrawMultiEXT-pStencilAttachment-06182"; |
| 156 | dynamic_rendering_fsr = "VUID-vkCmdDrawMultiEXT-imageView-06183"; |
| 157 | dynamic_rendering_fdm = "VUID-vkCmdDrawMultiEXT-imageView-06184"; |
Aaron Hagan | 09a0e17 | 2021-11-19 21:18:33 -0500 | [diff] [blame] | 158 | dynamic_rendering_color_sample = "VUID-vkCmdDrawMultiEXT-colorAttachmentCount-06185"; |
| 159 | dynamic_rendering_depth_sample = "VUID-vkCmdDrawMultiEXT-pDepthAttachment-06186"; |
| 160 | dynamic_rendering_stencil_sample = "VUID-vkCmdDrawMultiEXT-pStencilAttachment-06187"; |
| 161 | dynamic_rendering_multi_sample = "VUID-vkCmdDrawMultiEXT-colorAttachmentCount-06188"; |
Aaron Hagan | aca5044 | 2021-12-07 22:26:29 -0500 | [diff] [blame] | 162 | dynamic_rendering_06189 = "VUID-vkCmdDrawMultiEXT-pDepthAttachment-06189"; |
| 163 | dynamic_rendering_06190 = "VUID-vkCmdDrawMultiEXT-pStencilAttachment-06190"; |
| 164 | dynamic_rendering_06198 = "VUID-vkCmdDrawMultiEXT-renderPass-06198"; |
Lionel Landwerlin | 88423cb | 2021-12-07 15:31:02 +0200 | [diff] [blame^] | 165 | storage_image_read_without_format = "VUID-vkCmdDrawMultiEXT-OpTypeImage-06424"; |
| 166 | storage_image_write_without_format = "VUID-vkCmdDrawMultiEXT-OpTypeImage-06423"; |
Tony-LunarG | 4490de4 | 2021-06-21 15:49:19 -0600 | [diff] [blame] | 167 | } |
| 168 | }; |
| 169 | |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 170 | struct DispatchVuidsCmdDrawIndexed : DrawDispatchVuid { |
| 171 | DispatchVuidsCmdDrawIndexed() : DrawDispatchVuid() { |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 172 | pipeline_bound = "VUID-vkCmdDrawIndexed-None-02700"; |
| 173 | dynamic_state = "VUID-vkCmdDrawIndexed-commandBuffer-02701"; |
| 174 | vertex_binding = "VUID-vkCmdDrawIndexed-None-04007"; |
| 175 | vertex_binding_null = "VUID-vkCmdDrawIndexed-None-04008"; |
| 176 | compatible_pipeline = "VUID-vkCmdDrawIndexed-None-02697"; |
| 177 | render_pass_compatible = "VUID-vkCmdDrawIndexed-renderPass-02684"; |
| 178 | subpass_index = "VUID-vkCmdDrawIndexed-subpass-02685"; |
| 179 | sample_location = "VUID-vkCmdDrawIndexed-sampleLocationsEnable-02689"; |
| 180 | linear_sampler = "VUID-vkCmdDrawIndexed-magFilter-04553"; |
| 181 | cubic_sampler = "VUID-vkCmdDrawIndexed-None-02692"; |
| 182 | viewport_count = "VUID-vkCmdDrawIndexed-viewportCount-03417"; |
| 183 | scissor_count = "VUID-vkCmdDrawIndexed-scissorCount-03418"; |
| 184 | viewport_scissor_count = "VUID-vkCmdDrawIndexed-viewportCount-03419"; |
| 185 | primitive_topology = "VUID-vkCmdDrawIndexed-primitiveTopology-03420"; |
| 186 | corner_sampled_address_mode = "VUID-vkCmdDrawIndexed-flags-02696"; |
| 187 | subpass_input = "VUID-vkCmdDrawIndexed-None-02686"; |
| 188 | imageview_atomic = "VUID-vkCmdDrawIndexed-None-02691"; |
Piers Daniell | a7f93b6 | 2021-11-20 12:32:04 -0700 | [diff] [blame] | 189 | push_constants_set = "VUID-vkCmdDrawIndexed-maintenance4-06425"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 190 | image_subresources = "VUID-vkCmdDrawIndexed-None-04584"; |
| 191 | descriptor_valid = "VUID-vkCmdDrawIndexed-None-02699"; |
| 192 | sampler_imageview_type = "VUID-vkCmdDrawIndexed-None-02702"; |
| 193 | sampler_implicitLod_dref_proj = "VUID-vkCmdDrawIndexed-None-02703"; |
| 194 | sampler_bias_offset = "VUID-vkCmdDrawIndexed-None-02704"; |
| 195 | vertex_binding_attribute = "VUID-vkCmdDrawIndexed-None-02721"; |
| 196 | dynamic_state_setting_commands = "VUID-vkCmdDrawIndexed-None-02859"; |
sfricke-samsung | 962d6f0 | 2021-04-03 20:28:59 -0700 | [diff] [blame] | 197 | rasterization_samples = "VUID-vkCmdDrawIndexed-rasterizationSamples-04740"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 198 | unprotected_command_buffer = "VUID-vkCmdDrawIndexed-commandBuffer-02707"; |
| 199 | protected_command_buffer = "VUID-vkCmdDrawIndexed-commandBuffer-02712"; |
| 200 | max_multiview_instance_index = "VUID-vkCmdDrawIndexed-maxMultiviewInstanceIndex-02688"; |
Mark Lobodzinski | f786b41 | 2020-11-30 12:16:17 -0700 | [diff] [blame] | 201 | img_filter_cubic = "VUID-vkCmdDrawIndexed-None-02693"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 202 | filter_cubic = "VUID-vkCmdDrawIndexed-filterCubic-02694"; |
| 203 | filter_cubic_min_max = "VUID-vkCmdDrawIndexed-filterCubicMinmax-02695"; |
Tobias Hector | 6663c9b | 2020-11-05 10:18:02 +0000 | [diff] [blame] | 204 | viewport_count_primitive_shading_rate = "VUID-vkCmdDrawIndexed-primitiveFragmentShadingRateWithMultipleViewports-04552"; |
Piers Daniell | 924cd83 | 2021-05-18 13:48:47 -0600 | [diff] [blame] | 205 | patch_control_points = "VUID-vkCmdDrawIndexed-None-04875"; |
| 206 | rasterizer_discard_enable = "VUID-vkCmdDrawIndexed-None-04876"; |
| 207 | depth_bias_enable = "VUID-vkCmdDrawIndexed-None-04877"; |
| 208 | logic_op = "VUID-vkCmdDrawIndexed-logicOp-04878"; |
| 209 | primitive_restart_enable = "VUID-vkCmdDrawIndexed-None-04879"; |
| 210 | vertex_input_binding_stride = "VUID-vkCmdDrawIndexed-pStrides-04884"; |
| 211 | vertex_input = kVUID_Core_CmdDrawIndexed_VertexInput; |
ziga-lunarg | 8d62f95 | 2021-08-30 16:47:25 +0200 | [diff] [blame] | 212 | blend_enable = "VUID-vkCmdDrawIndexed-blendEnable-04727"; |
Aaron Hagan | 92a44f8 | 2021-11-19 09:34:56 -0500 | [diff] [blame] | 213 | dynamic_rendering_view_mask = "VUID-vkCmdDrawIndexed-viewMask-06178"; |
| 214 | dynamic_rendering_color_count = "VUID-vkCmdDrawIndexed-colorAttachmentCount-06179"; |
| 215 | dynamic_rendering_color_formats = "VUID-vkCmdDrawIndexed-colorAttachmentCount-06180"; |
| 216 | dynamic_rendering_depth_format = "VUID-vkCmdDrawIndexed-pDepthAttachment-06181"; |
| 217 | dynamic_rendering_stencil_format = "VUID-vkCmdDrawIndexed-pStencilAttachment-06182"; |
| 218 | dynamic_rendering_fsr = "VUID-vkCmdDrawIndexed-imageView-06183"; |
| 219 | dynamic_rendering_fdm = "VUID-vkCmdDrawIndexed-imageView-06184"; |
Aaron Hagan | 09a0e17 | 2021-11-19 21:18:33 -0500 | [diff] [blame] | 220 | dynamic_rendering_color_sample = "VUID-vkCmdDrawIndexed-colorAttachmentCount-06185"; |
| 221 | dynamic_rendering_depth_sample = "VUID-vkCmdDrawIndexed-pDepthAttachment-06186"; |
| 222 | dynamic_rendering_stencil_sample = "VUID-vkCmdDrawIndexed-pStencilAttachment-06187"; |
| 223 | dynamic_rendering_multi_sample = "VUID-vkCmdDrawIndexed-colorAttachmentCount-06188"; |
Aaron Hagan | aca5044 | 2021-12-07 22:26:29 -0500 | [diff] [blame] | 224 | dynamic_rendering_06189 = "VUID-vkCmdDrawIndexed-pDepthAttachment-06189"; |
| 225 | dynamic_rendering_06190 = "VUID-vkCmdDrawIndexed-pStencilAttachment-06190"; |
| 226 | dynamic_rendering_06198 = "VUID-vkCmdDrawIndexed-renderPass-06198"; |
Lionel Landwerlin | 88423cb | 2021-12-07 15:31:02 +0200 | [diff] [blame^] | 227 | storage_image_read_without_format = "VUID-vkCmdDrawIndexed-OpTypeImage-06424"; |
| 228 | storage_image_write_without_format = "VUID-vkCmdDrawIndexed-OpTypeImage-06423"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 229 | } |
| 230 | }; |
| 231 | |
Tony-LunarG | 4490de4 | 2021-06-21 15:49:19 -0600 | [diff] [blame] | 232 | struct DispatchVuidsCmdDrawMultiIndexedEXT : DrawDispatchVuid { |
| 233 | DispatchVuidsCmdDrawMultiIndexedEXT() : DrawDispatchVuid() { |
Lionel Landwerlin | 45e981c | 2021-12-07 15:29:40 +0200 | [diff] [blame] | 234 | pipeline_bound = "VUID-vkCmdDrawMultiIndexedEXT-None-02700"; |
| 235 | dynamic_state = "VUID-vkCmdDrawMultiIndexedEXT-commandBuffer-02701"; |
| 236 | vertex_binding = "VUID-vkCmdDrawMultiIndexedEXT-None-04007"; |
| 237 | vertex_binding_null = "VUID-vkCmdDrawMultiIndexedEXT-None-04008"; |
| 238 | compatible_pipeline = "VUID-vkCmdDrawMultiIndexedEXT-None-02697"; |
| 239 | render_pass_compatible = "VUID-vkCmdDrawMultiIndexedEXT-renderPass-02684"; |
| 240 | subpass_index = "VUID-vkCmdDrawMultiIndexedEXT-subpass-02685"; |
| 241 | sample_location = "VUID-vkCmdDrawMultiIndexedEXT-sampleLocationsEnable-02689"; |
| 242 | linear_sampler = "VUID-vkCmdDrawMultiIndexedEXT-magFilter-04553"; |
| 243 | cubic_sampler = "VUID-vkCmdDrawMultiIndexedEXT-None-02692"; |
| 244 | viewport_count = "VUID-vkCmdDrawMultiIndexedEXT-viewportCount-03417"; |
| 245 | scissor_count = "VUID-vkCmdDrawMultiIndexedEXT-scissorCount-03418"; |
| 246 | viewport_scissor_count = "VUID-vkCmdDrawMultiIndexedEXT-viewportCount-03419"; |
| 247 | primitive_topology = "VUID-vkCmdDrawMultiIndexedEXT-primitiveTopology-03420"; |
| 248 | corner_sampled_address_mode = "VUID-vkCmdDrawMultiIndexedEXT-flags-02696"; |
| 249 | subpass_input = "VUID-vkCmdDrawMultiIndexedEXT-None-02686"; |
| 250 | imageview_atomic = "VUID-vkCmdDrawMultiIndexedEXT-None-02691"; |
| 251 | push_constants_set = "VUID-vkCmdDrawMultiIndexedEXT-maintenance4-06425"; |
| 252 | image_subresources = "VUID-vkCmdDrawMultiIndexedEXT-None-04584"; |
| 253 | descriptor_valid = "VUID-vkCmdDrawMultiIndexedEXT-None-02699"; |
| 254 | sampler_imageview_type = "VUID-vkCmdDrawMultiIndexedEXT-None-02702"; |
| 255 | sampler_implicitLod_dref_proj = "VUID-vkCmdDrawMultiIndexedEXT-None-02703"; |
| 256 | sampler_bias_offset = "VUID-vkCmdDrawMultiIndexedEXT-None-02704"; |
| 257 | vertex_binding_attribute = "VUID-vkCmdDrawMultiIndexedEXT-None-02721"; |
| 258 | dynamic_state_setting_commands = "VUID-vkCmdDrawMultiIndexedEXT-None-02859"; |
| 259 | rasterization_samples = "VUID-vkCmdDrawMultiIndexedEXT-rasterizationSamples-04740"; |
| 260 | unprotected_command_buffer = "VUID-vkCmdDrawMultiIndexedEXT-commandBuffer-02707"; |
| 261 | protected_command_buffer = "VUID-vkCmdDrawMultiIndexedEXT-commandBuffer-02712"; |
| 262 | max_multiview_instance_index = "VUID-vkCmdDrawMultiIndexedEXT-maxMultiviewInstanceIndex-02688"; |
| 263 | img_filter_cubic = "VUID-vkCmdDrawMultiIndexedEXT-None-02693"; |
| 264 | filter_cubic = "VUID-vkCmdDrawMultiIndexedEXT-filterCubic-02694"; |
| 265 | filter_cubic_min_max = "VUID-vkCmdDrawMultiIndexedEXT-filterCubicMinmax-02695"; |
Tony-LunarG | 4490de4 | 2021-06-21 15:49:19 -0600 | [diff] [blame] | 266 | viewport_count_primitive_shading_rate = "VUID-vkCmdDrawMultiIndexedEXT-primitiveFragmentShadingRateWithMultipleViewports-04552"; |
Lionel Landwerlin | 45e981c | 2021-12-07 15:29:40 +0200 | [diff] [blame] | 267 | patch_control_points = "VUID-vkCmdDrawMultiIndexedEXT-None-04875"; |
| 268 | rasterizer_discard_enable = "VUID-vkCmdDrawMultiIndexedEXT-None-04876"; |
| 269 | depth_bias_enable = "VUID-vkCmdDrawMultiIndexedEXT-None-04877"; |
| 270 | logic_op = "VUID-vkCmdDrawMultiIndexedEXT-logicOp-04878"; |
| 271 | primitive_restart_enable = "VUID-vkCmdDrawMultiIndexedEXT-None-04879"; |
| 272 | vertex_input_binding_stride = "VUID-vkCmdDrawMultiIndexedEXT-pStrides-04884"; |
| 273 | vertex_input = kVUID_Core_CmdDrawMultiIndexedEXT_VertexInput; |
| 274 | blend_enable = "VUID-vkCmdDrawMultiIndexedEXT-blendEnable-04727"; |
| 275 | dynamic_rendering_view_mask = "VUID-vkCmdDrawMultiIndexedEXT-viewMask-06178"; |
| 276 | dynamic_rendering_color_count = "VUID-vkCmdDrawMultiIndexedEXT-colorAttachmentCount-06179"; |
| 277 | dynamic_rendering_color_formats = "VUID-vkCmdDrawMultiIndexedEXT-colorAttachmentCount-06180"; |
| 278 | dynamic_rendering_depth_format = "VUID-vkCmdDrawMultiIndexedEXT-pDepthAttachment-06181"; |
| 279 | dynamic_rendering_stencil_format = "VUID-vkCmdDrawMultiIndexedEXT-pStencilAttachment-06182"; |
| 280 | dynamic_rendering_fsr = "VUID-vkCmdDrawMultiIndexedEXT-imageView-06183"; |
| 281 | dynamic_rendering_fdm = "VUID-vkCmdDrawMultiIndexedEXT-imageView-06184"; |
| 282 | dynamic_rendering_color_sample = "VUID-vkCmdDrawMultiIndexedEXT-colorAttachmentCount-06185"; |
| 283 | dynamic_rendering_depth_sample = "VUID-vkCmdDrawMultiIndexedEXT-pDepthAttachment-06186"; |
| 284 | dynamic_rendering_stencil_sample = "VUID-vkCmdDrawMultiIndexedEXT-pStencilAttachment-06187"; |
| 285 | dynamic_rendering_multi_sample = "VUID-vkCmdDrawMultiIndexedEXT-colorAttachmentCount-06188"; |
| 286 | dynamic_rendering_06189 = "VUID-vkCmdDrawIndexedIndirect-pDepthAttachment-06189"; |
| 287 | dynamic_rendering_06190 = "VUID-vkCmdDrawIndexedIndirect-pStencilAttachment-06190"; |
| 288 | dynamic_rendering_06198 = "VUID-vkCmdDrawIndexedIndirect-renderPass-06198"; |
Lionel Landwerlin | 88423cb | 2021-12-07 15:31:02 +0200 | [diff] [blame^] | 289 | storage_image_read_without_format = "VUID-vkCmdDrawMultiIndexedEXT-OpTypeImage-06424"; |
| 290 | storage_image_write_without_format = "VUID-vkCmdDrawMultiIndexedEXT-OpTypeImage-06423"; |
Tony-LunarG | 4490de4 | 2021-06-21 15:49:19 -0600 | [diff] [blame] | 291 | } |
| 292 | }; |
| 293 | |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 294 | struct DispatchVuidsCmdDrawIndirect : DrawDispatchVuid { |
| 295 | DispatchVuidsCmdDrawIndirect() : DrawDispatchVuid() { |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 296 | pipeline_bound = "VUID-vkCmdDrawIndirect-None-02700"; |
| 297 | dynamic_state = "VUID-vkCmdDrawIndirect-commandBuffer-02701"; |
| 298 | vertex_binding = "VUID-vkCmdDrawIndirect-None-04007"; |
| 299 | vertex_binding_null = "VUID-vkCmdDrawIndirect-None-04008"; |
| 300 | compatible_pipeline = "VUID-vkCmdDrawIndirect-None-02697"; |
| 301 | render_pass_compatible = "VUID-vkCmdDrawIndirect-renderPass-02684"; |
| 302 | subpass_index = "VUID-vkCmdDrawIndirect-subpass-02685"; |
| 303 | sample_location = "VUID-vkCmdDrawIndirect-sampleLocationsEnable-02689"; |
| 304 | linear_sampler = "VUID-vkCmdDrawIndirect-magFilter-04553"; |
| 305 | cubic_sampler = "VUID-vkCmdDrawIndirect-None-02692"; |
| 306 | indirect_protected_cb = "VUID-vkCmdDrawIndirect-commandBuffer-02711"; |
| 307 | indirect_contiguous_memory = "VUID-vkCmdDrawIndirect-buffer-02708"; |
| 308 | indirect_buffer_bit = "VUID-vkCmdDrawIndirect-buffer-02709"; |
| 309 | viewport_count = "VUID-vkCmdDrawIndirect-viewportCount-03417"; |
| 310 | scissor_count = "VUID-vkCmdDrawIndirect-scissorCount-03418"; |
| 311 | viewport_scissor_count = "VUID-vkCmdDrawIndirect-viewportCount-03419"; |
| 312 | primitive_topology = "VUID-vkCmdDrawIndirect-primitiveTopology-03420"; |
| 313 | corner_sampled_address_mode = "VUID-vkCmdDrawIndirect-flags-02696"; |
| 314 | subpass_input = "VUID-vkCmdDrawIndirect-None-02686"; |
| 315 | imageview_atomic = "VUID-vkCmdDrawIndirect-None-02691"; |
Piers Daniell | a7f93b6 | 2021-11-20 12:32:04 -0700 | [diff] [blame] | 316 | push_constants_set = "VUID-vkCmdDrawIndirect-maintenance4-06425"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 317 | image_subresources = "VUID-vkCmdDrawIndirect-None-04584"; |
| 318 | descriptor_valid = "VUID-vkCmdDrawIndirect-None-02699"; |
| 319 | sampler_imageview_type = "VUID-vkCmdDrawIndirect-None-02702"; |
| 320 | sampler_implicitLod_dref_proj = "VUID-vkCmdDrawIndirect-None-02703"; |
| 321 | sampler_bias_offset = "VUID-vkCmdDrawIndirect-None-02704"; |
| 322 | vertex_binding_attribute = "VUID-vkCmdDrawIndirect-None-02721"; |
| 323 | dynamic_state_setting_commands = "VUID-vkCmdDrawIndirect-None-02859"; |
sfricke-samsung | 962d6f0 | 2021-04-03 20:28:59 -0700 | [diff] [blame] | 324 | rasterization_samples = "VUID-vkCmdDrawIndirect-rasterizationSamples-04740"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 325 | unprotected_command_buffer = "VUID-vkCmdDrawIndirect-commandBuffer-02707"; |
| 326 | max_multiview_instance_index = "VUID-vkCmdDrawIndirect-maxMultiviewInstanceIndex-02688"; |
Mark Lobodzinski | f786b41 | 2020-11-30 12:16:17 -0700 | [diff] [blame] | 327 | img_filter_cubic = "VUID-vkCmdDrawIndirect-None-02693"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 328 | filter_cubic = "VUID-vkCmdDrawIndirect-filterCubic-02694"; |
| 329 | filter_cubic_min_max = "VUID-vkCmdDrawIndirect-filterCubicMinmax-02695"; |
Tobias Hector | 6663c9b | 2020-11-05 10:18:02 +0000 | [diff] [blame] | 330 | viewport_count_primitive_shading_rate = "VUID-vkCmdDrawIndirect-primitiveFragmentShadingRateWithMultipleViewports-04552"; |
Piers Daniell | 924cd83 | 2021-05-18 13:48:47 -0600 | [diff] [blame] | 331 | patch_control_points = "VUID-vkCmdDrawIndirect-None-04875"; |
| 332 | rasterizer_discard_enable = "VUID-vkCmdDrawIndirect-None-04876"; |
| 333 | depth_bias_enable = "VUID-vkCmdDrawIndirect-None-04877"; |
| 334 | logic_op = "VUID-vkCmdDrawIndirect-logicOp-04878"; |
| 335 | primitive_restart_enable = "VUID-vkCmdDrawIndirect-None-04879"; |
| 336 | vertex_input_binding_stride = "VUID-vkCmdDrawIndirect-pStrides-04884"; |
| 337 | vertex_input = kVUID_Core_CmdDrawIndirect_VertexInput; |
ziga-lunarg | 8d62f95 | 2021-08-30 16:47:25 +0200 | [diff] [blame] | 338 | blend_enable = "VUID-vkCmdDrawIndirect-blendEnable-04727"; |
Aaron Hagan | 92a44f8 | 2021-11-19 09:34:56 -0500 | [diff] [blame] | 339 | dynamic_rendering_view_mask = "VUID-vkCmdDrawIndirect-viewMask-06178"; |
| 340 | dynamic_rendering_color_count = "VUID-vkCmdDrawIndirect-colorAttachmentCount-06179"; |
| 341 | dynamic_rendering_color_formats = "VUID-vkCmdDrawIndirect-colorAttachmentCount-06180"; |
| 342 | dynamic_rendering_depth_format = "VUID-vkCmdDrawIndirect-pDepthAttachment-06181"; |
| 343 | dynamic_rendering_stencil_format = "VUID-vkCmdDrawIndirect-pStencilAttachment-06182"; |
| 344 | dynamic_rendering_fsr = "VUID-vkCmdDrawIndirect-imageView-06183"; |
| 345 | dynamic_rendering_fdm = "VUID-vkCmdDrawIndirect-imageView-06184"; |
Aaron Hagan | 09a0e17 | 2021-11-19 21:18:33 -0500 | [diff] [blame] | 346 | dynamic_rendering_color_sample = "VUID-vkCmdDrawIndirect-colorAttachmentCount-06185"; |
| 347 | dynamic_rendering_depth_sample = "VUID-vkCmdDrawIndirect-pDepthAttachment-06186"; |
| 348 | dynamic_rendering_stencil_sample = "VUID-vkCmdDrawIndirect-pStencilAttachment-06187"; |
| 349 | dynamic_rendering_multi_sample = "VUID-vkCmdDrawIndirect-colorAttachmentCount-06188"; |
Aaron Hagan | aca5044 | 2021-12-07 22:26:29 -0500 | [diff] [blame] | 350 | dynamic_rendering_06189 = "VUID-vkCmdDrawIndirect-pDepthAttachment-06189"; |
| 351 | dynamic_rendering_06190 = "VUID-vkCmdDrawIndirect-pStencilAttachment-06190"; |
| 352 | dynamic_rendering_06198 = "VUID-vkCmdDrawIndirect-renderPass-06198"; |
Lionel Landwerlin | 88423cb | 2021-12-07 15:31:02 +0200 | [diff] [blame^] | 353 | storage_image_read_without_format = "VUID-vkCmdDrawIndirect-OpTypeImage-06424"; |
| 354 | storage_image_write_without_format = "VUID-vkCmdDrawIndirect-OpTypeImage-06423"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 355 | } |
| 356 | }; |
| 357 | |
| 358 | struct DispatchVuidsCmdDrawIndexedIndirect : DrawDispatchVuid { |
| 359 | DispatchVuidsCmdDrawIndexedIndirect() : DrawDispatchVuid() { |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 360 | pipeline_bound = "VUID-vkCmdDrawIndexedIndirect-None-02700"; |
| 361 | dynamic_state = "VUID-vkCmdDrawIndexedIndirect-commandBuffer-02701"; |
| 362 | vertex_binding = "VUID-vkCmdDrawIndexedIndirect-None-04007"; |
| 363 | vertex_binding_null = "VUID-vkCmdDrawIndexedIndirect-None-04008"; |
| 364 | compatible_pipeline = "VUID-vkCmdDrawIndexedIndirect-None-02697"; |
| 365 | render_pass_compatible = "VUID-vkCmdDrawIndexedIndirect-renderPass-02684"; |
| 366 | subpass_index = "VUID-vkCmdDrawIndexedIndirect-subpass-02685"; |
| 367 | sample_location = "VUID-vkCmdDrawIndexedIndirect-sampleLocationsEnable-02689"; |
| 368 | linear_sampler = "VUID-vkCmdDrawIndexedIndirect-magFilter-04553"; |
| 369 | cubic_sampler = "VUID-vkCmdDrawIndexedIndirect-None-02692"; |
| 370 | indirect_protected_cb = "VUID-vkCmdDrawIndexedIndirect-commandBuffer-02711"; |
| 371 | indirect_contiguous_memory = "VUID-vkCmdDrawIndexedIndirect-buffer-02708"; |
| 372 | indirect_buffer_bit = "VUID-vkCmdDrawIndexedIndirect-buffer-02709"; |
| 373 | viewport_count = "VUID-vkCmdDrawIndexedIndirect-viewportCount-03417"; |
| 374 | scissor_count = "VUID-vkCmdDrawIndexedIndirect-scissorCount-03418"; |
| 375 | viewport_scissor_count = "VUID-vkCmdDrawIndexedIndirect-viewportCount-03419"; |
| 376 | primitive_topology = "VUID-vkCmdDrawIndexedIndirect-primitiveTopology-03420"; |
| 377 | corner_sampled_address_mode = "VUID-vkCmdDrawIndexedIndirect-flags-02696"; |
| 378 | subpass_input = "VUID-vkCmdDrawIndexedIndirect-None-02686"; |
| 379 | imageview_atomic = "VUID-vkCmdDrawIndexedIndirect-None-02691"; |
Piers Daniell | a7f93b6 | 2021-11-20 12:32:04 -0700 | [diff] [blame] | 380 | push_constants_set = "VUID-vkCmdDrawIndexedIndirect-maintenance4-06425"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 381 | image_subresources = "VUID-vkCmdDrawIndexedIndirect-None-04584"; |
| 382 | descriptor_valid = "VUID-vkCmdDrawIndexedIndirect-None-02699"; |
| 383 | sampler_imageview_type = "VUID-vkCmdDrawIndexedIndirect-None-02702"; |
| 384 | sampler_implicitLod_dref_proj = "VUID-vkCmdDrawIndexedIndirect-None-02703"; |
| 385 | sampler_bias_offset = "VUID-vkCmdDrawIndexedIndirect-None-02704"; |
| 386 | vertex_binding_attribute = "VUID-vkCmdDrawIndexedIndirect-None-02721"; |
| 387 | dynamic_state_setting_commands = "VUID-vkCmdDrawIndexedIndirect-None-02859"; |
sfricke-samsung | 962d6f0 | 2021-04-03 20:28:59 -0700 | [diff] [blame] | 388 | rasterization_samples = "VUID-vkCmdDrawIndexedIndirect-rasterizationSamples-04740"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 389 | unprotected_command_buffer = "VUID-vkCmdDrawIndexedIndirect-commandBuffer-02707"; |
| 390 | max_multiview_instance_index = "VUID-vkCmdDrawIndexedIndirect-maxMultiviewInstanceIndex-02688"; |
Mark Lobodzinski | f786b41 | 2020-11-30 12:16:17 -0700 | [diff] [blame] | 391 | img_filter_cubic = "VUID-vkCmdDrawIndexedIndirect-None-02693"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 392 | filter_cubic = "VUID-vkCmdDrawIndexedIndirect-filterCubic-02694"; |
| 393 | filter_cubic_min_max = "VUID-vkCmdDrawIndexedIndirect-filterCubicMinmax-02695"; |
Tobias Hector | 6663c9b | 2020-11-05 10:18:02 +0000 | [diff] [blame] | 394 | viewport_count_primitive_shading_rate = "VUID-vkCmdDrawIndexedIndirect-primitiveFragmentShadingRateWithMultipleViewports-04552"; |
Piers Daniell | 924cd83 | 2021-05-18 13:48:47 -0600 | [diff] [blame] | 395 | patch_control_points = "VUID-vkCmdDrawIndexedIndirect-None-04875"; |
| 396 | rasterizer_discard_enable = "VUID-vkCmdDrawIndexedIndirect-None-04876"; |
| 397 | depth_bias_enable = "VUID-vkCmdDrawIndexedIndirect-None-04877"; |
| 398 | logic_op = "VUID-vkCmdDrawIndexedIndirect-logicOp-04878"; |
| 399 | primitive_restart_enable = "VUID-vkCmdDrawIndexedIndirect-None-04879"; |
| 400 | vertex_input_binding_stride = "VUID-vkCmdDrawIndexedIndirect-pStrides-04884"; |
| 401 | vertex_input = kVUID_Core_CmdDrawIndexedIndirect_VertexInput; |
ziga-lunarg | 8d62f95 | 2021-08-30 16:47:25 +0200 | [diff] [blame] | 402 | blend_enable = "VUID-vkCmdDrawIndexedIndirect-blendEnable-04727"; |
Aaron Hagan | 92a44f8 | 2021-11-19 09:34:56 -0500 | [diff] [blame] | 403 | dynamic_rendering_view_mask = "VUID-vkCmdDrawIndexedIndirect-viewMask-06178"; |
| 404 | dynamic_rendering_color_count = "VUID-vkCmdDrawIndexedIndirect-colorAttachmentCount-06179"; |
| 405 | dynamic_rendering_color_formats = "VUID-vkCmdDrawIndexedIndirect-colorAttachmentCount-06180"; |
| 406 | dynamic_rendering_depth_format = "VUID-vkCmdDrawIndexedIndirect-pDepthAttachment-06181"; |
| 407 | dynamic_rendering_stencil_format = "VUID-vkCmdDrawIndexedIndirect-pStencilAttachment-06182"; |
| 408 | dynamic_rendering_fsr = "VUID-vkCmdDrawIndexedIndirect-imageView-06183"; |
| 409 | dynamic_rendering_fdm = "VUID-vkCmdDrawIndexedIndirect-imageView-06184"; |
Aaron Hagan | 09a0e17 | 2021-11-19 21:18:33 -0500 | [diff] [blame] | 410 | dynamic_rendering_color_sample = "VUID-vkCmdDrawIndexedIndirect-colorAttachmentCount-06185"; |
| 411 | dynamic_rendering_depth_sample = "VUID-vkCmdDrawIndexedIndirect-pDepthAttachment-06186"; |
| 412 | dynamic_rendering_stencil_sample = "VUID-vkCmdDrawIndexedIndirect-pStencilAttachment-06187"; |
| 413 | dynamic_rendering_multi_sample = "VUID-vkCmdDrawIndexedIndirect-colorAttachmentCount-06188"; |
Aaron Hagan | aca5044 | 2021-12-07 22:26:29 -0500 | [diff] [blame] | 414 | dynamic_rendering_06189 = "VUID-vkCmdDrawIndexedIndirect-pDepthAttachment-06189"; |
| 415 | dynamic_rendering_06190 = "VUID-vkCmdDrawIndexedIndirect-pStencilAttachment-06190"; |
| 416 | dynamic_rendering_06198 = "VUID-vkCmdDrawIndexedIndirect-renderPass-06198"; |
Lionel Landwerlin | 88423cb | 2021-12-07 15:31:02 +0200 | [diff] [blame^] | 417 | storage_image_read_without_format = "VUID-vkCmdDrawIndexedIndirect-OpTypeImage-06424"; |
| 418 | storage_image_write_without_format = "VUID-vkCmdDrawIndexedIndirect-OpTypeImage-06423"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 419 | } |
| 420 | }; |
| 421 | |
| 422 | struct DispatchVuidsCmdDispatch : DrawDispatchVuid { |
| 423 | DispatchVuidsCmdDispatch() : DrawDispatchVuid() { |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 424 | pipeline_bound = "VUID-vkCmdDispatch-None-02700"; |
Mark Lobodzinski | 02d3755 | 2020-12-28 13:29:46 -0700 | [diff] [blame] | 425 | dynamic_state = "VUID-vkCmdDispatch-commandBuffer-02701"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 426 | compatible_pipeline = "VUID-vkCmdDispatch-None-02697"; |
| 427 | linear_sampler = "VUID-vkCmdDispatch-magFilter-04553"; |
| 428 | cubic_sampler = "VUID-vkCmdDispatch-None-02692"; |
| 429 | corner_sampled_address_mode = "VUID-vkCmdDispatch-flags-02696"; |
| 430 | imageview_atomic = "VUID-vkCmdDispatch-None-02691"; |
Piers Daniell | a7f93b6 | 2021-11-20 12:32:04 -0700 | [diff] [blame] | 431 | push_constants_set = "VUID-vkCmdDispatch-maintenance4-06425"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 432 | descriptor_valid = "VUID-vkCmdDispatch-None-02699"; |
| 433 | sampler_imageview_type = "VUID-vkCmdDispatch-None-02702"; |
| 434 | sampler_implicitLod_dref_proj = "VUID-vkCmdDispatch-None-02703"; |
| 435 | sampler_bias_offset = "VUID-vkCmdDispatch-None-02704"; |
| 436 | dynamic_state_setting_commands = "VUID-vkCmdDispatch-None-02859"; |
| 437 | unprotected_command_buffer = "VUID-vkCmdDispatch-commandBuffer-02707"; |
| 438 | protected_command_buffer = "VUID-vkCmdDispatch-commandBuffer-02712"; |
Mark Lobodzinski | f786b41 | 2020-11-30 12:16:17 -0700 | [diff] [blame] | 439 | img_filter_cubic = "VUID-vkCmdDispatch-None-02693"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 440 | filter_cubic = "VUID-vkCmdDispatch-filterCubic-02694"; |
| 441 | filter_cubic_min_max = "VUID-vkCmdDispatch-filterCubicMinmax-02695"; |
Lionel Landwerlin | 88423cb | 2021-12-07 15:31:02 +0200 | [diff] [blame^] | 442 | storage_image_read_without_format = "VUID-vkCmdDispatch-OpTypeImage-06424"; |
| 443 | storage_image_write_without_format = "VUID-vkCmdDispatch-OpTypeImage-06423"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 444 | } |
| 445 | }; |
| 446 | |
| 447 | struct DispatchVuidsCmdDispatchIndirect : DrawDispatchVuid { |
| 448 | DispatchVuidsCmdDispatchIndirect() : DrawDispatchVuid() { |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 449 | pipeline_bound = "VUID-vkCmdDispatchIndirect-None-02700"; |
Mark Lobodzinski | 02d3755 | 2020-12-28 13:29:46 -0700 | [diff] [blame] | 450 | dynamic_state = "VUID-vkCmdDispatchIndirect-commandBuffer-02701"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 451 | compatible_pipeline = "VUID-vkCmdDispatchIndirect-None-02697"; |
| 452 | linear_sampler = "VUID-vkCmdDispatchIndirect-magFilter-04553"; |
| 453 | cubic_sampler = "VUID-vkCmdDispatchIndirect-None-02692"; |
| 454 | indirect_protected_cb = "VUID-vkCmdDispatchIndirect-commandBuffer-02711"; |
| 455 | indirect_contiguous_memory = "VUID-vkCmdDispatchIndirect-buffer-02708"; |
| 456 | indirect_buffer_bit = "VUID-vkCmdDispatchIndirect-buffer-02709"; |
| 457 | corner_sampled_address_mode = "VUID-vkCmdDispatchIndirect-flags-02696"; |
| 458 | imageview_atomic = "VUID-vkCmdDispatchIndirect-None-02691"; |
Piers Daniell | a7f93b6 | 2021-11-20 12:32:04 -0700 | [diff] [blame] | 459 | push_constants_set = "VUID-vkCmdDispatchIndirect-maintenance4-06425"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 460 | descriptor_valid = "VUID-vkCmdDispatchIndirect-None-02699"; |
| 461 | sampler_imageview_type = "VUID-vkCmdDispatchIndirect-None-02702"; |
| 462 | sampler_implicitLod_dref_proj = "VUID-vkCmdDispatchIndirect-None-02703"; |
| 463 | sampler_bias_offset = "VUID-vkCmdDispatchIndirect-None-02704"; |
| 464 | dynamic_state_setting_commands = "VUID-vkCmdDispatchIndirect-None-02859"; |
| 465 | unprotected_command_buffer = "VUID-vkCmdDispatchIndirect-commandBuffer-02707"; |
Mark Lobodzinski | f786b41 | 2020-11-30 12:16:17 -0700 | [diff] [blame] | 466 | img_filter_cubic = "VUID-vkCmdDispatchIndirect-None-02693"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 467 | filter_cubic = "VUID-vkCmdDispatchIndirect-filterCubic-02694"; |
| 468 | filter_cubic_min_max = "VUID-vkCmdDispatchIndirect-filterCubicMinmax-02695"; |
Lionel Landwerlin | 88423cb | 2021-12-07 15:31:02 +0200 | [diff] [blame^] | 469 | storage_image_read_without_format = "VUID-vkCmdDispatchIndirect-OpTypeImage-06424"; |
| 470 | storage_image_write_without_format = "VUID-vkCmdDispatchIndirect-OpTypeImage-06423"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 471 | } |
| 472 | }; |
| 473 | |
| 474 | struct DispatchVuidsCmdDrawIndirectCount : DrawDispatchVuid { |
| 475 | DispatchVuidsCmdDrawIndirectCount() : DrawDispatchVuid() { |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 476 | pipeline_bound = "VUID-vkCmdDrawIndirectCount-None-02700"; |
| 477 | dynamic_state = "VUID-vkCmdDrawIndirectCount-commandBuffer-02701"; |
| 478 | vertex_binding = "VUID-vkCmdDrawIndirectCount-None-04007"; |
| 479 | vertex_binding_null = "VUID-vkCmdDrawIndirectCount-None-04008"; |
| 480 | compatible_pipeline = "VUID-vkCmdDrawIndirectCount-None-02697"; |
| 481 | render_pass_compatible = "VUID-vkCmdDrawIndirectCount-renderPass-02684"; |
| 482 | subpass_index = "VUID-vkCmdDrawIndirectCount-subpass-02685"; |
| 483 | sample_location = "VUID-vkCmdDrawIndirectCount-sampleLocationsEnable-02689"; |
| 484 | linear_sampler = "VUID-vkCmdDrawIndirectCount-magFilter-04553"; |
| 485 | cubic_sampler = "VUID-vkCmdDrawIndirectCount-None-02692"; |
| 486 | indirect_protected_cb = "VUID-vkCmdDrawIndirectCount-commandBuffer-02711"; |
| 487 | indirect_contiguous_memory = "VUID-vkCmdDrawIndirectCount-buffer-02708"; |
| 488 | indirect_buffer_bit = "VUID-vkCmdDrawIndirectCount-buffer-02709"; |
| 489 | viewport_count = "VUID-vkCmdDrawIndirectCount-viewportCount-03417"; |
| 490 | scissor_count = "VUID-vkCmdDrawIndirectCount-scissorCount-03418"; |
| 491 | viewport_scissor_count = "VUID-vkCmdDrawIndirectCount-viewportCount-03419"; |
| 492 | primitive_topology = "VUID-vkCmdDrawIndirectCount-primitiveTopology-03420"; |
| 493 | corner_sampled_address_mode = "VUID-vkCmdDrawIndirectCount-flags-02696"; |
| 494 | subpass_input = "VUID-vkCmdDrawIndirectCount-None-02686"; |
| 495 | imageview_atomic = "VUID-vkCmdDrawIndirectCount-None-02691"; |
Piers Daniell | a7f93b6 | 2021-11-20 12:32:04 -0700 | [diff] [blame] | 496 | push_constants_set = "VUID-vkCmdDrawIndirectCount-maintenance4-06425"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 497 | image_subresources = "VUID-vkCmdDrawIndirectCount-None-04584"; |
| 498 | descriptor_valid = "VUID-vkCmdDrawIndirectCount-None-02699"; |
| 499 | sampler_imageview_type = "VUID-vkCmdDrawIndirectCount-None-02702"; |
| 500 | sampler_implicitLod_dref_proj = "VUID-vkCmdDrawIndirectCount-None-02703"; |
| 501 | sampler_bias_offset = "VUID-vkCmdDrawIndirectCount-None-02704"; |
| 502 | vertex_binding_attribute = "VUID-vkCmdDrawIndirectCount-None-02721"; |
| 503 | dynamic_state_setting_commands = "VUID-vkCmdDrawIndirectCount-None-02859"; |
sfricke-samsung | 962d6f0 | 2021-04-03 20:28:59 -0700 | [diff] [blame] | 504 | rasterization_samples = "VUID-vkCmdDrawIndirectCount-rasterizationSamples-04740"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 505 | unprotected_command_buffer = "VUID-vkCmdDrawIndirectCount-commandBuffer-02707"; |
| 506 | max_multiview_instance_index = "VUID-vkCmdDrawIndirectCount-maxMultiviewInstanceIndex-02688"; |
Mark Lobodzinski | f786b41 | 2020-11-30 12:16:17 -0700 | [diff] [blame] | 507 | img_filter_cubic = "VUID-vkCmdDrawIndirectCount-None-02693"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 508 | filter_cubic = "VUID-vkCmdDrawIndirectCount-filterCubic-02694"; |
| 509 | filter_cubic_min_max = "VUID-vkCmdDrawIndirectCount-filterCubicMinmax-02695"; |
Tobias Hector | 6663c9b | 2020-11-05 10:18:02 +0000 | [diff] [blame] | 510 | viewport_count_primitive_shading_rate = "VUID-vkCmdDrawIndirectCount-primitiveFragmentShadingRateWithMultipleViewports-04552"; |
Piers Daniell | 924cd83 | 2021-05-18 13:48:47 -0600 | [diff] [blame] | 511 | patch_control_points = "VUID-vkCmdDrawIndirectCount-None-04875"; |
| 512 | rasterizer_discard_enable = "VUID-vkCmdDrawIndirectCount-None-04876"; |
| 513 | depth_bias_enable = "VUID-vkCmdDrawIndirectCount-None-04877"; |
| 514 | logic_op = "VUID-vkCmdDrawIndirectCount-logicOp-04878"; |
| 515 | primitive_restart_enable = "VUID-vkCmdDrawIndirectCount-None-04879"; |
| 516 | vertex_input_binding_stride = "VUID-vkCmdDrawIndirectCount-pStrides-04884"; |
| 517 | vertex_input = kVUID_Core_CmdDrawIndirectCount_VertexInput; |
ziga-lunarg | 8d62f95 | 2021-08-30 16:47:25 +0200 | [diff] [blame] | 518 | blend_enable = "VUID-vkCmdDrawIndirectCount-blendEnable-04727"; |
Lionel Landwerlin | 88423cb | 2021-12-07 15:31:02 +0200 | [diff] [blame^] | 519 | storage_image_read_without_format = "VUID-vkCmdDrawIndirectCount-OpTypeImage-06424"; |
| 520 | storage_image_write_without_format = "VUID-vkCmdDrawIndirectCount-OpTypeImage-06423"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 521 | } |
| 522 | }; |
| 523 | |
| 524 | struct DispatchVuidsCmdDrawIndexedIndirectCount : DrawDispatchVuid { |
| 525 | DispatchVuidsCmdDrawIndexedIndirectCount() : DrawDispatchVuid() { |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 526 | pipeline_bound = "VUID-vkCmdDrawIndexedIndirectCount-None-02700"; |
| 527 | dynamic_state = "VUID-vkCmdDrawIndexedIndirectCount-commandBuffer-02701"; |
| 528 | vertex_binding = "VUID-vkCmdDrawIndexedIndirectCount-None-04007"; |
| 529 | vertex_binding_null = "VUID-vkCmdDrawIndexedIndirectCount-None-04008"; |
| 530 | compatible_pipeline = "VUID-vkCmdDrawIndexedIndirectCount-None-02697"; |
| 531 | render_pass_compatible = "VUID-vkCmdDrawIndexedIndirectCount-renderPass-02684"; |
| 532 | subpass_index = "VUID-vkCmdDrawIndexedIndirectCount-subpass-02685"; |
| 533 | sample_location = "VUID-vkCmdDrawIndexedIndirectCount-sampleLocationsEnable-02689"; |
| 534 | linear_sampler = "VUID-vkCmdDrawIndexedIndirectCount-magFilter-04553"; |
| 535 | cubic_sampler = "VUID-vkCmdDrawIndexedIndirectCount-None-02692"; |
| 536 | indirect_protected_cb = "VUID-vkCmdDrawIndexedIndirectCount-commandBuffer-02711"; |
| 537 | indirect_contiguous_memory = "VUID-vkCmdDrawIndexedIndirectCount-buffer-02708"; |
| 538 | indirect_buffer_bit = "VUID-vkCmdDrawIndexedIndirectCount-buffer-02709"; |
| 539 | viewport_count = "VUID-vkCmdDrawIndexedIndirectCount-viewportCount-03417"; |
| 540 | scissor_count = "VUID-vkCmdDrawIndexedIndirectCount-scissorCount-03418"; |
| 541 | viewport_scissor_count = "VUID-vkCmdDrawIndexedIndirectCount-viewportCount-03419"; |
| 542 | primitive_topology = "VUID-vkCmdDrawIndexedIndirectCount-primitiveTopology-03420"; |
| 543 | corner_sampled_address_mode = "VUID-vkCmdDrawIndexedIndirectCount-flags-02696"; |
| 544 | subpass_input = "VUID-vkCmdDrawIndexedIndirectCount-None-02686"; |
| 545 | imageview_atomic = "VUID-vkCmdDrawIndexedIndirectCount-None-02691"; |
Piers Daniell | a7f93b6 | 2021-11-20 12:32:04 -0700 | [diff] [blame] | 546 | push_constants_set = "VUID-vkCmdDrawIndexedIndirectCount-maintenance4-06425"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 547 | image_subresources = "VUID-vkCmdDrawIndexedIndirectCount-None-04584"; |
| 548 | descriptor_valid = "VUID-vkCmdDrawIndexedIndirectCount-None-02699"; |
| 549 | sampler_imageview_type = "VUID-vkCmdDrawIndexedIndirectCount-None-02702"; |
| 550 | sampler_implicitLod_dref_proj = "VUID-vkCmdDrawIndexedIndirectCount-None-02703"; |
| 551 | sampler_bias_offset = "VUID-vkCmdDrawIndexedIndirectCount-None-02704"; |
| 552 | vertex_binding_attribute = "VUID-vkCmdDrawIndexedIndirectCount-None-02721"; |
| 553 | dynamic_state_setting_commands = "VUID-vkCmdDrawIndexedIndirectCount-None-02859"; |
sfricke-samsung | 962d6f0 | 2021-04-03 20:28:59 -0700 | [diff] [blame] | 554 | rasterization_samples = "VUID-vkCmdDrawIndexedIndirectCount-rasterizationSamples-04740"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 555 | unprotected_command_buffer = "VUID-vkCmdDrawIndexedIndirectCount-commandBuffer-02707"; |
| 556 | max_multiview_instance_index = "VUID-vkCmdDrawIndexedIndirectCount-maxMultiviewInstanceIndex-02688"; |
Mark Lobodzinski | f786b41 | 2020-11-30 12:16:17 -0700 | [diff] [blame] | 557 | img_filter_cubic = "VUID-vkCmdDrawIndexedIndirectCount-None-02693"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 558 | filter_cubic = "VUID-vkCmdDrawIndexedIndirectCount-filterCubic-02694"; |
| 559 | filter_cubic_min_max = "VUID-vkCmdDrawIndexedIndirectCount-filterCubicMinmax-02695"; |
Tobias Hector | 6663c9b | 2020-11-05 10:18:02 +0000 | [diff] [blame] | 560 | viewport_count_primitive_shading_rate = "VUID-vkCmdDrawIndexedIndirectCount-primitiveFragmentShadingRateWithMultipleViewports-04552"; |
Piers Daniell | 924cd83 | 2021-05-18 13:48:47 -0600 | [diff] [blame] | 561 | patch_control_points = "VUID-vkCmdDrawIndexedIndirectCount-None-04875"; |
| 562 | rasterizer_discard_enable = "VUID-vkCmdDrawIndexedIndirectCount-None-04876"; |
| 563 | depth_bias_enable = "VUID-vkCmdDrawIndexedIndirectCount-None-04877"; |
| 564 | logic_op = "VUID-vkCmdDrawIndexedIndirectCount-logicOp-04878"; |
| 565 | primitive_restart_enable = "VUID-vkCmdDrawIndexedIndirectCount-None-04879"; |
| 566 | vertex_input_binding_stride = "VUID-vkCmdDrawIndexedIndirectCount-pStrides-04884"; |
| 567 | vertex_input = kVUID_Core_CmdDrawIndexedIndirectCount_VertexInput; |
ziga-lunarg | 8d62f95 | 2021-08-30 16:47:25 +0200 | [diff] [blame] | 568 | blend_enable = "VUID-vkCmdDrawIndexedIndirectCount-blendEnable-04727"; |
Aaron Hagan | aca5044 | 2021-12-07 22:26:29 -0500 | [diff] [blame] | 569 | dynamic_rendering_view_mask = "VUID-vkCmdDrawIndexedIndirectCount-viewMask-06178"; |
| 570 | dynamic_rendering_color_count = "VUID-vkCmdDrawIndexedIndirectCount-colorAttachmentCount-06179"; |
| 571 | dynamic_rendering_color_formats = "VUID-vkCmdDrawIndexedIndirectCount-colorAttachmentCount-06180"; |
| 572 | dynamic_rendering_depth_format = "VUID-vkCmdDrawIndexedIndirectCount-pDepthAttachment-06181"; |
| 573 | dynamic_rendering_stencil_format = "VUID-vkCmdDrawIndexedIndirectCount-pStencilAttachment-06182"; |
| 574 | dynamic_rendering_fsr = "VUID-vkCmdDrawIndexedIndirectCount-imageView-06183"; |
| 575 | dynamic_rendering_fdm = "VUID-vkCmdDrawIndexedIndirectCount-imageView-06184"; |
| 576 | dynamic_rendering_color_sample = "VUID-vkCmdDrawIndexedIndirectCount-colorAttachmentCount-06185"; |
| 577 | dynamic_rendering_depth_sample = "VUID-vkCmdDrawIndexedIndirectCount-pDepthAttachment-06186"; |
| 578 | dynamic_rendering_stencil_sample = "VUID-vkCmdDrawIndexedIndirectCount-pStencilAttachment-06187"; |
| 579 | dynamic_rendering_multi_sample = "VUID-vkCmdDrawIndexedIndirectCount-colorAttachmentCount-06188"; |
| 580 | dynamic_rendering_06189 = "VUID-vkCmdDrawIndexedIndirectCount-pDepthAttachment-06189"; |
| 581 | dynamic_rendering_06190 = "VUID-vkCmdDrawIndexedIndirectCount-pStencilAttachment-06190"; |
| 582 | dynamic_rendering_06198 = "VUID-vkCmdDrawIndexedIndirectCount-renderPass-06198"; |
Lionel Landwerlin | 88423cb | 2021-12-07 15:31:02 +0200 | [diff] [blame^] | 583 | storage_image_read_without_format = "VUID-vkCmdDrawIndexedIndirectCount-OpTypeImage-06424"; |
| 584 | storage_image_write_without_format = "VUID-vkCmdDrawIndexedIndirectCount-OpTypeImage-06423"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 585 | } |
| 586 | }; |
| 587 | |
| 588 | struct DispatchVuidsCmdTraceRaysNV: DrawDispatchVuid { |
| 589 | DispatchVuidsCmdTraceRaysNV() : DrawDispatchVuid() { |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 590 | pipeline_bound = "VUID-vkCmdTraceRaysNV-None-02700"; |
| 591 | dynamic_state = "VUID-vkCmdTraceRaysNV-commandBuffer-02701"; |
| 592 | compatible_pipeline = "VUID-vkCmdTraceRaysNV-None-02697"; |
| 593 | linear_sampler = "VUID-vkCmdTraceRaysNV-magFilter-04553"; |
| 594 | cubic_sampler = "VUID-vkCmdTraceRaysNV-None-02692"; |
| 595 | corner_sampled_address_mode = "VUID-vkCmdTraceRaysNV-flags-02696"; |
| 596 | imageview_atomic = "VUID-vkCmdTraceRaysNV-None-02691"; |
Piers Daniell | a7f93b6 | 2021-11-20 12:32:04 -0700 | [diff] [blame] | 597 | push_constants_set = "VUID-vkCmdTraceRaysNV-maintenance4-06425"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 598 | descriptor_valid = "VUID-vkCmdTraceRaysNV-None-02699"; |
| 599 | sampler_imageview_type = "VUID-vkCmdTraceRaysNV-None-02702"; |
| 600 | sampler_implicitLod_dref_proj = "VUID-vkCmdTraceRaysNV-None-02703"; |
| 601 | sampler_bias_offset = "VUID-vkCmdTraceRaysNV-None-02704"; |
| 602 | dynamic_state_setting_commands = "VUID-vkCmdTraceRaysNV-None-02859"; |
| 603 | unprotected_command_buffer = "VUID-vkCmdTraceRaysNV-commandBuffer-02707"; |
sfricke-samsung | a3c47d1 | 2021-09-30 13:34:54 -0700 | [diff] [blame] | 604 | ray_query_protected_cb = "VUID-vkCmdTraceRaysNV-commandBuffer-04624"; |
Mark Lobodzinski | f786b41 | 2020-11-30 12:16:17 -0700 | [diff] [blame] | 605 | img_filter_cubic = "VUID-vkCmdTraceRaysNV-None-02693"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 606 | filter_cubic = "VUID-vkCmdTraceRaysNV-filterCubic-02694"; |
| 607 | filter_cubic_min_max = "VUID-vkCmdTraceRaysNV-filterCubicMinmax-02695"; |
Lionel Landwerlin | 88423cb | 2021-12-07 15:31:02 +0200 | [diff] [blame^] | 608 | storage_image_read_without_format = "VUID-vkCmdTraceRaysNV-OpTypeImage-06424"; |
| 609 | storage_image_write_without_format = "VUID-vkCmdTraceRaysNV-OpTypeImage-06423"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 610 | } |
| 611 | }; |
| 612 | |
| 613 | struct DispatchVuidsCmdTraceRaysKHR: DrawDispatchVuid { |
| 614 | DispatchVuidsCmdTraceRaysKHR() : DrawDispatchVuid() { |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 615 | pipeline_bound = "VUID-vkCmdTraceRaysKHR-None-02700"; |
| 616 | dynamic_state = "VUID-vkCmdTraceRaysKHR-commandBuffer-02701"; |
| 617 | compatible_pipeline = "VUID-vkCmdTraceRaysKHR-None-02697"; |
| 618 | linear_sampler = "VUID-vkCmdTraceRaysKHR-magFilter-04553"; |
| 619 | cubic_sampler = "VUID-vkCmdTraceRaysKHR-None-02692"; |
| 620 | corner_sampled_address_mode = "VUID-vkCmdTraceRaysKHR-flags-02696"; |
| 621 | imageview_atomic = "VUID-vkCmdTraceRaysKHR-None-02691"; |
Piers Daniell | a7f93b6 | 2021-11-20 12:32:04 -0700 | [diff] [blame] | 622 | push_constants_set = "VUID-vkCmdTraceRaysKHR-maintenance4-06425"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 623 | descriptor_valid = "VUID-vkCmdTraceRaysKHR-None-02699"; |
| 624 | sampler_imageview_type = "VUID-vkCmdTraceRaysKHR-None-02702"; |
| 625 | sampler_implicitLod_dref_proj = "VUID-vkCmdTraceRaysKHR-None-02703"; |
| 626 | sampler_bias_offset = "VUID-vkCmdTraceRaysKHR-None-02704"; |
| 627 | dynamic_state_setting_commands = "VUID-vkCmdTraceRaysKHR-None-02859"; |
| 628 | unprotected_command_buffer = "VUID-vkCmdTraceRaysKHR-commandBuffer-02707"; |
sfricke-samsung | a3c47d1 | 2021-09-30 13:34:54 -0700 | [diff] [blame] | 629 | ray_query_protected_cb = "VUID-vkCmdTraceRaysKHR-commandBuffer-04625"; |
Mark Lobodzinski | f786b41 | 2020-11-30 12:16:17 -0700 | [diff] [blame] | 630 | img_filter_cubic = "VUID-vkCmdTraceRaysKHR-None-02693"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 631 | filter_cubic = "VUID-vkCmdTraceRaysKHR-filterCubic-02694"; |
| 632 | filter_cubic_min_max = "VUID-vkCmdTraceRaysKHR-filterCubicMinmax-02695"; |
Lionel Landwerlin | 88423cb | 2021-12-07 15:31:02 +0200 | [diff] [blame^] | 633 | storage_image_read_without_format = "VUID-vkCmdTraceRaysKHR-OpTypeImage-06424"; |
| 634 | storage_image_write_without_format = "VUID-vkCmdTraceRaysKHR-OpTypeImage-06423"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 635 | } |
| 636 | }; |
| 637 | |
| 638 | struct DispatchVuidsCmdTraceRaysIndirectKHR: DrawDispatchVuid { |
| 639 | DispatchVuidsCmdTraceRaysIndirectKHR() : DrawDispatchVuid() { |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 640 | pipeline_bound = "VUID-vkCmdTraceRaysIndirectKHR-None-02700"; |
| 641 | dynamic_state = "VUID-vkCmdTraceRaysIndirectKHR-commandBuffer-02701"; |
| 642 | compatible_pipeline = "VUID-vkCmdTraceRaysIndirectKHR-None-02697"; |
| 643 | linear_sampler = "VUID-vkCmdTraceRaysIndirectKHR-magFilter-04553"; |
| 644 | cubic_sampler = "VUID-vkCmdTraceRaysIndirectKHR-None-02692"; |
Shannon McPherson | 57255a6 | 2020-12-23 16:00:54 -0700 | [diff] [blame] | 645 | indirect_contiguous_memory = "VUID-vkCmdTraceRaysIndirectKHR-indirectDeviceAddress-03632"; |
| 646 | indirect_buffer_bit = "VUID-vkCmdTraceRaysIndirectKHR-indirectDeviceAddress-03633"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 647 | corner_sampled_address_mode = "VUID-vkCmdTraceRaysIndirectKHR-flags-02696"; |
| 648 | imageview_atomic = "VUID-vkCmdTraceRaysIndirectKHR-None-02691"; |
Piers Daniell | a7f93b6 | 2021-11-20 12:32:04 -0700 | [diff] [blame] | 649 | push_constants_set = "VUID-vkCmdTraceRaysIndirectKHR-maintenance4-06425"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 650 | descriptor_valid = "VUID-vkCmdTraceRaysIndirectKHR-None-02699"; |
| 651 | sampler_imageview_type = "VUID-vkCmdTraceRaysIndirectKHR-None-02702"; |
| 652 | sampler_implicitLod_dref_proj = "VUID-vkCmdTraceRaysIndirectKHR-None-02703"; |
| 653 | sampler_bias_offset = "VUID-vkCmdTraceRaysIndirectKHR-None-02704"; |
| 654 | dynamic_state_setting_commands = "VUID-vkCmdTraceRaysIndirectKHR-None-02859"; |
| 655 | unprotected_command_buffer = "VUID-vkCmdTraceRaysIndirectKHR-commandBuffer-02707"; |
sfricke-samsung | a3c47d1 | 2021-09-30 13:34:54 -0700 | [diff] [blame] | 656 | ray_query_protected_cb = "VUID-vkCmdTraceRaysIndirectKHR-commandBuffer-03635"; |
Mark Lobodzinski | f786b41 | 2020-11-30 12:16:17 -0700 | [diff] [blame] | 657 | img_filter_cubic = "VUID-vkCmdTraceRaysIndirectKHR-None-02693"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 658 | filter_cubic = "VUID-vkCmdTraceRaysIndirectKHR-filterCubic-02694"; |
| 659 | filter_cubic_min_max = "VUID-vkCmdTraceRaysIndirectKHR-filterCubicMinmax-02695"; |
Lionel Landwerlin | 88423cb | 2021-12-07 15:31:02 +0200 | [diff] [blame^] | 660 | storage_image_read_without_format = "VUID-vkCmdTraceRaysIndirectKHR-OpTypeImage-06424"; |
| 661 | storage_image_write_without_format = "VUID-vkCmdTraceRaysIndirectKHR-OpTypeImage-06423"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 662 | } |
| 663 | }; |
| 664 | |
| 665 | struct DispatchVuidsCmdDrawMeshTasksNV: DrawDispatchVuid { |
| 666 | DispatchVuidsCmdDrawMeshTasksNV() : DrawDispatchVuid() { |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 667 | pipeline_bound = "VUID-vkCmdDrawMeshTasksNV-None-02700"; |
| 668 | dynamic_state = "VUID-vkCmdDrawMeshTasksNV-commandBuffer-02701"; |
| 669 | compatible_pipeline = "VUID-vkCmdDrawMeshTasksNV-None-02697"; |
| 670 | render_pass_compatible = "VUID-vkCmdDrawMeshTasksNV-renderPass-02684"; |
| 671 | subpass_index = "VUID-vkCmdDrawMeshTasksNV-subpass-02685"; |
| 672 | sample_location = "VUID-vkCmdDrawMeshTasksNV-sampleLocationsEnable-02689"; |
| 673 | linear_sampler = "VUID-vkCmdDrawMeshTasksNV-magFilter-04553"; |
| 674 | cubic_sampler = "VUID-vkCmdDrawMeshTasksNV-None-02692"; |
| 675 | viewport_count = "VUID-vkCmdDrawMeshTasksNV-viewportCount-03417"; |
| 676 | scissor_count = "VUID-vkCmdDrawMeshTasksNV-scissorCount-03418"; |
| 677 | viewport_scissor_count = "VUID-vkCmdDrawMeshTasksNV-viewportCount-03419"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 678 | corner_sampled_address_mode = "VUID-vkCmdDrawMeshTasksNV-flags-02696"; |
| 679 | subpass_input = "VUID-vkCmdDrawMeshTasksNV-None-02686"; |
| 680 | imageview_atomic = "VUID-vkCmdDrawMeshTasksNV-None-02691"; |
Piers Daniell | a7f93b6 | 2021-11-20 12:32:04 -0700 | [diff] [blame] | 681 | push_constants_set = "VUID-vkCmdDrawMeshTasksNV-maintenance4-06425"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 682 | image_subresources = "VUID-vkCmdDrawMeshTasksNV-None-04584"; |
| 683 | descriptor_valid = "VUID-vkCmdDrawMeshTasksNV-None-02699"; |
| 684 | sampler_imageview_type = "VUID-vkCmdDrawMeshTasksNV-None-02702"; |
| 685 | sampler_implicitLod_dref_proj = "VUID-vkCmdDrawMeshTasksNV-None-02703"; |
| 686 | sampler_bias_offset = "VUID-vkCmdDrawMeshTasksNV-None-02704"; |
| 687 | dynamic_state_setting_commands = "VUID-vkCmdDrawMeshTasksNV-None-02859"; |
sfricke-samsung | 962d6f0 | 2021-04-03 20:28:59 -0700 | [diff] [blame] | 688 | rasterization_samples = "VUID-vkCmdDrawMeshTasksNV-rasterizationSamples-04740"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 689 | unprotected_command_buffer = "VUID-vkCmdDrawMeshTasksNV-commandBuffer-02707"; |
| 690 | max_multiview_instance_index = "VUID-vkCmdDrawMeshTasksNV-maxMultiviewInstanceIndex-02688"; |
Mark Lobodzinski | f786b41 | 2020-11-30 12:16:17 -0700 | [diff] [blame] | 691 | img_filter_cubic = "VUID-vkCmdDrawMeshTasksNV-None-02693"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 692 | filter_cubic = "VUID-vkCmdDrawMeshTasksNV-filterCubic-02694"; |
| 693 | filter_cubic_min_max = "VUID-vkCmdDrawMeshTasksNV-filterCubicMinmax-02695"; |
Tobias Hector | 6663c9b | 2020-11-05 10:18:02 +0000 | [diff] [blame] | 694 | viewport_count_primitive_shading_rate = "VUID-vkCmdDrawMeshTasksNV-primitiveFragmentShadingRateWithMultipleViewports-04552"; |
Piers Daniell | 924cd83 | 2021-05-18 13:48:47 -0600 | [diff] [blame] | 695 | rasterizer_discard_enable = "VUID-vkCmdDrawMeshTasksNV-None-04876"; |
| 696 | depth_bias_enable = "VUID-vkCmdDrawMeshTasksNV-None-04877"; |
| 697 | logic_op = "VUID-vkCmdDrawMeshTasksNV-logicOp-04878"; |
Piers Daniell | 924cd83 | 2021-05-18 13:48:47 -0600 | [diff] [blame] | 698 | vertex_input = kVUID_Core_CmdDrawMeshTasksNV_VertexInput; |
ziga-lunarg | 8d62f95 | 2021-08-30 16:47:25 +0200 | [diff] [blame] | 699 | blend_enable = "VUID-vkCmdDrawMeshTasksNV-blendEnable-04727"; |
Lionel Landwerlin | 88423cb | 2021-12-07 15:31:02 +0200 | [diff] [blame^] | 700 | storage_image_read_without_format = "VUID-vkCmdDrawMeshTasksNV-OpTypeImage-06424"; |
| 701 | storage_image_write_without_format = "VUID-vkCmdDrawMeshTasksNV-OpTypeImage-06423"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 702 | } |
| 703 | }; |
| 704 | |
| 705 | struct DispatchVuidsCmdDrawMeshTasksIndirectNV: DrawDispatchVuid { |
| 706 | DispatchVuidsCmdDrawMeshTasksIndirectNV() : DrawDispatchVuid() { |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 707 | pipeline_bound = "VUID-vkCmdDrawMeshTasksIndirectNV-None-02700"; |
| 708 | dynamic_state = "VUID-vkCmdDrawMeshTasksIndirectNV-commandBuffer-02701"; |
| 709 | compatible_pipeline = "VUID-vkCmdDrawMeshTasksIndirectNV-None-02697"; |
| 710 | render_pass_compatible = "VUID-vkCmdDrawMeshTasksIndirectNV-renderPass-02684"; |
| 711 | subpass_index = "VUID-vkCmdDrawMeshTasksIndirectNV-subpass-02685"; |
| 712 | sample_location = "VUID-vkCmdDrawMeshTasksIndirectNV-sampleLocationsEnable-02689"; |
| 713 | linear_sampler = "VUID-vkCmdDrawMeshTasksIndirectNV-magFilter-04553"; |
| 714 | cubic_sampler = "VUID-vkCmdDrawMeshTasksIndirectNV-None-02692"; |
| 715 | indirect_protected_cb = "VUID-vkCmdDrawMeshTasksIndirectNV-commandBuffer-02711"; |
| 716 | indirect_contiguous_memory = "VUID-vkCmdDrawMeshTasksIndirectNV-buffer-02708"; |
| 717 | indirect_buffer_bit = "VUID-vkCmdDrawMeshTasksIndirectNV-buffer-02709"; |
| 718 | viewport_count = "VUID-vkCmdDrawMeshTasksIndirectNV-viewportCount-03417"; |
| 719 | scissor_count = "VUID-vkCmdDrawMeshTasksIndirectNV-scissorCount-03418"; |
| 720 | viewport_scissor_count = "VUID-vkCmdDrawMeshTasksIndirectNV-viewportCount-03419"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 721 | corner_sampled_address_mode = "VUID-vkCmdDrawMeshTasksIndirectNV-flags-02696"; |
| 722 | subpass_input = "VUID-vkCmdDrawMeshTasksIndirectNV-None-02686"; |
| 723 | imageview_atomic = "VUID-vkCmdDrawMeshTasksIndirectNV-None-02691"; |
Piers Daniell | a7f93b6 | 2021-11-20 12:32:04 -0700 | [diff] [blame] | 724 | push_constants_set = "VUID-vkCmdDrawMeshTasksIndirectNV-maintenance4-06425"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 725 | image_subresources = "VUID-vkCmdDrawMeshTasksIndirectNV-None-04584"; |
| 726 | descriptor_valid = "VUID-vkCmdDrawMeshTasksIndirectNV-None-02699"; |
| 727 | sampler_imageview_type = "VUID-vkCmdDrawMeshTasksIndirectNV-None-02702"; |
| 728 | sampler_implicitLod_dref_proj = "VUID-vkCmdDrawMeshTasksIndirectNV-None-02703"; |
| 729 | sampler_bias_offset = "VUID-vkCmdDrawMeshTasksIndirectNV-None-02704"; |
| 730 | dynamic_state_setting_commands = "VUID-vkCmdDrawMeshTasksIndirectNV-None-02859"; |
sfricke-samsung | 962d6f0 | 2021-04-03 20:28:59 -0700 | [diff] [blame] | 731 | rasterization_samples = "VUID-vkCmdDrawMeshTasksIndirectNV-rasterizationSamples-04740"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 732 | unprotected_command_buffer = "VUID-vkCmdDrawMeshTasksIndirectNV-commandBuffer-02707"; |
| 733 | max_multiview_instance_index = "VUID-vkCmdDrawMeshTasksIndirectNV-maxMultiviewInstanceIndex-02688"; |
Mark Lobodzinski | f786b41 | 2020-11-30 12:16:17 -0700 | [diff] [blame] | 734 | img_filter_cubic = "VUID-vkCmdDrawMeshTasksIndirectNV-None-02693"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 735 | filter_cubic = "VUID-vkCmdDrawMeshTasksIndirectNV-filterCubic-02694"; |
| 736 | filter_cubic_min_max = "VUID-vkCmdDrawMeshTasksIndirectNV-filterCubicMinmax-02695"; |
Tobias Hector | 6663c9b | 2020-11-05 10:18:02 +0000 | [diff] [blame] | 737 | viewport_count_primitive_shading_rate = "VUID-vkCmdDrawMeshTasksIndirectNV-primitiveFragmentShadingRateWithMultipleViewports-04552"; |
Piers Daniell | 924cd83 | 2021-05-18 13:48:47 -0600 | [diff] [blame] | 738 | rasterizer_discard_enable = "VUID-vkCmdDrawMeshTasksIndirectNV-None-04876"; |
| 739 | depth_bias_enable = "VUID-vkCmdDrawMeshTasksIndirectNV-None-04877"; |
| 740 | logic_op = "VUID-vkCmdDrawMeshTasksIndirectNV-logicOp-04878"; |
Piers Daniell | 924cd83 | 2021-05-18 13:48:47 -0600 | [diff] [blame] | 741 | vertex_input = kVUID_Core_CmdDrawMeshTasksIndirectNV_VertexInput; |
ziga-lunarg | 8d62f95 | 2021-08-30 16:47:25 +0200 | [diff] [blame] | 742 | blend_enable = "VUID-vkCmdDrawMeshTasksIndirectNV-blendEnable-04727"; |
Lionel Landwerlin | 88423cb | 2021-12-07 15:31:02 +0200 | [diff] [blame^] | 743 | storage_image_read_without_format = "VUID-vkCmdDrawMeshTasksIndirectNV-OpTypeImage-06424"; |
| 744 | storage_image_write_without_format = "VUID-vkCmdDrawMeshTasksIndirectNV-OpTypeImage-06423"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 745 | } |
| 746 | }; |
| 747 | |
| 748 | struct DispatchVuidsCmdDrawMeshTasksIndirectCountNV : DrawDispatchVuid { |
| 749 | DispatchVuidsCmdDrawMeshTasksIndirectCountNV() : DrawDispatchVuid() { |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 750 | pipeline_bound = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02700"; |
| 751 | dynamic_state = "VUID-vkCmdDrawMeshTasksIndirectCountNV-commandBuffer-02701"; |
| 752 | compatible_pipeline = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02697"; |
| 753 | render_pass_compatible = "VUID-vkCmdDrawMeshTasksIndirectCountNV-renderPass-02684"; |
| 754 | subpass_index = "VUID-vkCmdDrawMeshTasksIndirectCountNV-subpass-02685"; |
| 755 | sample_location = "VUID-vkCmdDrawMeshTasksIndirectCountNV-sampleLocationsEnable-02689"; |
| 756 | linear_sampler = "VUID-vkCmdDrawMeshTasksIndirectCountNV-magFilter-04553"; |
| 757 | cubic_sampler = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02692"; |
| 758 | indirect_protected_cb = "VUID-vkCmdDrawMeshTasksIndirectCountNV-commandBuffer-02711"; |
| 759 | indirect_contiguous_memory = "VUID-vkCmdDrawMeshTasksIndirectCountNV-buffer-02708"; |
| 760 | indirect_buffer_bit = "VUID-vkCmdDrawMeshTasksIndirectCountNV-buffer-02709"; |
| 761 | viewport_count = "VUID-vkCmdDrawMeshTasksIndirectCountNV-viewportCount-03417"; |
| 762 | scissor_count = "VUID-vkCmdDrawMeshTasksIndirectCountNV-scissorCount-03418"; |
| 763 | viewport_scissor_count = "VUID-vkCmdDrawMeshTasksIndirectCountNV-viewportCount-03419"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 764 | corner_sampled_address_mode = "VUID-vkCmdDrawMeshTasksIndirectCountNV-flags-02696"; |
| 765 | subpass_input = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02686"; |
| 766 | imageview_atomic = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02691"; |
Piers Daniell | a7f93b6 | 2021-11-20 12:32:04 -0700 | [diff] [blame] | 767 | push_constants_set = "VUID-vkCmdDrawMeshTasksIndirectCountNV-maintenance4-06425"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 768 | image_subresources = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-04584"; |
| 769 | descriptor_valid = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02699"; |
| 770 | sampler_imageview_type = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02702"; |
| 771 | sampler_implicitLod_dref_proj = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02703"; |
| 772 | sampler_bias_offset = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02704"; |
| 773 | dynamic_state_setting_commands = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02859"; |
sfricke-samsung | 962d6f0 | 2021-04-03 20:28:59 -0700 | [diff] [blame] | 774 | rasterization_samples = "VUID-vkCmdDrawMeshTasksIndirectCountNV-rasterizationSamples-04740"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 775 | unprotected_command_buffer = "VUID-vkCmdDrawMeshTasksIndirectCountNV-commandBuffer-02707"; |
| 776 | max_multiview_instance_index = "VUID-vkCmdDrawMeshTasksIndirectCountNV-maxMultiviewInstanceIndex-02688"; |
Mark Lobodzinski | f786b41 | 2020-11-30 12:16:17 -0700 | [diff] [blame] | 777 | img_filter_cubic = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02693"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 778 | filter_cubic = "VUID-vkCmdDrawMeshTasksIndirectCountNV-filterCubic-02694"; |
| 779 | filter_cubic_min_max = "VUID-vkCmdDrawMeshTasksIndirectCountNV-filterCubicMinmax-02695"; |
Tobias Hector | 6663c9b | 2020-11-05 10:18:02 +0000 | [diff] [blame] | 780 | viewport_count_primitive_shading_rate = "VUID-vkCmdDrawMeshTasksIndirectCountNV-primitiveFragmentShadingRateWithMultipleViewports-04552"; |
Piers Daniell | 924cd83 | 2021-05-18 13:48:47 -0600 | [diff] [blame] | 781 | rasterizer_discard_enable = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-04876"; |
| 782 | depth_bias_enable = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-04877"; |
| 783 | logic_op = "VUID-vkCmdDrawMeshTasksIndirectCountNV-logicOp-04878"; |
Piers Daniell | 924cd83 | 2021-05-18 13:48:47 -0600 | [diff] [blame] | 784 | vertex_input = kVUID_Core_CmdDrawMeshTasksIndirectCountNV_VertexInput; |
ziga-lunarg | 8d62f95 | 2021-08-30 16:47:25 +0200 | [diff] [blame] | 785 | blend_enable = "VUID-vkCmdDrawMeshTasksIndirectCountNV-blendEnable-04727"; |
Lionel Landwerlin | 88423cb | 2021-12-07 15:31:02 +0200 | [diff] [blame^] | 786 | storage_image_read_without_format = "VUID-vkCmdDrawMeshTasksIndirectCountNV-OpTypeImage-06424"; |
| 787 | storage_image_write_without_format = "VUID-vkCmdDrawMeshTasksIndirectCountNV-OpTypeImage-06423"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 788 | } |
| 789 | }; |
| 790 | |
| 791 | struct DispatchVuidsCmdDrawIndirectByteCountEXT: DrawDispatchVuid { |
| 792 | DispatchVuidsCmdDrawIndirectByteCountEXT() : DrawDispatchVuid() { |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 793 | pipeline_bound = "VUID-vkCmdDrawIndirectByteCountEXT-None-02700"; |
| 794 | dynamic_state = "VUID-vkCmdDrawIndirectByteCountEXT-commandBuffer-02701"; |
| 795 | vertex_binding = "VUID-vkCmdDrawIndirectByteCountEXT-None-04007"; |
| 796 | vertex_binding_null = "VUID-vkCmdDrawIndirectByteCountEXT-None-04008"; |
| 797 | compatible_pipeline = "VUID-vkCmdDrawIndirectByteCountEXT-None-02697"; |
| 798 | render_pass_compatible = "VUID-vkCmdDrawIndirectByteCountEXT-renderPass-02684"; |
| 799 | subpass_index = "VUID-vkCmdDrawIndirectByteCountEXT-subpass-02685"; |
| 800 | sample_location = "VUID-vkCmdDrawIndirectByteCountEXT-sampleLocationsEnable-02689"; |
| 801 | linear_sampler = "VUID-vkCmdDrawIndirectByteCountEXT-magFilter-04553"; |
| 802 | cubic_sampler = "VUID-vkCmdDrawIndirectByteCountEXT-None-02692"; |
| 803 | indirect_protected_cb = "VUID-vkCmdDrawIndirectByteCountEXT-commandBuffer-02646"; |
sfricke-samsung | b091d4e | 2021-04-18 23:15:59 -0700 | [diff] [blame] | 804 | indirect_contiguous_memory = "VUID-vkCmdDrawIndirectByteCountEXT-counterBuffer-04567", |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 805 | indirect_buffer_bit = "VUID-vkCmdDrawIndirectByteCountEXT-counterBuffer-02290"; |
| 806 | viewport_count = "VUID-vkCmdDrawIndirectByteCountEXT-viewportCount-03417"; |
| 807 | scissor_count = "VUID-vkCmdDrawIndirectByteCountEXT-scissorCount-03418"; |
| 808 | viewport_scissor_count = "VUID-vkCmdDrawIndirectByteCountEXT-viewportCount-03419"; |
| 809 | primitive_topology = "VUID-vkCmdDrawIndirectByteCountEXT-primitiveTopology-03420"; |
| 810 | corner_sampled_address_mode = "VUID-vkCmdDrawIndirectByteCountEXT-flags-02696"; |
| 811 | subpass_input = "VUID-vkCmdDrawIndirectByteCountEXT-None-02686"; |
| 812 | imageview_atomic = "VUID-vkCmdDrawIndirectByteCountEXT-None-02691"; |
Piers Daniell | a7f93b6 | 2021-11-20 12:32:04 -0700 | [diff] [blame] | 813 | push_constants_set = "VUID-vkCmdDrawIndirectByteCountEXT-maintenance4-06425"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 814 | image_subresources = "VUID-vkCmdDrawIndirectByteCountEXT-None-04584"; |
| 815 | descriptor_valid = "VUID-vkCmdDrawIndirectByteCountEXT-None-02699"; |
| 816 | sampler_imageview_type = "VUID-vkCmdDrawIndirectByteCountEXT-None-02702"; |
| 817 | sampler_implicitLod_dref_proj = "VUID-vkCmdDrawIndirectByteCountEXT-None-02703"; |
| 818 | sampler_bias_offset = "VUID-vkCmdDrawIndirectByteCountEXT-None-02704"; |
| 819 | vertex_binding_attribute = "VUID-vkCmdDrawIndirectByteCountEXT-None-02721"; |
| 820 | dynamic_state_setting_commands = "VUID-vkCmdDrawIndirectByteCountEXT-None-02859"; |
sfricke-samsung | 962d6f0 | 2021-04-03 20:28:59 -0700 | [diff] [blame] | 821 | rasterization_samples = "VUID-vkCmdDrawIndirectByteCountEXT-rasterizationSamples-04740"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 822 | unprotected_command_buffer = "VUID-vkCmdDrawIndirectByteCountEXT-commandBuffer-02707"; |
| 823 | max_multiview_instance_index = "VUID-vkCmdDrawIndirectByteCountEXT-maxMultiviewInstanceIndex-02688"; |
Mark Lobodzinski | f786b41 | 2020-11-30 12:16:17 -0700 | [diff] [blame] | 824 | img_filter_cubic = "VUID-vkCmdDrawIndirectByteCountEXT-None-02693"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 825 | filter_cubic = "VUID-vkCmdDrawIndirectByteCountEXT-filterCubic-02694"; |
| 826 | filter_cubic_min_max = "VUID-vkCmdDrawIndirectByteCountEXT-filterCubicMinmax-02695"; |
Tobias Hector | 6663c9b | 2020-11-05 10:18:02 +0000 | [diff] [blame] | 827 | viewport_count_primitive_shading_rate = "VUID-vkCmdDrawIndirectByteCountEXT-primitiveFragmentShadingRateWithMultipleViewports-04552"; |
Piers Daniell | 924cd83 | 2021-05-18 13:48:47 -0600 | [diff] [blame] | 828 | patch_control_points = "VUID-vkCmdDrawIndirectByteCountEXT-None-04875"; |
| 829 | rasterizer_discard_enable = "VUID-vkCmdDrawIndirectByteCountEXT-None-04876"; |
| 830 | depth_bias_enable = "VUID-vkCmdDrawIndirectByteCountEXT-None-04877"; |
| 831 | logic_op = "VUID-vkCmdDrawIndirectByteCountEXT-logicOp-04878"; |
| 832 | primitive_restart_enable = "VUID-vkCmdDrawIndirectByteCountEXT-None-04879"; |
| 833 | vertex_input_binding_stride = "VUID-vkCmdDrawIndirectByteCountEXT-pStrides-04884"; |
| 834 | vertex_input = kVUID_Core_CmdDrawIndirectByteCountEXT_VertexInput; |
ziga-lunarg | 8d62f95 | 2021-08-30 16:47:25 +0200 | [diff] [blame] | 835 | blend_enable = "VUID-vkCmdDrawIndirectByteCountEXT-blendEnable-04727"; |
Lionel Landwerlin | 88423cb | 2021-12-07 15:31:02 +0200 | [diff] [blame^] | 836 | storage_image_read_without_format = "VUID-vkCmdDrawIndirectByteCountEXT-OpTypeImage-06424"; |
| 837 | storage_image_write_without_format = "VUID-vkCmdDrawIndirectByteCountEXT-OpTypeImage-06423"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 838 | } |
| 839 | }; |
| 840 | |
| 841 | struct DispatchVuidsCmdDispatchBase: DrawDispatchVuid { |
| 842 | DispatchVuidsCmdDispatchBase() : DrawDispatchVuid() { |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 843 | pipeline_bound = "VUID-vkCmdDispatchBase-None-02700"; |
Mark Lobodzinski | 02d3755 | 2020-12-28 13:29:46 -0700 | [diff] [blame] | 844 | dynamic_state = "VUID-vkCmdDispatchBase-commandBuffer-02701"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 845 | compatible_pipeline = "VUID-vkCmdDispatchBase-None-02697"; |
| 846 | linear_sampler = "VUID-vkCmdDispatchBase-magFilter-04553"; |
| 847 | cubic_sampler = "VUID-vkCmdDispatchBase-None-02692"; |
| 848 | corner_sampled_address_mode = "VUID-vkCmdDispatchBase-flags-02696"; |
| 849 | imageview_atomic = "VUID-vkCmdDispatchBase-None-02691"; |
Piers Daniell | a7f93b6 | 2021-11-20 12:32:04 -0700 | [diff] [blame] | 850 | push_constants_set = "VUID-vkCmdDispatchBase-maintenance4-06425"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 851 | descriptor_valid = "VUID-vkCmdDispatchBase-None-02699"; |
| 852 | sampler_imageview_type = "VUID-vkCmdDispatchBase-None-02702"; |
| 853 | sampler_implicitLod_dref_proj = "VUID-vkCmdDispatchBase-None-02703"; |
| 854 | sampler_bias_offset = "VUID-vkCmdDispatchBase-None-02704"; |
| 855 | dynamic_state_setting_commands = "VUID-vkCmdDispatchBase-None-02859"; |
| 856 | unprotected_command_buffer = "VUID-vkCmdDispatchBase-commandBuffer-02707"; |
sfricke-samsung | e79d089 | 2021-06-17 08:56:22 -0700 | [diff] [blame] | 857 | protected_command_buffer = "VUID-vkCmdDispatchBase-commandBuffer-02712"; |
Mark Lobodzinski | f786b41 | 2020-11-30 12:16:17 -0700 | [diff] [blame] | 858 | img_filter_cubic = "VUID-vkCmdDispatchBase-None-02693"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 859 | filter_cubic = "VUID-vkCmdDispatchBase-filterCubic-02694"; |
| 860 | filter_cubic_min_max = "VUID-vkCmdDispatchBase-filterCubicMinmax-02695"; |
Lionel Landwerlin | 88423cb | 2021-12-07 15:31:02 +0200 | [diff] [blame^] | 861 | storage_image_read_without_format = "VUID-vkCmdDispatchBase-OpTypeImage-06424"; |
| 862 | storage_image_write_without_format = "VUID-vkCmdDispatchBase-OpTypeImage-06423"; |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 863 | } |
| 864 | }; |
| 865 | |
| 866 | // This LUT is created to allow a static listing of each VUID that is covered by drawdispatch commands |
Nathaniel Cesario | ce9b481 | 2020-12-17 08:55:28 -0700 | [diff] [blame] | 867 | static const std::map<CMD_TYPE, DrawDispatchVuid> kDrawdispatchVuid = { |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 868 | {CMD_DRAW, DispatchVuidsCmdDraw()}, |
Tony-LunarG | 4490de4 | 2021-06-21 15:49:19 -0600 | [diff] [blame] | 869 | {CMD_DRAWMULTIEXT, DispatchVuidsCmdDrawMultiEXT()}, |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 870 | {CMD_DRAWINDEXED, DispatchVuidsCmdDrawIndexed()}, |
Tony-LunarG | 4490de4 | 2021-06-21 15:49:19 -0600 | [diff] [blame] | 871 | {CMD_DRAWMULTIINDEXEDEXT, DispatchVuidsCmdDrawMultiIndexedEXT()}, |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 872 | {CMD_DRAWINDIRECT, DispatchVuidsCmdDrawIndirect()}, |
| 873 | {CMD_DRAWINDEXEDINDIRECT, DispatchVuidsCmdDrawIndexedIndirect()}, |
| 874 | {CMD_DISPATCH, DispatchVuidsCmdDispatch()}, |
| 875 | {CMD_DISPATCHINDIRECT, DispatchVuidsCmdDispatchIndirect()}, |
| 876 | {CMD_DRAWINDIRECTCOUNT, DispatchVuidsCmdDrawIndirectCount()}, |
sfricke-samsung | 85584a7 | 2021-09-30 21:43:38 -0700 | [diff] [blame] | 877 | {CMD_DRAWINDIRECTCOUNTKHR, DispatchVuidsCmdDrawIndirectCount()}, |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 878 | {CMD_DRAWINDEXEDINDIRECTCOUNT, DispatchVuidsCmdDrawIndexedIndirectCount()}, |
sfricke-samsung | 85584a7 | 2021-09-30 21:43:38 -0700 | [diff] [blame] | 879 | {CMD_DRAWINDEXEDINDIRECTCOUNTKHR, DispatchVuidsCmdDrawIndexedIndirectCount()}, |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 880 | {CMD_TRACERAYSNV, DispatchVuidsCmdTraceRaysNV()}, |
| 881 | {CMD_TRACERAYSKHR, DispatchVuidsCmdTraceRaysKHR()}, |
| 882 | {CMD_TRACERAYSINDIRECTKHR, DispatchVuidsCmdTraceRaysIndirectKHR()}, |
| 883 | {CMD_DRAWMESHTASKSNV, DispatchVuidsCmdDrawMeshTasksNV()}, |
| 884 | {CMD_DRAWMESHTASKSINDIRECTNV, DispatchVuidsCmdDrawMeshTasksIndirectNV()}, |
| 885 | {CMD_DRAWMESHTASKSINDIRECTCOUNTNV, DispatchVuidsCmdDrawMeshTasksIndirectCountNV()}, |
| 886 | {CMD_DRAWINDIRECTBYTECOUNTEXT, DispatchVuidsCmdDrawIndirectByteCountEXT()}, |
| 887 | {CMD_DISPATCHBASE, DispatchVuidsCmdDispatchBase()}, |
sfricke-samsung | 85584a7 | 2021-09-30 21:43:38 -0700 | [diff] [blame] | 888 | {CMD_DISPATCHBASEKHR, DispatchVuidsCmdDispatchBase()}, |
Spencer Fricke | 507600b | 2020-03-22 13:23:06 -0700 | [diff] [blame] | 889 | // Used if invalid cmd_type is used |
Mark Lobodzinski | ddf4361 | 2020-11-17 11:28:02 -0700 | [diff] [blame] | 890 | {CMD_NONE, DrawDispatchVuid()} |
Spencer Fricke | 507600b | 2020-03-22 13:23:06 -0700 | [diff] [blame] | 891 | }; |
| 892 | // clang-format on |
| 893 | |
| 894 | // Getter function to provide kVUIDUndefined in case an invalid cmd_type is passed in |
| 895 | const DrawDispatchVuid &CoreChecks::GetDrawDispatchVuid(CMD_TYPE cmd_type) const { |
Nathaniel Cesario | ce9b481 | 2020-12-17 08:55:28 -0700 | [diff] [blame] | 896 | if (kDrawdispatchVuid.find(cmd_type) != kDrawdispatchVuid.cend()) { |
| 897 | return kDrawdispatchVuid.at(cmd_type); |
Spencer Fricke | 507600b | 2020-03-22 13:23:06 -0700 | [diff] [blame] | 898 | } else { |
Nathaniel Cesario | ce9b481 | 2020-12-17 08:55:28 -0700 | [diff] [blame] | 899 | return kDrawdispatchVuid.at(CMD_NONE); |
Spencer Fricke | 507600b | 2020-03-22 13:23:06 -0700 | [diff] [blame] | 900 | } |
| 901 | } |
| 902 | |
Jasper St. Pierre | 512613a | 2019-04-08 16:25:23 -0700 | [diff] [blame] | 903 | // Generic function to handle validation for all CmdDraw* type functions |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 904 | bool CoreChecks::ValidateCmdDrawType(const CMD_BUFFER_STATE &cb_state, bool indexed, VkPipelineBindPoint bind_point, |
sfricke-samsung | 85584a7 | 2021-09-30 21:43:38 -0700 | [diff] [blame] | 905 | CMD_TYPE cmd_type) const { |
Jasper St. Pierre | 512613a | 2019-04-08 16:25:23 -0700 | [diff] [blame] | 906 | bool skip = false; |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 907 | skip |= ValidateCmd(&cb_state, cmd_type); |
| 908 | skip |= ValidateCmdBufDrawState(&cb_state, cmd_type, indexed, bind_point); |
| 909 | skip |= ValidateCmdRayQueryState(&cb_state, cmd_type, bind_point); |
Jasper St. Pierre | 512613a | 2019-04-08 16:25:23 -0700 | [diff] [blame] | 910 | return skip; |
| 911 | } |
| 912 | |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 913 | bool CoreChecks::ValidateCmdDrawInstance(const CMD_BUFFER_STATE &cb_node, uint32_t instanceCount, uint32_t firstInstance, |
sfricke-samsung | 85584a7 | 2021-09-30 21:43:38 -0700 | [diff] [blame] | 914 | CMD_TYPE cmd_type) const { |
locke-lunarg | 3fa463a | 2020-10-23 16:39:04 -0600 | [diff] [blame] | 915 | bool skip = false; |
| 916 | const DrawDispatchVuid vuid = GetDrawDispatchVuid(cmd_type); |
sfricke-samsung | 85584a7 | 2021-09-30 21:43:38 -0700 | [diff] [blame] | 917 | const char *caller = CommandTypeString(cmd_type); |
locke-lunarg | 3fa463a | 2020-10-23 16:39:04 -0600 | [diff] [blame] | 918 | |
| 919 | // Verify maxMultiviewInstanceIndex |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 920 | if (cb_node.activeRenderPass && cb_node.activeRenderPass->renderPass() && enabled_features.multiview_features.multiview && |
locke-lunarg | 3fa463a | 2020-10-23 16:39:04 -0600 | [diff] [blame] | 921 | ((instanceCount + firstInstance) > phys_dev_ext_props.multiview_props.maxMultiviewInstanceIndex)) { |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 922 | LogObjectList objlist(cb_node.Handle()); |
| 923 | objlist.add(cb_node.activeRenderPass->Handle()); |
locke-lunarg | 3fa463a | 2020-10-23 16:39:04 -0600 | [diff] [blame] | 924 | skip |= LogError(objlist, vuid.max_multiview_instance_index, |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 925 | "%s: renderpass %s multiview is enabled, and maxMultiviewInstanceIndex: %" PRIu32 |
| 926 | ", but instanceCount: %" PRIu32 "and firstInstance: %" PRIu32 ".", |
| 927 | caller, report_data->FormatHandle(cb_node.activeRenderPass->Handle()).c_str(), |
locke-lunarg | 3fa463a | 2020-10-23 16:39:04 -0600 | [diff] [blame] | 928 | phys_dev_ext_props.multiview_props.maxMultiviewInstanceIndex, instanceCount, firstInstance); |
| 929 | } |
| 930 | return skip; |
| 931 | } |
| 932 | |
Jasper St. Pierre | 512613a | 2019-04-08 16:25:23 -0700 | [diff] [blame] | 933 | bool CoreChecks::PreCallValidateCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, |
Jeff Bolz | 5c801d1 | 2019-10-09 10:38:45 -0500 | [diff] [blame] | 934 | uint32_t firstVertex, uint32_t firstInstance) const { |
locke-lunarg | 3fa463a | 2020-10-23 16:39:04 -0600 | [diff] [blame] | 935 | bool skip = false; |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 936 | const auto cb_state = Get<CMD_BUFFER_STATE>(commandBuffer); |
| 937 | skip |= ValidateCmdDrawInstance(*cb_state, instanceCount, firstInstance, CMD_DRAW); |
| 938 | skip |= ValidateCmdDrawType(*cb_state, false, VK_PIPELINE_BIND_POINT_GRAPHICS, CMD_DRAW); |
locke-lunarg | 3fa463a | 2020-10-23 16:39:04 -0600 | [diff] [blame] | 939 | return skip; |
Jasper St. Pierre | 512613a | 2019-04-08 16:25:23 -0700 | [diff] [blame] | 940 | } |
| 941 | |
Tony-LunarG | 4490de4 | 2021-06-21 15:49:19 -0600 | [diff] [blame] | 942 | bool CoreChecks::PreCallValidateCmdDrawMultiEXT(VkCommandBuffer commandBuffer, uint32_t drawCount, |
| 943 | const VkMultiDrawInfoEXT *pVertexInfo, uint32_t instanceCount, |
| 944 | uint32_t firstInstance, uint32_t stride) const { |
| 945 | bool skip = false; |
| 946 | if (!enabled_features.multi_draw_features.multiDraw) { |
| 947 | skip |= LogError(commandBuffer, "VUID-vkCmdDrawMultiEXT-None-04933", |
| 948 | "vkCmdDrawMultiEXT(): The multiDraw feature must be enabled to " |
| 949 | "call this command."); |
| 950 | } |
| 951 | if (drawCount > phys_dev_ext_props.multi_draw_props.maxMultiDrawCount) { |
| 952 | skip |= LogError(commandBuffer, "VUID-vkCmdDrawMultiEXT-drawCount-04934", |
| 953 | "vkCmdDrawMultiEXT(): parameter, uint32_t drawCount (%" PRIu32 |
| 954 | ") must be less than VkPhysicalDeviceMultiDrawPropertiesEXT::maxMultiDrawCount (%" PRIu32 ").", |
| 955 | drawCount, phys_dev_ext_props.multi_draw_props.maxMultiDrawCount); |
| 956 | } |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 957 | const auto cb_state = Get<CMD_BUFFER_STATE>(commandBuffer); |
| 958 | skip |= ValidateCmdDrawInstance(*cb_state, instanceCount, firstInstance, CMD_DRAWMULTIEXT); |
| 959 | skip |= ValidateCmdDrawType(*cb_state, false, VK_PIPELINE_BIND_POINT_GRAPHICS, CMD_DRAWMULTIEXT); |
Tony-LunarG | 4490de4 | 2021-06-21 15:49:19 -0600 | [diff] [blame] | 960 | return skip; |
| 961 | } |
| 962 | |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 963 | bool CoreChecks::ValidateCmdDrawIndexedBufferSize(const CMD_BUFFER_STATE &cb_state, uint32_t indexCount, uint32_t firstIndex, |
| 964 | const char *caller, const char *first_index_vuid) const { |
Tony-LunarG | 4490de4 | 2021-06-21 15:49:19 -0600 | [diff] [blame] | 965 | bool skip = false; |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 966 | if (cb_state.status & CBSTATUS_INDEX_BUFFER_BOUND) { |
Tony-LunarG | 4490de4 | 2021-06-21 15:49:19 -0600 | [diff] [blame] | 967 | unsigned int index_size = 0; |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 968 | const auto &index_buffer_binding = cb_state.index_buffer_binding; |
Tony-LunarG | 4490de4 | 2021-06-21 15:49:19 -0600 | [diff] [blame] | 969 | if (index_buffer_binding.index_type == VK_INDEX_TYPE_UINT16) { |
| 970 | index_size = 2; |
| 971 | } |
| 972 | else if (index_buffer_binding.index_type == VK_INDEX_TYPE_UINT32) { |
| 973 | index_size = 4; |
| 974 | } |
| 975 | else if (index_buffer_binding.index_type == VK_INDEX_TYPE_UINT8_EXT) { |
| 976 | index_size = 1; |
| 977 | } |
| 978 | VkDeviceSize end_offset = (index_size * (static_cast<VkDeviceSize>(firstIndex) + indexCount)) + index_buffer_binding.offset; |
| 979 | if (end_offset > index_buffer_binding.size) { |
| 980 | skip |= LogError(index_buffer_binding.buffer_state->buffer(), first_index_vuid, |
| 981 | "%s: index size (%u) * (firstIndex (%u) + indexCount (%u)) " |
| 982 | "+ binding offset (%" PRIuLEAST64 ") = an ending offset of %" PRIuLEAST64 |
| 983 | " bytes, which is greater than the index buffer size (%" PRIuLEAST64 ").", |
| 984 | caller, index_size, firstIndex, indexCount, index_buffer_binding.offset, end_offset, |
| 985 | index_buffer_binding.size); |
| 986 | } |
| 987 | } |
| 988 | return skip; |
| 989 | } |
| 990 | |
Jasper St. Pierre | 512613a | 2019-04-08 16:25:23 -0700 | [diff] [blame] | 991 | bool CoreChecks::PreCallValidateCmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, |
Jeff Bolz | 5c801d1 | 2019-10-09 10:38:45 -0500 | [diff] [blame] | 992 | uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance) const { |
locke-lunarg | 3fa463a | 2020-10-23 16:39:04 -0600 | [diff] [blame] | 993 | bool skip = false; |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 994 | const auto cb_state = Get<CMD_BUFFER_STATE>(commandBuffer); |
| 995 | skip |= ValidateCmdDrawInstance(*cb_state, instanceCount, firstInstance, CMD_DRAWINDEXED); |
| 996 | skip |= ValidateCmdDrawType(*cb_state, true, VK_PIPELINE_BIND_POINT_GRAPHICS, CMD_DRAWINDEXED); |
| 997 | skip |= ValidateCmdDrawIndexedBufferSize(*cb_state, indexCount, firstIndex, "vkCmdDrawIndexed()", |
Tony-LunarG | 4490de4 | 2021-06-21 15:49:19 -0600 | [diff] [blame] | 998 | "VUID-vkCmdDrawIndexed-firstIndex-04932"); |
| 999 | return skip; |
| 1000 | } |
| 1001 | |
| 1002 | bool CoreChecks::PreCallValidateCmdDrawMultiIndexedEXT(VkCommandBuffer commandBuffer, uint32_t drawCount, |
| 1003 | const VkMultiDrawIndexedInfoEXT *pIndexInfo, uint32_t instanceCount, |
| 1004 | uint32_t firstInstance, uint32_t stride, |
| 1005 | const int32_t *pVertexOffset) const { |
| 1006 | bool skip = false; |
| 1007 | if (!enabled_features.multi_draw_features.multiDraw) { |
| 1008 | skip |= LogError(commandBuffer, "VUID-vkCmdDrawMultiIndexedEXT-None-04937", |
| 1009 | "vkCmdDrawMultiIndexedEXT(): The multiDraw feature must be enabled to " |
| 1010 | "call this command."); |
| 1011 | } |
| 1012 | if (drawCount > phys_dev_ext_props.multi_draw_props.maxMultiDrawCount) { |
| 1013 | skip |= LogError(commandBuffer, "VUID-vkCmdDrawMultiIndexedEXT-drawCount-04939", |
| 1014 | "vkCmdDrawMultiIndexedEXT(): parameter, uint32_t drawCount (0x%" PRIu32 |
| 1015 | ") must be less than VkPhysicalDeviceMultiDrawPropertiesEXT::maxMultiDrawCount (0x%" PRIu32 ").", |
| 1016 | drawCount, phys_dev_ext_props.multi_draw_props.maxMultiDrawCount); |
| 1017 | } |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 1018 | const auto cb_state = Get<CMD_BUFFER_STATE>(commandBuffer); |
| 1019 | skip |= ValidateCmdDrawInstance(*cb_state, instanceCount, firstInstance, CMD_DRAWMULTIINDEXEDEXT); |
| 1020 | skip |= ValidateCmdDrawType(*cb_state, true, VK_PIPELINE_BIND_POINT_GRAPHICS, CMD_DRAWMULTIINDEXEDEXT); |
Ricardo Garcia | 27a26f5 | 2021-07-13 15:52:14 +0200 | [diff] [blame] | 1021 | const auto info_bytes = reinterpret_cast<const char *>(pIndexInfo); |
Tony-LunarG | 4490de4 | 2021-06-21 15:49:19 -0600 | [diff] [blame] | 1022 | for (uint32_t i = 0; i < drawCount; i++) { |
Ricardo Garcia | 27a26f5 | 2021-07-13 15:52:14 +0200 | [diff] [blame] | 1023 | const auto info_ptr = reinterpret_cast<const VkMultiDrawIndexedInfoEXT *>(info_bytes + i * stride); |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 1024 | skip |= ValidateCmdDrawIndexedBufferSize(*cb_state, info_ptr->indexCount, info_ptr->firstIndex, |
Tony-LunarG | 4490de4 | 2021-06-21 15:49:19 -0600 | [diff] [blame] | 1025 | "vkCmdDrawMultiIndexedEXT()", "VUID-vkCmdDrawMultiIndexedEXT-firstIndex-04938"); |
Jasper St. Pierre | 512613a | 2019-04-08 16:25:23 -0700 | [diff] [blame] | 1026 | } |
| 1027 | return skip; |
| 1028 | } |
| 1029 | |
Tony-LunarG | c0c3df5 | 2020-11-20 13:47:10 -0700 | [diff] [blame] | 1030 | bool CoreChecks::PreCallValidateCmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, |
| 1031 | uint32_t drawCount, uint32_t stride) const { |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 1032 | const auto cb_state = Get<CMD_BUFFER_STATE>(commandBuffer); |
| 1033 | bool skip = ValidateCmdDrawType(*cb_state, false, VK_PIPELINE_BIND_POINT_GRAPHICS, CMD_DRAWINDIRECT); |
Jeremy Gebben | b20a824 | 2021-11-05 15:14:43 -0600 | [diff] [blame] | 1034 | const auto buffer_state = Get<BUFFER_STATE>(buffer); |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 1035 | skip |= ValidateIndirectCmd(*cb_state, *buffer_state, CMD_DRAWINDIRECT); |
Tony-LunarG | c0c3df5 | 2020-11-20 13:47:10 -0700 | [diff] [blame] | 1036 | if (drawCount > 1) { |
Locke | e68ac65 | 2019-05-06 10:17:33 -0600 | [diff] [blame] | 1037 | skip |= ValidateCmdDrawStrideWithStruct(commandBuffer, "VUID-vkCmdDrawIndirect-drawCount-00476", stride, |
| 1038 | "VkDrawIndirectCommand", sizeof(VkDrawIndirectCommand)); |
Tony-LunarG | c0c3df5 | 2020-11-20 13:47:10 -0700 | [diff] [blame] | 1039 | skip |= ValidateCmdDrawStrideWithBuffer(commandBuffer, "VUID-vkCmdDrawIndirect-drawCount-00488", stride, |
| 1040 | "VkDrawIndirectCommand", sizeof(VkDrawIndirectCommand), drawCount, offset, |
Jeremy Gebben | 9f53710 | 2021-10-05 16:37:12 -0600 | [diff] [blame] | 1041 | buffer_state.get()); |
Tony-LunarG | c0c3df5 | 2020-11-20 13:47:10 -0700 | [diff] [blame] | 1042 | } else if ((drawCount == 1) && (offset + sizeof(VkDrawIndirectCommand)) > buffer_state->createInfo.size) { |
| 1043 | skip |= LogError(commandBuffer, "VUID-vkCmdDrawIndirect-drawCount-00487", |
Jeremy Gebben | da6b48f | 2021-05-13 10:46:18 -0600 | [diff] [blame] | 1044 | "CmdDrawIndirect: drawCount equals 1 and (offset + sizeof(VkDrawIndirectCommand)) (%" PRIu64 ") is not less than " |
| 1045 | "or equal to the size of buffer (%" PRIu64 ").", |
Tony-LunarG | c0c3df5 | 2020-11-20 13:47:10 -0700 | [diff] [blame] | 1046 | (offset + sizeof(VkDrawIndirectCommand)), buffer_state->createInfo.size); |
Locke | e68ac65 | 2019-05-06 10:17:33 -0600 | [diff] [blame] | 1047 | } |
Jasper St. Pierre | 512613a | 2019-04-08 16:25:23 -0700 | [diff] [blame] | 1048 | // TODO: If the drawIndirectFirstInstance feature is not enabled, all the firstInstance members of the |
| 1049 | // VkDrawIndirectCommand structures accessed by this command must be 0, which will require access to the contents of 'buffer'. |
| 1050 | return skip; |
| 1051 | } |
| 1052 | |
Jasper St. Pierre | 512613a | 2019-04-08 16:25:23 -0700 | [diff] [blame] | 1053 | bool CoreChecks::PreCallValidateCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, |
Tony-LunarG | c0c3df5 | 2020-11-20 13:47:10 -0700 | [diff] [blame] | 1054 | uint32_t drawCount, uint32_t stride) const { |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 1055 | const auto cb_state = Get<CMD_BUFFER_STATE>(commandBuffer); |
| 1056 | bool skip = ValidateCmdDrawType(*cb_state, true, VK_PIPELINE_BIND_POINT_GRAPHICS, CMD_DRAWINDEXEDINDIRECT); |
Jeremy Gebben | b20a824 | 2021-11-05 15:14:43 -0600 | [diff] [blame] | 1057 | const auto buffer_state = Get<BUFFER_STATE>(buffer); |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 1058 | skip |= ValidateIndirectCmd(*cb_state, *buffer_state, CMD_DRAWINDEXEDINDIRECT); |
Tony-LunarG | c0c3df5 | 2020-11-20 13:47:10 -0700 | [diff] [blame] | 1059 | if (drawCount > 1) { |
Locke | e68ac65 | 2019-05-06 10:17:33 -0600 | [diff] [blame] | 1060 | skip |= ValidateCmdDrawStrideWithStruct(commandBuffer, "VUID-vkCmdDrawIndexedIndirect-drawCount-00528", stride, |
| 1061 | "VkDrawIndexedIndirectCommand", sizeof(VkDrawIndexedIndirectCommand)); |
| 1062 | skip |= ValidateCmdDrawStrideWithBuffer(commandBuffer, "VUID-vkCmdDrawIndexedIndirect-drawCount-00540", stride, |
Tony-LunarG | c0c3df5 | 2020-11-20 13:47:10 -0700 | [diff] [blame] | 1063 | "VkDrawIndexedIndirectCommand", sizeof(VkDrawIndexedIndirectCommand), drawCount, |
Jeremy Gebben | 9f53710 | 2021-10-05 16:37:12 -0600 | [diff] [blame] | 1064 | offset, buffer_state.get()); |
Tony-LunarG | c0c3df5 | 2020-11-20 13:47:10 -0700 | [diff] [blame] | 1065 | } else if ((drawCount == 1) && (offset + sizeof(VkDrawIndexedIndirectCommand)) > buffer_state->createInfo.size) { |
| 1066 | skip |= LogError( |
| 1067 | commandBuffer, "VUID-vkCmdDrawIndexedIndirect-drawCount-00539", |
Jeremy Gebben | da6b48f | 2021-05-13 10:46:18 -0600 | [diff] [blame] | 1068 | "CmdDrawIndexedIndirect: drawCount equals 1 and (offset + sizeof(VkDrawIndexedIndirectCommand)) (%" PRIu64 ") is not less than " |
| 1069 | "or equal to the size of buffer (%" PRIu64 ").", |
Tony-LunarG | c0c3df5 | 2020-11-20 13:47:10 -0700 | [diff] [blame] | 1070 | (offset + sizeof(VkDrawIndexedIndirectCommand)), buffer_state->createInfo.size); |
Locke | e68ac65 | 2019-05-06 10:17:33 -0600 | [diff] [blame] | 1071 | } |
Jasper St. Pierre | 512613a | 2019-04-08 16:25:23 -0700 | [diff] [blame] | 1072 | // TODO: If the drawIndirectFirstInstance feature is not enabled, all the firstInstance members of the |
| 1073 | // VkDrawIndexedIndirectCommand structures accessed by this command must be 0, which will require access to the contents of |
| 1074 | // 'buffer'. |
| 1075 | return skip; |
| 1076 | } |
| 1077 | |
Jeff Bolz | 5c801d1 | 2019-10-09 10:38:45 -0500 | [diff] [blame] | 1078 | bool CoreChecks::PreCallValidateCmdDispatch(VkCommandBuffer commandBuffer, uint32_t x, uint32_t y, uint32_t z) const { |
Locke | f39c077 | 2019-04-03 14:40:02 -0600 | [diff] [blame] | 1079 | bool skip = false; |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 1080 | const auto cb_state = Get<CMD_BUFFER_STATE>(commandBuffer); |
| 1081 | skip |= ValidateCmdDrawType(*cb_state, false, VK_PIPELINE_BIND_POINT_COMPUTE, CMD_DISPATCH); |
Locke | f39c077 | 2019-04-03 14:40:02 -0600 | [diff] [blame] | 1082 | return skip; |
Jasper St. Pierre | 512613a | 2019-04-08 16:25:23 -0700 | [diff] [blame] | 1083 | } |
| 1084 | |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 1085 | bool CoreChecks::ValidateBaseGroups(const CMD_BUFFER_STATE &cb_state, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, |
Tony-LunarG | f825e6d | 2020-12-16 13:05:17 -0700 | [diff] [blame] | 1086 | const char *apiName) const { |
| 1087 | bool skip = false; |
| 1088 | if (baseGroupX || baseGroupY || baseGroupZ) { |
Tony-LunarG | f825e6d | 2020-12-16 13:05:17 -0700 | [diff] [blame] | 1089 | const auto lv_bind_point = ConvertToLvlBindPoint(VK_PIPELINE_BIND_POINT_COMPUTE); |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 1090 | const auto *pipeline_state = cb_state.lastBound[lv_bind_point].pipeline_state; |
Jeremy Gebben | 11af979 | 2021-08-20 10:20:09 -0600 | [diff] [blame] | 1091 | if (pipeline_state && !(pipeline_state->GetPipelineCreateFlags() & VK_PIPELINE_CREATE_DISPATCH_BASE)) { |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 1092 | skip |= LogError(cb_state.Handle(), "VUID-vkCmdDispatchBase-baseGroupX-00427", |
Tony-LunarG | f825e6d | 2020-12-16 13:05:17 -0700 | [diff] [blame] | 1093 | "%s(): If any of baseGroupX, baseGroupY, or baseGroupZ are not zero, then the bound compute pipeline " |
| 1094 | "must have been created with the VK_PIPELINE_CREATE_DISPATCH_BASE flag", |
| 1095 | apiName); |
| 1096 | } |
| 1097 | } |
| 1098 | return skip; |
| 1099 | } |
| 1100 | |
locke-lunarg | 25b6c35 | 2020-08-06 17:44:18 -0600 | [diff] [blame] | 1101 | bool CoreChecks::PreCallValidateCmdDispatchBase(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, |
| 1102 | uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, |
| 1103 | uint32_t groupCountZ) const { |
| 1104 | bool skip = false; |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 1105 | const auto cb_state = Get<CMD_BUFFER_STATE>(commandBuffer); |
| 1106 | skip |= ValidateCmdDrawType(*cb_state, false, VK_PIPELINE_BIND_POINT_COMPUTE, CMD_DISPATCHBASE); |
| 1107 | skip |= ValidateBaseGroups(*cb_state, baseGroupX, baseGroupY, baseGroupZ, "vkCmdDispatchBase()"); |
locke-lunarg | 25b6c35 | 2020-08-06 17:44:18 -0600 | [diff] [blame] | 1108 | return skip; |
| 1109 | } |
| 1110 | |
| 1111 | bool CoreChecks::PreCallValidateCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, |
| 1112 | uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, |
| 1113 | uint32_t groupCountZ) const { |
| 1114 | bool skip = false; |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 1115 | const auto cb_state = Get<CMD_BUFFER_STATE>(commandBuffer); |
| 1116 | skip |= ValidateCmdDrawType(*cb_state, false, VK_PIPELINE_BIND_POINT_COMPUTE, CMD_DISPATCHBASEKHR); |
| 1117 | skip |= ValidateBaseGroups(*cb_state, baseGroupX, baseGroupY, baseGroupZ, "vkCmdDispatchBaseKHR()"); |
locke-lunarg | 25b6c35 | 2020-08-06 17:44:18 -0600 | [diff] [blame] | 1118 | return skip; |
| 1119 | } |
| 1120 | |
Jeff Bolz | 5c801d1 | 2019-10-09 10:38:45 -0500 | [diff] [blame] | 1121 | bool CoreChecks::PreCallValidateCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset) const { |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 1122 | const auto cb_state = Get<CMD_BUFFER_STATE>(commandBuffer); |
| 1123 | bool skip = ValidateCmdDrawType(*cb_state, false, VK_PIPELINE_BIND_POINT_COMPUTE, CMD_DISPATCHINDIRECT); |
Jeremy Gebben | b20a824 | 2021-11-05 15:14:43 -0600 | [diff] [blame] | 1124 | const auto buffer_state = Get<BUFFER_STATE>(buffer); |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 1125 | skip |= ValidateIndirectCmd(*cb_state, *buffer_state, CMD_DISPATCHINDIRECT); |
Tony-LunarG | da555b5 | 2021-01-06 13:43:49 -0700 | [diff] [blame] | 1126 | if ((offset + sizeof(VkDispatchIndirectCommand)) > buffer_state->createInfo.size) { |
| 1127 | skip |= LogError(commandBuffer, "VUID-vkCmdDispatchIndirect-offset-00407", |
| 1128 | "vkCmdDispatchIndirect(): The sum of offset and the size of VkDispatchIndirectCommand is greater than the " |
| 1129 | "size of the buffer"); |
| 1130 | } |
Jasper St. Pierre | 512613a | 2019-04-08 16:25:23 -0700 | [diff] [blame] | 1131 | return skip; |
| 1132 | } |
Tony-LunarG | a74d3fe | 2019-11-22 15:43:20 -0700 | [diff] [blame] | 1133 | bool CoreChecks::ValidateCmdDrawIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, |
| 1134 | VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, |
sfricke-samsung | 85584a7 | 2021-09-30 21:43:38 -0700 | [diff] [blame] | 1135 | uint32_t stride, CMD_TYPE cmd_type) const { |
Jasper St. Pierre | 512613a | 2019-04-08 16:25:23 -0700 | [diff] [blame] | 1136 | bool skip = false; |
sfricke-samsung | 85584a7 | 2021-09-30 21:43:38 -0700 | [diff] [blame] | 1137 | const char *apiName = CommandTypeString(cmd_type); |
Nathaniel Cesario | 7f231f1 | 2021-03-25 12:10:58 -0600 | [diff] [blame] | 1138 | if ((device_extensions.vk_khr_draw_indirect_count != kEnabledByCreateinfo) && |
| 1139 | ((api_version >= VK_API_VERSION_1_2) && (enabled_features.core12.drawIndirectCount == VK_FALSE))) { |
Shannon McPherson | 2c793ba | 2020-08-28 12:13:24 -0600 | [diff] [blame] | 1140 | skip |= LogError(commandBuffer, "VUID-vkCmdDrawIndirectCount-None-04445", |
sfricke-samsung | 27c7072 | 2020-05-02 08:42:39 -0700 | [diff] [blame] | 1141 | "%s(): Starting in Vulkan 1.2 the VkPhysicalDeviceVulkan12Features::drawIndirectCount must be enabled to " |
| 1142 | "call this command.", |
| 1143 | apiName); |
| 1144 | } |
AndreyVK_D3D | b2753e1 | 2021-07-21 12:24:03 +0300 | [diff] [blame] | 1145 | skip |= ValidateCmdDrawStrideWithStruct(commandBuffer, "VUID-vkCmdDrawIndirectCount-stride-03110", stride, |
| 1146 | "VkDrawIndirectCommand", sizeof(VkDrawIndirectCommand)); |
Locke | e68ac65 | 2019-05-06 10:17:33 -0600 | [diff] [blame] | 1147 | if (maxDrawCount > 1) { |
Jeremy Gebben | b20a824 | 2021-11-05 15:14:43 -0600 | [diff] [blame] | 1148 | const auto buffer_state = Get<BUFFER_STATE>(buffer); |
AndreyVK_D3D | b2753e1 | 2021-07-21 12:24:03 +0300 | [diff] [blame] | 1149 | skip |= ValidateCmdDrawStrideWithBuffer(commandBuffer, "VUID-vkCmdDrawIndirectCount-maxDrawCount-03111", stride, |
| 1150 | "VkDrawIndirectCommand", sizeof(VkDrawIndirectCommand), maxDrawCount, offset, |
Jeremy Gebben | 9f53710 | 2021-10-05 16:37:12 -0600 | [diff] [blame] | 1151 | buffer_state.get()); |
Jasper St. Pierre | 512613a | 2019-04-08 16:25:23 -0700 | [diff] [blame] | 1152 | } |
| 1153 | |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 1154 | const auto cb_state = Get<CMD_BUFFER_STATE>(commandBuffer); |
| 1155 | skip |= ValidateCmdDrawType(*cb_state, false, VK_PIPELINE_BIND_POINT_GRAPHICS, cmd_type); |
| 1156 | const auto buffer_state = Get<BUFFER_STATE>(buffer); |
| 1157 | skip |= ValidateIndirectCmd(*cb_state, *buffer_state, cmd_type); |
Jeremy Gebben | b20a824 | 2021-11-05 15:14:43 -0600 | [diff] [blame] | 1158 | const auto count_buffer_state = Get<BUFFER_STATE>(countBuffer); |
Jeremy Gebben | 9f53710 | 2021-10-05 16:37:12 -0600 | [diff] [blame] | 1159 | skip |= ValidateMemoryIsBoundToBuffer(count_buffer_state.get(), apiName, "VUID-vkCmdDrawIndirectCount-countBuffer-02714"); |
Tony-LunarG | 83544c7 | 2020-01-17 12:30:19 -0700 | [diff] [blame] | 1160 | skip |= |
Jeremy Gebben | 9f53710 | 2021-10-05 16:37:12 -0600 | [diff] [blame] | 1161 | ValidateBufferUsageFlags(count_buffer_state.get(), VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT, true, |
Tony-LunarG | 83544c7 | 2020-01-17 12:30:19 -0700 | [diff] [blame] | 1162 | "VUID-vkCmdDrawIndirectCount-countBuffer-02715", apiName, "VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT"); |
Jasper St. Pierre | 512613a | 2019-04-08 16:25:23 -0700 | [diff] [blame] | 1163 | return skip; |
| 1164 | } |
| 1165 | |
Tony-LunarG | a74d3fe | 2019-11-22 15:43:20 -0700 | [diff] [blame] | 1166 | bool CoreChecks::PreCallValidateCmdDrawIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, |
| 1167 | VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, |
| 1168 | uint32_t stride) const { |
Tony-LunarG | 83544c7 | 2020-01-17 12:30:19 -0700 | [diff] [blame] | 1169 | return ValidateCmdDrawIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride, |
sfricke-samsung | 85584a7 | 2021-09-30 21:43:38 -0700 | [diff] [blame] | 1170 | CMD_DRAWINDIRECTCOUNTKHR); |
Tony-LunarG | a74d3fe | 2019-11-22 15:43:20 -0700 | [diff] [blame] | 1171 | } |
| 1172 | |
| 1173 | bool CoreChecks::PreCallValidateCmdDrawIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, |
| 1174 | VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, |
| 1175 | uint32_t stride) const { |
Tony-LunarG | 83544c7 | 2020-01-17 12:30:19 -0700 | [diff] [blame] | 1176 | return ValidateCmdDrawIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride, |
sfricke-samsung | 85584a7 | 2021-09-30 21:43:38 -0700 | [diff] [blame] | 1177 | CMD_DRAWINDIRECTCOUNT); |
Tony-LunarG | a74d3fe | 2019-11-22 15:43:20 -0700 | [diff] [blame] | 1178 | } |
| 1179 | |
| 1180 | bool CoreChecks::ValidateCmdDrawIndexedIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, |
| 1181 | VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, |
sfricke-samsung | 85584a7 | 2021-09-30 21:43:38 -0700 | [diff] [blame] | 1182 | uint32_t stride, CMD_TYPE cmd_type) const { |
Jasper St. Pierre | 512613a | 2019-04-08 16:25:23 -0700 | [diff] [blame] | 1183 | bool skip = false; |
sfricke-samsung | 85584a7 | 2021-09-30 21:43:38 -0700 | [diff] [blame] | 1184 | const char *apiName = CommandTypeString(cmd_type); |
Nathaniel Cesario | 7f231f1 | 2021-03-25 12:10:58 -0600 | [diff] [blame] | 1185 | if ((device_extensions.vk_khr_draw_indirect_count != kEnabledByCreateinfo) && |
| 1186 | ((api_version >= VK_API_VERSION_1_2) && (enabled_features.core12.drawIndirectCount == VK_FALSE))) { |
Shannon McPherson | 2c793ba | 2020-08-28 12:13:24 -0600 | [diff] [blame] | 1187 | skip |= LogError(commandBuffer, "VUID-vkCmdDrawIndexedIndirectCount-None-04445", |
sfricke-samsung | 27c7072 | 2020-05-02 08:42:39 -0700 | [diff] [blame] | 1188 | "%s(): Starting in Vulkan 1.2 the VkPhysicalDeviceVulkan12Features::drawIndirectCount must be enabled to " |
| 1189 | "call this command.", |
| 1190 | apiName); |
| 1191 | } |
AndreyVK_D3D | b2753e1 | 2021-07-21 12:24:03 +0300 | [diff] [blame] | 1192 | skip |= ValidateCmdDrawStrideWithStruct(commandBuffer, "VUID-vkCmdDrawIndexedIndirectCount-stride-03142", stride, |
| 1193 | "VkDrawIndexedIndirectCommand", sizeof(VkDrawIndexedIndirectCommand)); |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 1194 | const auto buffer_state = Get<BUFFER_STATE>(buffer); |
Locke | e68ac65 | 2019-05-06 10:17:33 -0600 | [diff] [blame] | 1195 | if (maxDrawCount > 1) { |
Mike Schuchardt | 65847d9 | 2019-12-20 13:50:47 -0800 | [diff] [blame] | 1196 | skip |= ValidateCmdDrawStrideWithBuffer(commandBuffer, "VUID-vkCmdDrawIndexedIndirectCount-maxDrawCount-03143", stride, |
AndreyVK_D3D | b2753e1 | 2021-07-21 12:24:03 +0300 | [diff] [blame] | 1197 | "VkDrawIndexedIndirectCommand", sizeof(VkDrawIndexedIndirectCommand), maxDrawCount, |
Jeremy Gebben | 9f53710 | 2021-10-05 16:37:12 -0600 | [diff] [blame] | 1198 | offset, buffer_state.get()); |
Jasper St. Pierre | 512613a | 2019-04-08 16:25:23 -0700 | [diff] [blame] | 1199 | } |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 1200 | const auto cb_state = Get<CMD_BUFFER_STATE>(commandBuffer); |
| 1201 | skip |= ValidateCmdDrawType(*cb_state, true, VK_PIPELINE_BIND_POINT_GRAPHICS, cmd_type); |
| 1202 | skip |= ValidateIndirectCmd(*cb_state, *buffer_state, cmd_type); |
Jeremy Gebben | b20a824 | 2021-11-05 15:14:43 -0600 | [diff] [blame] | 1203 | const auto count_buffer_state = Get<BUFFER_STATE>(countBuffer); |
Jeremy Gebben | 9f53710 | 2021-10-05 16:37:12 -0600 | [diff] [blame] | 1204 | skip |= |
| 1205 | ValidateMemoryIsBoundToBuffer(count_buffer_state.get(), apiName, "VUID-vkCmdDrawIndexedIndirectCount-countBuffer-02714"); |
| 1206 | skip |= ValidateBufferUsageFlags(count_buffer_state.get(), VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT, true, |
sfricke-samsung | f692b97 | 2020-05-02 08:00:45 -0700 | [diff] [blame] | 1207 | "VUID-vkCmdDrawIndexedIndirectCount-countBuffer-02715", apiName, |
Mike Schuchardt | 65847d9 | 2019-12-20 13:50:47 -0800 | [diff] [blame] | 1208 | "VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT"); |
Jasper St. Pierre | 512613a | 2019-04-08 16:25:23 -0700 | [diff] [blame] | 1209 | return skip; |
| 1210 | } |
| 1211 | |
Tony-LunarG | a74d3fe | 2019-11-22 15:43:20 -0700 | [diff] [blame] | 1212 | bool CoreChecks::PreCallValidateCmdDrawIndexedIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, |
| 1213 | VkBuffer countBuffer, VkDeviceSize countBufferOffset, |
| 1214 | uint32_t maxDrawCount, uint32_t stride) const { |
sfricke-samsung | f692b97 | 2020-05-02 08:00:45 -0700 | [diff] [blame] | 1215 | return ValidateCmdDrawIndexedIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride, |
sfricke-samsung | 85584a7 | 2021-09-30 21:43:38 -0700 | [diff] [blame] | 1216 | CMD_DRAWINDEXEDINDIRECTCOUNTKHR); |
Tony-LunarG | a74d3fe | 2019-11-22 15:43:20 -0700 | [diff] [blame] | 1217 | } |
| 1218 | |
| 1219 | bool CoreChecks::PreCallValidateCmdDrawIndexedIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, |
| 1220 | VkBuffer countBuffer, VkDeviceSize countBufferOffset, |
| 1221 | uint32_t maxDrawCount, uint32_t stride) const { |
sfricke-samsung | f692b97 | 2020-05-02 08:00:45 -0700 | [diff] [blame] | 1222 | return ValidateCmdDrawIndexedIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride, |
sfricke-samsung | 85584a7 | 2021-09-30 21:43:38 -0700 | [diff] [blame] | 1223 | CMD_DRAWINDEXEDINDIRECTCOUNT); |
Tony-LunarG | a74d3fe | 2019-11-22 15:43:20 -0700 | [diff] [blame] | 1224 | } |
| 1225 | |
locke-lunarg | 9a16ebb | 2020-07-30 16:56:33 -0600 | [diff] [blame] | 1226 | bool CoreChecks::PreCallValidateCmdDrawIndirectByteCountEXT(VkCommandBuffer commandBuffer, uint32_t instanceCount, |
| 1227 | uint32_t firstInstance, VkBuffer counterBuffer, |
| 1228 | VkDeviceSize counterBufferOffset, uint32_t counterOffset, |
| 1229 | uint32_t vertexStride) const { |
sfricke-samsung | d5e9adb | 2020-10-26 03:59:29 -0700 | [diff] [blame] | 1230 | bool skip = false; |
Tony-LunarG | 2c94ba8 | 2020-11-05 14:21:40 -0700 | [diff] [blame] | 1231 | if (!enabled_features.transform_feedback_features.transformFeedback) { |
| 1232 | skip |= LogError(commandBuffer, "VUID-vkCmdDrawIndirectByteCountEXT-transformFeedback-02287", |
| 1233 | "%s: transformFeedback feature is not enabled.", "vkCmdDrawIndirectByteCountEXT()"); |
| 1234 | } |
sfricke-samsung | 45996a4 | 2021-09-16 13:45:27 -0700 | [diff] [blame] | 1235 | if (IsExtEnabled(device_extensions.vk_ext_transform_feedback) && |
| 1236 | !phys_dev_ext_props.transform_feedback_props.transformFeedbackDraw) { |
sfricke-samsung | ba459bd | 2020-12-06 23:20:04 -0800 | [diff] [blame] | 1237 | skip |= LogError(commandBuffer, "VUID-vkCmdDrawIndirectByteCountEXT-transformFeedbackDraw-02288", |
Tony-LunarG | 2c94ba8 | 2020-11-05 14:21:40 -0700 | [diff] [blame] | 1238 | "%s: VkPhysicalDeviceTransformFeedbackPropertiesEXT::transformFeedbackDraw is not supported", |
| 1239 | "vkCmdDrawIndirectByteCountEXT()"); |
| 1240 | } |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 1241 | const auto cb_state = Get<CMD_BUFFER_STATE>(commandBuffer); |
| 1242 | skip |= ValidateCmdDrawInstance(*cb_state, instanceCount, firstInstance, CMD_DRAWINDIRECTBYTECOUNTEXT); |
| 1243 | skip |= ValidateCmdDrawType(*cb_state, false, VK_PIPELINE_BIND_POINT_GRAPHICS, CMD_DRAWINDIRECTBYTECOUNTEXT); |
| 1244 | const auto counter_buffer_state = Get<BUFFER_STATE>(counterBuffer); |
| 1245 | skip |= ValidateIndirectCmd(*cb_state, *counter_buffer_state, CMD_DRAWINDIRECTBYTECOUNTEXT); |
sfricke-samsung | d5e9adb | 2020-10-26 03:59:29 -0700 | [diff] [blame] | 1246 | return skip; |
locke-lunarg | 9a16ebb | 2020-07-30 16:56:33 -0600 | [diff] [blame] | 1247 | } |
| 1248 | |
Jeff Bolz | f6e872c | 2019-10-22 12:17:28 -0500 | [diff] [blame] | 1249 | bool CoreChecks::PreCallValidateCmdTraceRaysNV(VkCommandBuffer commandBuffer, VkBuffer raygenShaderBindingTableBuffer, |
| 1250 | VkDeviceSize raygenShaderBindingOffset, VkBuffer missShaderBindingTableBuffer, |
| 1251 | VkDeviceSize missShaderBindingOffset, VkDeviceSize missShaderBindingStride, |
| 1252 | VkBuffer hitShaderBindingTableBuffer, VkDeviceSize hitShaderBindingOffset, |
| 1253 | VkDeviceSize hitShaderBindingStride, VkBuffer callableShaderBindingTableBuffer, |
| 1254 | VkDeviceSize callableShaderBindingOffset, VkDeviceSize callableShaderBindingStride, |
| 1255 | uint32_t width, uint32_t height, uint32_t depth) const { |
Jeremy Gebben | b20a824 | 2021-11-05 15:14:43 -0600 | [diff] [blame] | 1256 | const auto cb_state = Get<CMD_BUFFER_STATE>(commandBuffer); |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 1257 | bool skip = ValidateCmdDrawType(*cb_state, true, VK_PIPELINE_BIND_POINT_RAY_TRACING_NV, CMD_TRACERAYSNV); |
Jeremy Gebben | b20a824 | 2021-11-05 15:14:43 -0600 | [diff] [blame] | 1258 | auto callable_shader_buffer_state = Get<BUFFER_STATE>(callableShaderBindingTableBuffer); |
sourav parmar | d152180 | 2020-06-07 21:49:02 -0700 | [diff] [blame] | 1259 | if (callable_shader_buffer_state && callableShaderBindingOffset >= callable_shader_buffer_state->createInfo.size) { |
| 1260 | skip |= LogError(commandBuffer, "VUID-vkCmdTraceRaysNV-callableShaderBindingOffset-02461", |
| 1261 | "vkCmdTraceRaysNV: callableShaderBindingOffset %" PRIu64 |
| 1262 | " must be less than the size of callableShaderBindingTableBuffer %" PRIu64 " .", |
| 1263 | callableShaderBindingOffset, callable_shader_buffer_state->createInfo.size); |
| 1264 | } |
Jeremy Gebben | b20a824 | 2021-11-05 15:14:43 -0600 | [diff] [blame] | 1265 | auto hit_shader_buffer_state = Get<BUFFER_STATE>(hitShaderBindingTableBuffer); |
sourav parmar | d152180 | 2020-06-07 21:49:02 -0700 | [diff] [blame] | 1266 | if (hit_shader_buffer_state && hitShaderBindingOffset >= hit_shader_buffer_state->createInfo.size) { |
| 1267 | skip |= LogError(commandBuffer, "VUID-vkCmdTraceRaysNV-hitShaderBindingOffset-02459", |
| 1268 | "vkCmdTraceRaysNV: hitShaderBindingOffset %" PRIu64 |
| 1269 | " must be less than the size of hitShaderBindingTableBuffer %" PRIu64 " .", |
| 1270 | hitShaderBindingOffset, hit_shader_buffer_state->createInfo.size); |
| 1271 | } |
Jeremy Gebben | b20a824 | 2021-11-05 15:14:43 -0600 | [diff] [blame] | 1272 | auto miss_shader_buffer_state = Get<BUFFER_STATE>(missShaderBindingTableBuffer); |
sourav parmar | d152180 | 2020-06-07 21:49:02 -0700 | [diff] [blame] | 1273 | if (miss_shader_buffer_state && missShaderBindingOffset >= miss_shader_buffer_state->createInfo.size) { |
| 1274 | skip |= LogError(commandBuffer, "VUID-vkCmdTraceRaysNV-missShaderBindingOffset-02457", |
| 1275 | "vkCmdTraceRaysNV: missShaderBindingOffset %" PRIu64 |
baldurk | 751594b | 2020-09-09 09:41:02 +0100 | [diff] [blame] | 1276 | " must be less than the size of missShaderBindingTableBuffer %" PRIu64 " .", |
sourav parmar | d152180 | 2020-06-07 21:49:02 -0700 | [diff] [blame] | 1277 | missShaderBindingOffset, miss_shader_buffer_state->createInfo.size); |
| 1278 | } |
Jeremy Gebben | b20a824 | 2021-11-05 15:14:43 -0600 | [diff] [blame] | 1279 | auto raygen_shader_buffer_state = Get<BUFFER_STATE>(raygenShaderBindingTableBuffer); |
sourav parmar | d152180 | 2020-06-07 21:49:02 -0700 | [diff] [blame] | 1280 | if (raygenShaderBindingOffset >= raygen_shader_buffer_state->createInfo.size) { |
| 1281 | skip |= LogError(commandBuffer, "VUID-vkCmdTraceRaysNV-raygenShaderBindingOffset-02455", |
| 1282 | "vkCmdTraceRaysNV: raygenShaderBindingOffset %" PRIu64 |
baldurk | 751594b | 2020-09-09 09:41:02 +0100 | [diff] [blame] | 1283 | " must be less than the size of raygenShaderBindingTableBuffer %" PRIu64 " .", |
sourav parmar | d152180 | 2020-06-07 21:49:02 -0700 | [diff] [blame] | 1284 | raygenShaderBindingOffset, raygen_shader_buffer_state->createInfo.size); |
| 1285 | } |
sourav parmar | cd5fb18 | 2020-07-17 12:58:44 -0700 | [diff] [blame] | 1286 | |
sourav parmar | 30e1939 | 2020-12-02 16:57:21 -0800 | [diff] [blame] | 1287 | const auto lv_bind_point = ConvertToLvlBindPoint(VK_PIPELINE_BIND_POINT_RAY_TRACING_NV); |
| 1288 | const PIPELINE_STATE *pipeline_state = cb_state->lastBound[lv_bind_point].pipeline_state; |
Jeremy Gebben | 14b0d1a | 2021-05-15 20:15:41 -0600 | [diff] [blame] | 1289 | if (!pipeline_state || (pipeline_state && !pipeline_state->pipeline())) { |
sourav parmar | 30e1939 | 2020-12-02 16:57:21 -0800 | [diff] [blame] | 1290 | skip |= LogError(device, "VUID-vkCmdTraceRaysNV-None-02700", |
| 1291 | "vkCmdTraceRaysKHR: A valid pipeline must be bound to the pipeline bind point used by this command."); |
sourav parmar | cd5fb18 | 2020-07-17 12:58:44 -0700 | [diff] [blame] | 1292 | } |
Jeff Bolz | f6e872c | 2019-10-22 12:17:28 -0500 | [diff] [blame] | 1293 | return skip; |
| 1294 | } |
| 1295 | |
Jeff Bolz | 443c2ca | 2020-03-19 12:11:51 -0500 | [diff] [blame] | 1296 | bool CoreChecks::PreCallValidateCmdTraceRaysKHR(VkCommandBuffer commandBuffer, |
sourav parmar | cd5fb18 | 2020-07-17 12:58:44 -0700 | [diff] [blame] | 1297 | const VkStridedDeviceAddressRegionKHR *pRaygenShaderBindingTable, |
| 1298 | const VkStridedDeviceAddressRegionKHR *pMissShaderBindingTable, |
| 1299 | const VkStridedDeviceAddressRegionKHR *pHitShaderBindingTable, |
| 1300 | const VkStridedDeviceAddressRegionKHR *pCallableShaderBindingTable, uint32_t width, |
Jeff Bolz | 443c2ca | 2020-03-19 12:11:51 -0500 | [diff] [blame] | 1301 | uint32_t height, uint32_t depth) const { |
Jeremy Gebben | b20a824 | 2021-11-05 15:14:43 -0600 | [diff] [blame] | 1302 | const auto cb_state = Get<CMD_BUFFER_STATE>(commandBuffer); |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 1303 | bool skip = ValidateCmdDrawType(*cb_state, true, VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR, CMD_TRACERAYSKHR); |
Shannon McPherson | 9caca05 | 2020-11-25 11:34:38 -0700 | [diff] [blame] | 1304 | const auto lv_bind_point = ConvertToLvlBindPoint(VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR); |
| 1305 | const PIPELINE_STATE *pipeline_state = cb_state->lastBound[lv_bind_point].pipeline_state; |
Jeremy Gebben | 14b0d1a | 2021-05-15 20:15:41 -0600 | [diff] [blame] | 1306 | if (!pipeline_state || (pipeline_state && !pipeline_state->pipeline())) { |
sourav parmar | cd5fb18 | 2020-07-17 12:58:44 -0700 | [diff] [blame] | 1307 | skip |= LogError(device, "VUID-vkCmdTraceRaysKHR-None-02700", |
| 1308 | "vkCmdTraceRaysKHR: A valid pipeline must be bound to the pipeline bind point used by this command."); |
| 1309 | } else { // bound to valid RT pipeline |
Jeremy Gebben | 11af979 | 2021-08-20 10:20:09 -0600 | [diff] [blame] | 1310 | if (pipeline_state->GetPipelineCreateFlags() & VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR) { |
sourav parmar | cd5fb18 | 2020-07-17 12:58:44 -0700 | [diff] [blame] | 1311 | if (!pHitShaderBindingTable->deviceAddress) { |
| 1312 | skip |= LogError(device, "VUID-vkCmdTraceRaysKHR-flags-03697", |
| 1313 | "vkCmdTraceRaysKHR: If the currently bound ray tracing pipeline was created with flags " |
| 1314 | "that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, the " |
| 1315 | "deviceAddress member of pHitShaderBindingTable must not be zero."); |
| 1316 | } |
| 1317 | if (!pHitShaderBindingTable || pHitShaderBindingTable->size == 0 || pHitShaderBindingTable->stride == 0) { |
| 1318 | skip |= LogError(device, "VUID-vkCmdTraceRaysKHR-flags-03514", |
| 1319 | "vkCmdTraceRaysKHR: If the currently bound ray tracing pipeline was created with " |
| 1320 | "flags that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, " |
| 1321 | "entries in pHitShaderBindingTable accessed as a result of this command in order to " |
| 1322 | "execute an intersection shader must not be set to zero."); |
| 1323 | } |
| 1324 | } |
Jeremy Gebben | 11af979 | 2021-08-20 10:20:09 -0600 | [diff] [blame] | 1325 | if (pipeline_state->GetPipelineCreateFlags() & VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR) { |
sourav parmar | cd5fb18 | 2020-07-17 12:58:44 -0700 | [diff] [blame] | 1326 | if (!pHitShaderBindingTable->deviceAddress) { |
| 1327 | skip |= LogError(device, "VUID-vkCmdTraceRaysKHR-flags-03696", |
| 1328 | "vkCmdTraceRaysKHR: If the currently bound ray tracing pipeline was created with flags " |
| 1329 | "that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, the " |
| 1330 | "deviceAddress member of pHitShaderBindingTable must not be zero."); |
| 1331 | } |
| 1332 | if (!pHitShaderBindingTable || pHitShaderBindingTable->size == 0 || pHitShaderBindingTable->stride == 0) { |
| 1333 | skip |= LogError(device, "VUID-vkCmdTraceRaysKHR-flags-03513", |
| 1334 | "vkCmdTraceRaysKHR: If the currently bound ray tracing pipeline was created with " |
| 1335 | "flags that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, " |
| 1336 | "entries in pHitShaderBindingTable accessed as a result of this command in order to " |
| 1337 | "execute a closest hit shader must not be set to zero."); |
| 1338 | } |
| 1339 | } |
Jeremy Gebben | 11af979 | 2021-08-20 10:20:09 -0600 | [diff] [blame] | 1340 | if (pipeline_state->GetPipelineCreateFlags() & VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR) { |
sourav parmar | cd5fb18 | 2020-07-17 12:58:44 -0700 | [diff] [blame] | 1341 | if (!pHitShaderBindingTable || pHitShaderBindingTable->size == 0 || pHitShaderBindingTable->stride == 0) { |
| 1342 | skip |= LogError(device, "VUID-vkCmdTraceRaysKHR-flags-03512", |
| 1343 | "vkCmdTraceRaysKHR: If the currently bound ray tracing pipeline was created with " |
| 1344 | "flags that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR, " |
| 1345 | "entries in pHitShaderBindingTable accessed as a result of this command in order to " |
| 1346 | "execute an any hit shader must not be set to zero."); |
| 1347 | } |
| 1348 | } |
| 1349 | } |
Jeff Bolz | 443c2ca | 2020-03-19 12:11:51 -0500 | [diff] [blame] | 1350 | return skip; |
| 1351 | } |
| 1352 | |
Jeff Bolz | 443c2ca | 2020-03-19 12:11:51 -0500 | [diff] [blame] | 1353 | bool CoreChecks::PreCallValidateCmdTraceRaysIndirectKHR(VkCommandBuffer commandBuffer, |
sourav parmar | cd5fb18 | 2020-07-17 12:58:44 -0700 | [diff] [blame] | 1354 | const VkStridedDeviceAddressRegionKHR *pRaygenShaderBindingTable, |
| 1355 | const VkStridedDeviceAddressRegionKHR *pMissShaderBindingTable, |
| 1356 | const VkStridedDeviceAddressRegionKHR *pHitShaderBindingTable, |
| 1357 | const VkStridedDeviceAddressRegionKHR *pCallableShaderBindingTable, |
| 1358 | VkDeviceAddress indirectDeviceAddress) const { |
Jeremy Gebben | b20a824 | 2021-11-05 15:14:43 -0600 | [diff] [blame] | 1359 | const auto cb_state = Get<CMD_BUFFER_STATE>(commandBuffer); |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 1360 | bool skip = ValidateCmdDrawType(*cb_state, true, VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR, CMD_TRACERAYSINDIRECTKHR); |
Shannon McPherson | 9caca05 | 2020-11-25 11:34:38 -0700 | [diff] [blame] | 1361 | const auto lv_bind_point = ConvertToLvlBindPoint(VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR); |
Jeremy Gebben | b20a824 | 2021-11-05 15:14:43 -0600 | [diff] [blame] | 1362 | const auto *pipeline_state = cb_state->lastBound[lv_bind_point].pipeline_state; |
Jeremy Gebben | 14b0d1a | 2021-05-15 20:15:41 -0600 | [diff] [blame] | 1363 | if (!pipeline_state || (pipeline_state && !pipeline_state->pipeline())) { |
sourav parmar | cd5fb18 | 2020-07-17 12:58:44 -0700 | [diff] [blame] | 1364 | skip |= |
| 1365 | LogError(device, "VUID-vkCmdTraceRaysIndirectKHR-None-02700", |
| 1366 | "vkCmdTraceRaysIndirectKHR: A valid pipeline must be bound to the pipeline bind point used by this command."); |
| 1367 | } else { // valid bind point |
Jeremy Gebben | 11af979 | 2021-08-20 10:20:09 -0600 | [diff] [blame] | 1368 | if (pipeline_state->GetPipelineCreateFlags() & VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR) { |
sourav parmar | cd5fb18 | 2020-07-17 12:58:44 -0700 | [diff] [blame] | 1369 | if (!pHitShaderBindingTable || pHitShaderBindingTable->deviceAddress == 0) { |
| 1370 | skip |= LogError(device, "VUID-vkCmdTraceRaysIndirectKHR-flags-03697", |
| 1371 | "vkCmdTraceRaysIndirectKHR: If the currently bound ray tracing pipeline was created with " |
| 1372 | "flags that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, the " |
| 1373 | "deviceAddress member of pHitShaderBindingTable must not be zero."); |
| 1374 | } |
| 1375 | if (!pHitShaderBindingTable || pHitShaderBindingTable->size == 0 || pHitShaderBindingTable->stride == 0) { |
| 1376 | skip |= LogError(device, "VUID-vkCmdTraceRaysIndirectKHR-flags-03514", |
| 1377 | "vkCmdTraceRaysIndirectKHR: If the currently bound ray tracing pipeline was created with " |
| 1378 | "flags that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, " |
| 1379 | "entries in pHitShaderBindingTable accessed as a result of this command in order to " |
| 1380 | "execute an intersection shader must not be set to zero."); |
| 1381 | } |
| 1382 | } |
Jeremy Gebben | 11af979 | 2021-08-20 10:20:09 -0600 | [diff] [blame] | 1383 | if (pipeline_state->GetPipelineCreateFlags() & VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR) { |
sourav parmar | cd5fb18 | 2020-07-17 12:58:44 -0700 | [diff] [blame] | 1384 | if (!pHitShaderBindingTable || pHitShaderBindingTable->deviceAddress == 0) { |
| 1385 | skip |= LogError(device, "VUID-vkCmdTraceRaysIndirectKHR-flags-03696", |
| 1386 | "vkCmdTraceRaysIndirectKHR:If the currently bound ray tracing pipeline was created with " |
| 1387 | "flags that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, " |
| 1388 | "the deviceAddress member of pHitShaderBindingTable must not be zero."); |
| 1389 | } |
| 1390 | if (!pHitShaderBindingTable || pHitShaderBindingTable->size == 0 || pHitShaderBindingTable->stride == 0) { |
| 1391 | skip |= LogError(device, "VUID-vkCmdTraceRaysIndirectKHR-flags-03513", |
| 1392 | "vkCmdTraceRaysIndirectKHR: If the currently bound ray tracing pipeline was created with " |
| 1393 | "flags that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, " |
| 1394 | "entries in pHitShaderBindingTable accessed as a result of this command in order to " |
| 1395 | "execute a closest hit shader must not be set to zero."); |
| 1396 | } |
| 1397 | } |
Jeremy Gebben | 11af979 | 2021-08-20 10:20:09 -0600 | [diff] [blame] | 1398 | if (pipeline_state->GetPipelineCreateFlags() & VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR) { |
sourav parmar | cd5fb18 | 2020-07-17 12:58:44 -0700 | [diff] [blame] | 1399 | if (!pHitShaderBindingTable || pHitShaderBindingTable->size == 0 || pHitShaderBindingTable->stride == 0) { |
| 1400 | skip |= LogError(device, "VUID-vkCmdTraceRaysIndirectKHR-flags-03512", |
| 1401 | "vkCmdTraceRaysIndirectKHR: If the currently bound ray tracing pipeline was created with " |
| 1402 | "flags that included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR, " |
| 1403 | "entries in pHitShaderBindingTable accessed as a result of this command in order to " |
| 1404 | "execute an any hit shader must not be set to zero."); |
| 1405 | } |
| 1406 | } |
| 1407 | } |
Jeff Bolz | 443c2ca | 2020-03-19 12:11:51 -0500 | [diff] [blame] | 1408 | return skip; |
| 1409 | } |
| 1410 | |
Jeff Bolz | 5c801d1 | 2019-10-09 10:38:45 -0500 | [diff] [blame] | 1411 | bool CoreChecks::PreCallValidateCmdDrawMeshTasksNV(VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask) const { |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 1412 | const auto cb_state = Get<CMD_BUFFER_STATE>(commandBuffer); |
| 1413 | bool skip = ValidateCmdDrawType(*cb_state, false, VK_PIPELINE_BIND_POINT_GRAPHICS, CMD_DRAWMESHTASKSNV); |
Jasper St. Pierre | 512613a | 2019-04-08 16:25:23 -0700 | [diff] [blame] | 1414 | return skip; |
| 1415 | } |
| 1416 | |
Jasper St. Pierre | 512613a | 2019-04-08 16:25:23 -0700 | [diff] [blame] | 1417 | bool CoreChecks::PreCallValidateCmdDrawMeshTasksIndirectNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, |
Jeff Bolz | 5c801d1 | 2019-10-09 10:38:45 -0500 | [diff] [blame] | 1418 | uint32_t drawCount, uint32_t stride) const { |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 1419 | const auto cb_state = Get<CMD_BUFFER_STATE>(commandBuffer); |
| 1420 | bool skip = ValidateCmdDrawType(*cb_state, false, VK_PIPELINE_BIND_POINT_GRAPHICS, CMD_DRAWMESHTASKSINDIRECTNV); |
Jeremy Gebben | b20a824 | 2021-11-05 15:14:43 -0600 | [diff] [blame] | 1421 | const auto buffer_state = Get<BUFFER_STATE>(buffer); |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 1422 | skip |= ValidateIndirectCmd(*cb_state, *buffer_state, CMD_DRAWMESHTASKSINDIRECTNV); |
Locke | e68ac65 | 2019-05-06 10:17:33 -0600 | [diff] [blame] | 1423 | if (drawCount > 1) { |
Locke | e68ac65 | 2019-05-06 10:17:33 -0600 | [diff] [blame] | 1424 | skip |= ValidateCmdDrawStrideWithBuffer(commandBuffer, "VUID-vkCmdDrawMeshTasksIndirectNV-drawCount-02157", stride, |
| 1425 | "VkDrawMeshTasksIndirectCommandNV", sizeof(VkDrawMeshTasksIndirectCommandNV), |
Jeremy Gebben | 9f53710 | 2021-10-05 16:37:12 -0600 | [diff] [blame] | 1426 | drawCount, offset, buffer_state.get()); |
Locke | e68ac65 | 2019-05-06 10:17:33 -0600 | [diff] [blame] | 1427 | } |
Jasper St. Pierre | 512613a | 2019-04-08 16:25:23 -0700 | [diff] [blame] | 1428 | return skip; |
| 1429 | } |
| 1430 | |
Jasper St. Pierre | 512613a | 2019-04-08 16:25:23 -0700 | [diff] [blame] | 1431 | bool CoreChecks::PreCallValidateCmdDrawMeshTasksIndirectCountNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, |
| 1432 | VkBuffer countBuffer, VkDeviceSize countBufferOffset, |
Jeff Bolz | 5c801d1 | 2019-10-09 10:38:45 -0500 | [diff] [blame] | 1433 | uint32_t maxDrawCount, uint32_t stride) const { |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 1434 | const auto cb_state = Get<CMD_BUFFER_STATE>(commandBuffer); |
| 1435 | bool skip = ValidateCmdDrawType(*cb_state, false, VK_PIPELINE_BIND_POINT_GRAPHICS, CMD_DRAWMESHTASKSINDIRECTCOUNTNV); |
Jeremy Gebben | b20a824 | 2021-11-05 15:14:43 -0600 | [diff] [blame] | 1436 | const auto buffer_state = Get<BUFFER_STATE>(buffer); |
| 1437 | const auto count_buffer_state = Get<BUFFER_STATE>(countBuffer); |
Jeremy Gebben | e5361dd | 2021-11-18 14:23:56 -0700 | [diff] [blame] | 1438 | skip |= ValidateIndirectCmd(*cb_state, *buffer_state, CMD_DRAWMESHTASKSINDIRECTCOUNTNV); |
Jeremy Gebben | 9f53710 | 2021-10-05 16:37:12 -0600 | [diff] [blame] | 1439 | skip |= ValidateMemoryIsBoundToBuffer(count_buffer_state.get(), "vkCmdDrawMeshTasksIndirectCountNV()", |
Shannon McPherson | de3eeba | 2019-04-30 16:53:59 -0600 | [diff] [blame] | 1440 | "VUID-vkCmdDrawMeshTasksIndirectCountNV-countBuffer-02714"); |
Jeremy Gebben | 9f53710 | 2021-10-05 16:37:12 -0600 | [diff] [blame] | 1441 | skip |= ValidateBufferUsageFlags(count_buffer_state.get(), VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT, true, |
sfricke-samsung | f692b97 | 2020-05-02 08:00:45 -0700 | [diff] [blame] | 1442 | "VUID-vkCmdDrawMeshTasksIndirectCountNV-countBuffer-02715", |
| 1443 | "vkCmdDrawMeshTasksIndirectCountNV()", "VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT"); |
Locke | e68ac65 | 2019-05-06 10:17:33 -0600 | [diff] [blame] | 1444 | skip |= ValidateCmdDrawStrideWithStruct(commandBuffer, "VUID-vkCmdDrawMeshTasksIndirectCountNV-stride-02182", stride, |
| 1445 | "VkDrawMeshTasksIndirectCommandNV", sizeof(VkDrawMeshTasksIndirectCommandNV)); |
| 1446 | if (maxDrawCount > 1) { |
| 1447 | skip |= ValidateCmdDrawStrideWithBuffer(commandBuffer, "VUID-vkCmdDrawMeshTasksIndirectCountNV-maxDrawCount-02183", stride, |
| 1448 | "VkDrawMeshTasksIndirectCommandNV", sizeof(VkDrawMeshTasksIndirectCommandNV), |
Jeremy Gebben | 9f53710 | 2021-10-05 16:37:12 -0600 | [diff] [blame] | 1449 | maxDrawCount, offset, buffer_state.get()); |
Locke | e68ac65 | 2019-05-06 10:17:33 -0600 | [diff] [blame] | 1450 | } |
Jasper St. Pierre | 512613a | 2019-04-08 16:25:23 -0700 | [diff] [blame] | 1451 | return skip; |
| 1452 | } |