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