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