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