| Mike Schuchardt | 440d464 | 2019-06-20 17:14:57 -0700 | [diff] [blame] | 1 | // *** THIS FILE IS GENERATED - DO NOT EDIT *** |
| 2 | // See object_tracker_generator.py for modifications |
| 3 | |
| 4 | |
| 5 | /*************************************************************************** |
| 6 | * |
| 7 | * Copyright (c) 2015-2019 The Khronos Group Inc. |
| 8 | * Copyright (c) 2015-2019 Valve Corporation |
| 9 | * Copyright (c) 2015-2019 LunarG, Inc. |
| 10 | * Copyright (c) 2015-2019 Google Inc. |
| 11 | * |
| 12 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 13 | * you may not use this file except in compliance with the License. |
| 14 | * You may obtain a copy of the License at |
| 15 | * |
| 16 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 17 | * |
| 18 | * Unless required by applicable law or agreed to in writing, software |
| 19 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 20 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 21 | * See the License for the specific language governing permissions and |
| 22 | * limitations under the License. |
| 23 | * |
| 24 | * Author: Mark Lobodzinski <mark@lunarg.com> |
| 25 | * Author: Dave Houlton <daveh@lunarg.com> |
| 26 | * |
| 27 | ****************************************************************************/ |
| 28 | |
| 29 | |
| 30 | #include "chassis.h" |
| 31 | #include "object_lifetime_validation.h" |
| 32 | |
| 33 | |
| 34 | |
| 35 | // ObjectTracker undestroyed objects validation function |
| 36 | bool ObjectLifetimes::ReportUndestroyedObjects(VkDevice device, const std::string& error_code) { |
| 37 | bool skip = false; |
| 38 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypeCommandBuffer, error_code); |
| 39 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypeSemaphore, error_code); |
| 40 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypeFence, error_code); |
| 41 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypeDeviceMemory, error_code); |
| 42 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypeBuffer, error_code); |
| 43 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypeImage, error_code); |
| 44 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypeEvent, error_code); |
| 45 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypeQueryPool, error_code); |
| 46 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypeBufferView, error_code); |
| 47 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypeImageView, error_code); |
| 48 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypeShaderModule, error_code); |
| 49 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypePipelineCache, error_code); |
| 50 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypePipelineLayout, error_code); |
| 51 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypeRenderPass, error_code); |
| 52 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypePipeline, error_code); |
| 53 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypeDescriptorSetLayout, error_code); |
| 54 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypeSampler, error_code); |
| 55 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypeDescriptorPool, error_code); |
| 56 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypeDescriptorSet, error_code); |
| 57 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypeFramebuffer, error_code); |
| 58 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypeCommandPool, error_code); |
| 59 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypeSamplerYcbcrConversion, error_code); |
| 60 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypeDescriptorUpdateTemplate, error_code); |
| 61 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypeSurfaceKHR, error_code); |
| 62 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypeSwapchainKHR, error_code); |
| 63 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypeDisplayKHR, error_code); |
| 64 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypeDisplayModeKHR, error_code); |
| 65 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypeDebugReportCallbackEXT, error_code); |
| 66 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypeObjectTableNVX, error_code); |
| 67 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypeIndirectCommandsLayoutNVX, error_code); |
| 68 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypeDebugUtilsMessengerEXT, error_code); |
| 69 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypeValidationCacheEXT, error_code); |
| 70 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypeAccelerationStructureNV, error_code); |
| 71 | skip |= DeviceReportUndestroyedObjects(device, kVulkanObjectTypePerformanceConfigurationINTEL, error_code); |
| 72 | return skip; |
| 73 | } |
| 74 | |
| 75 | void ObjectLifetimes::DestroyUndestroyedObjects(VkDevice device) { |
| 76 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypeCommandBuffer); |
| 77 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypeSemaphore); |
| 78 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypeFence); |
| 79 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypeDeviceMemory); |
| 80 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypeBuffer); |
| 81 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypeImage); |
| 82 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypeEvent); |
| 83 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypeQueryPool); |
| 84 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypeBufferView); |
| 85 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypeImageView); |
| 86 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypeShaderModule); |
| 87 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypePipelineCache); |
| 88 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypePipelineLayout); |
| 89 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypeRenderPass); |
| 90 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypePipeline); |
| 91 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypeDescriptorSetLayout); |
| 92 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypeSampler); |
| 93 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypeDescriptorPool); |
| 94 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypeDescriptorSet); |
| 95 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypeFramebuffer); |
| 96 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypeCommandPool); |
| 97 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypeSamplerYcbcrConversion); |
| 98 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypeDescriptorUpdateTemplate); |
| 99 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypeSurfaceKHR); |
| 100 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypeSwapchainKHR); |
| 101 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypeDisplayKHR); |
| 102 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypeDisplayModeKHR); |
| 103 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypeDebugReportCallbackEXT); |
| 104 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypeObjectTableNVX); |
| 105 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypeIndirectCommandsLayoutNVX); |
| 106 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypeDebugUtilsMessengerEXT); |
| 107 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypeValidationCacheEXT); |
| 108 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypeAccelerationStructureNV); |
| 109 | DeviceDestroyUndestroyedObjects(device, kVulkanObjectTypePerformanceConfigurationINTEL); |
| 110 | } |
| 111 | |
| 112 | |
| 113 | |
| 114 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceFeatures( |
| 115 | VkPhysicalDevice physicalDevice, |
| 116 | VkPhysicalDeviceFeatures* pFeatures) { |
| 117 | bool skip = false; |
| 118 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceFeatures-physicalDevice-parameter", kVUIDUndefined); |
| 119 | |
| 120 | return skip; |
| 121 | } |
| 122 | |
| 123 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceFormatProperties( |
| 124 | VkPhysicalDevice physicalDevice, |
| 125 | VkFormat format, |
| 126 | VkFormatProperties* pFormatProperties) { |
| 127 | bool skip = false; |
| 128 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceFormatProperties-physicalDevice-parameter", kVUIDUndefined); |
| 129 | |
| 130 | return skip; |
| 131 | } |
| 132 | |
| 133 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceImageFormatProperties( |
| 134 | VkPhysicalDevice physicalDevice, |
| 135 | VkFormat format, |
| 136 | VkImageType type, |
| 137 | VkImageTiling tiling, |
| 138 | VkImageUsageFlags usage, |
| 139 | VkImageCreateFlags flags, |
| 140 | VkImageFormatProperties* pImageFormatProperties) { |
| 141 | bool skip = false; |
| 142 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceImageFormatProperties-physicalDevice-parameter", kVUIDUndefined); |
| 143 | |
| 144 | return skip; |
| 145 | } |
| 146 | |
| 147 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceProperties( |
| 148 | VkPhysicalDevice physicalDevice, |
| 149 | VkPhysicalDeviceProperties* pProperties) { |
| 150 | bool skip = false; |
| 151 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceProperties-physicalDevice-parameter", kVUIDUndefined); |
| 152 | |
| 153 | return skip; |
| 154 | } |
| 155 | |
| 156 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceMemoryProperties( |
| 157 | VkPhysicalDevice physicalDevice, |
| 158 | VkPhysicalDeviceMemoryProperties* pMemoryProperties) { |
| 159 | bool skip = false; |
| 160 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceMemoryProperties-physicalDevice-parameter", kVUIDUndefined); |
| 161 | |
| 162 | return skip; |
| 163 | } |
| 164 | |
| 165 | bool ObjectLifetimes::PreCallValidateGetInstanceProcAddr( |
| 166 | VkInstance instance, |
| 167 | const char* pName) { |
| 168 | bool skip = false; |
| 169 | skip |= ValidateObject(instance, instance, kVulkanObjectTypeInstance, true, "VUID-vkGetInstanceProcAddr-instance-parameter", kVUIDUndefined); |
| 170 | |
| 171 | return skip; |
| 172 | } |
| 173 | |
| 174 | bool ObjectLifetimes::PreCallValidateGetDeviceProcAddr( |
| 175 | VkDevice device, |
| 176 | const char* pName) { |
| 177 | bool skip = false; |
| 178 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetDeviceProcAddr-device-parameter", kVUIDUndefined); |
| 179 | |
| 180 | return skip; |
| 181 | } |
| 182 | |
| 183 | bool ObjectLifetimes::PreCallValidateCreateDevice( |
| 184 | VkPhysicalDevice physicalDevice, |
| 185 | const VkDeviceCreateInfo* pCreateInfo, |
| 186 | const VkAllocationCallbacks* pAllocator, |
| 187 | VkDevice* pDevice) { |
| 188 | bool skip = false; |
| 189 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkCreateDevice-physicalDevice-parameter", kVUIDUndefined); |
| 190 | |
| 191 | return skip; |
| 192 | } |
| 193 | |
| 194 | void ObjectLifetimes::PostCallRecordCreateDevice( |
| 195 | VkPhysicalDevice physicalDevice, |
| 196 | const VkDeviceCreateInfo* pCreateInfo, |
| 197 | const VkAllocationCallbacks* pAllocator, |
| 198 | VkDevice* pDevice, |
| 199 | VkResult result) { |
| 200 | if (result != VK_SUCCESS) return; |
| 201 | CreateObject(physicalDevice, *pDevice, kVulkanObjectTypeDevice, pAllocator); |
| 202 | |
| 203 | } |
| 204 | |
| 205 | bool ObjectLifetimes::PreCallValidateEnumerateDeviceExtensionProperties( |
| 206 | VkPhysicalDevice physicalDevice, |
| 207 | const char* pLayerName, |
| 208 | uint32_t* pPropertyCount, |
| 209 | VkExtensionProperties* pProperties) { |
| 210 | bool skip = false; |
| 211 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkEnumerateDeviceExtensionProperties-physicalDevice-parameter", kVUIDUndefined); |
| 212 | |
| 213 | return skip; |
| 214 | } |
| 215 | |
| 216 | bool ObjectLifetimes::PreCallValidateEnumerateDeviceLayerProperties( |
| 217 | VkPhysicalDevice physicalDevice, |
| 218 | uint32_t* pPropertyCount, |
| 219 | VkLayerProperties* pProperties) { |
| 220 | bool skip = false; |
| 221 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkEnumerateDeviceLayerProperties-physicalDevice-parameter", kVUIDUndefined); |
| 222 | |
| 223 | return skip; |
| 224 | } |
| 225 | |
| 226 | bool ObjectLifetimes::PreCallValidateQueueSubmit( |
| 227 | VkQueue queue, |
| 228 | uint32_t submitCount, |
| 229 | const VkSubmitInfo* pSubmits, |
| 230 | VkFence fence) { |
| 231 | bool skip = false; |
| 232 | skip |= ValidateObject(queue, queue, kVulkanObjectTypeQueue, false, "VUID-vkQueueSubmit-queue-parameter", "VUID-vkQueueSubmit-commonparent"); |
| 233 | if (pSubmits) { |
| 234 | for (uint32_t index0 = 0; index0 < submitCount; ++index0) { |
| 235 | if (pSubmits[index0].pWaitSemaphores) { |
| 236 | for (uint32_t index1 = 0; index1 < pSubmits[index0].waitSemaphoreCount; ++index1) { |
| 237 | skip |= ValidateObject(queue, pSubmits[index0].pWaitSemaphores[index1], kVulkanObjectTypeSemaphore, false, "VUID-VkSubmitInfo-pWaitSemaphores-parameter", "VUID-VkSubmitInfo-commonparent"); |
| 238 | } |
| 239 | } |
| 240 | if (pSubmits[index0].pCommandBuffers) { |
| 241 | for (uint32_t index1 = 0; index1 < pSubmits[index0].commandBufferCount; ++index1) { |
| 242 | skip |= ValidateObject(queue, pSubmits[index0].pCommandBuffers[index1], kVulkanObjectTypeCommandBuffer, false, "VUID-VkSubmitInfo-pCommandBuffers-parameter", "VUID-VkSubmitInfo-commonparent"); |
| 243 | } |
| 244 | } |
| 245 | if (pSubmits[index0].pSignalSemaphores) { |
| 246 | for (uint32_t index1 = 0; index1 < pSubmits[index0].signalSemaphoreCount; ++index1) { |
| 247 | skip |= ValidateObject(queue, pSubmits[index0].pSignalSemaphores[index1], kVulkanObjectTypeSemaphore, false, "VUID-VkSubmitInfo-pSignalSemaphores-parameter", "VUID-VkSubmitInfo-commonparent"); |
| 248 | } |
| 249 | } |
| 250 | } |
| 251 | } |
| 252 | skip |= ValidateObject(queue, fence, kVulkanObjectTypeFence, true, "VUID-vkQueueSubmit-fence-parameter", "VUID-vkQueueSubmit-commonparent"); |
| 253 | |
| 254 | return skip; |
| 255 | } |
| 256 | |
| 257 | bool ObjectLifetimes::PreCallValidateQueueWaitIdle( |
| 258 | VkQueue queue) { |
| 259 | bool skip = false; |
| 260 | skip |= ValidateObject(queue, queue, kVulkanObjectTypeQueue, false, "VUID-vkQueueWaitIdle-queue-parameter", kVUIDUndefined); |
| 261 | |
| 262 | return skip; |
| 263 | } |
| 264 | |
| 265 | bool ObjectLifetimes::PreCallValidateDeviceWaitIdle( |
| 266 | VkDevice device) { |
| 267 | bool skip = false; |
| 268 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkDeviceWaitIdle-device-parameter", kVUIDUndefined); |
| 269 | |
| 270 | return skip; |
| 271 | } |
| 272 | |
| 273 | bool ObjectLifetimes::PreCallValidateAllocateMemory( |
| 274 | VkDevice device, |
| 275 | const VkMemoryAllocateInfo* pAllocateInfo, |
| 276 | const VkAllocationCallbacks* pAllocator, |
| 277 | VkDeviceMemory* pMemory) { |
| 278 | bool skip = false; |
| 279 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkAllocateMemory-device-parameter", kVUIDUndefined); |
| 280 | |
| 281 | return skip; |
| 282 | } |
| 283 | |
| 284 | void ObjectLifetimes::PostCallRecordAllocateMemory( |
| 285 | VkDevice device, |
| 286 | const VkMemoryAllocateInfo* pAllocateInfo, |
| 287 | const VkAllocationCallbacks* pAllocator, |
| 288 | VkDeviceMemory* pMemory, |
| 289 | VkResult result) { |
| 290 | if (result != VK_SUCCESS) return; |
| 291 | CreateObject(device, *pMemory, kVulkanObjectTypeDeviceMemory, pAllocator); |
| 292 | |
| 293 | } |
| 294 | |
| 295 | bool ObjectLifetimes::PreCallValidateFreeMemory( |
| 296 | VkDevice device, |
| 297 | VkDeviceMemory memory, |
| 298 | const VkAllocationCallbacks* pAllocator) { |
| 299 | bool skip = false; |
| 300 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkFreeMemory-device-parameter", kVUIDUndefined); |
| 301 | skip |= ValidateObject(device, memory, kVulkanObjectTypeDeviceMemory, true, "VUID-vkFreeMemory-memory-parameter", "VUID-vkFreeMemory-memory-parent"); |
| 302 | skip |= ValidateDestroyObject(device, memory, kVulkanObjectTypeDeviceMemory, pAllocator, kVUIDUndefined, kVUIDUndefined); |
| 303 | |
| 304 | return skip; |
| 305 | } |
| 306 | |
| 307 | void ObjectLifetimes::PreCallRecordFreeMemory( |
| 308 | VkDevice device, |
| 309 | VkDeviceMemory memory, |
| 310 | const VkAllocationCallbacks* pAllocator) { |
| 311 | RecordDestroyObject(device, memory, kVulkanObjectTypeDeviceMemory); |
| 312 | |
| 313 | } |
| 314 | |
| 315 | bool ObjectLifetimes::PreCallValidateMapMemory( |
| 316 | VkDevice device, |
| 317 | VkDeviceMemory memory, |
| 318 | VkDeviceSize offset, |
| 319 | VkDeviceSize size, |
| 320 | VkMemoryMapFlags flags, |
| 321 | void** ppData) { |
| 322 | bool skip = false; |
| 323 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkMapMemory-device-parameter", kVUIDUndefined); |
| 324 | skip |= ValidateObject(device, memory, kVulkanObjectTypeDeviceMemory, false, "VUID-vkMapMemory-memory-parameter", "VUID-vkMapMemory-memory-parent"); |
| 325 | |
| 326 | return skip; |
| 327 | } |
| 328 | |
| 329 | bool ObjectLifetimes::PreCallValidateUnmapMemory( |
| 330 | VkDevice device, |
| 331 | VkDeviceMemory memory) { |
| 332 | bool skip = false; |
| 333 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkUnmapMemory-device-parameter", kVUIDUndefined); |
| 334 | skip |= ValidateObject(device, memory, kVulkanObjectTypeDeviceMemory, false, "VUID-vkUnmapMemory-memory-parameter", "VUID-vkUnmapMemory-memory-parent"); |
| 335 | |
| 336 | return skip; |
| 337 | } |
| 338 | |
| 339 | bool ObjectLifetimes::PreCallValidateFlushMappedMemoryRanges( |
| 340 | VkDevice device, |
| 341 | uint32_t memoryRangeCount, |
| 342 | const VkMappedMemoryRange* pMemoryRanges) { |
| 343 | bool skip = false; |
| 344 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkFlushMappedMemoryRanges-device-parameter", kVUIDUndefined); |
| 345 | if (pMemoryRanges) { |
| 346 | for (uint32_t index0 = 0; index0 < memoryRangeCount; ++index0) { |
| 347 | skip |= ValidateObject(device, pMemoryRanges[index0].memory, kVulkanObjectTypeDeviceMemory, false, "VUID-VkMappedMemoryRange-memory-parameter", kVUIDUndefined); |
| 348 | } |
| 349 | } |
| 350 | |
| 351 | return skip; |
| 352 | } |
| 353 | |
| 354 | bool ObjectLifetimes::PreCallValidateInvalidateMappedMemoryRanges( |
| 355 | VkDevice device, |
| 356 | uint32_t memoryRangeCount, |
| 357 | const VkMappedMemoryRange* pMemoryRanges) { |
| 358 | bool skip = false; |
| 359 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkInvalidateMappedMemoryRanges-device-parameter", kVUIDUndefined); |
| 360 | if (pMemoryRanges) { |
| 361 | for (uint32_t index0 = 0; index0 < memoryRangeCount; ++index0) { |
| 362 | skip |= ValidateObject(device, pMemoryRanges[index0].memory, kVulkanObjectTypeDeviceMemory, false, "VUID-VkMappedMemoryRange-memory-parameter", kVUIDUndefined); |
| 363 | } |
| 364 | } |
| 365 | |
| 366 | return skip; |
| 367 | } |
| 368 | |
| 369 | bool ObjectLifetimes::PreCallValidateGetDeviceMemoryCommitment( |
| 370 | VkDevice device, |
| 371 | VkDeviceMemory memory, |
| 372 | VkDeviceSize* pCommittedMemoryInBytes) { |
| 373 | bool skip = false; |
| 374 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetDeviceMemoryCommitment-device-parameter", kVUIDUndefined); |
| 375 | skip |= ValidateObject(device, memory, kVulkanObjectTypeDeviceMemory, false, "VUID-vkGetDeviceMemoryCommitment-memory-parameter", "VUID-vkGetDeviceMemoryCommitment-memory-parent"); |
| 376 | |
| 377 | return skip; |
| 378 | } |
| 379 | |
| 380 | bool ObjectLifetimes::PreCallValidateBindBufferMemory( |
| 381 | VkDevice device, |
| 382 | VkBuffer buffer, |
| 383 | VkDeviceMemory memory, |
| 384 | VkDeviceSize memoryOffset) { |
| 385 | bool skip = false; |
| 386 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkBindBufferMemory-device-parameter", kVUIDUndefined); |
| 387 | skip |= ValidateObject(device, buffer, kVulkanObjectTypeBuffer, false, "VUID-vkBindBufferMemory-buffer-parameter", "VUID-vkBindBufferMemory-buffer-parent"); |
| 388 | skip |= ValidateObject(device, memory, kVulkanObjectTypeDeviceMemory, false, "VUID-vkBindBufferMemory-memory-parameter", "VUID-vkBindBufferMemory-memory-parent"); |
| 389 | |
| 390 | return skip; |
| 391 | } |
| 392 | |
| 393 | bool ObjectLifetimes::PreCallValidateBindImageMemory( |
| 394 | VkDevice device, |
| 395 | VkImage image, |
| 396 | VkDeviceMemory memory, |
| 397 | VkDeviceSize memoryOffset) { |
| 398 | bool skip = false; |
| 399 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkBindImageMemory-device-parameter", kVUIDUndefined); |
| 400 | skip |= ValidateObject(device, image, kVulkanObjectTypeImage, false, "VUID-vkBindImageMemory-image-parameter", "VUID-vkBindImageMemory-image-parent"); |
| 401 | skip |= ValidateObject(device, memory, kVulkanObjectTypeDeviceMemory, false, "VUID-vkBindImageMemory-memory-parameter", "VUID-vkBindImageMemory-memory-parent"); |
| 402 | |
| 403 | return skip; |
| 404 | } |
| 405 | |
| 406 | bool ObjectLifetimes::PreCallValidateGetBufferMemoryRequirements( |
| 407 | VkDevice device, |
| 408 | VkBuffer buffer, |
| 409 | VkMemoryRequirements* pMemoryRequirements) { |
| 410 | bool skip = false; |
| 411 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetBufferMemoryRequirements-device-parameter", kVUIDUndefined); |
| 412 | skip |= ValidateObject(device, buffer, kVulkanObjectTypeBuffer, false, "VUID-vkGetBufferMemoryRequirements-buffer-parameter", "VUID-vkGetBufferMemoryRequirements-buffer-parent"); |
| 413 | |
| 414 | return skip; |
| 415 | } |
| 416 | |
| 417 | bool ObjectLifetimes::PreCallValidateGetImageMemoryRequirements( |
| 418 | VkDevice device, |
| 419 | VkImage image, |
| 420 | VkMemoryRequirements* pMemoryRequirements) { |
| 421 | bool skip = false; |
| 422 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetImageMemoryRequirements-device-parameter", kVUIDUndefined); |
| 423 | skip |= ValidateObject(device, image, kVulkanObjectTypeImage, false, "VUID-vkGetImageMemoryRequirements-image-parameter", "VUID-vkGetImageMemoryRequirements-image-parent"); |
| 424 | |
| 425 | return skip; |
| 426 | } |
| 427 | |
| 428 | bool ObjectLifetimes::PreCallValidateGetImageSparseMemoryRequirements( |
| 429 | VkDevice device, |
| 430 | VkImage image, |
| 431 | uint32_t* pSparseMemoryRequirementCount, |
| 432 | VkSparseImageMemoryRequirements* pSparseMemoryRequirements) { |
| 433 | bool skip = false; |
| 434 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetImageSparseMemoryRequirements-device-parameter", kVUIDUndefined); |
| 435 | skip |= ValidateObject(device, image, kVulkanObjectTypeImage, false, "VUID-vkGetImageSparseMemoryRequirements-image-parameter", "VUID-vkGetImageSparseMemoryRequirements-image-parent"); |
| 436 | |
| 437 | return skip; |
| 438 | } |
| 439 | |
| 440 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceSparseImageFormatProperties( |
| 441 | VkPhysicalDevice physicalDevice, |
| 442 | VkFormat format, |
| 443 | VkImageType type, |
| 444 | VkSampleCountFlagBits samples, |
| 445 | VkImageUsageFlags usage, |
| 446 | VkImageTiling tiling, |
| 447 | uint32_t* pPropertyCount, |
| 448 | VkSparseImageFormatProperties* pProperties) { |
| 449 | bool skip = false; |
| 450 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceSparseImageFormatProperties-physicalDevice-parameter", kVUIDUndefined); |
| 451 | |
| 452 | return skip; |
| 453 | } |
| 454 | |
| 455 | bool ObjectLifetimes::PreCallValidateQueueBindSparse( |
| 456 | VkQueue queue, |
| 457 | uint32_t bindInfoCount, |
| 458 | const VkBindSparseInfo* pBindInfo, |
| 459 | VkFence fence) { |
| 460 | bool skip = false; |
| 461 | skip |= ValidateObject(queue, queue, kVulkanObjectTypeQueue, false, "VUID-vkQueueBindSparse-queue-parameter", "VUID-vkQueueBindSparse-commonparent"); |
| 462 | if (pBindInfo) { |
| 463 | for (uint32_t index0 = 0; index0 < bindInfoCount; ++index0) { |
| 464 | if (pBindInfo[index0].pWaitSemaphores) { |
| 465 | for (uint32_t index1 = 0; index1 < pBindInfo[index0].waitSemaphoreCount; ++index1) { |
| 466 | skip |= ValidateObject(queue, pBindInfo[index0].pWaitSemaphores[index1], kVulkanObjectTypeSemaphore, false, "VUID-VkBindSparseInfo-pWaitSemaphores-parameter", "VUID-VkBindSparseInfo-commonparent"); |
| 467 | } |
| 468 | } |
| 469 | if (pBindInfo[index0].pBufferBinds) { |
| 470 | for (uint32_t index1 = 0; index1 < pBindInfo[index0].bufferBindCount; ++index1) { |
| 471 | skip |= ValidateObject(queue, pBindInfo[index0].pBufferBinds[index1].buffer, kVulkanObjectTypeBuffer, false, "VUID-VkSparseBufferMemoryBindInfo-buffer-parameter", kVUIDUndefined); |
| 472 | if (pBindInfo[index0].pBufferBinds[index1].pBinds) { |
| 473 | for (uint32_t index2 = 0; index2 < pBindInfo[index0].pBufferBinds[index1].bindCount; ++index2) { |
| 474 | skip |= ValidateObject(queue, pBindInfo[index0].pBufferBinds[index1].pBinds[index2].memory, kVulkanObjectTypeDeviceMemory, true, "VUID-VkSparseMemoryBind-memory-parameter", kVUIDUndefined); |
| 475 | } |
| 476 | } |
| 477 | } |
| 478 | } |
| 479 | if (pBindInfo[index0].pImageOpaqueBinds) { |
| 480 | for (uint32_t index1 = 0; index1 < pBindInfo[index0].imageOpaqueBindCount; ++index1) { |
| 481 | skip |= ValidateObject(queue, pBindInfo[index0].pImageOpaqueBinds[index1].image, kVulkanObjectTypeImage, false, "VUID-VkSparseImageOpaqueMemoryBindInfo-image-parameter", kVUIDUndefined); |
| 482 | if (pBindInfo[index0].pImageOpaqueBinds[index1].pBinds) { |
| 483 | for (uint32_t index2 = 0; index2 < pBindInfo[index0].pImageOpaqueBinds[index1].bindCount; ++index2) { |
| 484 | skip |= ValidateObject(queue, pBindInfo[index0].pImageOpaqueBinds[index1].pBinds[index2].memory, kVulkanObjectTypeDeviceMemory, true, "VUID-VkSparseMemoryBind-memory-parameter", kVUIDUndefined); |
| 485 | } |
| 486 | } |
| 487 | } |
| 488 | } |
| 489 | if (pBindInfo[index0].pImageBinds) { |
| 490 | for (uint32_t index1 = 0; index1 < pBindInfo[index0].imageBindCount; ++index1) { |
| 491 | skip |= ValidateObject(queue, pBindInfo[index0].pImageBinds[index1].image, kVulkanObjectTypeImage, false, "VUID-VkSparseImageMemoryBindInfo-image-parameter", kVUIDUndefined); |
| 492 | if (pBindInfo[index0].pImageBinds[index1].pBinds) { |
| 493 | for (uint32_t index2 = 0; index2 < pBindInfo[index0].pImageBinds[index1].bindCount; ++index2) { |
| 494 | skip |= ValidateObject(queue, pBindInfo[index0].pImageBinds[index1].pBinds[index2].memory, kVulkanObjectTypeDeviceMemory, true, "VUID-VkSparseImageMemoryBind-memory-parameter", kVUIDUndefined); |
| 495 | } |
| 496 | } |
| 497 | } |
| 498 | } |
| 499 | if (pBindInfo[index0].pSignalSemaphores) { |
| 500 | for (uint32_t index1 = 0; index1 < pBindInfo[index0].signalSemaphoreCount; ++index1) { |
| 501 | skip |= ValidateObject(queue, pBindInfo[index0].pSignalSemaphores[index1], kVulkanObjectTypeSemaphore, false, "VUID-VkBindSparseInfo-pSignalSemaphores-parameter", "VUID-VkBindSparseInfo-commonparent"); |
| 502 | } |
| 503 | } |
| 504 | } |
| 505 | } |
| 506 | skip |= ValidateObject(queue, fence, kVulkanObjectTypeFence, true, "VUID-vkQueueBindSparse-fence-parameter", "VUID-vkQueueBindSparse-commonparent"); |
| 507 | |
| 508 | return skip; |
| 509 | } |
| 510 | |
| 511 | bool ObjectLifetimes::PreCallValidateCreateFence( |
| 512 | VkDevice device, |
| 513 | const VkFenceCreateInfo* pCreateInfo, |
| 514 | const VkAllocationCallbacks* pAllocator, |
| 515 | VkFence* pFence) { |
| 516 | bool skip = false; |
| 517 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkCreateFence-device-parameter", kVUIDUndefined); |
| 518 | |
| 519 | return skip; |
| 520 | } |
| 521 | |
| 522 | void ObjectLifetimes::PostCallRecordCreateFence( |
| 523 | VkDevice device, |
| 524 | const VkFenceCreateInfo* pCreateInfo, |
| 525 | const VkAllocationCallbacks* pAllocator, |
| 526 | VkFence* pFence, |
| 527 | VkResult result) { |
| 528 | if (result != VK_SUCCESS) return; |
| 529 | CreateObject(device, *pFence, kVulkanObjectTypeFence, pAllocator); |
| 530 | |
| 531 | } |
| 532 | |
| 533 | bool ObjectLifetimes::PreCallValidateDestroyFence( |
| 534 | VkDevice device, |
| 535 | VkFence fence, |
| 536 | const VkAllocationCallbacks* pAllocator) { |
| 537 | bool skip = false; |
| 538 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkDestroyFence-device-parameter", kVUIDUndefined); |
| 539 | skip |= ValidateObject(device, fence, kVulkanObjectTypeFence, true, "VUID-vkDestroyFence-fence-parameter", "VUID-vkDestroyFence-fence-parent"); |
| 540 | skip |= ValidateDestroyObject(device, fence, kVulkanObjectTypeFence, pAllocator, "VUID-vkDestroyFence-fence-01121", "VUID-vkDestroyFence-fence-01122"); |
| 541 | |
| 542 | return skip; |
| 543 | } |
| 544 | |
| 545 | void ObjectLifetimes::PreCallRecordDestroyFence( |
| 546 | VkDevice device, |
| 547 | VkFence fence, |
| 548 | const VkAllocationCallbacks* pAllocator) { |
| 549 | RecordDestroyObject(device, fence, kVulkanObjectTypeFence); |
| 550 | |
| 551 | } |
| 552 | |
| 553 | bool ObjectLifetimes::PreCallValidateResetFences( |
| 554 | VkDevice device, |
| 555 | uint32_t fenceCount, |
| 556 | const VkFence* pFences) { |
| 557 | bool skip = false; |
| 558 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkResetFences-device-parameter", kVUIDUndefined); |
| 559 | if (pFences) { |
| 560 | for (uint32_t index0 = 0; index0 < fenceCount; ++index0) { |
| 561 | skip |= ValidateObject(device, pFences[index0], kVulkanObjectTypeFence, false, "VUID-vkResetFences-pFences-parameter", "VUID-vkResetFences-pFences-parent"); |
| 562 | } |
| 563 | } |
| 564 | |
| 565 | return skip; |
| 566 | } |
| 567 | |
| 568 | bool ObjectLifetimes::PreCallValidateGetFenceStatus( |
| 569 | VkDevice device, |
| 570 | VkFence fence) { |
| 571 | bool skip = false; |
| 572 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetFenceStatus-device-parameter", kVUIDUndefined); |
| 573 | skip |= ValidateObject(device, fence, kVulkanObjectTypeFence, false, "VUID-vkGetFenceStatus-fence-parameter", "VUID-vkGetFenceStatus-fence-parent"); |
| 574 | |
| 575 | return skip; |
| 576 | } |
| 577 | |
| 578 | bool ObjectLifetimes::PreCallValidateWaitForFences( |
| 579 | VkDevice device, |
| 580 | uint32_t fenceCount, |
| 581 | const VkFence* pFences, |
| 582 | VkBool32 waitAll, |
| 583 | uint64_t timeout) { |
| 584 | bool skip = false; |
| 585 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkWaitForFences-device-parameter", kVUIDUndefined); |
| 586 | if (pFences) { |
| 587 | for (uint32_t index0 = 0; index0 < fenceCount; ++index0) { |
| 588 | skip |= ValidateObject(device, pFences[index0], kVulkanObjectTypeFence, false, "VUID-vkWaitForFences-pFences-parameter", "VUID-vkWaitForFences-pFences-parent"); |
| 589 | } |
| 590 | } |
| 591 | |
| 592 | return skip; |
| 593 | } |
| 594 | |
| 595 | bool ObjectLifetimes::PreCallValidateCreateSemaphore( |
| 596 | VkDevice device, |
| 597 | const VkSemaphoreCreateInfo* pCreateInfo, |
| 598 | const VkAllocationCallbacks* pAllocator, |
| 599 | VkSemaphore* pSemaphore) { |
| 600 | bool skip = false; |
| 601 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkCreateSemaphore-device-parameter", kVUIDUndefined); |
| 602 | |
| 603 | return skip; |
| 604 | } |
| 605 | |
| 606 | void ObjectLifetimes::PostCallRecordCreateSemaphore( |
| 607 | VkDevice device, |
| 608 | const VkSemaphoreCreateInfo* pCreateInfo, |
| 609 | const VkAllocationCallbacks* pAllocator, |
| 610 | VkSemaphore* pSemaphore, |
| 611 | VkResult result) { |
| 612 | if (result != VK_SUCCESS) return; |
| 613 | CreateObject(device, *pSemaphore, kVulkanObjectTypeSemaphore, pAllocator); |
| 614 | |
| 615 | } |
| 616 | |
| 617 | bool ObjectLifetimes::PreCallValidateDestroySemaphore( |
| 618 | VkDevice device, |
| 619 | VkSemaphore semaphore, |
| 620 | const VkAllocationCallbacks* pAllocator) { |
| 621 | bool skip = false; |
| 622 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkDestroySemaphore-device-parameter", kVUIDUndefined); |
| 623 | skip |= ValidateObject(device, semaphore, kVulkanObjectTypeSemaphore, true, "VUID-vkDestroySemaphore-semaphore-parameter", "VUID-vkDestroySemaphore-semaphore-parent"); |
| 624 | skip |= ValidateDestroyObject(device, semaphore, kVulkanObjectTypeSemaphore, pAllocator, "VUID-vkDestroySemaphore-semaphore-01138", "VUID-vkDestroySemaphore-semaphore-01139"); |
| 625 | |
| 626 | return skip; |
| 627 | } |
| 628 | |
| 629 | void ObjectLifetimes::PreCallRecordDestroySemaphore( |
| 630 | VkDevice device, |
| 631 | VkSemaphore semaphore, |
| 632 | const VkAllocationCallbacks* pAllocator) { |
| 633 | RecordDestroyObject(device, semaphore, kVulkanObjectTypeSemaphore); |
| 634 | |
| 635 | } |
| 636 | |
| 637 | bool ObjectLifetimes::PreCallValidateCreateEvent( |
| 638 | VkDevice device, |
| 639 | const VkEventCreateInfo* pCreateInfo, |
| 640 | const VkAllocationCallbacks* pAllocator, |
| 641 | VkEvent* pEvent) { |
| 642 | bool skip = false; |
| 643 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkCreateEvent-device-parameter", kVUIDUndefined); |
| 644 | |
| 645 | return skip; |
| 646 | } |
| 647 | |
| 648 | void ObjectLifetimes::PostCallRecordCreateEvent( |
| 649 | VkDevice device, |
| 650 | const VkEventCreateInfo* pCreateInfo, |
| 651 | const VkAllocationCallbacks* pAllocator, |
| 652 | VkEvent* pEvent, |
| 653 | VkResult result) { |
| 654 | if (result != VK_SUCCESS) return; |
| 655 | CreateObject(device, *pEvent, kVulkanObjectTypeEvent, pAllocator); |
| 656 | |
| 657 | } |
| 658 | |
| 659 | bool ObjectLifetimes::PreCallValidateDestroyEvent( |
| 660 | VkDevice device, |
| 661 | VkEvent event, |
| 662 | const VkAllocationCallbacks* pAllocator) { |
| 663 | bool skip = false; |
| 664 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkDestroyEvent-device-parameter", kVUIDUndefined); |
| 665 | skip |= ValidateObject(device, event, kVulkanObjectTypeEvent, true, "VUID-vkDestroyEvent-event-parameter", "VUID-vkDestroyEvent-event-parent"); |
| 666 | skip |= ValidateDestroyObject(device, event, kVulkanObjectTypeEvent, pAllocator, "VUID-vkDestroyEvent-event-01146", "VUID-vkDestroyEvent-event-01147"); |
| 667 | |
| 668 | return skip; |
| 669 | } |
| 670 | |
| 671 | void ObjectLifetimes::PreCallRecordDestroyEvent( |
| 672 | VkDevice device, |
| 673 | VkEvent event, |
| 674 | const VkAllocationCallbacks* pAllocator) { |
| 675 | RecordDestroyObject(device, event, kVulkanObjectTypeEvent); |
| 676 | |
| 677 | } |
| 678 | |
| 679 | bool ObjectLifetimes::PreCallValidateGetEventStatus( |
| 680 | VkDevice device, |
| 681 | VkEvent event) { |
| 682 | bool skip = false; |
| 683 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetEventStatus-device-parameter", kVUIDUndefined); |
| 684 | skip |= ValidateObject(device, event, kVulkanObjectTypeEvent, false, "VUID-vkGetEventStatus-event-parameter", "VUID-vkGetEventStatus-event-parent"); |
| 685 | |
| 686 | return skip; |
| 687 | } |
| 688 | |
| 689 | bool ObjectLifetimes::PreCallValidateSetEvent( |
| 690 | VkDevice device, |
| 691 | VkEvent event) { |
| 692 | bool skip = false; |
| 693 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkSetEvent-device-parameter", kVUIDUndefined); |
| 694 | skip |= ValidateObject(device, event, kVulkanObjectTypeEvent, false, "VUID-vkSetEvent-event-parameter", "VUID-vkSetEvent-event-parent"); |
| 695 | |
| 696 | return skip; |
| 697 | } |
| 698 | |
| 699 | bool ObjectLifetimes::PreCallValidateResetEvent( |
| 700 | VkDevice device, |
| 701 | VkEvent event) { |
| 702 | bool skip = false; |
| 703 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkResetEvent-device-parameter", kVUIDUndefined); |
| 704 | skip |= ValidateObject(device, event, kVulkanObjectTypeEvent, false, "VUID-vkResetEvent-event-parameter", "VUID-vkResetEvent-event-parent"); |
| 705 | |
| 706 | return skip; |
| 707 | } |
| 708 | |
| 709 | bool ObjectLifetimes::PreCallValidateCreateQueryPool( |
| 710 | VkDevice device, |
| 711 | const VkQueryPoolCreateInfo* pCreateInfo, |
| 712 | const VkAllocationCallbacks* pAllocator, |
| 713 | VkQueryPool* pQueryPool) { |
| 714 | bool skip = false; |
| 715 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkCreateQueryPool-device-parameter", kVUIDUndefined); |
| 716 | |
| 717 | return skip; |
| 718 | } |
| 719 | |
| 720 | void ObjectLifetimes::PostCallRecordCreateQueryPool( |
| 721 | VkDevice device, |
| 722 | const VkQueryPoolCreateInfo* pCreateInfo, |
| 723 | const VkAllocationCallbacks* pAllocator, |
| 724 | VkQueryPool* pQueryPool, |
| 725 | VkResult result) { |
| 726 | if (result != VK_SUCCESS) return; |
| 727 | CreateObject(device, *pQueryPool, kVulkanObjectTypeQueryPool, pAllocator); |
| 728 | |
| 729 | } |
| 730 | |
| 731 | bool ObjectLifetimes::PreCallValidateDestroyQueryPool( |
| 732 | VkDevice device, |
| 733 | VkQueryPool queryPool, |
| 734 | const VkAllocationCallbacks* pAllocator) { |
| 735 | bool skip = false; |
| 736 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkDestroyQueryPool-device-parameter", kVUIDUndefined); |
| 737 | skip |= ValidateObject(device, queryPool, kVulkanObjectTypeQueryPool, true, "VUID-vkDestroyQueryPool-queryPool-parameter", "VUID-vkDestroyQueryPool-queryPool-parent"); |
| 738 | skip |= ValidateDestroyObject(device, queryPool, kVulkanObjectTypeQueryPool, pAllocator, "VUID-vkDestroyQueryPool-queryPool-00794", "VUID-vkDestroyQueryPool-queryPool-00795"); |
| 739 | |
| 740 | return skip; |
| 741 | } |
| 742 | |
| 743 | void ObjectLifetimes::PreCallRecordDestroyQueryPool( |
| 744 | VkDevice device, |
| 745 | VkQueryPool queryPool, |
| 746 | const VkAllocationCallbacks* pAllocator) { |
| 747 | RecordDestroyObject(device, queryPool, kVulkanObjectTypeQueryPool); |
| 748 | |
| 749 | } |
| 750 | |
| 751 | bool ObjectLifetimes::PreCallValidateGetQueryPoolResults( |
| 752 | VkDevice device, |
| 753 | VkQueryPool queryPool, |
| 754 | uint32_t firstQuery, |
| 755 | uint32_t queryCount, |
| 756 | size_t dataSize, |
| 757 | void* pData, |
| 758 | VkDeviceSize stride, |
| 759 | VkQueryResultFlags flags) { |
| 760 | bool skip = false; |
| 761 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetQueryPoolResults-device-parameter", kVUIDUndefined); |
| 762 | skip |= ValidateObject(device, queryPool, kVulkanObjectTypeQueryPool, false, "VUID-vkGetQueryPoolResults-queryPool-parameter", "VUID-vkGetQueryPoolResults-queryPool-parent"); |
| 763 | |
| 764 | return skip; |
| 765 | } |
| 766 | |
| 767 | bool ObjectLifetimes::PreCallValidateCreateBuffer( |
| 768 | VkDevice device, |
| 769 | const VkBufferCreateInfo* pCreateInfo, |
| 770 | const VkAllocationCallbacks* pAllocator, |
| 771 | VkBuffer* pBuffer) { |
| 772 | bool skip = false; |
| 773 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkCreateBuffer-device-parameter", kVUIDUndefined); |
| 774 | |
| 775 | return skip; |
| 776 | } |
| 777 | |
| 778 | void ObjectLifetimes::PostCallRecordCreateBuffer( |
| 779 | VkDevice device, |
| 780 | const VkBufferCreateInfo* pCreateInfo, |
| 781 | const VkAllocationCallbacks* pAllocator, |
| 782 | VkBuffer* pBuffer, |
| 783 | VkResult result) { |
| 784 | if (result != VK_SUCCESS) return; |
| 785 | CreateObject(device, *pBuffer, kVulkanObjectTypeBuffer, pAllocator); |
| 786 | |
| 787 | } |
| 788 | |
| 789 | bool ObjectLifetimes::PreCallValidateDestroyBuffer( |
| 790 | VkDevice device, |
| 791 | VkBuffer buffer, |
| 792 | const VkAllocationCallbacks* pAllocator) { |
| 793 | bool skip = false; |
| 794 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkDestroyBuffer-device-parameter", kVUIDUndefined); |
| 795 | skip |= ValidateObject(device, buffer, kVulkanObjectTypeBuffer, true, "VUID-vkDestroyBuffer-buffer-parameter", "VUID-vkDestroyBuffer-buffer-parent"); |
| 796 | skip |= ValidateDestroyObject(device, buffer, kVulkanObjectTypeBuffer, pAllocator, "VUID-vkDestroyBuffer-buffer-00923", "VUID-vkDestroyBuffer-buffer-00924"); |
| 797 | |
| 798 | return skip; |
| 799 | } |
| 800 | |
| 801 | void ObjectLifetimes::PreCallRecordDestroyBuffer( |
| 802 | VkDevice device, |
| 803 | VkBuffer buffer, |
| 804 | const VkAllocationCallbacks* pAllocator) { |
| 805 | RecordDestroyObject(device, buffer, kVulkanObjectTypeBuffer); |
| 806 | |
| 807 | } |
| 808 | |
| 809 | bool ObjectLifetimes::PreCallValidateCreateBufferView( |
| 810 | VkDevice device, |
| 811 | const VkBufferViewCreateInfo* pCreateInfo, |
| 812 | const VkAllocationCallbacks* pAllocator, |
| 813 | VkBufferView* pView) { |
| 814 | bool skip = false; |
| 815 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkCreateBufferView-device-parameter", kVUIDUndefined); |
| 816 | if (pCreateInfo) { |
| 817 | skip |= ValidateObject(device, pCreateInfo->buffer, kVulkanObjectTypeBuffer, false, "VUID-VkBufferViewCreateInfo-buffer-parameter", kVUIDUndefined); |
| 818 | } |
| 819 | |
| 820 | return skip; |
| 821 | } |
| 822 | |
| 823 | void ObjectLifetimes::PostCallRecordCreateBufferView( |
| 824 | VkDevice device, |
| 825 | const VkBufferViewCreateInfo* pCreateInfo, |
| 826 | const VkAllocationCallbacks* pAllocator, |
| 827 | VkBufferView* pView, |
| 828 | VkResult result) { |
| 829 | if (result != VK_SUCCESS) return; |
| 830 | CreateObject(device, *pView, kVulkanObjectTypeBufferView, pAllocator); |
| 831 | |
| 832 | } |
| 833 | |
| 834 | bool ObjectLifetimes::PreCallValidateDestroyBufferView( |
| 835 | VkDevice device, |
| 836 | VkBufferView bufferView, |
| 837 | const VkAllocationCallbacks* pAllocator) { |
| 838 | bool skip = false; |
| 839 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkDestroyBufferView-device-parameter", kVUIDUndefined); |
| 840 | skip |= ValidateObject(device, bufferView, kVulkanObjectTypeBufferView, true, "VUID-vkDestroyBufferView-bufferView-parameter", "VUID-vkDestroyBufferView-bufferView-parent"); |
| 841 | skip |= ValidateDestroyObject(device, bufferView, kVulkanObjectTypeBufferView, pAllocator, "VUID-vkDestroyBufferView-bufferView-00937", "VUID-vkDestroyBufferView-bufferView-00938"); |
| 842 | |
| 843 | return skip; |
| 844 | } |
| 845 | |
| 846 | void ObjectLifetimes::PreCallRecordDestroyBufferView( |
| 847 | VkDevice device, |
| 848 | VkBufferView bufferView, |
| 849 | const VkAllocationCallbacks* pAllocator) { |
| 850 | RecordDestroyObject(device, bufferView, kVulkanObjectTypeBufferView); |
| 851 | |
| 852 | } |
| 853 | |
| 854 | bool ObjectLifetimes::PreCallValidateCreateImage( |
| 855 | VkDevice device, |
| 856 | const VkImageCreateInfo* pCreateInfo, |
| 857 | const VkAllocationCallbacks* pAllocator, |
| 858 | VkImage* pImage) { |
| 859 | bool skip = false; |
| 860 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkCreateImage-device-parameter", kVUIDUndefined); |
| 861 | |
| 862 | return skip; |
| 863 | } |
| 864 | |
| 865 | void ObjectLifetimes::PostCallRecordCreateImage( |
| 866 | VkDevice device, |
| 867 | const VkImageCreateInfo* pCreateInfo, |
| 868 | const VkAllocationCallbacks* pAllocator, |
| 869 | VkImage* pImage, |
| 870 | VkResult result) { |
| 871 | if (result != VK_SUCCESS) return; |
| 872 | CreateObject(device, *pImage, kVulkanObjectTypeImage, pAllocator); |
| 873 | |
| 874 | } |
| 875 | |
| 876 | bool ObjectLifetimes::PreCallValidateDestroyImage( |
| 877 | VkDevice device, |
| 878 | VkImage image, |
| 879 | const VkAllocationCallbacks* pAllocator) { |
| 880 | bool skip = false; |
| 881 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkDestroyImage-device-parameter", kVUIDUndefined); |
| 882 | skip |= ValidateObject(device, image, kVulkanObjectTypeImage, true, "VUID-vkDestroyImage-image-parameter", "VUID-vkDestroyImage-image-parent"); |
| 883 | skip |= ValidateDestroyObject(device, image, kVulkanObjectTypeImage, pAllocator, "VUID-vkDestroyImage-image-01001", "VUID-vkDestroyImage-image-01002"); |
| 884 | |
| 885 | return skip; |
| 886 | } |
| 887 | |
| 888 | void ObjectLifetimes::PreCallRecordDestroyImage( |
| 889 | VkDevice device, |
| 890 | VkImage image, |
| 891 | const VkAllocationCallbacks* pAllocator) { |
| 892 | RecordDestroyObject(device, image, kVulkanObjectTypeImage); |
| 893 | |
| 894 | } |
| 895 | |
| 896 | bool ObjectLifetimes::PreCallValidateGetImageSubresourceLayout( |
| 897 | VkDevice device, |
| 898 | VkImage image, |
| 899 | const VkImageSubresource* pSubresource, |
| 900 | VkSubresourceLayout* pLayout) { |
| 901 | bool skip = false; |
| 902 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetImageSubresourceLayout-device-parameter", kVUIDUndefined); |
| 903 | skip |= ValidateObject(device, image, kVulkanObjectTypeImage, false, "VUID-vkGetImageSubresourceLayout-image-parameter", "VUID-vkGetImageSubresourceLayout-image-parent"); |
| 904 | |
| 905 | return skip; |
| 906 | } |
| 907 | |
| 908 | bool ObjectLifetimes::PreCallValidateCreateImageView( |
| 909 | VkDevice device, |
| 910 | const VkImageViewCreateInfo* pCreateInfo, |
| 911 | const VkAllocationCallbacks* pAllocator, |
| 912 | VkImageView* pView) { |
| 913 | bool skip = false; |
| 914 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkCreateImageView-device-parameter", kVUIDUndefined); |
| 915 | if (pCreateInfo) { |
| 916 | skip |= ValidateObject(device, pCreateInfo->image, kVulkanObjectTypeImage, false, "VUID-VkImageViewCreateInfo-image-parameter", kVUIDUndefined); |
| 917 | } |
| 918 | |
| 919 | return skip; |
| 920 | } |
| 921 | |
| 922 | void ObjectLifetimes::PostCallRecordCreateImageView( |
| 923 | VkDevice device, |
| 924 | const VkImageViewCreateInfo* pCreateInfo, |
| 925 | const VkAllocationCallbacks* pAllocator, |
| 926 | VkImageView* pView, |
| 927 | VkResult result) { |
| 928 | if (result != VK_SUCCESS) return; |
| 929 | CreateObject(device, *pView, kVulkanObjectTypeImageView, pAllocator); |
| 930 | |
| 931 | } |
| 932 | |
| 933 | bool ObjectLifetimes::PreCallValidateDestroyImageView( |
| 934 | VkDevice device, |
| 935 | VkImageView imageView, |
| 936 | const VkAllocationCallbacks* pAllocator) { |
| 937 | bool skip = false; |
| 938 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkDestroyImageView-device-parameter", kVUIDUndefined); |
| 939 | skip |= ValidateObject(device, imageView, kVulkanObjectTypeImageView, true, "VUID-vkDestroyImageView-imageView-parameter", "VUID-vkDestroyImageView-imageView-parent"); |
| 940 | skip |= ValidateDestroyObject(device, imageView, kVulkanObjectTypeImageView, pAllocator, "VUID-vkDestroyImageView-imageView-01027", "VUID-vkDestroyImageView-imageView-01028"); |
| 941 | |
| 942 | return skip; |
| 943 | } |
| 944 | |
| 945 | void ObjectLifetimes::PreCallRecordDestroyImageView( |
| 946 | VkDevice device, |
| 947 | VkImageView imageView, |
| 948 | const VkAllocationCallbacks* pAllocator) { |
| 949 | RecordDestroyObject(device, imageView, kVulkanObjectTypeImageView); |
| 950 | |
| 951 | } |
| 952 | |
| 953 | bool ObjectLifetimes::PreCallValidateCreateShaderModule( |
| 954 | VkDevice device, |
| 955 | const VkShaderModuleCreateInfo* pCreateInfo, |
| 956 | const VkAllocationCallbacks* pAllocator, |
| 957 | VkShaderModule* pShaderModule) { |
| 958 | bool skip = false; |
| 959 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkCreateShaderModule-device-parameter", kVUIDUndefined); |
| 960 | |
| 961 | return skip; |
| 962 | } |
| 963 | |
| 964 | void ObjectLifetimes::PostCallRecordCreateShaderModule( |
| 965 | VkDevice device, |
| 966 | const VkShaderModuleCreateInfo* pCreateInfo, |
| 967 | const VkAllocationCallbacks* pAllocator, |
| 968 | VkShaderModule* pShaderModule, |
| 969 | VkResult result) { |
| 970 | if (result != VK_SUCCESS) return; |
| 971 | CreateObject(device, *pShaderModule, kVulkanObjectTypeShaderModule, pAllocator); |
| 972 | |
| 973 | } |
| 974 | |
| 975 | bool ObjectLifetimes::PreCallValidateDestroyShaderModule( |
| 976 | VkDevice device, |
| 977 | VkShaderModule shaderModule, |
| 978 | const VkAllocationCallbacks* pAllocator) { |
| 979 | bool skip = false; |
| 980 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkDestroyShaderModule-device-parameter", kVUIDUndefined); |
| 981 | skip |= ValidateObject(device, shaderModule, kVulkanObjectTypeShaderModule, true, "VUID-vkDestroyShaderModule-shaderModule-parameter", "VUID-vkDestroyShaderModule-shaderModule-parent"); |
| 982 | skip |= ValidateDestroyObject(device, shaderModule, kVulkanObjectTypeShaderModule, pAllocator, "VUID-vkDestroyShaderModule-shaderModule-01092", "VUID-vkDestroyShaderModule-shaderModule-01093"); |
| 983 | |
| 984 | return skip; |
| 985 | } |
| 986 | |
| 987 | void ObjectLifetimes::PreCallRecordDestroyShaderModule( |
| 988 | VkDevice device, |
| 989 | VkShaderModule shaderModule, |
| 990 | const VkAllocationCallbacks* pAllocator) { |
| 991 | RecordDestroyObject(device, shaderModule, kVulkanObjectTypeShaderModule); |
| 992 | |
| 993 | } |
| 994 | |
| 995 | bool ObjectLifetimes::PreCallValidateCreatePipelineCache( |
| 996 | VkDevice device, |
| 997 | const VkPipelineCacheCreateInfo* pCreateInfo, |
| 998 | const VkAllocationCallbacks* pAllocator, |
| 999 | VkPipelineCache* pPipelineCache) { |
| 1000 | bool skip = false; |
| 1001 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkCreatePipelineCache-device-parameter", kVUIDUndefined); |
| 1002 | |
| 1003 | return skip; |
| 1004 | } |
| 1005 | |
| 1006 | void ObjectLifetimes::PostCallRecordCreatePipelineCache( |
| 1007 | VkDevice device, |
| 1008 | const VkPipelineCacheCreateInfo* pCreateInfo, |
| 1009 | const VkAllocationCallbacks* pAllocator, |
| 1010 | VkPipelineCache* pPipelineCache, |
| 1011 | VkResult result) { |
| 1012 | if (result != VK_SUCCESS) return; |
| 1013 | CreateObject(device, *pPipelineCache, kVulkanObjectTypePipelineCache, pAllocator); |
| 1014 | |
| 1015 | } |
| 1016 | |
| 1017 | bool ObjectLifetimes::PreCallValidateDestroyPipelineCache( |
| 1018 | VkDevice device, |
| 1019 | VkPipelineCache pipelineCache, |
| 1020 | const VkAllocationCallbacks* pAllocator) { |
| 1021 | bool skip = false; |
| 1022 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkDestroyPipelineCache-device-parameter", kVUIDUndefined); |
| 1023 | skip |= ValidateObject(device, pipelineCache, kVulkanObjectTypePipelineCache, true, "VUID-vkDestroyPipelineCache-pipelineCache-parameter", "VUID-vkDestroyPipelineCache-pipelineCache-parent"); |
| 1024 | skip |= ValidateDestroyObject(device, pipelineCache, kVulkanObjectTypePipelineCache, pAllocator, "VUID-vkDestroyPipelineCache-pipelineCache-00771", "VUID-vkDestroyPipelineCache-pipelineCache-00772"); |
| 1025 | |
| 1026 | return skip; |
| 1027 | } |
| 1028 | |
| 1029 | void ObjectLifetimes::PreCallRecordDestroyPipelineCache( |
| 1030 | VkDevice device, |
| 1031 | VkPipelineCache pipelineCache, |
| 1032 | const VkAllocationCallbacks* pAllocator) { |
| 1033 | RecordDestroyObject(device, pipelineCache, kVulkanObjectTypePipelineCache); |
| 1034 | |
| 1035 | } |
| 1036 | |
| 1037 | bool ObjectLifetimes::PreCallValidateGetPipelineCacheData( |
| 1038 | VkDevice device, |
| 1039 | VkPipelineCache pipelineCache, |
| 1040 | size_t* pDataSize, |
| 1041 | void* pData) { |
| 1042 | bool skip = false; |
| 1043 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetPipelineCacheData-device-parameter", kVUIDUndefined); |
| 1044 | skip |= ValidateObject(device, pipelineCache, kVulkanObjectTypePipelineCache, false, "VUID-vkGetPipelineCacheData-pipelineCache-parameter", "VUID-vkGetPipelineCacheData-pipelineCache-parent"); |
| 1045 | |
| 1046 | return skip; |
| 1047 | } |
| 1048 | |
| 1049 | bool ObjectLifetimes::PreCallValidateMergePipelineCaches( |
| 1050 | VkDevice device, |
| 1051 | VkPipelineCache dstCache, |
| 1052 | uint32_t srcCacheCount, |
| 1053 | const VkPipelineCache* pSrcCaches) { |
| 1054 | bool skip = false; |
| 1055 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkMergePipelineCaches-device-parameter", kVUIDUndefined); |
| 1056 | skip |= ValidateObject(device, dstCache, kVulkanObjectTypePipelineCache, false, "VUID-vkMergePipelineCaches-dstCache-parameter", "VUID-vkMergePipelineCaches-dstCache-parent"); |
| 1057 | if (pSrcCaches) { |
| 1058 | for (uint32_t index0 = 0; index0 < srcCacheCount; ++index0) { |
| 1059 | skip |= ValidateObject(device, pSrcCaches[index0], kVulkanObjectTypePipelineCache, false, "VUID-vkMergePipelineCaches-pSrcCaches-parameter", "VUID-vkMergePipelineCaches-pSrcCaches-parent"); |
| 1060 | } |
| 1061 | } |
| 1062 | |
| 1063 | return skip; |
| 1064 | } |
| 1065 | |
| 1066 | bool ObjectLifetimes::PreCallValidateCreateGraphicsPipelines( |
| 1067 | VkDevice device, |
| 1068 | VkPipelineCache pipelineCache, |
| 1069 | uint32_t createInfoCount, |
| 1070 | const VkGraphicsPipelineCreateInfo* pCreateInfos, |
| 1071 | const VkAllocationCallbacks* pAllocator, |
| 1072 | VkPipeline* pPipelines) { |
| 1073 | bool skip = false; |
| 1074 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkCreateGraphicsPipelines-device-parameter", kVUIDUndefined); |
| 1075 | skip |= ValidateObject(device, pipelineCache, kVulkanObjectTypePipelineCache, true, "VUID-vkCreateGraphicsPipelines-pipelineCache-parameter", "VUID-vkCreateGraphicsPipelines-pipelineCache-parent"); |
| 1076 | if (pCreateInfos) { |
| 1077 | for (uint32_t index0 = 0; index0 < createInfoCount; ++index0) { |
| 1078 | if (pCreateInfos[index0].pStages) { |
| 1079 | for (uint32_t index1 = 0; index1 < pCreateInfos[index0].stageCount; ++index1) { |
| 1080 | skip |= ValidateObject(device, pCreateInfos[index0].pStages[index1].module, kVulkanObjectTypeShaderModule, false, "VUID-VkPipelineShaderStageCreateInfo-module-parameter", kVUIDUndefined); |
| 1081 | } |
| 1082 | } |
| 1083 | skip |= ValidateObject(device, pCreateInfos[index0].layout, kVulkanObjectTypePipelineLayout, false, "VUID-VkGraphicsPipelineCreateInfo-layout-parameter", "VUID-VkGraphicsPipelineCreateInfo-commonparent"); |
| 1084 | skip |= ValidateObject(device, pCreateInfos[index0].renderPass, kVulkanObjectTypeRenderPass, false, "VUID-VkGraphicsPipelineCreateInfo-renderPass-parameter", "VUID-VkGraphicsPipelineCreateInfo-commonparent"); |
| 1085 | skip |= ValidateObject(device, pCreateInfos[index0].basePipelineHandle, kVulkanObjectTypePipeline, true, kVUIDUndefined, "VUID-VkGraphicsPipelineCreateInfo-commonparent"); |
| 1086 | } |
| 1087 | } |
| 1088 | |
| 1089 | return skip; |
| 1090 | } |
| 1091 | |
| 1092 | void ObjectLifetimes::PostCallRecordCreateGraphicsPipelines( |
| 1093 | VkDevice device, |
| 1094 | VkPipelineCache pipelineCache, |
| 1095 | uint32_t createInfoCount, |
| 1096 | const VkGraphicsPipelineCreateInfo* pCreateInfos, |
| 1097 | const VkAllocationCallbacks* pAllocator, |
| 1098 | VkPipeline* pPipelines, |
| 1099 | VkResult result) { |
| 1100 | if (VK_ERROR_VALIDATION_FAILED_EXT == result) return; |
| 1101 | if (pPipelines) { |
| 1102 | for (uint32_t index = 0; index < createInfoCount; index++) { |
| 1103 | if (!pPipelines[index]) continue; |
| 1104 | CreateObject(device, pPipelines[index], kVulkanObjectTypePipeline, pAllocator); |
| 1105 | } |
| 1106 | } |
| 1107 | |
| 1108 | } |
| 1109 | |
| 1110 | bool ObjectLifetimes::PreCallValidateCreateComputePipelines( |
| 1111 | VkDevice device, |
| 1112 | VkPipelineCache pipelineCache, |
| 1113 | uint32_t createInfoCount, |
| 1114 | const VkComputePipelineCreateInfo* pCreateInfos, |
| 1115 | const VkAllocationCallbacks* pAllocator, |
| 1116 | VkPipeline* pPipelines) { |
| 1117 | bool skip = false; |
| 1118 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkCreateComputePipelines-device-parameter", kVUIDUndefined); |
| 1119 | skip |= ValidateObject(device, pipelineCache, kVulkanObjectTypePipelineCache, true, "VUID-vkCreateComputePipelines-pipelineCache-parameter", "VUID-vkCreateComputePipelines-pipelineCache-parent"); |
| 1120 | if (pCreateInfos) { |
| 1121 | for (uint32_t index0 = 0; index0 < createInfoCount; ++index0) { |
| 1122 | skip |= ValidateObject(device, pCreateInfos[index0].layout, kVulkanObjectTypePipelineLayout, false, "VUID-VkComputePipelineCreateInfo-layout-parameter", "VUID-VkComputePipelineCreateInfo-commonparent"); |
| 1123 | skip |= ValidateObject(device, pCreateInfos[index0].basePipelineHandle, kVulkanObjectTypePipeline, true, kVUIDUndefined, "VUID-VkComputePipelineCreateInfo-commonparent"); |
| 1124 | } |
| 1125 | } |
| 1126 | |
| 1127 | return skip; |
| 1128 | } |
| 1129 | |
| 1130 | void ObjectLifetimes::PostCallRecordCreateComputePipelines( |
| 1131 | VkDevice device, |
| 1132 | VkPipelineCache pipelineCache, |
| 1133 | uint32_t createInfoCount, |
| 1134 | const VkComputePipelineCreateInfo* pCreateInfos, |
| 1135 | const VkAllocationCallbacks* pAllocator, |
| 1136 | VkPipeline* pPipelines, |
| 1137 | VkResult result) { |
| 1138 | if (VK_ERROR_VALIDATION_FAILED_EXT == result) return; |
| 1139 | if (pPipelines) { |
| 1140 | for (uint32_t index = 0; index < createInfoCount; index++) { |
| 1141 | if (!pPipelines[index]) continue; |
| 1142 | CreateObject(device, pPipelines[index], kVulkanObjectTypePipeline, pAllocator); |
| 1143 | } |
| 1144 | } |
| 1145 | |
| 1146 | } |
| 1147 | |
| 1148 | bool ObjectLifetimes::PreCallValidateDestroyPipeline( |
| 1149 | VkDevice device, |
| 1150 | VkPipeline pipeline, |
| 1151 | const VkAllocationCallbacks* pAllocator) { |
| 1152 | bool skip = false; |
| 1153 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkDestroyPipeline-device-parameter", kVUIDUndefined); |
| 1154 | skip |= ValidateObject(device, pipeline, kVulkanObjectTypePipeline, true, "VUID-vkDestroyPipeline-pipeline-parameter", "VUID-vkDestroyPipeline-pipeline-parent"); |
| 1155 | skip |= ValidateDestroyObject(device, pipeline, kVulkanObjectTypePipeline, pAllocator, "VUID-vkDestroyPipeline-pipeline-00766", "VUID-vkDestroyPipeline-pipeline-00767"); |
| 1156 | |
| 1157 | return skip; |
| 1158 | } |
| 1159 | |
| 1160 | void ObjectLifetimes::PreCallRecordDestroyPipeline( |
| 1161 | VkDevice device, |
| 1162 | VkPipeline pipeline, |
| 1163 | const VkAllocationCallbacks* pAllocator) { |
| 1164 | RecordDestroyObject(device, pipeline, kVulkanObjectTypePipeline); |
| 1165 | |
| 1166 | } |
| 1167 | |
| 1168 | bool ObjectLifetimes::PreCallValidateCreatePipelineLayout( |
| 1169 | VkDevice device, |
| 1170 | const VkPipelineLayoutCreateInfo* pCreateInfo, |
| 1171 | const VkAllocationCallbacks* pAllocator, |
| 1172 | VkPipelineLayout* pPipelineLayout) { |
| 1173 | bool skip = false; |
| 1174 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkCreatePipelineLayout-device-parameter", kVUIDUndefined); |
| 1175 | if (pCreateInfo) { |
| 1176 | if (pCreateInfo->pSetLayouts) { |
| 1177 | for (uint32_t index1 = 0; index1 < pCreateInfo->setLayoutCount; ++index1) { |
| 1178 | skip |= ValidateObject(device, pCreateInfo->pSetLayouts[index1], kVulkanObjectTypeDescriptorSetLayout, false, "VUID-VkPipelineLayoutCreateInfo-pSetLayouts-parameter", kVUIDUndefined); |
| 1179 | } |
| 1180 | } |
| 1181 | } |
| 1182 | |
| 1183 | return skip; |
| 1184 | } |
| 1185 | |
| 1186 | void ObjectLifetimes::PostCallRecordCreatePipelineLayout( |
| 1187 | VkDevice device, |
| 1188 | const VkPipelineLayoutCreateInfo* pCreateInfo, |
| 1189 | const VkAllocationCallbacks* pAllocator, |
| 1190 | VkPipelineLayout* pPipelineLayout, |
| 1191 | VkResult result) { |
| 1192 | if (result != VK_SUCCESS) return; |
| 1193 | CreateObject(device, *pPipelineLayout, kVulkanObjectTypePipelineLayout, pAllocator); |
| 1194 | |
| 1195 | } |
| 1196 | |
| 1197 | bool ObjectLifetimes::PreCallValidateDestroyPipelineLayout( |
| 1198 | VkDevice device, |
| 1199 | VkPipelineLayout pipelineLayout, |
| 1200 | const VkAllocationCallbacks* pAllocator) { |
| 1201 | bool skip = false; |
| 1202 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkDestroyPipelineLayout-device-parameter", kVUIDUndefined); |
| 1203 | skip |= ValidateObject(device, pipelineLayout, kVulkanObjectTypePipelineLayout, true, "VUID-vkDestroyPipelineLayout-pipelineLayout-parameter", "VUID-vkDestroyPipelineLayout-pipelineLayout-parent"); |
| 1204 | skip |= ValidateDestroyObject(device, pipelineLayout, kVulkanObjectTypePipelineLayout, pAllocator, "VUID-vkDestroyPipelineLayout-pipelineLayout-00299", "VUID-vkDestroyPipelineLayout-pipelineLayout-00300"); |
| 1205 | |
| 1206 | return skip; |
| 1207 | } |
| 1208 | |
| 1209 | void ObjectLifetimes::PreCallRecordDestroyPipelineLayout( |
| 1210 | VkDevice device, |
| 1211 | VkPipelineLayout pipelineLayout, |
| 1212 | const VkAllocationCallbacks* pAllocator) { |
| 1213 | RecordDestroyObject(device, pipelineLayout, kVulkanObjectTypePipelineLayout); |
| 1214 | |
| 1215 | } |
| 1216 | |
| 1217 | bool ObjectLifetimes::PreCallValidateCreateSampler( |
| 1218 | VkDevice device, |
| 1219 | const VkSamplerCreateInfo* pCreateInfo, |
| 1220 | const VkAllocationCallbacks* pAllocator, |
| 1221 | VkSampler* pSampler) { |
| 1222 | bool skip = false; |
| 1223 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkCreateSampler-device-parameter", kVUIDUndefined); |
| 1224 | |
| 1225 | return skip; |
| 1226 | } |
| 1227 | |
| 1228 | void ObjectLifetimes::PostCallRecordCreateSampler( |
| 1229 | VkDevice device, |
| 1230 | const VkSamplerCreateInfo* pCreateInfo, |
| 1231 | const VkAllocationCallbacks* pAllocator, |
| 1232 | VkSampler* pSampler, |
| 1233 | VkResult result) { |
| 1234 | if (result != VK_SUCCESS) return; |
| 1235 | CreateObject(device, *pSampler, kVulkanObjectTypeSampler, pAllocator); |
| 1236 | |
| 1237 | } |
| 1238 | |
| 1239 | bool ObjectLifetimes::PreCallValidateDestroySampler( |
| 1240 | VkDevice device, |
| 1241 | VkSampler sampler, |
| 1242 | const VkAllocationCallbacks* pAllocator) { |
| 1243 | bool skip = false; |
| 1244 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkDestroySampler-device-parameter", kVUIDUndefined); |
| 1245 | skip |= ValidateObject(device, sampler, kVulkanObjectTypeSampler, true, "VUID-vkDestroySampler-sampler-parameter", "VUID-vkDestroySampler-sampler-parent"); |
| 1246 | skip |= ValidateDestroyObject(device, sampler, kVulkanObjectTypeSampler, pAllocator, "VUID-vkDestroySampler-sampler-01083", "VUID-vkDestroySampler-sampler-01084"); |
| 1247 | |
| 1248 | return skip; |
| 1249 | } |
| 1250 | |
| 1251 | void ObjectLifetimes::PreCallRecordDestroySampler( |
| 1252 | VkDevice device, |
| 1253 | VkSampler sampler, |
| 1254 | const VkAllocationCallbacks* pAllocator) { |
| 1255 | RecordDestroyObject(device, sampler, kVulkanObjectTypeSampler); |
| 1256 | |
| 1257 | } |
| 1258 | |
| 1259 | bool ObjectLifetimes::PreCallValidateDestroyDescriptorSetLayout( |
| 1260 | VkDevice device, |
| 1261 | VkDescriptorSetLayout descriptorSetLayout, |
| 1262 | const VkAllocationCallbacks* pAllocator) { |
| 1263 | bool skip = false; |
| 1264 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkDestroyDescriptorSetLayout-device-parameter", kVUIDUndefined); |
| 1265 | skip |= ValidateObject(device, descriptorSetLayout, kVulkanObjectTypeDescriptorSetLayout, true, "VUID-vkDestroyDescriptorSetLayout-descriptorSetLayout-parameter", "VUID-vkDestroyDescriptorSetLayout-descriptorSetLayout-parent"); |
| 1266 | skip |= ValidateDestroyObject(device, descriptorSetLayout, kVulkanObjectTypeDescriptorSetLayout, pAllocator, "VUID-vkDestroyDescriptorSetLayout-descriptorSetLayout-00284", "VUID-vkDestroyDescriptorSetLayout-descriptorSetLayout-00285"); |
| 1267 | |
| 1268 | return skip; |
| 1269 | } |
| 1270 | |
| 1271 | void ObjectLifetimes::PreCallRecordDestroyDescriptorSetLayout( |
| 1272 | VkDevice device, |
| 1273 | VkDescriptorSetLayout descriptorSetLayout, |
| 1274 | const VkAllocationCallbacks* pAllocator) { |
| 1275 | RecordDestroyObject(device, descriptorSetLayout, kVulkanObjectTypeDescriptorSetLayout); |
| 1276 | |
| 1277 | } |
| 1278 | |
| 1279 | bool ObjectLifetimes::PreCallValidateCreateDescriptorPool( |
| 1280 | VkDevice device, |
| 1281 | const VkDescriptorPoolCreateInfo* pCreateInfo, |
| 1282 | const VkAllocationCallbacks* pAllocator, |
| 1283 | VkDescriptorPool* pDescriptorPool) { |
| 1284 | bool skip = false; |
| 1285 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkCreateDescriptorPool-device-parameter", kVUIDUndefined); |
| 1286 | |
| 1287 | return skip; |
| 1288 | } |
| 1289 | |
| 1290 | void ObjectLifetimes::PostCallRecordCreateDescriptorPool( |
| 1291 | VkDevice device, |
| 1292 | const VkDescriptorPoolCreateInfo* pCreateInfo, |
| 1293 | const VkAllocationCallbacks* pAllocator, |
| 1294 | VkDescriptorPool* pDescriptorPool, |
| 1295 | VkResult result) { |
| 1296 | if (result != VK_SUCCESS) return; |
| 1297 | CreateObject(device, *pDescriptorPool, kVulkanObjectTypeDescriptorPool, pAllocator); |
| 1298 | |
| 1299 | } |
| 1300 | |
| Mike Schuchardt | 440d464 | 2019-06-20 17:14:57 -0700 | [diff] [blame] | 1301 | bool ObjectLifetimes::PreCallValidateDestroyFramebuffer( |
| 1302 | VkDevice device, |
| 1303 | VkFramebuffer framebuffer, |
| 1304 | const VkAllocationCallbacks* pAllocator) { |
| 1305 | bool skip = false; |
| 1306 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkDestroyFramebuffer-device-parameter", kVUIDUndefined); |
| 1307 | skip |= ValidateObject(device, framebuffer, kVulkanObjectTypeFramebuffer, true, "VUID-vkDestroyFramebuffer-framebuffer-parameter", "VUID-vkDestroyFramebuffer-framebuffer-parent"); |
| 1308 | skip |= ValidateDestroyObject(device, framebuffer, kVulkanObjectTypeFramebuffer, pAllocator, "VUID-vkDestroyFramebuffer-framebuffer-00893", "VUID-vkDestroyFramebuffer-framebuffer-00894"); |
| 1309 | |
| 1310 | return skip; |
| 1311 | } |
| 1312 | |
| 1313 | void ObjectLifetimes::PreCallRecordDestroyFramebuffer( |
| 1314 | VkDevice device, |
| 1315 | VkFramebuffer framebuffer, |
| 1316 | const VkAllocationCallbacks* pAllocator) { |
| 1317 | RecordDestroyObject(device, framebuffer, kVulkanObjectTypeFramebuffer); |
| 1318 | |
| 1319 | } |
| 1320 | |
| 1321 | bool ObjectLifetimes::PreCallValidateCreateRenderPass( |
| 1322 | VkDevice device, |
| 1323 | const VkRenderPassCreateInfo* pCreateInfo, |
| 1324 | const VkAllocationCallbacks* pAllocator, |
| 1325 | VkRenderPass* pRenderPass) { |
| 1326 | bool skip = false; |
| 1327 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkCreateRenderPass-device-parameter", kVUIDUndefined); |
| 1328 | |
| 1329 | return skip; |
| 1330 | } |
| 1331 | |
| 1332 | void ObjectLifetimes::PostCallRecordCreateRenderPass( |
| 1333 | VkDevice device, |
| 1334 | const VkRenderPassCreateInfo* pCreateInfo, |
| 1335 | const VkAllocationCallbacks* pAllocator, |
| 1336 | VkRenderPass* pRenderPass, |
| 1337 | VkResult result) { |
| 1338 | if (result != VK_SUCCESS) return; |
| 1339 | CreateObject(device, *pRenderPass, kVulkanObjectTypeRenderPass, pAllocator); |
| 1340 | |
| 1341 | } |
| 1342 | |
| 1343 | bool ObjectLifetimes::PreCallValidateDestroyRenderPass( |
| 1344 | VkDevice device, |
| 1345 | VkRenderPass renderPass, |
| 1346 | const VkAllocationCallbacks* pAllocator) { |
| 1347 | bool skip = false; |
| 1348 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkDestroyRenderPass-device-parameter", kVUIDUndefined); |
| 1349 | skip |= ValidateObject(device, renderPass, kVulkanObjectTypeRenderPass, true, "VUID-vkDestroyRenderPass-renderPass-parameter", "VUID-vkDestroyRenderPass-renderPass-parent"); |
| 1350 | skip |= ValidateDestroyObject(device, renderPass, kVulkanObjectTypeRenderPass, pAllocator, "VUID-vkDestroyRenderPass-renderPass-00874", "VUID-vkDestroyRenderPass-renderPass-00875"); |
| 1351 | |
| 1352 | return skip; |
| 1353 | } |
| 1354 | |
| 1355 | void ObjectLifetimes::PreCallRecordDestroyRenderPass( |
| 1356 | VkDevice device, |
| 1357 | VkRenderPass renderPass, |
| 1358 | const VkAllocationCallbacks* pAllocator) { |
| 1359 | RecordDestroyObject(device, renderPass, kVulkanObjectTypeRenderPass); |
| 1360 | |
| 1361 | } |
| 1362 | |
| 1363 | bool ObjectLifetimes::PreCallValidateGetRenderAreaGranularity( |
| 1364 | VkDevice device, |
| 1365 | VkRenderPass renderPass, |
| 1366 | VkExtent2D* pGranularity) { |
| 1367 | bool skip = false; |
| 1368 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetRenderAreaGranularity-device-parameter", kVUIDUndefined); |
| 1369 | skip |= ValidateObject(device, renderPass, kVulkanObjectTypeRenderPass, false, "VUID-vkGetRenderAreaGranularity-renderPass-parameter", "VUID-vkGetRenderAreaGranularity-renderPass-parent"); |
| 1370 | |
| 1371 | return skip; |
| 1372 | } |
| 1373 | |
| 1374 | bool ObjectLifetimes::PreCallValidateCreateCommandPool( |
| 1375 | VkDevice device, |
| 1376 | const VkCommandPoolCreateInfo* pCreateInfo, |
| 1377 | const VkAllocationCallbacks* pAllocator, |
| 1378 | VkCommandPool* pCommandPool) { |
| 1379 | bool skip = false; |
| 1380 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkCreateCommandPool-device-parameter", kVUIDUndefined); |
| 1381 | |
| 1382 | return skip; |
| 1383 | } |
| 1384 | |
| 1385 | void ObjectLifetimes::PostCallRecordCreateCommandPool( |
| 1386 | VkDevice device, |
| 1387 | const VkCommandPoolCreateInfo* pCreateInfo, |
| 1388 | const VkAllocationCallbacks* pAllocator, |
| 1389 | VkCommandPool* pCommandPool, |
| 1390 | VkResult result) { |
| 1391 | if (result != VK_SUCCESS) return; |
| 1392 | CreateObject(device, *pCommandPool, kVulkanObjectTypeCommandPool, pAllocator); |
| 1393 | |
| 1394 | } |
| 1395 | |
| 1396 | bool ObjectLifetimes::PreCallValidateResetCommandPool( |
| 1397 | VkDevice device, |
| 1398 | VkCommandPool commandPool, |
| 1399 | VkCommandPoolResetFlags flags) { |
| 1400 | bool skip = false; |
| 1401 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkResetCommandPool-device-parameter", kVUIDUndefined); |
| 1402 | skip |= ValidateObject(device, commandPool, kVulkanObjectTypeCommandPool, false, "VUID-vkResetCommandPool-commandPool-parameter", "VUID-vkResetCommandPool-commandPool-parent"); |
| 1403 | |
| 1404 | return skip; |
| 1405 | } |
| 1406 | |
| 1407 | bool ObjectLifetimes::PreCallValidateEndCommandBuffer( |
| 1408 | VkCommandBuffer commandBuffer) { |
| 1409 | bool skip = false; |
| 1410 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkEndCommandBuffer-commandBuffer-parameter", kVUIDUndefined); |
| 1411 | |
| 1412 | return skip; |
| 1413 | } |
| 1414 | |
| 1415 | bool ObjectLifetimes::PreCallValidateResetCommandBuffer( |
| 1416 | VkCommandBuffer commandBuffer, |
| 1417 | VkCommandBufferResetFlags flags) { |
| 1418 | bool skip = false; |
| 1419 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkResetCommandBuffer-commandBuffer-parameter", kVUIDUndefined); |
| 1420 | |
| 1421 | return skip; |
| 1422 | } |
| 1423 | |
| 1424 | bool ObjectLifetimes::PreCallValidateCmdBindPipeline( |
| 1425 | VkCommandBuffer commandBuffer, |
| 1426 | VkPipelineBindPoint pipelineBindPoint, |
| 1427 | VkPipeline pipeline) { |
| 1428 | bool skip = false; |
| 1429 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdBindPipeline-commandBuffer-parameter", "VUID-vkCmdBindPipeline-commonparent"); |
| 1430 | skip |= ValidateObject(commandBuffer, pipeline, kVulkanObjectTypePipeline, false, "VUID-vkCmdBindPipeline-pipeline-parameter", "VUID-vkCmdBindPipeline-commonparent"); |
| 1431 | |
| 1432 | return skip; |
| 1433 | } |
| 1434 | |
| 1435 | bool ObjectLifetimes::PreCallValidateCmdSetViewport( |
| 1436 | VkCommandBuffer commandBuffer, |
| 1437 | uint32_t firstViewport, |
| 1438 | uint32_t viewportCount, |
| 1439 | const VkViewport* pViewports) { |
| 1440 | bool skip = false; |
| 1441 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdSetViewport-commandBuffer-parameter", kVUIDUndefined); |
| 1442 | |
| 1443 | return skip; |
| 1444 | } |
| 1445 | |
| 1446 | bool ObjectLifetimes::PreCallValidateCmdSetScissor( |
| 1447 | VkCommandBuffer commandBuffer, |
| 1448 | uint32_t firstScissor, |
| 1449 | uint32_t scissorCount, |
| 1450 | const VkRect2D* pScissors) { |
| 1451 | bool skip = false; |
| 1452 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdSetScissor-commandBuffer-parameter", kVUIDUndefined); |
| 1453 | |
| 1454 | return skip; |
| 1455 | } |
| 1456 | |
| 1457 | bool ObjectLifetimes::PreCallValidateCmdSetLineWidth( |
| 1458 | VkCommandBuffer commandBuffer, |
| 1459 | float lineWidth) { |
| 1460 | bool skip = false; |
| 1461 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdSetLineWidth-commandBuffer-parameter", kVUIDUndefined); |
| 1462 | |
| 1463 | return skip; |
| 1464 | } |
| 1465 | |
| 1466 | bool ObjectLifetimes::PreCallValidateCmdSetDepthBias( |
| 1467 | VkCommandBuffer commandBuffer, |
| 1468 | float depthBiasConstantFactor, |
| 1469 | float depthBiasClamp, |
| 1470 | float depthBiasSlopeFactor) { |
| 1471 | bool skip = false; |
| 1472 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdSetDepthBias-commandBuffer-parameter", kVUIDUndefined); |
| 1473 | |
| 1474 | return skip; |
| 1475 | } |
| 1476 | |
| 1477 | bool ObjectLifetimes::PreCallValidateCmdSetBlendConstants( |
| 1478 | VkCommandBuffer commandBuffer, |
| 1479 | const float blendConstants[4]) { |
| 1480 | bool skip = false; |
| 1481 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdSetBlendConstants-commandBuffer-parameter", kVUIDUndefined); |
| 1482 | |
| 1483 | return skip; |
| 1484 | } |
| 1485 | |
| 1486 | bool ObjectLifetimes::PreCallValidateCmdSetDepthBounds( |
| 1487 | VkCommandBuffer commandBuffer, |
| 1488 | float minDepthBounds, |
| 1489 | float maxDepthBounds) { |
| 1490 | bool skip = false; |
| 1491 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdSetDepthBounds-commandBuffer-parameter", kVUIDUndefined); |
| 1492 | |
| 1493 | return skip; |
| 1494 | } |
| 1495 | |
| 1496 | bool ObjectLifetimes::PreCallValidateCmdSetStencilCompareMask( |
| 1497 | VkCommandBuffer commandBuffer, |
| 1498 | VkStencilFaceFlags faceMask, |
| 1499 | uint32_t compareMask) { |
| 1500 | bool skip = false; |
| 1501 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdSetStencilCompareMask-commandBuffer-parameter", kVUIDUndefined); |
| 1502 | |
| 1503 | return skip; |
| 1504 | } |
| 1505 | |
| 1506 | bool ObjectLifetimes::PreCallValidateCmdSetStencilWriteMask( |
| 1507 | VkCommandBuffer commandBuffer, |
| 1508 | VkStencilFaceFlags faceMask, |
| 1509 | uint32_t writeMask) { |
| 1510 | bool skip = false; |
| 1511 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdSetStencilWriteMask-commandBuffer-parameter", kVUIDUndefined); |
| 1512 | |
| 1513 | return skip; |
| 1514 | } |
| 1515 | |
| 1516 | bool ObjectLifetimes::PreCallValidateCmdSetStencilReference( |
| 1517 | VkCommandBuffer commandBuffer, |
| 1518 | VkStencilFaceFlags faceMask, |
| 1519 | uint32_t reference) { |
| 1520 | bool skip = false; |
| 1521 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdSetStencilReference-commandBuffer-parameter", kVUIDUndefined); |
| 1522 | |
| 1523 | return skip; |
| 1524 | } |
| 1525 | |
| 1526 | bool ObjectLifetimes::PreCallValidateCmdBindDescriptorSets( |
| 1527 | VkCommandBuffer commandBuffer, |
| 1528 | VkPipelineBindPoint pipelineBindPoint, |
| 1529 | VkPipelineLayout layout, |
| 1530 | uint32_t firstSet, |
| 1531 | uint32_t descriptorSetCount, |
| 1532 | const VkDescriptorSet* pDescriptorSets, |
| 1533 | uint32_t dynamicOffsetCount, |
| 1534 | const uint32_t* pDynamicOffsets) { |
| 1535 | bool skip = false; |
| 1536 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdBindDescriptorSets-commandBuffer-parameter", "VUID-vkCmdBindDescriptorSets-commonparent"); |
| 1537 | skip |= ValidateObject(commandBuffer, layout, kVulkanObjectTypePipelineLayout, false, "VUID-vkCmdBindDescriptorSets-layout-parameter", "VUID-vkCmdBindDescriptorSets-commonparent"); |
| 1538 | if (pDescriptorSets) { |
| 1539 | for (uint32_t index0 = 0; index0 < descriptorSetCount; ++index0) { |
| 1540 | skip |= ValidateObject(commandBuffer, pDescriptorSets[index0], kVulkanObjectTypeDescriptorSet, false, "VUID-vkCmdBindDescriptorSets-pDescriptorSets-parameter", "VUID-vkCmdBindDescriptorSets-commonparent"); |
| 1541 | } |
| 1542 | } |
| 1543 | |
| 1544 | return skip; |
| 1545 | } |
| 1546 | |
| 1547 | bool ObjectLifetimes::PreCallValidateCmdBindIndexBuffer( |
| 1548 | VkCommandBuffer commandBuffer, |
| 1549 | VkBuffer buffer, |
| 1550 | VkDeviceSize offset, |
| 1551 | VkIndexType indexType) { |
| 1552 | bool skip = false; |
| 1553 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdBindIndexBuffer-commandBuffer-parameter", "VUID-vkCmdBindIndexBuffer-commonparent"); |
| 1554 | skip |= ValidateObject(commandBuffer, buffer, kVulkanObjectTypeBuffer, false, "VUID-vkCmdBindIndexBuffer-buffer-parameter", "VUID-vkCmdBindIndexBuffer-commonparent"); |
| 1555 | |
| 1556 | return skip; |
| 1557 | } |
| 1558 | |
| 1559 | bool ObjectLifetimes::PreCallValidateCmdBindVertexBuffers( |
| 1560 | VkCommandBuffer commandBuffer, |
| 1561 | uint32_t firstBinding, |
| 1562 | uint32_t bindingCount, |
| 1563 | const VkBuffer* pBuffers, |
| 1564 | const VkDeviceSize* pOffsets) { |
| 1565 | bool skip = false; |
| 1566 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdBindVertexBuffers-commandBuffer-parameter", "VUID-vkCmdBindVertexBuffers-commonparent"); |
| 1567 | if (pBuffers) { |
| 1568 | for (uint32_t index0 = 0; index0 < bindingCount; ++index0) { |
| 1569 | skip |= ValidateObject(commandBuffer, pBuffers[index0], kVulkanObjectTypeBuffer, false, "VUID-vkCmdBindVertexBuffers-pBuffers-parameter", "VUID-vkCmdBindVertexBuffers-commonparent"); |
| 1570 | } |
| 1571 | } |
| 1572 | |
| 1573 | return skip; |
| 1574 | } |
| 1575 | |
| 1576 | bool ObjectLifetimes::PreCallValidateCmdDraw( |
| 1577 | VkCommandBuffer commandBuffer, |
| 1578 | uint32_t vertexCount, |
| 1579 | uint32_t instanceCount, |
| 1580 | uint32_t firstVertex, |
| 1581 | uint32_t firstInstance) { |
| 1582 | bool skip = false; |
| 1583 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdDraw-commandBuffer-parameter", kVUIDUndefined); |
| 1584 | |
| 1585 | return skip; |
| 1586 | } |
| 1587 | |
| 1588 | bool ObjectLifetimes::PreCallValidateCmdDrawIndexed( |
| 1589 | VkCommandBuffer commandBuffer, |
| 1590 | uint32_t indexCount, |
| 1591 | uint32_t instanceCount, |
| 1592 | uint32_t firstIndex, |
| 1593 | int32_t vertexOffset, |
| 1594 | uint32_t firstInstance) { |
| 1595 | bool skip = false; |
| 1596 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdDrawIndexed-commandBuffer-parameter", kVUIDUndefined); |
| 1597 | |
| 1598 | return skip; |
| 1599 | } |
| 1600 | |
| 1601 | bool ObjectLifetimes::PreCallValidateCmdDrawIndirect( |
| 1602 | VkCommandBuffer commandBuffer, |
| 1603 | VkBuffer buffer, |
| 1604 | VkDeviceSize offset, |
| 1605 | uint32_t drawCount, |
| 1606 | uint32_t stride) { |
| 1607 | bool skip = false; |
| 1608 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdDrawIndirect-commandBuffer-parameter", "VUID-vkCmdDrawIndirect-commonparent"); |
| 1609 | skip |= ValidateObject(commandBuffer, buffer, kVulkanObjectTypeBuffer, false, "VUID-vkCmdDrawIndirect-buffer-parameter", "VUID-vkCmdDrawIndirect-commonparent"); |
| 1610 | |
| 1611 | return skip; |
| 1612 | } |
| 1613 | |
| 1614 | bool ObjectLifetimes::PreCallValidateCmdDrawIndexedIndirect( |
| 1615 | VkCommandBuffer commandBuffer, |
| 1616 | VkBuffer buffer, |
| 1617 | VkDeviceSize offset, |
| 1618 | uint32_t drawCount, |
| 1619 | uint32_t stride) { |
| 1620 | bool skip = false; |
| 1621 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdDrawIndexedIndirect-commandBuffer-parameter", "VUID-vkCmdDrawIndexedIndirect-commonparent"); |
| 1622 | skip |= ValidateObject(commandBuffer, buffer, kVulkanObjectTypeBuffer, false, "VUID-vkCmdDrawIndexedIndirect-buffer-parameter", "VUID-vkCmdDrawIndexedIndirect-commonparent"); |
| 1623 | |
| 1624 | return skip; |
| 1625 | } |
| 1626 | |
| 1627 | bool ObjectLifetimes::PreCallValidateCmdDispatch( |
| 1628 | VkCommandBuffer commandBuffer, |
| 1629 | uint32_t groupCountX, |
| 1630 | uint32_t groupCountY, |
| 1631 | uint32_t groupCountZ) { |
| 1632 | bool skip = false; |
| 1633 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdDispatch-commandBuffer-parameter", kVUIDUndefined); |
| 1634 | |
| 1635 | return skip; |
| 1636 | } |
| 1637 | |
| 1638 | bool ObjectLifetimes::PreCallValidateCmdDispatchIndirect( |
| 1639 | VkCommandBuffer commandBuffer, |
| 1640 | VkBuffer buffer, |
| 1641 | VkDeviceSize offset) { |
| 1642 | bool skip = false; |
| 1643 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdDispatchIndirect-commandBuffer-parameter", "VUID-vkCmdDispatchIndirect-commonparent"); |
| 1644 | skip |= ValidateObject(commandBuffer, buffer, kVulkanObjectTypeBuffer, false, "VUID-vkCmdDispatchIndirect-buffer-parameter", "VUID-vkCmdDispatchIndirect-commonparent"); |
| 1645 | |
| 1646 | return skip; |
| 1647 | } |
| 1648 | |
| 1649 | bool ObjectLifetimes::PreCallValidateCmdCopyBuffer( |
| 1650 | VkCommandBuffer commandBuffer, |
| 1651 | VkBuffer srcBuffer, |
| 1652 | VkBuffer dstBuffer, |
| 1653 | uint32_t regionCount, |
| 1654 | const VkBufferCopy* pRegions) { |
| 1655 | bool skip = false; |
| 1656 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdCopyBuffer-commandBuffer-parameter", "VUID-vkCmdCopyBuffer-commonparent"); |
| 1657 | skip |= ValidateObject(commandBuffer, srcBuffer, kVulkanObjectTypeBuffer, false, "VUID-vkCmdCopyBuffer-srcBuffer-parameter", "VUID-vkCmdCopyBuffer-commonparent"); |
| 1658 | skip |= ValidateObject(commandBuffer, dstBuffer, kVulkanObjectTypeBuffer, false, "VUID-vkCmdCopyBuffer-dstBuffer-parameter", "VUID-vkCmdCopyBuffer-commonparent"); |
| 1659 | |
| 1660 | return skip; |
| 1661 | } |
| 1662 | |
| 1663 | bool ObjectLifetimes::PreCallValidateCmdCopyImage( |
| 1664 | VkCommandBuffer commandBuffer, |
| 1665 | VkImage srcImage, |
| 1666 | VkImageLayout srcImageLayout, |
| 1667 | VkImage dstImage, |
| 1668 | VkImageLayout dstImageLayout, |
| 1669 | uint32_t regionCount, |
| 1670 | const VkImageCopy* pRegions) { |
| 1671 | bool skip = false; |
| 1672 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdCopyImage-commandBuffer-parameter", "VUID-vkCmdCopyImage-commonparent"); |
| 1673 | skip |= ValidateObject(commandBuffer, srcImage, kVulkanObjectTypeImage, false, "VUID-vkCmdCopyImage-srcImage-parameter", "VUID-vkCmdCopyImage-commonparent"); |
| 1674 | skip |= ValidateObject(commandBuffer, dstImage, kVulkanObjectTypeImage, false, "VUID-vkCmdCopyImage-dstImage-parameter", "VUID-vkCmdCopyImage-commonparent"); |
| 1675 | |
| 1676 | return skip; |
| 1677 | } |
| 1678 | |
| 1679 | bool ObjectLifetimes::PreCallValidateCmdBlitImage( |
| 1680 | VkCommandBuffer commandBuffer, |
| 1681 | VkImage srcImage, |
| 1682 | VkImageLayout srcImageLayout, |
| 1683 | VkImage dstImage, |
| 1684 | VkImageLayout dstImageLayout, |
| 1685 | uint32_t regionCount, |
| 1686 | const VkImageBlit* pRegions, |
| 1687 | VkFilter filter) { |
| 1688 | bool skip = false; |
| 1689 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdBlitImage-commandBuffer-parameter", "VUID-vkCmdBlitImage-commonparent"); |
| 1690 | skip |= ValidateObject(commandBuffer, srcImage, kVulkanObjectTypeImage, false, "VUID-vkCmdBlitImage-srcImage-parameter", "VUID-vkCmdBlitImage-commonparent"); |
| 1691 | skip |= ValidateObject(commandBuffer, dstImage, kVulkanObjectTypeImage, false, "VUID-vkCmdBlitImage-dstImage-parameter", "VUID-vkCmdBlitImage-commonparent"); |
| 1692 | |
| 1693 | return skip; |
| 1694 | } |
| 1695 | |
| 1696 | bool ObjectLifetimes::PreCallValidateCmdCopyBufferToImage( |
| 1697 | VkCommandBuffer commandBuffer, |
| 1698 | VkBuffer srcBuffer, |
| 1699 | VkImage dstImage, |
| 1700 | VkImageLayout dstImageLayout, |
| 1701 | uint32_t regionCount, |
| 1702 | const VkBufferImageCopy* pRegions) { |
| 1703 | bool skip = false; |
| 1704 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdCopyBufferToImage-commandBuffer-parameter", "VUID-vkCmdCopyBufferToImage-commonparent"); |
| 1705 | skip |= ValidateObject(commandBuffer, srcBuffer, kVulkanObjectTypeBuffer, false, "VUID-vkCmdCopyBufferToImage-srcBuffer-parameter", "VUID-vkCmdCopyBufferToImage-commonparent"); |
| 1706 | skip |= ValidateObject(commandBuffer, dstImage, kVulkanObjectTypeImage, false, "VUID-vkCmdCopyBufferToImage-dstImage-parameter", "VUID-vkCmdCopyBufferToImage-commonparent"); |
| 1707 | |
| 1708 | return skip; |
| 1709 | } |
| 1710 | |
| 1711 | bool ObjectLifetimes::PreCallValidateCmdCopyImageToBuffer( |
| 1712 | VkCommandBuffer commandBuffer, |
| 1713 | VkImage srcImage, |
| 1714 | VkImageLayout srcImageLayout, |
| 1715 | VkBuffer dstBuffer, |
| 1716 | uint32_t regionCount, |
| 1717 | const VkBufferImageCopy* pRegions) { |
| 1718 | bool skip = false; |
| 1719 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdCopyImageToBuffer-commandBuffer-parameter", "VUID-vkCmdCopyImageToBuffer-commonparent"); |
| 1720 | skip |= ValidateObject(commandBuffer, srcImage, kVulkanObjectTypeImage, false, "VUID-vkCmdCopyImageToBuffer-srcImage-parameter", "VUID-vkCmdCopyImageToBuffer-commonparent"); |
| 1721 | skip |= ValidateObject(commandBuffer, dstBuffer, kVulkanObjectTypeBuffer, false, "VUID-vkCmdCopyImageToBuffer-dstBuffer-parameter", "VUID-vkCmdCopyImageToBuffer-commonparent"); |
| 1722 | |
| 1723 | return skip; |
| 1724 | } |
| 1725 | |
| 1726 | bool ObjectLifetimes::PreCallValidateCmdUpdateBuffer( |
| 1727 | VkCommandBuffer commandBuffer, |
| 1728 | VkBuffer dstBuffer, |
| 1729 | VkDeviceSize dstOffset, |
| 1730 | VkDeviceSize dataSize, |
| 1731 | const void* pData) { |
| 1732 | bool skip = false; |
| 1733 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdUpdateBuffer-commandBuffer-parameter", "VUID-vkCmdUpdateBuffer-commonparent"); |
| 1734 | skip |= ValidateObject(commandBuffer, dstBuffer, kVulkanObjectTypeBuffer, false, "VUID-vkCmdUpdateBuffer-dstBuffer-parameter", "VUID-vkCmdUpdateBuffer-commonparent"); |
| 1735 | |
| 1736 | return skip; |
| 1737 | } |
| 1738 | |
| 1739 | bool ObjectLifetimes::PreCallValidateCmdFillBuffer( |
| 1740 | VkCommandBuffer commandBuffer, |
| 1741 | VkBuffer dstBuffer, |
| 1742 | VkDeviceSize dstOffset, |
| 1743 | VkDeviceSize size, |
| 1744 | uint32_t data) { |
| 1745 | bool skip = false; |
| 1746 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdFillBuffer-commandBuffer-parameter", "VUID-vkCmdFillBuffer-commonparent"); |
| 1747 | skip |= ValidateObject(commandBuffer, dstBuffer, kVulkanObjectTypeBuffer, false, "VUID-vkCmdFillBuffer-dstBuffer-parameter", "VUID-vkCmdFillBuffer-commonparent"); |
| 1748 | |
| 1749 | return skip; |
| 1750 | } |
| 1751 | |
| 1752 | bool ObjectLifetimes::PreCallValidateCmdClearColorImage( |
| 1753 | VkCommandBuffer commandBuffer, |
| 1754 | VkImage image, |
| 1755 | VkImageLayout imageLayout, |
| 1756 | const VkClearColorValue* pColor, |
| 1757 | uint32_t rangeCount, |
| 1758 | const VkImageSubresourceRange* pRanges) { |
| 1759 | bool skip = false; |
| 1760 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdClearColorImage-commandBuffer-parameter", "VUID-vkCmdClearColorImage-commonparent"); |
| 1761 | skip |= ValidateObject(commandBuffer, image, kVulkanObjectTypeImage, false, "VUID-vkCmdClearColorImage-image-parameter", "VUID-vkCmdClearColorImage-commonparent"); |
| 1762 | |
| 1763 | return skip; |
| 1764 | } |
| 1765 | |
| 1766 | bool ObjectLifetimes::PreCallValidateCmdClearDepthStencilImage( |
| 1767 | VkCommandBuffer commandBuffer, |
| 1768 | VkImage image, |
| 1769 | VkImageLayout imageLayout, |
| 1770 | const VkClearDepthStencilValue* pDepthStencil, |
| 1771 | uint32_t rangeCount, |
| 1772 | const VkImageSubresourceRange* pRanges) { |
| 1773 | bool skip = false; |
| 1774 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdClearDepthStencilImage-commandBuffer-parameter", "VUID-vkCmdClearDepthStencilImage-commonparent"); |
| 1775 | skip |= ValidateObject(commandBuffer, image, kVulkanObjectTypeImage, false, "VUID-vkCmdClearDepthStencilImage-image-parameter", "VUID-vkCmdClearDepthStencilImage-commonparent"); |
| 1776 | |
| 1777 | return skip; |
| 1778 | } |
| 1779 | |
| 1780 | bool ObjectLifetimes::PreCallValidateCmdClearAttachments( |
| 1781 | VkCommandBuffer commandBuffer, |
| 1782 | uint32_t attachmentCount, |
| 1783 | const VkClearAttachment* pAttachments, |
| 1784 | uint32_t rectCount, |
| 1785 | const VkClearRect* pRects) { |
| 1786 | bool skip = false; |
| 1787 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdClearAttachments-commandBuffer-parameter", kVUIDUndefined); |
| 1788 | |
| 1789 | return skip; |
| 1790 | } |
| 1791 | |
| 1792 | bool ObjectLifetimes::PreCallValidateCmdResolveImage( |
| 1793 | VkCommandBuffer commandBuffer, |
| 1794 | VkImage srcImage, |
| 1795 | VkImageLayout srcImageLayout, |
| 1796 | VkImage dstImage, |
| 1797 | VkImageLayout dstImageLayout, |
| 1798 | uint32_t regionCount, |
| 1799 | const VkImageResolve* pRegions) { |
| 1800 | bool skip = false; |
| 1801 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdResolveImage-commandBuffer-parameter", "VUID-vkCmdResolveImage-commonparent"); |
| 1802 | skip |= ValidateObject(commandBuffer, srcImage, kVulkanObjectTypeImage, false, "VUID-vkCmdResolveImage-srcImage-parameter", "VUID-vkCmdResolveImage-commonparent"); |
| 1803 | skip |= ValidateObject(commandBuffer, dstImage, kVulkanObjectTypeImage, false, "VUID-vkCmdResolveImage-dstImage-parameter", "VUID-vkCmdResolveImage-commonparent"); |
| 1804 | |
| 1805 | return skip; |
| 1806 | } |
| 1807 | |
| 1808 | bool ObjectLifetimes::PreCallValidateCmdSetEvent( |
| 1809 | VkCommandBuffer commandBuffer, |
| 1810 | VkEvent event, |
| 1811 | VkPipelineStageFlags stageMask) { |
| 1812 | bool skip = false; |
| 1813 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdSetEvent-commandBuffer-parameter", "VUID-vkCmdSetEvent-commonparent"); |
| 1814 | skip |= ValidateObject(commandBuffer, event, kVulkanObjectTypeEvent, false, "VUID-vkCmdSetEvent-event-parameter", "VUID-vkCmdSetEvent-commonparent"); |
| 1815 | |
| 1816 | return skip; |
| 1817 | } |
| 1818 | |
| 1819 | bool ObjectLifetimes::PreCallValidateCmdResetEvent( |
| 1820 | VkCommandBuffer commandBuffer, |
| 1821 | VkEvent event, |
| 1822 | VkPipelineStageFlags stageMask) { |
| 1823 | bool skip = false; |
| 1824 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdResetEvent-commandBuffer-parameter", "VUID-vkCmdResetEvent-commonparent"); |
| 1825 | skip |= ValidateObject(commandBuffer, event, kVulkanObjectTypeEvent, false, "VUID-vkCmdResetEvent-event-parameter", "VUID-vkCmdResetEvent-commonparent"); |
| 1826 | |
| 1827 | return skip; |
| 1828 | } |
| 1829 | |
| 1830 | bool ObjectLifetimes::PreCallValidateCmdWaitEvents( |
| 1831 | VkCommandBuffer commandBuffer, |
| 1832 | uint32_t eventCount, |
| 1833 | const VkEvent* pEvents, |
| 1834 | VkPipelineStageFlags srcStageMask, |
| 1835 | VkPipelineStageFlags dstStageMask, |
| 1836 | uint32_t memoryBarrierCount, |
| 1837 | const VkMemoryBarrier* pMemoryBarriers, |
| 1838 | uint32_t bufferMemoryBarrierCount, |
| 1839 | const VkBufferMemoryBarrier* pBufferMemoryBarriers, |
| 1840 | uint32_t imageMemoryBarrierCount, |
| 1841 | const VkImageMemoryBarrier* pImageMemoryBarriers) { |
| 1842 | bool skip = false; |
| 1843 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdWaitEvents-commandBuffer-parameter", "VUID-vkCmdWaitEvents-commonparent"); |
| 1844 | if (pEvents) { |
| 1845 | for (uint32_t index0 = 0; index0 < eventCount; ++index0) { |
| 1846 | skip |= ValidateObject(commandBuffer, pEvents[index0], kVulkanObjectTypeEvent, false, "VUID-vkCmdWaitEvents-pEvents-parameter", "VUID-vkCmdWaitEvents-commonparent"); |
| 1847 | } |
| 1848 | } |
| 1849 | if (pBufferMemoryBarriers) { |
| 1850 | for (uint32_t index0 = 0; index0 < bufferMemoryBarrierCount; ++index0) { |
| 1851 | skip |= ValidateObject(commandBuffer, pBufferMemoryBarriers[index0].buffer, kVulkanObjectTypeBuffer, false, "VUID-VkBufferMemoryBarrier-buffer-parameter", kVUIDUndefined); |
| 1852 | } |
| 1853 | } |
| 1854 | if (pImageMemoryBarriers) { |
| 1855 | for (uint32_t index0 = 0; index0 < imageMemoryBarrierCount; ++index0) { |
| 1856 | skip |= ValidateObject(commandBuffer, pImageMemoryBarriers[index0].image, kVulkanObjectTypeImage, false, "VUID-VkImageMemoryBarrier-image-parameter", kVUIDUndefined); |
| 1857 | } |
| 1858 | } |
| 1859 | |
| 1860 | return skip; |
| 1861 | } |
| 1862 | |
| 1863 | bool ObjectLifetimes::PreCallValidateCmdPipelineBarrier( |
| 1864 | VkCommandBuffer commandBuffer, |
| 1865 | VkPipelineStageFlags srcStageMask, |
| 1866 | VkPipelineStageFlags dstStageMask, |
| 1867 | VkDependencyFlags dependencyFlags, |
| 1868 | uint32_t memoryBarrierCount, |
| 1869 | const VkMemoryBarrier* pMemoryBarriers, |
| 1870 | uint32_t bufferMemoryBarrierCount, |
| 1871 | const VkBufferMemoryBarrier* pBufferMemoryBarriers, |
| 1872 | uint32_t imageMemoryBarrierCount, |
| 1873 | const VkImageMemoryBarrier* pImageMemoryBarriers) { |
| 1874 | bool skip = false; |
| 1875 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdPipelineBarrier-commandBuffer-parameter", kVUIDUndefined); |
| 1876 | if (pBufferMemoryBarriers) { |
| 1877 | for (uint32_t index0 = 0; index0 < bufferMemoryBarrierCount; ++index0) { |
| 1878 | skip |= ValidateObject(commandBuffer, pBufferMemoryBarriers[index0].buffer, kVulkanObjectTypeBuffer, false, "VUID-VkBufferMemoryBarrier-buffer-parameter", kVUIDUndefined); |
| 1879 | } |
| 1880 | } |
| 1881 | if (pImageMemoryBarriers) { |
| 1882 | for (uint32_t index0 = 0; index0 < imageMemoryBarrierCount; ++index0) { |
| 1883 | skip |= ValidateObject(commandBuffer, pImageMemoryBarriers[index0].image, kVulkanObjectTypeImage, false, "VUID-VkImageMemoryBarrier-image-parameter", kVUIDUndefined); |
| 1884 | } |
| 1885 | } |
| 1886 | |
| 1887 | return skip; |
| 1888 | } |
| 1889 | |
| 1890 | bool ObjectLifetimes::PreCallValidateCmdBeginQuery( |
| 1891 | VkCommandBuffer commandBuffer, |
| 1892 | VkQueryPool queryPool, |
| 1893 | uint32_t query, |
| 1894 | VkQueryControlFlags flags) { |
| 1895 | bool skip = false; |
| 1896 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdBeginQuery-commandBuffer-parameter", "VUID-vkCmdBeginQuery-commonparent"); |
| 1897 | skip |= ValidateObject(commandBuffer, queryPool, kVulkanObjectTypeQueryPool, false, "VUID-vkCmdBeginQuery-queryPool-parameter", "VUID-vkCmdBeginQuery-commonparent"); |
| 1898 | |
| 1899 | return skip; |
| 1900 | } |
| 1901 | |
| 1902 | bool ObjectLifetimes::PreCallValidateCmdEndQuery( |
| 1903 | VkCommandBuffer commandBuffer, |
| 1904 | VkQueryPool queryPool, |
| 1905 | uint32_t query) { |
| 1906 | bool skip = false; |
| 1907 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdEndQuery-commandBuffer-parameter", "VUID-vkCmdEndQuery-commonparent"); |
| 1908 | skip |= ValidateObject(commandBuffer, queryPool, kVulkanObjectTypeQueryPool, false, "VUID-vkCmdEndQuery-queryPool-parameter", "VUID-vkCmdEndQuery-commonparent"); |
| 1909 | |
| 1910 | return skip; |
| 1911 | } |
| 1912 | |
| 1913 | bool ObjectLifetimes::PreCallValidateCmdResetQueryPool( |
| 1914 | VkCommandBuffer commandBuffer, |
| 1915 | VkQueryPool queryPool, |
| 1916 | uint32_t firstQuery, |
| 1917 | uint32_t queryCount) { |
| 1918 | bool skip = false; |
| 1919 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdResetQueryPool-commandBuffer-parameter", "VUID-vkCmdResetQueryPool-commonparent"); |
| 1920 | skip |= ValidateObject(commandBuffer, queryPool, kVulkanObjectTypeQueryPool, false, "VUID-vkCmdResetQueryPool-queryPool-parameter", "VUID-vkCmdResetQueryPool-commonparent"); |
| 1921 | |
| 1922 | return skip; |
| 1923 | } |
| 1924 | |
| 1925 | bool ObjectLifetimes::PreCallValidateCmdWriteTimestamp( |
| 1926 | VkCommandBuffer commandBuffer, |
| 1927 | VkPipelineStageFlagBits pipelineStage, |
| 1928 | VkQueryPool queryPool, |
| 1929 | uint32_t query) { |
| 1930 | bool skip = false; |
| 1931 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdWriteTimestamp-commandBuffer-parameter", "VUID-vkCmdWriteTimestamp-commonparent"); |
| 1932 | skip |= ValidateObject(commandBuffer, queryPool, kVulkanObjectTypeQueryPool, false, "VUID-vkCmdWriteTimestamp-queryPool-parameter", "VUID-vkCmdWriteTimestamp-commonparent"); |
| 1933 | |
| 1934 | return skip; |
| 1935 | } |
| 1936 | |
| 1937 | bool ObjectLifetimes::PreCallValidateCmdCopyQueryPoolResults( |
| 1938 | VkCommandBuffer commandBuffer, |
| 1939 | VkQueryPool queryPool, |
| 1940 | uint32_t firstQuery, |
| 1941 | uint32_t queryCount, |
| 1942 | VkBuffer dstBuffer, |
| 1943 | VkDeviceSize dstOffset, |
| 1944 | VkDeviceSize stride, |
| 1945 | VkQueryResultFlags flags) { |
| 1946 | bool skip = false; |
| 1947 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdCopyQueryPoolResults-commandBuffer-parameter", "VUID-vkCmdCopyQueryPoolResults-commonparent"); |
| 1948 | skip |= ValidateObject(commandBuffer, queryPool, kVulkanObjectTypeQueryPool, false, "VUID-vkCmdCopyQueryPoolResults-queryPool-parameter", "VUID-vkCmdCopyQueryPoolResults-commonparent"); |
| 1949 | skip |= ValidateObject(commandBuffer, dstBuffer, kVulkanObjectTypeBuffer, false, "VUID-vkCmdCopyQueryPoolResults-dstBuffer-parameter", "VUID-vkCmdCopyQueryPoolResults-commonparent"); |
| 1950 | |
| 1951 | return skip; |
| 1952 | } |
| 1953 | |
| 1954 | bool ObjectLifetimes::PreCallValidateCmdPushConstants( |
| 1955 | VkCommandBuffer commandBuffer, |
| 1956 | VkPipelineLayout layout, |
| 1957 | VkShaderStageFlags stageFlags, |
| 1958 | uint32_t offset, |
| 1959 | uint32_t size, |
| 1960 | const void* pValues) { |
| 1961 | bool skip = false; |
| 1962 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdPushConstants-commandBuffer-parameter", "VUID-vkCmdPushConstants-commonparent"); |
| 1963 | skip |= ValidateObject(commandBuffer, layout, kVulkanObjectTypePipelineLayout, false, "VUID-vkCmdPushConstants-layout-parameter", "VUID-vkCmdPushConstants-commonparent"); |
| 1964 | |
| 1965 | return skip; |
| 1966 | } |
| 1967 | |
| 1968 | bool ObjectLifetimes::PreCallValidateCmdBeginRenderPass( |
| 1969 | VkCommandBuffer commandBuffer, |
| 1970 | const VkRenderPassBeginInfo* pRenderPassBegin, |
| 1971 | VkSubpassContents contents) { |
| 1972 | bool skip = false; |
| 1973 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdBeginRenderPass-commandBuffer-parameter", kVUIDUndefined); |
| 1974 | if (pRenderPassBegin) { |
| 1975 | skip |= ValidateObject(commandBuffer, pRenderPassBegin->renderPass, kVulkanObjectTypeRenderPass, false, "VUID-VkRenderPassBeginInfo-renderPass-parameter", "VUID-VkRenderPassBeginInfo-commonparent"); |
| 1976 | skip |= ValidateObject(commandBuffer, pRenderPassBegin->framebuffer, kVulkanObjectTypeFramebuffer, false, "VUID-VkRenderPassBeginInfo-framebuffer-parameter", "VUID-VkRenderPassBeginInfo-commonparent"); |
| 1977 | } |
| 1978 | |
| 1979 | return skip; |
| 1980 | } |
| 1981 | |
| 1982 | bool ObjectLifetimes::PreCallValidateCmdNextSubpass( |
| 1983 | VkCommandBuffer commandBuffer, |
| 1984 | VkSubpassContents contents) { |
| 1985 | bool skip = false; |
| 1986 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdNextSubpass-commandBuffer-parameter", kVUIDUndefined); |
| 1987 | |
| 1988 | return skip; |
| 1989 | } |
| 1990 | |
| 1991 | bool ObjectLifetimes::PreCallValidateCmdEndRenderPass( |
| 1992 | VkCommandBuffer commandBuffer) { |
| 1993 | bool skip = false; |
| 1994 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdEndRenderPass-commandBuffer-parameter", kVUIDUndefined); |
| 1995 | |
| 1996 | return skip; |
| 1997 | } |
| 1998 | |
| 1999 | bool ObjectLifetimes::PreCallValidateCmdExecuteCommands( |
| 2000 | VkCommandBuffer commandBuffer, |
| 2001 | uint32_t commandBufferCount, |
| 2002 | const VkCommandBuffer* pCommandBuffers) { |
| 2003 | bool skip = false; |
| 2004 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdExecuteCommands-commandBuffer-parameter", "VUID-vkCmdExecuteCommands-commonparent"); |
| 2005 | if (pCommandBuffers) { |
| 2006 | for (uint32_t index0 = 0; index0 < commandBufferCount; ++index0) { |
| 2007 | skip |= ValidateObject(commandBuffer, pCommandBuffers[index0], kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdExecuteCommands-pCommandBuffers-parameter", "VUID-vkCmdExecuteCommands-commonparent"); |
| 2008 | } |
| 2009 | } |
| 2010 | |
| 2011 | return skip; |
| 2012 | } |
| 2013 | |
| 2014 | bool ObjectLifetimes::PreCallValidateBindBufferMemory2( |
| 2015 | VkDevice device, |
| 2016 | uint32_t bindInfoCount, |
| 2017 | const VkBindBufferMemoryInfo* pBindInfos) { |
| 2018 | bool skip = false; |
| 2019 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkBindBufferMemory2-device-parameter", kVUIDUndefined); |
| 2020 | if (pBindInfos) { |
| 2021 | for (uint32_t index0 = 0; index0 < bindInfoCount; ++index0) { |
| 2022 | skip |= ValidateObject(device, pBindInfos[index0].buffer, kVulkanObjectTypeBuffer, false, "VUID-VkBindBufferMemoryInfo-buffer-parameter", "VUID-VkBindBufferMemoryInfo-commonparent"); |
| 2023 | skip |= ValidateObject(device, pBindInfos[index0].memory, kVulkanObjectTypeDeviceMemory, false, "VUID-VkBindBufferMemoryInfo-memory-parameter", "VUID-VkBindBufferMemoryInfo-commonparent"); |
| 2024 | } |
| 2025 | } |
| 2026 | |
| 2027 | return skip; |
| 2028 | } |
| 2029 | |
| 2030 | bool ObjectLifetimes::PreCallValidateBindImageMemory2( |
| 2031 | VkDevice device, |
| 2032 | uint32_t bindInfoCount, |
| 2033 | const VkBindImageMemoryInfo* pBindInfos) { |
| 2034 | bool skip = false; |
| 2035 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkBindImageMemory2-device-parameter", kVUIDUndefined); |
| 2036 | if (pBindInfos) { |
| 2037 | for (uint32_t index0 = 0; index0 < bindInfoCount; ++index0) { |
| 2038 | skip |= ValidateObject(device, pBindInfos[index0].image, kVulkanObjectTypeImage, false, "VUID-VkBindImageMemoryInfo-image-parameter", "VUID-VkBindImageMemoryInfo-commonparent"); |
| 2039 | skip |= ValidateObject(device, pBindInfos[index0].memory, kVulkanObjectTypeDeviceMemory, true, kVUIDUndefined, "VUID-VkBindImageMemoryInfo-commonparent"); |
| 2040 | } |
| 2041 | } |
| 2042 | |
| 2043 | return skip; |
| 2044 | } |
| 2045 | |
| 2046 | bool ObjectLifetimes::PreCallValidateGetDeviceGroupPeerMemoryFeatures( |
| 2047 | VkDevice device, |
| 2048 | uint32_t heapIndex, |
| 2049 | uint32_t localDeviceIndex, |
| 2050 | uint32_t remoteDeviceIndex, |
| 2051 | VkPeerMemoryFeatureFlags* pPeerMemoryFeatures) { |
| 2052 | bool skip = false; |
| 2053 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetDeviceGroupPeerMemoryFeatures-device-parameter", kVUIDUndefined); |
| 2054 | |
| 2055 | return skip; |
| 2056 | } |
| 2057 | |
| 2058 | bool ObjectLifetimes::PreCallValidateCmdSetDeviceMask( |
| 2059 | VkCommandBuffer commandBuffer, |
| 2060 | uint32_t deviceMask) { |
| 2061 | bool skip = false; |
| 2062 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdSetDeviceMask-commandBuffer-parameter", kVUIDUndefined); |
| 2063 | |
| 2064 | return skip; |
| 2065 | } |
| 2066 | |
| 2067 | bool ObjectLifetimes::PreCallValidateCmdDispatchBase( |
| 2068 | VkCommandBuffer commandBuffer, |
| 2069 | uint32_t baseGroupX, |
| 2070 | uint32_t baseGroupY, |
| 2071 | uint32_t baseGroupZ, |
| 2072 | uint32_t groupCountX, |
| 2073 | uint32_t groupCountY, |
| 2074 | uint32_t groupCountZ) { |
| 2075 | bool skip = false; |
| 2076 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdDispatchBase-commandBuffer-parameter", kVUIDUndefined); |
| 2077 | |
| 2078 | return skip; |
| 2079 | } |
| 2080 | |
| 2081 | bool ObjectLifetimes::PreCallValidateEnumeratePhysicalDeviceGroups( |
| 2082 | VkInstance instance, |
| 2083 | uint32_t* pPhysicalDeviceGroupCount, |
| 2084 | VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties) { |
| 2085 | bool skip = false; |
| 2086 | skip |= ValidateObject(instance, instance, kVulkanObjectTypeInstance, false, "VUID-vkEnumeratePhysicalDeviceGroups-instance-parameter", kVUIDUndefined); |
| 2087 | |
| 2088 | return skip; |
| 2089 | } |
| 2090 | |
| 2091 | bool ObjectLifetimes::PreCallValidateGetImageMemoryRequirements2( |
| 2092 | VkDevice device, |
| 2093 | const VkImageMemoryRequirementsInfo2* pInfo, |
| 2094 | VkMemoryRequirements2* pMemoryRequirements) { |
| 2095 | bool skip = false; |
| 2096 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetImageMemoryRequirements2-device-parameter", kVUIDUndefined); |
| 2097 | if (pInfo) { |
| 2098 | skip |= ValidateObject(device, pInfo->image, kVulkanObjectTypeImage, false, "VUID-VkImageMemoryRequirementsInfo2-image-parameter", kVUIDUndefined); |
| 2099 | } |
| 2100 | |
| 2101 | return skip; |
| 2102 | } |
| 2103 | |
| 2104 | bool ObjectLifetimes::PreCallValidateGetBufferMemoryRequirements2( |
| 2105 | VkDevice device, |
| 2106 | const VkBufferMemoryRequirementsInfo2* pInfo, |
| 2107 | VkMemoryRequirements2* pMemoryRequirements) { |
| 2108 | bool skip = false; |
| 2109 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetBufferMemoryRequirements2-device-parameter", kVUIDUndefined); |
| 2110 | if (pInfo) { |
| 2111 | skip |= ValidateObject(device, pInfo->buffer, kVulkanObjectTypeBuffer, false, "VUID-VkBufferMemoryRequirementsInfo2-buffer-parameter", kVUIDUndefined); |
| 2112 | } |
| 2113 | |
| 2114 | return skip; |
| 2115 | } |
| 2116 | |
| 2117 | bool ObjectLifetimes::PreCallValidateGetImageSparseMemoryRequirements2( |
| 2118 | VkDevice device, |
| 2119 | const VkImageSparseMemoryRequirementsInfo2* pInfo, |
| 2120 | uint32_t* pSparseMemoryRequirementCount, |
| 2121 | VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { |
| 2122 | bool skip = false; |
| 2123 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetImageSparseMemoryRequirements2-device-parameter", kVUIDUndefined); |
| 2124 | if (pInfo) { |
| 2125 | skip |= ValidateObject(device, pInfo->image, kVulkanObjectTypeImage, false, "VUID-VkImageSparseMemoryRequirementsInfo2-image-parameter", kVUIDUndefined); |
| 2126 | } |
| 2127 | |
| 2128 | return skip; |
| 2129 | } |
| 2130 | |
| 2131 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceFeatures2( |
| 2132 | VkPhysicalDevice physicalDevice, |
| 2133 | VkPhysicalDeviceFeatures2* pFeatures) { |
| 2134 | bool skip = false; |
| 2135 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceFeatures2-physicalDevice-parameter", kVUIDUndefined); |
| 2136 | |
| 2137 | return skip; |
| 2138 | } |
| 2139 | |
| 2140 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceProperties2( |
| 2141 | VkPhysicalDevice physicalDevice, |
| 2142 | VkPhysicalDeviceProperties2* pProperties) { |
| 2143 | bool skip = false; |
| 2144 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceProperties2-physicalDevice-parameter", kVUIDUndefined); |
| 2145 | |
| 2146 | return skip; |
| 2147 | } |
| 2148 | |
| 2149 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceFormatProperties2( |
| 2150 | VkPhysicalDevice physicalDevice, |
| 2151 | VkFormat format, |
| 2152 | VkFormatProperties2* pFormatProperties) { |
| 2153 | bool skip = false; |
| 2154 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceFormatProperties2-physicalDevice-parameter", kVUIDUndefined); |
| 2155 | |
| 2156 | return skip; |
| 2157 | } |
| 2158 | |
| 2159 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceImageFormatProperties2( |
| 2160 | VkPhysicalDevice physicalDevice, |
| 2161 | const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, |
| 2162 | VkImageFormatProperties2* pImageFormatProperties) { |
| 2163 | bool skip = false; |
| 2164 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceImageFormatProperties2-physicalDevice-parameter", kVUIDUndefined); |
| 2165 | |
| 2166 | return skip; |
| 2167 | } |
| 2168 | |
| 2169 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceMemoryProperties2( |
| 2170 | VkPhysicalDevice physicalDevice, |
| 2171 | VkPhysicalDeviceMemoryProperties2* pMemoryProperties) { |
| 2172 | bool skip = false; |
| 2173 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceMemoryProperties2-physicalDevice-parameter", kVUIDUndefined); |
| 2174 | |
| 2175 | return skip; |
| 2176 | } |
| 2177 | |
| 2178 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceSparseImageFormatProperties2( |
| 2179 | VkPhysicalDevice physicalDevice, |
| 2180 | const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, |
| 2181 | uint32_t* pPropertyCount, |
| 2182 | VkSparseImageFormatProperties2* pProperties) { |
| 2183 | bool skip = false; |
| 2184 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceSparseImageFormatProperties2-physicalDevice-parameter", kVUIDUndefined); |
| 2185 | |
| 2186 | return skip; |
| 2187 | } |
| 2188 | |
| 2189 | bool ObjectLifetimes::PreCallValidateTrimCommandPool( |
| 2190 | VkDevice device, |
| 2191 | VkCommandPool commandPool, |
| 2192 | VkCommandPoolTrimFlags flags) { |
| 2193 | bool skip = false; |
| 2194 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkTrimCommandPool-device-parameter", kVUIDUndefined); |
| 2195 | skip |= ValidateObject(device, commandPool, kVulkanObjectTypeCommandPool, false, "VUID-vkTrimCommandPool-commandPool-parameter", "VUID-vkTrimCommandPool-commandPool-parent"); |
| 2196 | |
| 2197 | return skip; |
| 2198 | } |
| 2199 | |
| 2200 | bool ObjectLifetimes::PreCallValidateCreateSamplerYcbcrConversion( |
| 2201 | VkDevice device, |
| 2202 | const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, |
| 2203 | const VkAllocationCallbacks* pAllocator, |
| 2204 | VkSamplerYcbcrConversion* pYcbcrConversion) { |
| 2205 | bool skip = false; |
| 2206 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkCreateSamplerYcbcrConversion-device-parameter", kVUIDUndefined); |
| 2207 | |
| 2208 | return skip; |
| 2209 | } |
| 2210 | |
| 2211 | void ObjectLifetimes::PostCallRecordCreateSamplerYcbcrConversion( |
| 2212 | VkDevice device, |
| 2213 | const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, |
| 2214 | const VkAllocationCallbacks* pAllocator, |
| 2215 | VkSamplerYcbcrConversion* pYcbcrConversion, |
| 2216 | VkResult result) { |
| 2217 | if (result != VK_SUCCESS) return; |
| 2218 | CreateObject(device, *pYcbcrConversion, kVulkanObjectTypeSamplerYcbcrConversion, pAllocator); |
| 2219 | |
| 2220 | } |
| 2221 | |
| 2222 | bool ObjectLifetimes::PreCallValidateDestroySamplerYcbcrConversion( |
| 2223 | VkDevice device, |
| 2224 | VkSamplerYcbcrConversion ycbcrConversion, |
| 2225 | const VkAllocationCallbacks* pAllocator) { |
| 2226 | bool skip = false; |
| 2227 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkDestroySamplerYcbcrConversion-device-parameter", kVUIDUndefined); |
| 2228 | skip |= ValidateObject(device, ycbcrConversion, kVulkanObjectTypeSamplerYcbcrConversion, true, "VUID-vkDestroySamplerYcbcrConversion-ycbcrConversion-parameter", "VUID-vkDestroySamplerYcbcrConversion-ycbcrConversion-parent"); |
| 2229 | skip |= ValidateDestroyObject(device, ycbcrConversion, kVulkanObjectTypeSamplerYcbcrConversion, pAllocator, kVUIDUndefined, kVUIDUndefined); |
| 2230 | |
| 2231 | return skip; |
| 2232 | } |
| 2233 | |
| 2234 | void ObjectLifetimes::PreCallRecordDestroySamplerYcbcrConversion( |
| 2235 | VkDevice device, |
| 2236 | VkSamplerYcbcrConversion ycbcrConversion, |
| 2237 | const VkAllocationCallbacks* pAllocator) { |
| 2238 | RecordDestroyObject(device, ycbcrConversion, kVulkanObjectTypeSamplerYcbcrConversion); |
| 2239 | |
| 2240 | } |
| 2241 | |
| 2242 | bool ObjectLifetimes::PreCallValidateCreateDescriptorUpdateTemplate( |
| 2243 | VkDevice device, |
| 2244 | const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, |
| 2245 | const VkAllocationCallbacks* pAllocator, |
| 2246 | VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate) { |
| 2247 | bool skip = false; |
| 2248 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkCreateDescriptorUpdateTemplate-device-parameter", kVUIDUndefined); |
| 2249 | if (pCreateInfo) { |
| 2250 | skip |= ValidateObject(device, pCreateInfo->descriptorSetLayout, kVulkanObjectTypeDescriptorSetLayout, true, "VUID-VkDescriptorUpdateTemplateCreateInfo-descriptorSetLayout-parameter", "VUID-VkDescriptorUpdateTemplateCreateInfo-commonparent"); |
| 2251 | skip |= ValidateObject(device, pCreateInfo->pipelineLayout, kVulkanObjectTypePipelineLayout, true, kVUIDUndefined, "VUID-VkDescriptorUpdateTemplateCreateInfo-commonparent"); |
| 2252 | } |
| 2253 | |
| 2254 | return skip; |
| 2255 | } |
| 2256 | |
| 2257 | void ObjectLifetimes::PostCallRecordCreateDescriptorUpdateTemplate( |
| 2258 | VkDevice device, |
| 2259 | const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, |
| 2260 | const VkAllocationCallbacks* pAllocator, |
| 2261 | VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate, |
| 2262 | VkResult result) { |
| 2263 | if (result != VK_SUCCESS) return; |
| 2264 | CreateObject(device, *pDescriptorUpdateTemplate, kVulkanObjectTypeDescriptorUpdateTemplate, pAllocator); |
| 2265 | |
| 2266 | } |
| 2267 | |
| 2268 | bool ObjectLifetimes::PreCallValidateDestroyDescriptorUpdateTemplate( |
| 2269 | VkDevice device, |
| 2270 | VkDescriptorUpdateTemplate descriptorUpdateTemplate, |
| 2271 | const VkAllocationCallbacks* pAllocator) { |
| 2272 | bool skip = false; |
| 2273 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkDestroyDescriptorUpdateTemplate-device-parameter", kVUIDUndefined); |
| 2274 | skip |= ValidateObject(device, descriptorUpdateTemplate, kVulkanObjectTypeDescriptorUpdateTemplate, true, "VUID-vkDestroyDescriptorUpdateTemplate-descriptorUpdateTemplate-parameter", "VUID-vkDestroyDescriptorUpdateTemplate-descriptorUpdateTemplate-parent"); |
| 2275 | skip |= ValidateDestroyObject(device, descriptorUpdateTemplate, kVulkanObjectTypeDescriptorUpdateTemplate, pAllocator, "VUID-vkDestroyDescriptorUpdateTemplate-descriptorSetLayout-00356", "VUID-vkDestroyDescriptorUpdateTemplate-descriptorSetLayout-00357"); |
| 2276 | |
| 2277 | return skip; |
| 2278 | } |
| 2279 | |
| 2280 | void ObjectLifetimes::PreCallRecordDestroyDescriptorUpdateTemplate( |
| 2281 | VkDevice device, |
| 2282 | VkDescriptorUpdateTemplate descriptorUpdateTemplate, |
| 2283 | const VkAllocationCallbacks* pAllocator) { |
| 2284 | RecordDestroyObject(device, descriptorUpdateTemplate, kVulkanObjectTypeDescriptorUpdateTemplate); |
| 2285 | |
| 2286 | } |
| 2287 | |
| 2288 | bool ObjectLifetimes::PreCallValidateUpdateDescriptorSetWithTemplate( |
| 2289 | VkDevice device, |
| 2290 | VkDescriptorSet descriptorSet, |
| 2291 | VkDescriptorUpdateTemplate descriptorUpdateTemplate, |
| 2292 | const void* pData) { |
| 2293 | bool skip = false; |
| 2294 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkUpdateDescriptorSetWithTemplate-device-parameter", kVUIDUndefined); |
| 2295 | skip |= ValidateObject(device, descriptorSet, kVulkanObjectTypeDescriptorSet, false, "VUID-vkUpdateDescriptorSetWithTemplate-descriptorSet-parameter", kVUIDUndefined); |
| 2296 | skip |= ValidateObject(device, descriptorUpdateTemplate, kVulkanObjectTypeDescriptorUpdateTemplate, false, "VUID-vkUpdateDescriptorSetWithTemplate-descriptorUpdateTemplate-parameter", "VUID-vkUpdateDescriptorSetWithTemplate-descriptorUpdateTemplate-parent"); |
| 2297 | |
| 2298 | return skip; |
| 2299 | } |
| 2300 | |
| 2301 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceExternalBufferProperties( |
| 2302 | VkPhysicalDevice physicalDevice, |
| 2303 | const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, |
| 2304 | VkExternalBufferProperties* pExternalBufferProperties) { |
| 2305 | bool skip = false; |
| 2306 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceExternalBufferProperties-physicalDevice-parameter", kVUIDUndefined); |
| 2307 | |
| 2308 | return skip; |
| 2309 | } |
| 2310 | |
| 2311 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceExternalFenceProperties( |
| 2312 | VkPhysicalDevice physicalDevice, |
| 2313 | const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, |
| 2314 | VkExternalFenceProperties* pExternalFenceProperties) { |
| 2315 | bool skip = false; |
| 2316 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceExternalFenceProperties-physicalDevice-parameter", kVUIDUndefined); |
| 2317 | |
| 2318 | return skip; |
| 2319 | } |
| 2320 | |
| 2321 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceExternalSemaphoreProperties( |
| 2322 | VkPhysicalDevice physicalDevice, |
| 2323 | const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, |
| 2324 | VkExternalSemaphoreProperties* pExternalSemaphoreProperties) { |
| 2325 | bool skip = false; |
| 2326 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceExternalSemaphoreProperties-physicalDevice-parameter", kVUIDUndefined); |
| 2327 | |
| 2328 | return skip; |
| 2329 | } |
| 2330 | |
| 2331 | bool ObjectLifetimes::PreCallValidateDestroySurfaceKHR( |
| 2332 | VkInstance instance, |
| 2333 | VkSurfaceKHR surface, |
| 2334 | const VkAllocationCallbacks* pAllocator) { |
| 2335 | bool skip = false; |
| 2336 | skip |= ValidateObject(instance, instance, kVulkanObjectTypeInstance, false, "VUID-vkDestroySurfaceKHR-instance-parameter", kVUIDUndefined); |
| 2337 | skip |= ValidateObject(instance, surface, kVulkanObjectTypeSurfaceKHR, true, "VUID-vkDestroySurfaceKHR-surface-parameter", "VUID-vkDestroySurfaceKHR-surface-parent"); |
| 2338 | skip |= ValidateDestroyObject(instance, surface, kVulkanObjectTypeSurfaceKHR, pAllocator, "VUID-vkDestroySurfaceKHR-surface-01267", "VUID-vkDestroySurfaceKHR-surface-01268"); |
| 2339 | |
| 2340 | return skip; |
| 2341 | } |
| 2342 | |
| 2343 | void ObjectLifetimes::PreCallRecordDestroySurfaceKHR( |
| 2344 | VkInstance instance, |
| 2345 | VkSurfaceKHR surface, |
| 2346 | const VkAllocationCallbacks* pAllocator) { |
| 2347 | RecordDestroyObject(instance, surface, kVulkanObjectTypeSurfaceKHR); |
| 2348 | |
| 2349 | } |
| 2350 | |
| 2351 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceSurfaceSupportKHR( |
| 2352 | VkPhysicalDevice physicalDevice, |
| 2353 | uint32_t queueFamilyIndex, |
| 2354 | VkSurfaceKHR surface, |
| 2355 | VkBool32* pSupported) { |
| 2356 | bool skip = false; |
| 2357 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceSurfaceSupportKHR-physicalDevice-parameter", "VUID-vkGetPhysicalDeviceSurfaceSupportKHR-commonparent"); |
| 2358 | skip |= ValidateObject(physicalDevice, surface, kVulkanObjectTypeSurfaceKHR, false, "VUID-vkGetPhysicalDeviceSurfaceSupportKHR-surface-parameter", "VUID-vkGetPhysicalDeviceSurfaceSupportKHR-commonparent"); |
| 2359 | |
| 2360 | return skip; |
| 2361 | } |
| 2362 | |
| 2363 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceSurfaceCapabilitiesKHR( |
| 2364 | VkPhysicalDevice physicalDevice, |
| 2365 | VkSurfaceKHR surface, |
| 2366 | VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) { |
| 2367 | bool skip = false; |
| 2368 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-physicalDevice-parameter", "VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-commonparent"); |
| 2369 | skip |= ValidateObject(physicalDevice, surface, kVulkanObjectTypeSurfaceKHR, false, "VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-surface-parameter", "VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-commonparent"); |
| 2370 | |
| 2371 | return skip; |
| 2372 | } |
| 2373 | |
| 2374 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceSurfaceFormatsKHR( |
| 2375 | VkPhysicalDevice physicalDevice, |
| 2376 | VkSurfaceKHR surface, |
| 2377 | uint32_t* pSurfaceFormatCount, |
| 2378 | VkSurfaceFormatKHR* pSurfaceFormats) { |
| 2379 | bool skip = false; |
| 2380 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-physicalDevice-parameter", "VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-commonparent"); |
| 2381 | skip |= ValidateObject(physicalDevice, surface, kVulkanObjectTypeSurfaceKHR, false, "VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-surface-parameter", "VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-commonparent"); |
| 2382 | |
| 2383 | return skip; |
| 2384 | } |
| 2385 | |
| 2386 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceSurfacePresentModesKHR( |
| 2387 | VkPhysicalDevice physicalDevice, |
| 2388 | VkSurfaceKHR surface, |
| 2389 | uint32_t* pPresentModeCount, |
| 2390 | VkPresentModeKHR* pPresentModes) { |
| 2391 | bool skip = false; |
| 2392 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-physicalDevice-parameter", "VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-commonparent"); |
| 2393 | skip |= ValidateObject(physicalDevice, surface, kVulkanObjectTypeSurfaceKHR, false, "VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-surface-parameter", "VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-commonparent"); |
| 2394 | |
| 2395 | return skip; |
| 2396 | } |
| 2397 | |
| 2398 | bool ObjectLifetimes::PreCallValidateCreateSwapchainKHR( |
| 2399 | VkDevice device, |
| 2400 | const VkSwapchainCreateInfoKHR* pCreateInfo, |
| 2401 | const VkAllocationCallbacks* pAllocator, |
| 2402 | VkSwapchainKHR* pSwapchain) { |
| 2403 | bool skip = false; |
| 2404 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkCreateSwapchainKHR-device-parameter", kVUIDUndefined); |
| 2405 | if (pCreateInfo) { |
| 2406 | skip |= ValidateObject(device, pCreateInfo->surface, kVulkanObjectTypeSurfaceKHR, false, "VUID-VkSwapchainCreateInfoKHR-surface-parameter", "VUID-VkSwapchainCreateInfoKHR-commonparent"); |
| 2407 | skip |= ValidateObject(device, pCreateInfo->oldSwapchain, kVulkanObjectTypeSwapchainKHR, true, "VUID-VkSwapchainCreateInfoKHR-oldSwapchain-parameter", "VUID-VkSwapchainCreateInfoKHR-oldSwapchain-parent"); |
| 2408 | } |
| 2409 | |
| 2410 | return skip; |
| 2411 | } |
| 2412 | |
| 2413 | void ObjectLifetimes::PostCallRecordCreateSwapchainKHR( |
| 2414 | VkDevice device, |
| 2415 | const VkSwapchainCreateInfoKHR* pCreateInfo, |
| 2416 | const VkAllocationCallbacks* pAllocator, |
| 2417 | VkSwapchainKHR* pSwapchain, |
| 2418 | VkResult result) { |
| 2419 | if (result != VK_SUCCESS) return; |
| 2420 | CreateObject(device, *pSwapchain, kVulkanObjectTypeSwapchainKHR, pAllocator); |
| 2421 | |
| 2422 | } |
| 2423 | |
| 2424 | bool ObjectLifetimes::PreCallValidateAcquireNextImageKHR( |
| 2425 | VkDevice device, |
| 2426 | VkSwapchainKHR swapchain, |
| 2427 | uint64_t timeout, |
| 2428 | VkSemaphore semaphore, |
| 2429 | VkFence fence, |
| 2430 | uint32_t* pImageIndex) { |
| 2431 | bool skip = false; |
| 2432 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkAcquireNextImageKHR-device-parameter", "VUID-vkAcquireNextImageKHR-commonparent"); |
| 2433 | skip |= ValidateObject(device, swapchain, kVulkanObjectTypeSwapchainKHR, false, "VUID-vkAcquireNextImageKHR-swapchain-parameter", "VUID-vkAcquireNextImageKHR-commonparent"); |
| 2434 | skip |= ValidateObject(device, semaphore, kVulkanObjectTypeSemaphore, true, "VUID-vkAcquireNextImageKHR-semaphore-parameter", "VUID-vkAcquireNextImageKHR-semaphore-parent"); |
| 2435 | skip |= ValidateObject(device, fence, kVulkanObjectTypeFence, true, "VUID-vkAcquireNextImageKHR-fence-parameter", "VUID-vkAcquireNextImageKHR-fence-parent"); |
| 2436 | |
| 2437 | return skip; |
| 2438 | } |
| 2439 | |
| 2440 | bool ObjectLifetimes::PreCallValidateQueuePresentKHR( |
| 2441 | VkQueue queue, |
| 2442 | const VkPresentInfoKHR* pPresentInfo) { |
| 2443 | bool skip = false; |
| 2444 | skip |= ValidateObject(queue, queue, kVulkanObjectTypeQueue, false, "VUID-vkQueuePresentKHR-queue-parameter", kVUIDUndefined); |
| 2445 | if (pPresentInfo) { |
| 2446 | if (pPresentInfo->pWaitSemaphores) { |
| 2447 | for (uint32_t index1 = 0; index1 < pPresentInfo->waitSemaphoreCount; ++index1) { |
| 2448 | skip |= ValidateObject(queue, pPresentInfo->pWaitSemaphores[index1], kVulkanObjectTypeSemaphore, false, "VUID-VkPresentInfoKHR-pWaitSemaphores-parameter", "VUID-VkPresentInfoKHR-commonparent"); |
| 2449 | } |
| 2450 | } |
| 2451 | if (pPresentInfo->pSwapchains) { |
| 2452 | for (uint32_t index1 = 0; index1 < pPresentInfo->swapchainCount; ++index1) { |
| 2453 | skip |= ValidateObject(queue, pPresentInfo->pSwapchains[index1], kVulkanObjectTypeSwapchainKHR, false, "VUID-VkPresentInfoKHR-pSwapchains-parameter", "VUID-VkPresentInfoKHR-commonparent"); |
| 2454 | } |
| 2455 | } |
| 2456 | } |
| 2457 | |
| 2458 | return skip; |
| 2459 | } |
| 2460 | |
| 2461 | bool ObjectLifetimes::PreCallValidateGetDeviceGroupPresentCapabilitiesKHR( |
| 2462 | VkDevice device, |
| 2463 | VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities) { |
| 2464 | bool skip = false; |
| 2465 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetDeviceGroupPresentCapabilitiesKHR-device-parameter", kVUIDUndefined); |
| 2466 | |
| 2467 | return skip; |
| 2468 | } |
| 2469 | |
| 2470 | bool ObjectLifetimes::PreCallValidateGetDeviceGroupSurfacePresentModesKHR( |
| 2471 | VkDevice device, |
| 2472 | VkSurfaceKHR surface, |
| 2473 | VkDeviceGroupPresentModeFlagsKHR* pModes) { |
| 2474 | bool skip = false; |
| 2475 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetDeviceGroupSurfacePresentModesKHR-device-parameter", "VUID-vkGetDeviceGroupSurfacePresentModesKHR-commonparent"); |
| 2476 | skip |= ValidateObject(device, surface, kVulkanObjectTypeSurfaceKHR, false, "VUID-vkGetDeviceGroupSurfacePresentModesKHR-surface-parameter", "VUID-vkGetDeviceGroupSurfacePresentModesKHR-commonparent"); |
| 2477 | |
| 2478 | return skip; |
| 2479 | } |
| 2480 | |
| 2481 | bool ObjectLifetimes::PreCallValidateGetPhysicalDevicePresentRectanglesKHR( |
| 2482 | VkPhysicalDevice physicalDevice, |
| 2483 | VkSurfaceKHR surface, |
| 2484 | uint32_t* pRectCount, |
| 2485 | VkRect2D* pRects) { |
| 2486 | bool skip = false; |
| 2487 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDevicePresentRectanglesKHR-physicalDevice-parameter", "VUID-vkGetPhysicalDevicePresentRectanglesKHR-commonparent"); |
| 2488 | skip |= ValidateObject(physicalDevice, surface, kVulkanObjectTypeSurfaceKHR, false, "VUID-vkGetPhysicalDevicePresentRectanglesKHR-surface-parameter", "VUID-vkGetPhysicalDevicePresentRectanglesKHR-commonparent"); |
| 2489 | |
| 2490 | return skip; |
| 2491 | } |
| 2492 | |
| 2493 | bool ObjectLifetimes::PreCallValidateAcquireNextImage2KHR( |
| 2494 | VkDevice device, |
| 2495 | const VkAcquireNextImageInfoKHR* pAcquireInfo, |
| 2496 | uint32_t* pImageIndex) { |
| 2497 | bool skip = false; |
| 2498 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkAcquireNextImage2KHR-device-parameter", kVUIDUndefined); |
| 2499 | if (pAcquireInfo) { |
| 2500 | skip |= ValidateObject(device, pAcquireInfo->swapchain, kVulkanObjectTypeSwapchainKHR, false, "VUID-VkAcquireNextImageInfoKHR-swapchain-parameter", "VUID-VkAcquireNextImageInfoKHR-commonparent"); |
| 2501 | skip |= ValidateObject(device, pAcquireInfo->semaphore, kVulkanObjectTypeSemaphore, true, "VUID-VkAcquireNextImageInfoKHR-semaphore-parameter", "VUID-VkAcquireNextImageInfoKHR-commonparent"); |
| 2502 | skip |= ValidateObject(device, pAcquireInfo->fence, kVulkanObjectTypeFence, true, "VUID-VkAcquireNextImageInfoKHR-fence-parameter", "VUID-VkAcquireNextImageInfoKHR-commonparent"); |
| 2503 | } |
| 2504 | |
| 2505 | return skip; |
| 2506 | } |
| 2507 | |
| 2508 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceDisplayPlanePropertiesKHR( |
| 2509 | VkPhysicalDevice physicalDevice, |
| 2510 | uint32_t* pPropertyCount, |
| 2511 | VkDisplayPlanePropertiesKHR* pProperties) { |
| 2512 | bool skip = false; |
| 2513 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceDisplayPlanePropertiesKHR-physicalDevice-parameter", kVUIDUndefined); |
| 2514 | |
| 2515 | return skip; |
| 2516 | } |
| 2517 | |
| 2518 | bool ObjectLifetimes::PreCallValidateGetDisplayPlaneSupportedDisplaysKHR( |
| 2519 | VkPhysicalDevice physicalDevice, |
| 2520 | uint32_t planeIndex, |
| 2521 | uint32_t* pDisplayCount, |
| 2522 | VkDisplayKHR* pDisplays) { |
| 2523 | bool skip = false; |
| 2524 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetDisplayPlaneSupportedDisplaysKHR-physicalDevice-parameter", kVUIDUndefined); |
| 2525 | |
| 2526 | return skip; |
| 2527 | } |
| 2528 | |
| 2529 | void ObjectLifetimes::PostCallRecordGetDisplayPlaneSupportedDisplaysKHR( |
| 2530 | VkPhysicalDevice physicalDevice, |
| 2531 | uint32_t planeIndex, |
| 2532 | uint32_t* pDisplayCount, |
| 2533 | VkDisplayKHR* pDisplays, |
| 2534 | VkResult result) { |
| 2535 | if (result != VK_SUCCESS) return; |
| 2536 | if (pDisplays) { |
| 2537 | for (uint32_t index = 0; index < *pDisplayCount; index++) { |
| 2538 | CreateObject(physicalDevice, pDisplays[index], kVulkanObjectTypeDisplayKHR, nullptr); |
| 2539 | } |
| 2540 | } |
| 2541 | |
| 2542 | } |
| 2543 | |
| 2544 | bool ObjectLifetimes::PreCallValidateCreateDisplayModeKHR( |
| 2545 | VkPhysicalDevice physicalDevice, |
| 2546 | VkDisplayKHR display, |
| 2547 | const VkDisplayModeCreateInfoKHR* pCreateInfo, |
| 2548 | const VkAllocationCallbacks* pAllocator, |
| 2549 | VkDisplayModeKHR* pMode) { |
| 2550 | bool skip = false; |
| 2551 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkCreateDisplayModeKHR-physicalDevice-parameter", kVUIDUndefined); |
| 2552 | skip |= ValidateObject(physicalDevice, display, kVulkanObjectTypeDisplayKHR, false, "VUID-vkCreateDisplayModeKHR-display-parameter", kVUIDUndefined); |
| 2553 | |
| 2554 | return skip; |
| 2555 | } |
| 2556 | |
| 2557 | void ObjectLifetimes::PostCallRecordCreateDisplayModeKHR( |
| 2558 | VkPhysicalDevice physicalDevice, |
| 2559 | VkDisplayKHR display, |
| 2560 | const VkDisplayModeCreateInfoKHR* pCreateInfo, |
| 2561 | const VkAllocationCallbacks* pAllocator, |
| 2562 | VkDisplayModeKHR* pMode, |
| 2563 | VkResult result) { |
| 2564 | if (result != VK_SUCCESS) return; |
| 2565 | CreateObject(physicalDevice, *pMode, kVulkanObjectTypeDisplayModeKHR, pAllocator); |
| 2566 | |
| 2567 | } |
| 2568 | |
| 2569 | bool ObjectLifetimes::PreCallValidateGetDisplayPlaneCapabilitiesKHR( |
| 2570 | VkPhysicalDevice physicalDevice, |
| 2571 | VkDisplayModeKHR mode, |
| 2572 | uint32_t planeIndex, |
| 2573 | VkDisplayPlaneCapabilitiesKHR* pCapabilities) { |
| 2574 | bool skip = false; |
| 2575 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetDisplayPlaneCapabilitiesKHR-physicalDevice-parameter", kVUIDUndefined); |
| 2576 | skip |= ValidateObject(physicalDevice, mode, kVulkanObjectTypeDisplayModeKHR, false, "VUID-vkGetDisplayPlaneCapabilitiesKHR-mode-parameter", kVUIDUndefined); |
| 2577 | |
| 2578 | return skip; |
| 2579 | } |
| 2580 | |
| 2581 | bool ObjectLifetimes::PreCallValidateCreateDisplayPlaneSurfaceKHR( |
| 2582 | VkInstance instance, |
| 2583 | const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, |
| 2584 | const VkAllocationCallbacks* pAllocator, |
| 2585 | VkSurfaceKHR* pSurface) { |
| 2586 | bool skip = false; |
| 2587 | skip |= ValidateObject(instance, instance, kVulkanObjectTypeInstance, false, "VUID-vkCreateDisplayPlaneSurfaceKHR-instance-parameter", kVUIDUndefined); |
| 2588 | if (pCreateInfo) { |
| 2589 | skip |= ValidateObject(instance, pCreateInfo->displayMode, kVulkanObjectTypeDisplayModeKHR, false, "VUID-VkDisplaySurfaceCreateInfoKHR-displayMode-parameter", kVUIDUndefined); |
| 2590 | } |
| 2591 | |
| 2592 | return skip; |
| 2593 | } |
| 2594 | |
| 2595 | void ObjectLifetimes::PostCallRecordCreateDisplayPlaneSurfaceKHR( |
| 2596 | VkInstance instance, |
| 2597 | const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, |
| 2598 | const VkAllocationCallbacks* pAllocator, |
| 2599 | VkSurfaceKHR* pSurface, |
| 2600 | VkResult result) { |
| 2601 | if (result != VK_SUCCESS) return; |
| 2602 | CreateObject(instance, *pSurface, kVulkanObjectTypeSurfaceKHR, pAllocator); |
| 2603 | |
| 2604 | } |
| 2605 | |
| 2606 | bool ObjectLifetimes::PreCallValidateCreateSharedSwapchainsKHR( |
| 2607 | VkDevice device, |
| 2608 | uint32_t swapchainCount, |
| 2609 | const VkSwapchainCreateInfoKHR* pCreateInfos, |
| 2610 | const VkAllocationCallbacks* pAllocator, |
| 2611 | VkSwapchainKHR* pSwapchains) { |
| 2612 | bool skip = false; |
| 2613 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkCreateSharedSwapchainsKHR-device-parameter", kVUIDUndefined); |
| 2614 | if (pCreateInfos) { |
| 2615 | for (uint32_t index0 = 0; index0 < swapchainCount; ++index0) { |
| 2616 | skip |= ValidateObject(device, pCreateInfos[index0].surface, kVulkanObjectTypeSurfaceKHR, false, "VUID-VkSwapchainCreateInfoKHR-surface-parameter", "VUID-VkSwapchainCreateInfoKHR-commonparent"); |
| 2617 | skip |= ValidateObject(device, pCreateInfos[index0].oldSwapchain, kVulkanObjectTypeSwapchainKHR, true, "VUID-VkSwapchainCreateInfoKHR-oldSwapchain-parameter", "VUID-VkSwapchainCreateInfoKHR-oldSwapchain-parent"); |
| 2618 | } |
| 2619 | } |
| 2620 | |
| 2621 | return skip; |
| 2622 | } |
| 2623 | |
| 2624 | void ObjectLifetimes::PostCallRecordCreateSharedSwapchainsKHR( |
| 2625 | VkDevice device, |
| 2626 | uint32_t swapchainCount, |
| 2627 | const VkSwapchainCreateInfoKHR* pCreateInfos, |
| 2628 | const VkAllocationCallbacks* pAllocator, |
| 2629 | VkSwapchainKHR* pSwapchains, |
| 2630 | VkResult result) { |
| 2631 | if (result != VK_SUCCESS) return; |
| 2632 | if (pSwapchains) { |
| 2633 | for (uint32_t index = 0; index < swapchainCount; index++) { |
| 2634 | CreateObject(device, pSwapchains[index], kVulkanObjectTypeSwapchainKHR, pAllocator); |
| 2635 | } |
| 2636 | } |
| 2637 | |
| 2638 | } |
| 2639 | |
| 2640 | #ifdef VK_USE_PLATFORM_XLIB_KHR |
| 2641 | |
| 2642 | bool ObjectLifetimes::PreCallValidateCreateXlibSurfaceKHR( |
| 2643 | VkInstance instance, |
| 2644 | const VkXlibSurfaceCreateInfoKHR* pCreateInfo, |
| 2645 | const VkAllocationCallbacks* pAllocator, |
| 2646 | VkSurfaceKHR* pSurface) { |
| 2647 | bool skip = false; |
| 2648 | skip |= ValidateObject(instance, instance, kVulkanObjectTypeInstance, false, "VUID-vkCreateXlibSurfaceKHR-instance-parameter", kVUIDUndefined); |
| 2649 | |
| 2650 | return skip; |
| 2651 | } |
| 2652 | |
| 2653 | void ObjectLifetimes::PostCallRecordCreateXlibSurfaceKHR( |
| 2654 | VkInstance instance, |
| 2655 | const VkXlibSurfaceCreateInfoKHR* pCreateInfo, |
| 2656 | const VkAllocationCallbacks* pAllocator, |
| 2657 | VkSurfaceKHR* pSurface, |
| 2658 | VkResult result) { |
| 2659 | if (result != VK_SUCCESS) return; |
| 2660 | CreateObject(instance, *pSurface, kVulkanObjectTypeSurfaceKHR, pAllocator); |
| 2661 | |
| 2662 | } |
| 2663 | #endif // VK_USE_PLATFORM_XLIB_KHR |
| 2664 | |
| 2665 | #ifdef VK_USE_PLATFORM_XLIB_KHR |
| 2666 | |
| 2667 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceXlibPresentationSupportKHR( |
| 2668 | VkPhysicalDevice physicalDevice, |
| 2669 | uint32_t queueFamilyIndex, |
| 2670 | Display* dpy, |
| 2671 | VisualID visualID) { |
| 2672 | bool skip = false; |
| 2673 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceXlibPresentationSupportKHR-physicalDevice-parameter", kVUIDUndefined); |
| 2674 | |
| 2675 | return skip; |
| 2676 | } |
| 2677 | #endif // VK_USE_PLATFORM_XLIB_KHR |
| 2678 | |
| 2679 | #ifdef VK_USE_PLATFORM_XCB_KHR |
| 2680 | |
| 2681 | bool ObjectLifetimes::PreCallValidateCreateXcbSurfaceKHR( |
| 2682 | VkInstance instance, |
| 2683 | const VkXcbSurfaceCreateInfoKHR* pCreateInfo, |
| 2684 | const VkAllocationCallbacks* pAllocator, |
| 2685 | VkSurfaceKHR* pSurface) { |
| 2686 | bool skip = false; |
| 2687 | skip |= ValidateObject(instance, instance, kVulkanObjectTypeInstance, false, "VUID-vkCreateXcbSurfaceKHR-instance-parameter", kVUIDUndefined); |
| 2688 | |
| 2689 | return skip; |
| 2690 | } |
| 2691 | |
| 2692 | void ObjectLifetimes::PostCallRecordCreateXcbSurfaceKHR( |
| 2693 | VkInstance instance, |
| 2694 | const VkXcbSurfaceCreateInfoKHR* pCreateInfo, |
| 2695 | const VkAllocationCallbacks* pAllocator, |
| 2696 | VkSurfaceKHR* pSurface, |
| 2697 | VkResult result) { |
| 2698 | if (result != VK_SUCCESS) return; |
| 2699 | CreateObject(instance, *pSurface, kVulkanObjectTypeSurfaceKHR, pAllocator); |
| 2700 | |
| 2701 | } |
| 2702 | #endif // VK_USE_PLATFORM_XCB_KHR |
| 2703 | |
| 2704 | #ifdef VK_USE_PLATFORM_XCB_KHR |
| 2705 | |
| 2706 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceXcbPresentationSupportKHR( |
| 2707 | VkPhysicalDevice physicalDevice, |
| 2708 | uint32_t queueFamilyIndex, |
| 2709 | xcb_connection_t* connection, |
| 2710 | xcb_visualid_t visual_id) { |
| 2711 | bool skip = false; |
| 2712 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceXcbPresentationSupportKHR-physicalDevice-parameter", kVUIDUndefined); |
| 2713 | |
| 2714 | return skip; |
| 2715 | } |
| 2716 | #endif // VK_USE_PLATFORM_XCB_KHR |
| 2717 | |
| 2718 | #ifdef VK_USE_PLATFORM_WAYLAND_KHR |
| 2719 | |
| 2720 | bool ObjectLifetimes::PreCallValidateCreateWaylandSurfaceKHR( |
| 2721 | VkInstance instance, |
| 2722 | const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, |
| 2723 | const VkAllocationCallbacks* pAllocator, |
| 2724 | VkSurfaceKHR* pSurface) { |
| 2725 | bool skip = false; |
| 2726 | skip |= ValidateObject(instance, instance, kVulkanObjectTypeInstance, false, "VUID-vkCreateWaylandSurfaceKHR-instance-parameter", kVUIDUndefined); |
| 2727 | |
| 2728 | return skip; |
| 2729 | } |
| 2730 | |
| 2731 | void ObjectLifetimes::PostCallRecordCreateWaylandSurfaceKHR( |
| 2732 | VkInstance instance, |
| 2733 | const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, |
| 2734 | const VkAllocationCallbacks* pAllocator, |
| 2735 | VkSurfaceKHR* pSurface, |
| 2736 | VkResult result) { |
| 2737 | if (result != VK_SUCCESS) return; |
| 2738 | CreateObject(instance, *pSurface, kVulkanObjectTypeSurfaceKHR, pAllocator); |
| 2739 | |
| 2740 | } |
| 2741 | #endif // VK_USE_PLATFORM_WAYLAND_KHR |
| 2742 | |
| 2743 | #ifdef VK_USE_PLATFORM_WAYLAND_KHR |
| 2744 | |
| 2745 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceWaylandPresentationSupportKHR( |
| 2746 | VkPhysicalDevice physicalDevice, |
| 2747 | uint32_t queueFamilyIndex, |
| 2748 | struct wl_display* display) { |
| 2749 | bool skip = false; |
| 2750 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceWaylandPresentationSupportKHR-physicalDevice-parameter", kVUIDUndefined); |
| 2751 | |
| 2752 | return skip; |
| 2753 | } |
| 2754 | #endif // VK_USE_PLATFORM_WAYLAND_KHR |
| 2755 | |
| 2756 | #ifdef VK_USE_PLATFORM_ANDROID_KHR |
| 2757 | |
| 2758 | bool ObjectLifetimes::PreCallValidateCreateAndroidSurfaceKHR( |
| 2759 | VkInstance instance, |
| 2760 | const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, |
| 2761 | const VkAllocationCallbacks* pAllocator, |
| 2762 | VkSurfaceKHR* pSurface) { |
| 2763 | bool skip = false; |
| 2764 | skip |= ValidateObject(instance, instance, kVulkanObjectTypeInstance, false, "VUID-vkCreateAndroidSurfaceKHR-instance-parameter", kVUIDUndefined); |
| 2765 | |
| 2766 | return skip; |
| 2767 | } |
| 2768 | |
| 2769 | void ObjectLifetimes::PostCallRecordCreateAndroidSurfaceKHR( |
| 2770 | VkInstance instance, |
| 2771 | const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, |
| 2772 | const VkAllocationCallbacks* pAllocator, |
| 2773 | VkSurfaceKHR* pSurface, |
| 2774 | VkResult result) { |
| 2775 | if (result != VK_SUCCESS) return; |
| 2776 | CreateObject(instance, *pSurface, kVulkanObjectTypeSurfaceKHR, pAllocator); |
| 2777 | |
| 2778 | } |
| 2779 | #endif // VK_USE_PLATFORM_ANDROID_KHR |
| 2780 | |
| 2781 | #ifdef VK_USE_PLATFORM_WIN32_KHR |
| 2782 | |
| 2783 | bool ObjectLifetimes::PreCallValidateCreateWin32SurfaceKHR( |
| 2784 | VkInstance instance, |
| 2785 | const VkWin32SurfaceCreateInfoKHR* pCreateInfo, |
| 2786 | const VkAllocationCallbacks* pAllocator, |
| 2787 | VkSurfaceKHR* pSurface) { |
| 2788 | bool skip = false; |
| 2789 | skip |= ValidateObject(instance, instance, kVulkanObjectTypeInstance, false, "VUID-vkCreateWin32SurfaceKHR-instance-parameter", kVUIDUndefined); |
| 2790 | |
| 2791 | return skip; |
| 2792 | } |
| 2793 | |
| 2794 | void ObjectLifetimes::PostCallRecordCreateWin32SurfaceKHR( |
| 2795 | VkInstance instance, |
| 2796 | const VkWin32SurfaceCreateInfoKHR* pCreateInfo, |
| 2797 | const VkAllocationCallbacks* pAllocator, |
| 2798 | VkSurfaceKHR* pSurface, |
| 2799 | VkResult result) { |
| 2800 | if (result != VK_SUCCESS) return; |
| 2801 | CreateObject(instance, *pSurface, kVulkanObjectTypeSurfaceKHR, pAllocator); |
| 2802 | |
| 2803 | } |
| 2804 | #endif // VK_USE_PLATFORM_WIN32_KHR |
| 2805 | |
| 2806 | #ifdef VK_USE_PLATFORM_WIN32_KHR |
| 2807 | |
| 2808 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceWin32PresentationSupportKHR( |
| 2809 | VkPhysicalDevice physicalDevice, |
| 2810 | uint32_t queueFamilyIndex) { |
| 2811 | bool skip = false; |
| 2812 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceWin32PresentationSupportKHR-physicalDevice-parameter", kVUIDUndefined); |
| 2813 | |
| 2814 | return skip; |
| 2815 | } |
| 2816 | #endif // VK_USE_PLATFORM_WIN32_KHR |
| 2817 | |
| 2818 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceFeatures2KHR( |
| 2819 | VkPhysicalDevice physicalDevice, |
| 2820 | VkPhysicalDeviceFeatures2* pFeatures) { |
| 2821 | bool skip = false; |
| 2822 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceFeatures2-physicalDevice-parameter", kVUIDUndefined); |
| 2823 | |
| 2824 | return skip; |
| 2825 | } |
| 2826 | |
| 2827 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceProperties2KHR( |
| 2828 | VkPhysicalDevice physicalDevice, |
| 2829 | VkPhysicalDeviceProperties2* pProperties) { |
| 2830 | bool skip = false; |
| 2831 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceProperties2-physicalDevice-parameter", kVUIDUndefined); |
| 2832 | |
| 2833 | return skip; |
| 2834 | } |
| 2835 | |
| 2836 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceFormatProperties2KHR( |
| 2837 | VkPhysicalDevice physicalDevice, |
| 2838 | VkFormat format, |
| 2839 | VkFormatProperties2* pFormatProperties) { |
| 2840 | bool skip = false; |
| 2841 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceFormatProperties2-physicalDevice-parameter", kVUIDUndefined); |
| 2842 | |
| 2843 | return skip; |
| 2844 | } |
| 2845 | |
| 2846 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceImageFormatProperties2KHR( |
| 2847 | VkPhysicalDevice physicalDevice, |
| 2848 | const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, |
| 2849 | VkImageFormatProperties2* pImageFormatProperties) { |
| 2850 | bool skip = false; |
| 2851 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceImageFormatProperties2-physicalDevice-parameter", kVUIDUndefined); |
| 2852 | |
| 2853 | return skip; |
| 2854 | } |
| 2855 | |
| 2856 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceMemoryProperties2KHR( |
| 2857 | VkPhysicalDevice physicalDevice, |
| 2858 | VkPhysicalDeviceMemoryProperties2* pMemoryProperties) { |
| 2859 | bool skip = false; |
| 2860 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceMemoryProperties2-physicalDevice-parameter", kVUIDUndefined); |
| 2861 | |
| 2862 | return skip; |
| 2863 | } |
| 2864 | |
| 2865 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceSparseImageFormatProperties2KHR( |
| 2866 | VkPhysicalDevice physicalDevice, |
| 2867 | const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, |
| 2868 | uint32_t* pPropertyCount, |
| 2869 | VkSparseImageFormatProperties2* pProperties) { |
| 2870 | bool skip = false; |
| 2871 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceSparseImageFormatProperties2-physicalDevice-parameter", kVUIDUndefined); |
| 2872 | |
| 2873 | return skip; |
| 2874 | } |
| 2875 | |
| 2876 | bool ObjectLifetimes::PreCallValidateGetDeviceGroupPeerMemoryFeaturesKHR( |
| 2877 | VkDevice device, |
| 2878 | uint32_t heapIndex, |
| 2879 | uint32_t localDeviceIndex, |
| 2880 | uint32_t remoteDeviceIndex, |
| 2881 | VkPeerMemoryFeatureFlags* pPeerMemoryFeatures) { |
| 2882 | bool skip = false; |
| 2883 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetDeviceGroupPeerMemoryFeatures-device-parameter", kVUIDUndefined); |
| 2884 | |
| 2885 | return skip; |
| 2886 | } |
| 2887 | |
| 2888 | bool ObjectLifetimes::PreCallValidateCmdSetDeviceMaskKHR( |
| 2889 | VkCommandBuffer commandBuffer, |
| 2890 | uint32_t deviceMask) { |
| 2891 | bool skip = false; |
| 2892 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdSetDeviceMask-commandBuffer-parameter", kVUIDUndefined); |
| 2893 | |
| 2894 | return skip; |
| 2895 | } |
| 2896 | |
| 2897 | bool ObjectLifetimes::PreCallValidateCmdDispatchBaseKHR( |
| 2898 | VkCommandBuffer commandBuffer, |
| 2899 | uint32_t baseGroupX, |
| 2900 | uint32_t baseGroupY, |
| 2901 | uint32_t baseGroupZ, |
| 2902 | uint32_t groupCountX, |
| 2903 | uint32_t groupCountY, |
| 2904 | uint32_t groupCountZ) { |
| 2905 | bool skip = false; |
| 2906 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdDispatchBase-commandBuffer-parameter", kVUIDUndefined); |
| 2907 | |
| 2908 | return skip; |
| 2909 | } |
| 2910 | |
| 2911 | bool ObjectLifetimes::PreCallValidateTrimCommandPoolKHR( |
| 2912 | VkDevice device, |
| 2913 | VkCommandPool commandPool, |
| 2914 | VkCommandPoolTrimFlags flags) { |
| 2915 | bool skip = false; |
| 2916 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkTrimCommandPool-device-parameter", kVUIDUndefined); |
| 2917 | skip |= ValidateObject(device, commandPool, kVulkanObjectTypeCommandPool, false, "VUID-vkTrimCommandPool-commandPool-parameter", "VUID-vkTrimCommandPool-commandPool-parent"); |
| 2918 | |
| 2919 | return skip; |
| 2920 | } |
| 2921 | |
| 2922 | bool ObjectLifetimes::PreCallValidateEnumeratePhysicalDeviceGroupsKHR( |
| 2923 | VkInstance instance, |
| 2924 | uint32_t* pPhysicalDeviceGroupCount, |
| 2925 | VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties) { |
| 2926 | bool skip = false; |
| 2927 | skip |= ValidateObject(instance, instance, kVulkanObjectTypeInstance, false, "VUID-vkEnumeratePhysicalDeviceGroups-instance-parameter", kVUIDUndefined); |
| 2928 | |
| 2929 | return skip; |
| 2930 | } |
| 2931 | |
| 2932 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceExternalBufferPropertiesKHR( |
| 2933 | VkPhysicalDevice physicalDevice, |
| 2934 | const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, |
| 2935 | VkExternalBufferProperties* pExternalBufferProperties) { |
| 2936 | bool skip = false; |
| 2937 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceExternalBufferProperties-physicalDevice-parameter", kVUIDUndefined); |
| 2938 | |
| 2939 | return skip; |
| 2940 | } |
| 2941 | |
| 2942 | #ifdef VK_USE_PLATFORM_WIN32_KHR |
| 2943 | |
| 2944 | bool ObjectLifetimes::PreCallValidateGetMemoryWin32HandleKHR( |
| 2945 | VkDevice device, |
| 2946 | const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, |
| 2947 | HANDLE* pHandle) { |
| 2948 | bool skip = false; |
| 2949 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetMemoryWin32HandleKHR-device-parameter", kVUIDUndefined); |
| 2950 | if (pGetWin32HandleInfo) { |
| 2951 | skip |= ValidateObject(device, pGetWin32HandleInfo->memory, kVulkanObjectTypeDeviceMemory, false, "VUID-VkMemoryGetWin32HandleInfoKHR-memory-parameter", kVUIDUndefined); |
| 2952 | } |
| 2953 | |
| 2954 | return skip; |
| 2955 | } |
| 2956 | #endif // VK_USE_PLATFORM_WIN32_KHR |
| 2957 | |
| 2958 | #ifdef VK_USE_PLATFORM_WIN32_KHR |
| 2959 | |
| 2960 | bool ObjectLifetimes::PreCallValidateGetMemoryWin32HandlePropertiesKHR( |
| 2961 | VkDevice device, |
| 2962 | VkExternalMemoryHandleTypeFlagBits handleType, |
| 2963 | HANDLE handle, |
| 2964 | VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties) { |
| 2965 | bool skip = false; |
| 2966 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetMemoryWin32HandlePropertiesKHR-device-parameter", kVUIDUndefined); |
| 2967 | |
| 2968 | return skip; |
| 2969 | } |
| 2970 | #endif // VK_USE_PLATFORM_WIN32_KHR |
| 2971 | |
| 2972 | bool ObjectLifetimes::PreCallValidateGetMemoryFdKHR( |
| 2973 | VkDevice device, |
| 2974 | const VkMemoryGetFdInfoKHR* pGetFdInfo, |
| 2975 | int* pFd) { |
| 2976 | bool skip = false; |
| 2977 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetMemoryFdKHR-device-parameter", kVUIDUndefined); |
| 2978 | if (pGetFdInfo) { |
| 2979 | skip |= ValidateObject(device, pGetFdInfo->memory, kVulkanObjectTypeDeviceMemory, false, "VUID-VkMemoryGetFdInfoKHR-memory-parameter", kVUIDUndefined); |
| 2980 | } |
| 2981 | |
| 2982 | return skip; |
| 2983 | } |
| 2984 | |
| 2985 | bool ObjectLifetimes::PreCallValidateGetMemoryFdPropertiesKHR( |
| 2986 | VkDevice device, |
| 2987 | VkExternalMemoryHandleTypeFlagBits handleType, |
| 2988 | int fd, |
| 2989 | VkMemoryFdPropertiesKHR* pMemoryFdProperties) { |
| 2990 | bool skip = false; |
| 2991 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetMemoryFdPropertiesKHR-device-parameter", kVUIDUndefined); |
| 2992 | |
| 2993 | return skip; |
| 2994 | } |
| 2995 | |
| 2996 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceExternalSemaphorePropertiesKHR( |
| 2997 | VkPhysicalDevice physicalDevice, |
| 2998 | const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, |
| 2999 | VkExternalSemaphoreProperties* pExternalSemaphoreProperties) { |
| 3000 | bool skip = false; |
| 3001 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceExternalSemaphoreProperties-physicalDevice-parameter", kVUIDUndefined); |
| 3002 | |
| 3003 | return skip; |
| 3004 | } |
| 3005 | |
| 3006 | #ifdef VK_USE_PLATFORM_WIN32_KHR |
| 3007 | |
| 3008 | bool ObjectLifetimes::PreCallValidateImportSemaphoreWin32HandleKHR( |
| 3009 | VkDevice device, |
| 3010 | const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo) { |
| 3011 | bool skip = false; |
| 3012 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkImportSemaphoreWin32HandleKHR-device-parameter", kVUIDUndefined); |
| 3013 | if (pImportSemaphoreWin32HandleInfo) { |
| 3014 | skip |= ValidateObject(device, pImportSemaphoreWin32HandleInfo->semaphore, kVulkanObjectTypeSemaphore, false, "VUID-VkImportSemaphoreWin32HandleInfoKHR-semaphore-parameter", kVUIDUndefined); |
| 3015 | } |
| 3016 | |
| 3017 | return skip; |
| 3018 | } |
| 3019 | #endif // VK_USE_PLATFORM_WIN32_KHR |
| 3020 | |
| 3021 | #ifdef VK_USE_PLATFORM_WIN32_KHR |
| 3022 | |
| 3023 | bool ObjectLifetimes::PreCallValidateGetSemaphoreWin32HandleKHR( |
| 3024 | VkDevice device, |
| 3025 | const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, |
| 3026 | HANDLE* pHandle) { |
| 3027 | bool skip = false; |
| 3028 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetSemaphoreWin32HandleKHR-device-parameter", kVUIDUndefined); |
| 3029 | if (pGetWin32HandleInfo) { |
| 3030 | skip |= ValidateObject(device, pGetWin32HandleInfo->semaphore, kVulkanObjectTypeSemaphore, false, "VUID-VkSemaphoreGetWin32HandleInfoKHR-semaphore-parameter", kVUIDUndefined); |
| 3031 | } |
| 3032 | |
| 3033 | return skip; |
| 3034 | } |
| 3035 | #endif // VK_USE_PLATFORM_WIN32_KHR |
| 3036 | |
| 3037 | bool ObjectLifetimes::PreCallValidateImportSemaphoreFdKHR( |
| 3038 | VkDevice device, |
| 3039 | const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo) { |
| 3040 | bool skip = false; |
| 3041 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkImportSemaphoreFdKHR-device-parameter", kVUIDUndefined); |
| 3042 | if (pImportSemaphoreFdInfo) { |
| 3043 | skip |= ValidateObject(device, pImportSemaphoreFdInfo->semaphore, kVulkanObjectTypeSemaphore, false, "VUID-VkImportSemaphoreFdInfoKHR-semaphore-parameter", kVUIDUndefined); |
| 3044 | } |
| 3045 | |
| 3046 | return skip; |
| 3047 | } |
| 3048 | |
| 3049 | bool ObjectLifetimes::PreCallValidateGetSemaphoreFdKHR( |
| 3050 | VkDevice device, |
| 3051 | const VkSemaphoreGetFdInfoKHR* pGetFdInfo, |
| 3052 | int* pFd) { |
| 3053 | bool skip = false; |
| 3054 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetSemaphoreFdKHR-device-parameter", kVUIDUndefined); |
| 3055 | if (pGetFdInfo) { |
| 3056 | skip |= ValidateObject(device, pGetFdInfo->semaphore, kVulkanObjectTypeSemaphore, false, "VUID-VkSemaphoreGetFdInfoKHR-semaphore-parameter", kVUIDUndefined); |
| 3057 | } |
| 3058 | |
| 3059 | return skip; |
| 3060 | } |
| 3061 | |
| 3062 | bool ObjectLifetimes::PreCallValidateCmdPushDescriptorSetWithTemplateKHR( |
| 3063 | VkCommandBuffer commandBuffer, |
| 3064 | VkDescriptorUpdateTemplate descriptorUpdateTemplate, |
| 3065 | VkPipelineLayout layout, |
| 3066 | uint32_t set, |
| 3067 | const void* pData) { |
| 3068 | bool skip = false; |
| 3069 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdPushDescriptorSetWithTemplateKHR-commandBuffer-parameter", "VUID-vkCmdPushDescriptorSetWithTemplateKHR-commonparent"); |
| 3070 | skip |= ValidateObject(commandBuffer, descriptorUpdateTemplate, kVulkanObjectTypeDescriptorUpdateTemplate, false, "VUID-vkCmdPushDescriptorSetWithTemplateKHR-descriptorUpdateTemplate-parameter", "VUID-vkCmdPushDescriptorSetWithTemplateKHR-commonparent"); |
| 3071 | skip |= ValidateObject(commandBuffer, layout, kVulkanObjectTypePipelineLayout, false, "VUID-vkCmdPushDescriptorSetWithTemplateKHR-layout-parameter", "VUID-vkCmdPushDescriptorSetWithTemplateKHR-commonparent"); |
| 3072 | |
| 3073 | return skip; |
| 3074 | } |
| 3075 | |
| 3076 | bool ObjectLifetimes::PreCallValidateCreateDescriptorUpdateTemplateKHR( |
| 3077 | VkDevice device, |
| 3078 | const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, |
| 3079 | const VkAllocationCallbacks* pAllocator, |
| 3080 | VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate) { |
| 3081 | bool skip = false; |
| 3082 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkCreateDescriptorUpdateTemplate-device-parameter", kVUIDUndefined); |
| 3083 | if (pCreateInfo) { |
| 3084 | skip |= ValidateObject(device, pCreateInfo->descriptorSetLayout, kVulkanObjectTypeDescriptorSetLayout, true, "VUID-VkDescriptorUpdateTemplateCreateInfo-descriptorSetLayout-parameter", "VUID-VkDescriptorUpdateTemplateCreateInfo-commonparent"); |
| 3085 | skip |= ValidateObject(device, pCreateInfo->pipelineLayout, kVulkanObjectTypePipelineLayout, true, kVUIDUndefined, "VUID-VkDescriptorUpdateTemplateCreateInfo-commonparent"); |
| 3086 | } |
| 3087 | |
| 3088 | return skip; |
| 3089 | } |
| 3090 | |
| 3091 | void ObjectLifetimes::PostCallRecordCreateDescriptorUpdateTemplateKHR( |
| 3092 | VkDevice device, |
| 3093 | const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, |
| 3094 | const VkAllocationCallbacks* pAllocator, |
| 3095 | VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate, |
| 3096 | VkResult result) { |
| 3097 | if (result != VK_SUCCESS) return; |
| 3098 | CreateObject(device, *pDescriptorUpdateTemplate, kVulkanObjectTypeDescriptorUpdateTemplate, pAllocator); |
| 3099 | |
| 3100 | } |
| 3101 | |
| 3102 | bool ObjectLifetimes::PreCallValidateDestroyDescriptorUpdateTemplateKHR( |
| 3103 | VkDevice device, |
| 3104 | VkDescriptorUpdateTemplate descriptorUpdateTemplate, |
| 3105 | const VkAllocationCallbacks* pAllocator) { |
| 3106 | bool skip = false; |
| 3107 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkDestroyDescriptorUpdateTemplate-device-parameter", kVUIDUndefined); |
| 3108 | skip |= ValidateObject(device, descriptorUpdateTemplate, kVulkanObjectTypeDescriptorUpdateTemplate, true, "VUID-vkDestroyDescriptorUpdateTemplate-descriptorUpdateTemplate-parameter", "VUID-vkDestroyDescriptorUpdateTemplate-descriptorUpdateTemplate-parent"); |
| 3109 | skip |= ValidateDestroyObject(device, descriptorUpdateTemplate, kVulkanObjectTypeDescriptorUpdateTemplate, pAllocator, "VUID-vkDestroyDescriptorUpdateTemplate-descriptorSetLayout-00356", "VUID-vkDestroyDescriptorUpdateTemplate-descriptorSetLayout-00357"); |
| 3110 | |
| 3111 | return skip; |
| 3112 | } |
| 3113 | |
| 3114 | void ObjectLifetimes::PreCallRecordDestroyDescriptorUpdateTemplateKHR( |
| 3115 | VkDevice device, |
| 3116 | VkDescriptorUpdateTemplate descriptorUpdateTemplate, |
| 3117 | const VkAllocationCallbacks* pAllocator) { |
| 3118 | RecordDestroyObject(device, descriptorUpdateTemplate, kVulkanObjectTypeDescriptorUpdateTemplate); |
| 3119 | |
| 3120 | } |
| 3121 | |
| 3122 | bool ObjectLifetimes::PreCallValidateUpdateDescriptorSetWithTemplateKHR( |
| 3123 | VkDevice device, |
| 3124 | VkDescriptorSet descriptorSet, |
| 3125 | VkDescriptorUpdateTemplate descriptorUpdateTemplate, |
| 3126 | const void* pData) { |
| 3127 | bool skip = false; |
| 3128 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkUpdateDescriptorSetWithTemplate-device-parameter", kVUIDUndefined); |
| 3129 | skip |= ValidateObject(device, descriptorSet, kVulkanObjectTypeDescriptorSet, false, "VUID-vkUpdateDescriptorSetWithTemplate-descriptorSet-parameter", kVUIDUndefined); |
| 3130 | skip |= ValidateObject(device, descriptorUpdateTemplate, kVulkanObjectTypeDescriptorUpdateTemplate, false, "VUID-vkUpdateDescriptorSetWithTemplate-descriptorUpdateTemplate-parameter", "VUID-vkUpdateDescriptorSetWithTemplate-descriptorUpdateTemplate-parent"); |
| 3131 | |
| 3132 | return skip; |
| 3133 | } |
| 3134 | |
| 3135 | bool ObjectLifetimes::PreCallValidateCreateRenderPass2KHR( |
| 3136 | VkDevice device, |
| 3137 | const VkRenderPassCreateInfo2KHR* pCreateInfo, |
| 3138 | const VkAllocationCallbacks* pAllocator, |
| 3139 | VkRenderPass* pRenderPass) { |
| 3140 | bool skip = false; |
| 3141 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkCreateRenderPass2KHR-device-parameter", kVUIDUndefined); |
| 3142 | |
| 3143 | return skip; |
| 3144 | } |
| 3145 | |
| 3146 | void ObjectLifetimes::PostCallRecordCreateRenderPass2KHR( |
| 3147 | VkDevice device, |
| 3148 | const VkRenderPassCreateInfo2KHR* pCreateInfo, |
| 3149 | const VkAllocationCallbacks* pAllocator, |
| 3150 | VkRenderPass* pRenderPass, |
| 3151 | VkResult result) { |
| 3152 | if (result != VK_SUCCESS) return; |
| 3153 | CreateObject(device, *pRenderPass, kVulkanObjectTypeRenderPass, pAllocator); |
| 3154 | |
| 3155 | } |
| 3156 | |
| 3157 | bool ObjectLifetimes::PreCallValidateCmdBeginRenderPass2KHR( |
| 3158 | VkCommandBuffer commandBuffer, |
| 3159 | const VkRenderPassBeginInfo* pRenderPassBegin, |
| 3160 | const VkSubpassBeginInfoKHR* pSubpassBeginInfo) { |
| 3161 | bool skip = false; |
| 3162 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdBeginRenderPass2KHR-commandBuffer-parameter", kVUIDUndefined); |
| 3163 | if (pRenderPassBegin) { |
| 3164 | skip |= ValidateObject(commandBuffer, pRenderPassBegin->renderPass, kVulkanObjectTypeRenderPass, false, "VUID-VkRenderPassBeginInfo-renderPass-parameter", "VUID-VkRenderPassBeginInfo-commonparent"); |
| 3165 | skip |= ValidateObject(commandBuffer, pRenderPassBegin->framebuffer, kVulkanObjectTypeFramebuffer, false, "VUID-VkRenderPassBeginInfo-framebuffer-parameter", "VUID-VkRenderPassBeginInfo-commonparent"); |
| 3166 | } |
| 3167 | |
| 3168 | return skip; |
| 3169 | } |
| 3170 | |
| 3171 | bool ObjectLifetimes::PreCallValidateCmdNextSubpass2KHR( |
| 3172 | VkCommandBuffer commandBuffer, |
| 3173 | const VkSubpassBeginInfoKHR* pSubpassBeginInfo, |
| 3174 | const VkSubpassEndInfoKHR* pSubpassEndInfo) { |
| 3175 | bool skip = false; |
| 3176 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdNextSubpass2KHR-commandBuffer-parameter", kVUIDUndefined); |
| 3177 | |
| 3178 | return skip; |
| 3179 | } |
| 3180 | |
| 3181 | bool ObjectLifetimes::PreCallValidateCmdEndRenderPass2KHR( |
| 3182 | VkCommandBuffer commandBuffer, |
| 3183 | const VkSubpassEndInfoKHR* pSubpassEndInfo) { |
| 3184 | bool skip = false; |
| 3185 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdEndRenderPass2KHR-commandBuffer-parameter", kVUIDUndefined); |
| 3186 | |
| 3187 | return skip; |
| 3188 | } |
| 3189 | |
| 3190 | bool ObjectLifetimes::PreCallValidateGetSwapchainStatusKHR( |
| 3191 | VkDevice device, |
| 3192 | VkSwapchainKHR swapchain) { |
| 3193 | bool skip = false; |
| 3194 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetSwapchainStatusKHR-device-parameter", "VUID-vkGetSwapchainStatusKHR-commonparent"); |
| 3195 | skip |= ValidateObject(device, swapchain, kVulkanObjectTypeSwapchainKHR, false, "VUID-vkGetSwapchainStatusKHR-swapchain-parameter", "VUID-vkGetSwapchainStatusKHR-commonparent"); |
| 3196 | |
| 3197 | return skip; |
| 3198 | } |
| 3199 | |
| 3200 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceExternalFencePropertiesKHR( |
| 3201 | VkPhysicalDevice physicalDevice, |
| 3202 | const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, |
| 3203 | VkExternalFenceProperties* pExternalFenceProperties) { |
| 3204 | bool skip = false; |
| 3205 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceExternalFenceProperties-physicalDevice-parameter", kVUIDUndefined); |
| 3206 | |
| 3207 | return skip; |
| 3208 | } |
| 3209 | |
| 3210 | #ifdef VK_USE_PLATFORM_WIN32_KHR |
| 3211 | |
| 3212 | bool ObjectLifetimes::PreCallValidateImportFenceWin32HandleKHR( |
| 3213 | VkDevice device, |
| 3214 | const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo) { |
| 3215 | bool skip = false; |
| 3216 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkImportFenceWin32HandleKHR-device-parameter", kVUIDUndefined); |
| 3217 | if (pImportFenceWin32HandleInfo) { |
| 3218 | skip |= ValidateObject(device, pImportFenceWin32HandleInfo->fence, kVulkanObjectTypeFence, false, "VUID-VkImportFenceWin32HandleInfoKHR-fence-parameter", kVUIDUndefined); |
| 3219 | } |
| 3220 | |
| 3221 | return skip; |
| 3222 | } |
| 3223 | #endif // VK_USE_PLATFORM_WIN32_KHR |
| 3224 | |
| 3225 | #ifdef VK_USE_PLATFORM_WIN32_KHR |
| 3226 | |
| 3227 | bool ObjectLifetimes::PreCallValidateGetFenceWin32HandleKHR( |
| 3228 | VkDevice device, |
| 3229 | const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, |
| 3230 | HANDLE* pHandle) { |
| 3231 | bool skip = false; |
| 3232 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetFenceWin32HandleKHR-device-parameter", kVUIDUndefined); |
| 3233 | if (pGetWin32HandleInfo) { |
| 3234 | skip |= ValidateObject(device, pGetWin32HandleInfo->fence, kVulkanObjectTypeFence, false, "VUID-VkFenceGetWin32HandleInfoKHR-fence-parameter", kVUIDUndefined); |
| 3235 | } |
| 3236 | |
| 3237 | return skip; |
| 3238 | } |
| 3239 | #endif // VK_USE_PLATFORM_WIN32_KHR |
| 3240 | |
| 3241 | bool ObjectLifetimes::PreCallValidateImportFenceFdKHR( |
| 3242 | VkDevice device, |
| 3243 | const VkImportFenceFdInfoKHR* pImportFenceFdInfo) { |
| 3244 | bool skip = false; |
| 3245 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkImportFenceFdKHR-device-parameter", kVUIDUndefined); |
| 3246 | if (pImportFenceFdInfo) { |
| 3247 | skip |= ValidateObject(device, pImportFenceFdInfo->fence, kVulkanObjectTypeFence, false, "VUID-VkImportFenceFdInfoKHR-fence-parameter", kVUIDUndefined); |
| 3248 | } |
| 3249 | |
| 3250 | return skip; |
| 3251 | } |
| 3252 | |
| 3253 | bool ObjectLifetimes::PreCallValidateGetFenceFdKHR( |
| 3254 | VkDevice device, |
| 3255 | const VkFenceGetFdInfoKHR* pGetFdInfo, |
| 3256 | int* pFd) { |
| 3257 | bool skip = false; |
| 3258 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetFenceFdKHR-device-parameter", kVUIDUndefined); |
| 3259 | if (pGetFdInfo) { |
| 3260 | skip |= ValidateObject(device, pGetFdInfo->fence, kVulkanObjectTypeFence, false, "VUID-VkFenceGetFdInfoKHR-fence-parameter", kVUIDUndefined); |
| 3261 | } |
| 3262 | |
| 3263 | return skip; |
| 3264 | } |
| 3265 | |
| 3266 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceSurfaceCapabilities2KHR( |
| 3267 | VkPhysicalDevice physicalDevice, |
| 3268 | const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, |
| 3269 | VkSurfaceCapabilities2KHR* pSurfaceCapabilities) { |
| 3270 | bool skip = false; |
| 3271 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-physicalDevice-parameter", kVUIDUndefined); |
| 3272 | if (pSurfaceInfo) { |
| 3273 | skip |= ValidateObject(physicalDevice, pSurfaceInfo->surface, kVulkanObjectTypeSurfaceKHR, false, "VUID-VkPhysicalDeviceSurfaceInfo2KHR-surface-parameter", kVUIDUndefined); |
| 3274 | } |
| 3275 | |
| 3276 | return skip; |
| 3277 | } |
| 3278 | |
| 3279 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceSurfaceFormats2KHR( |
| 3280 | VkPhysicalDevice physicalDevice, |
| 3281 | const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, |
| 3282 | uint32_t* pSurfaceFormatCount, |
| 3283 | VkSurfaceFormat2KHR* pSurfaceFormats) { |
| 3284 | bool skip = false; |
| 3285 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceSurfaceFormats2KHR-physicalDevice-parameter", kVUIDUndefined); |
| 3286 | if (pSurfaceInfo) { |
| 3287 | skip |= ValidateObject(physicalDevice, pSurfaceInfo->surface, kVulkanObjectTypeSurfaceKHR, false, "VUID-VkPhysicalDeviceSurfaceInfo2KHR-surface-parameter", kVUIDUndefined); |
| 3288 | } |
| 3289 | |
| 3290 | return skip; |
| 3291 | } |
| 3292 | |
| 3293 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceDisplayPlaneProperties2KHR( |
| 3294 | VkPhysicalDevice physicalDevice, |
| 3295 | uint32_t* pPropertyCount, |
| 3296 | VkDisplayPlaneProperties2KHR* pProperties) { |
| 3297 | bool skip = false; |
| 3298 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceDisplayPlaneProperties2KHR-physicalDevice-parameter", kVUIDUndefined); |
| 3299 | |
| 3300 | return skip; |
| 3301 | } |
| 3302 | |
| 3303 | bool ObjectLifetimes::PreCallValidateGetDisplayPlaneCapabilities2KHR( |
| 3304 | VkPhysicalDevice physicalDevice, |
| 3305 | const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo, |
| 3306 | VkDisplayPlaneCapabilities2KHR* pCapabilities) { |
| 3307 | bool skip = false; |
| 3308 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetDisplayPlaneCapabilities2KHR-physicalDevice-parameter", kVUIDUndefined); |
| 3309 | if (pDisplayPlaneInfo) { |
| 3310 | skip |= ValidateObject(physicalDevice, pDisplayPlaneInfo->mode, kVulkanObjectTypeDisplayModeKHR, false, "VUID-VkDisplayPlaneInfo2KHR-mode-parameter", kVUIDUndefined); |
| 3311 | } |
| 3312 | |
| 3313 | return skip; |
| 3314 | } |
| 3315 | |
| 3316 | bool ObjectLifetimes::PreCallValidateGetImageMemoryRequirements2KHR( |
| 3317 | VkDevice device, |
| 3318 | const VkImageMemoryRequirementsInfo2* pInfo, |
| 3319 | VkMemoryRequirements2* pMemoryRequirements) { |
| 3320 | bool skip = false; |
| 3321 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetImageMemoryRequirements2-device-parameter", kVUIDUndefined); |
| 3322 | if (pInfo) { |
| 3323 | skip |= ValidateObject(device, pInfo->image, kVulkanObjectTypeImage, false, "VUID-VkImageMemoryRequirementsInfo2-image-parameter", kVUIDUndefined); |
| 3324 | } |
| 3325 | |
| 3326 | return skip; |
| 3327 | } |
| 3328 | |
| 3329 | bool ObjectLifetimes::PreCallValidateGetBufferMemoryRequirements2KHR( |
| 3330 | VkDevice device, |
| 3331 | const VkBufferMemoryRequirementsInfo2* pInfo, |
| 3332 | VkMemoryRequirements2* pMemoryRequirements) { |
| 3333 | bool skip = false; |
| 3334 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetBufferMemoryRequirements2-device-parameter", kVUIDUndefined); |
| 3335 | if (pInfo) { |
| 3336 | skip |= ValidateObject(device, pInfo->buffer, kVulkanObjectTypeBuffer, false, "VUID-VkBufferMemoryRequirementsInfo2-buffer-parameter", kVUIDUndefined); |
| 3337 | } |
| 3338 | |
| 3339 | return skip; |
| 3340 | } |
| 3341 | |
| 3342 | bool ObjectLifetimes::PreCallValidateGetImageSparseMemoryRequirements2KHR( |
| 3343 | VkDevice device, |
| 3344 | const VkImageSparseMemoryRequirementsInfo2* pInfo, |
| 3345 | uint32_t* pSparseMemoryRequirementCount, |
| 3346 | VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { |
| 3347 | bool skip = false; |
| 3348 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetImageSparseMemoryRequirements2-device-parameter", kVUIDUndefined); |
| 3349 | if (pInfo) { |
| 3350 | skip |= ValidateObject(device, pInfo->image, kVulkanObjectTypeImage, false, "VUID-VkImageSparseMemoryRequirementsInfo2-image-parameter", kVUIDUndefined); |
| 3351 | } |
| 3352 | |
| 3353 | return skip; |
| 3354 | } |
| 3355 | |
| 3356 | bool ObjectLifetimes::PreCallValidateCreateSamplerYcbcrConversionKHR( |
| 3357 | VkDevice device, |
| 3358 | const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, |
| 3359 | const VkAllocationCallbacks* pAllocator, |
| 3360 | VkSamplerYcbcrConversion* pYcbcrConversion) { |
| 3361 | bool skip = false; |
| 3362 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkCreateSamplerYcbcrConversion-device-parameter", kVUIDUndefined); |
| 3363 | |
| 3364 | return skip; |
| 3365 | } |
| 3366 | |
| 3367 | void ObjectLifetimes::PostCallRecordCreateSamplerYcbcrConversionKHR( |
| 3368 | VkDevice device, |
| 3369 | const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, |
| 3370 | const VkAllocationCallbacks* pAllocator, |
| 3371 | VkSamplerYcbcrConversion* pYcbcrConversion, |
| 3372 | VkResult result) { |
| 3373 | if (result != VK_SUCCESS) return; |
| 3374 | CreateObject(device, *pYcbcrConversion, kVulkanObjectTypeSamplerYcbcrConversion, pAllocator); |
| 3375 | |
| 3376 | } |
| 3377 | |
| 3378 | bool ObjectLifetimes::PreCallValidateDestroySamplerYcbcrConversionKHR( |
| 3379 | VkDevice device, |
| 3380 | VkSamplerYcbcrConversion ycbcrConversion, |
| 3381 | const VkAllocationCallbacks* pAllocator) { |
| 3382 | bool skip = false; |
| 3383 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkDestroySamplerYcbcrConversion-device-parameter", kVUIDUndefined); |
| 3384 | skip |= ValidateObject(device, ycbcrConversion, kVulkanObjectTypeSamplerYcbcrConversion, true, "VUID-vkDestroySamplerYcbcrConversion-ycbcrConversion-parameter", "VUID-vkDestroySamplerYcbcrConversion-ycbcrConversion-parent"); |
| 3385 | skip |= ValidateDestroyObject(device, ycbcrConversion, kVulkanObjectTypeSamplerYcbcrConversion, pAllocator, kVUIDUndefined, kVUIDUndefined); |
| 3386 | |
| 3387 | return skip; |
| 3388 | } |
| 3389 | |
| 3390 | void ObjectLifetimes::PreCallRecordDestroySamplerYcbcrConversionKHR( |
| 3391 | VkDevice device, |
| 3392 | VkSamplerYcbcrConversion ycbcrConversion, |
| 3393 | const VkAllocationCallbacks* pAllocator) { |
| 3394 | RecordDestroyObject(device, ycbcrConversion, kVulkanObjectTypeSamplerYcbcrConversion); |
| 3395 | |
| 3396 | } |
| 3397 | |
| 3398 | bool ObjectLifetimes::PreCallValidateBindBufferMemory2KHR( |
| 3399 | VkDevice device, |
| 3400 | uint32_t bindInfoCount, |
| 3401 | const VkBindBufferMemoryInfo* pBindInfos) { |
| 3402 | bool skip = false; |
| 3403 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkBindBufferMemory2-device-parameter", kVUIDUndefined); |
| 3404 | if (pBindInfos) { |
| 3405 | for (uint32_t index0 = 0; index0 < bindInfoCount; ++index0) { |
| 3406 | skip |= ValidateObject(device, pBindInfos[index0].buffer, kVulkanObjectTypeBuffer, false, "VUID-VkBindBufferMemoryInfo-buffer-parameter", "VUID-VkBindBufferMemoryInfo-commonparent"); |
| 3407 | skip |= ValidateObject(device, pBindInfos[index0].memory, kVulkanObjectTypeDeviceMemory, false, "VUID-VkBindBufferMemoryInfo-memory-parameter", "VUID-VkBindBufferMemoryInfo-commonparent"); |
| 3408 | } |
| 3409 | } |
| 3410 | |
| 3411 | return skip; |
| 3412 | } |
| 3413 | |
| 3414 | bool ObjectLifetimes::PreCallValidateBindImageMemory2KHR( |
| 3415 | VkDevice device, |
| 3416 | uint32_t bindInfoCount, |
| 3417 | const VkBindImageMemoryInfo* pBindInfos) { |
| 3418 | bool skip = false; |
| 3419 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkBindImageMemory2-device-parameter", kVUIDUndefined); |
| 3420 | if (pBindInfos) { |
| 3421 | for (uint32_t index0 = 0; index0 < bindInfoCount; ++index0) { |
| 3422 | skip |= ValidateObject(device, pBindInfos[index0].image, kVulkanObjectTypeImage, false, "VUID-VkBindImageMemoryInfo-image-parameter", "VUID-VkBindImageMemoryInfo-commonparent"); |
| 3423 | skip |= ValidateObject(device, pBindInfos[index0].memory, kVulkanObjectTypeDeviceMemory, true, kVUIDUndefined, "VUID-VkBindImageMemoryInfo-commonparent"); |
| 3424 | } |
| 3425 | } |
| 3426 | |
| 3427 | return skip; |
| 3428 | } |
| 3429 | |
| 3430 | bool ObjectLifetimes::PreCallValidateCmdDrawIndirectCountKHR( |
| 3431 | VkCommandBuffer commandBuffer, |
| 3432 | VkBuffer buffer, |
| 3433 | VkDeviceSize offset, |
| 3434 | VkBuffer countBuffer, |
| 3435 | VkDeviceSize countBufferOffset, |
| 3436 | uint32_t maxDrawCount, |
| 3437 | uint32_t stride) { |
| 3438 | bool skip = false; |
| 3439 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdDrawIndirectCountKHR-commandBuffer-parameter", "VUID-vkCmdDrawIndirectCountKHR-commonparent"); |
| 3440 | skip |= ValidateObject(commandBuffer, buffer, kVulkanObjectTypeBuffer, false, "VUID-vkCmdDrawIndirectCountKHR-buffer-parameter", "VUID-vkCmdDrawIndirectCountKHR-commonparent"); |
| 3441 | skip |= ValidateObject(commandBuffer, countBuffer, kVulkanObjectTypeBuffer, false, "VUID-vkCmdDrawIndirectCountKHR-countBuffer-parameter", "VUID-vkCmdDrawIndirectCountKHR-commonparent"); |
| 3442 | |
| 3443 | return skip; |
| 3444 | } |
| 3445 | |
| 3446 | bool ObjectLifetimes::PreCallValidateCmdDrawIndexedIndirectCountKHR( |
| 3447 | VkCommandBuffer commandBuffer, |
| 3448 | VkBuffer buffer, |
| 3449 | VkDeviceSize offset, |
| 3450 | VkBuffer countBuffer, |
| 3451 | VkDeviceSize countBufferOffset, |
| 3452 | uint32_t maxDrawCount, |
| 3453 | uint32_t stride) { |
| 3454 | bool skip = false; |
| 3455 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdDrawIndexedIndirectCountKHR-commandBuffer-parameter", "VUID-vkCmdDrawIndexedIndirectCountKHR-commonparent"); |
| 3456 | skip |= ValidateObject(commandBuffer, buffer, kVulkanObjectTypeBuffer, false, "VUID-vkCmdDrawIndexedIndirectCountKHR-buffer-parameter", "VUID-vkCmdDrawIndexedIndirectCountKHR-commonparent"); |
| 3457 | skip |= ValidateObject(commandBuffer, countBuffer, kVulkanObjectTypeBuffer, false, "VUID-vkCmdDrawIndexedIndirectCountKHR-countBuffer-parameter", "VUID-vkCmdDrawIndexedIndirectCountKHR-commonparent"); |
| 3458 | |
| 3459 | return skip; |
| 3460 | } |
| 3461 | |
| 3462 | bool ObjectLifetimes::PreCallValidateCreateDebugReportCallbackEXT( |
| 3463 | VkInstance instance, |
| 3464 | const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, |
| 3465 | const VkAllocationCallbacks* pAllocator, |
| 3466 | VkDebugReportCallbackEXT* pCallback) { |
| 3467 | bool skip = false; |
| 3468 | skip |= ValidateObject(instance, instance, kVulkanObjectTypeInstance, false, "VUID-vkCreateDebugReportCallbackEXT-instance-parameter", kVUIDUndefined); |
| 3469 | |
| 3470 | return skip; |
| 3471 | } |
| 3472 | |
| 3473 | void ObjectLifetimes::PostCallRecordCreateDebugReportCallbackEXT( |
| 3474 | VkInstance instance, |
| 3475 | const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, |
| 3476 | const VkAllocationCallbacks* pAllocator, |
| 3477 | VkDebugReportCallbackEXT* pCallback, |
| 3478 | VkResult result) { |
| 3479 | if (result != VK_SUCCESS) return; |
| 3480 | CreateObject(instance, *pCallback, kVulkanObjectTypeDebugReportCallbackEXT, pAllocator); |
| 3481 | |
| 3482 | } |
| 3483 | |
| 3484 | bool ObjectLifetimes::PreCallValidateDestroyDebugReportCallbackEXT( |
| 3485 | VkInstance instance, |
| 3486 | VkDebugReportCallbackEXT callback, |
| 3487 | const VkAllocationCallbacks* pAllocator) { |
| 3488 | bool skip = false; |
| 3489 | skip |= ValidateObject(instance, instance, kVulkanObjectTypeInstance, false, "VUID-vkDestroyDebugReportCallbackEXT-instance-parameter", kVUIDUndefined); |
| 3490 | skip |= ValidateObject(instance, callback, kVulkanObjectTypeDebugReportCallbackEXT, false, "VUID-vkDestroyDebugReportCallbackEXT-callback-parameter", "VUID-vkDestroyDebugReportCallbackEXT-callback-parent"); |
| 3491 | skip |= ValidateDestroyObject(instance, callback, kVulkanObjectTypeDebugReportCallbackEXT, pAllocator, kVUIDUndefined, kVUIDUndefined); |
| 3492 | |
| 3493 | return skip; |
| 3494 | } |
| 3495 | |
| 3496 | void ObjectLifetimes::PreCallRecordDestroyDebugReportCallbackEXT( |
| 3497 | VkInstance instance, |
| 3498 | VkDebugReportCallbackEXT callback, |
| 3499 | const VkAllocationCallbacks* pAllocator) { |
| 3500 | RecordDestroyObject(instance, callback, kVulkanObjectTypeDebugReportCallbackEXT); |
| 3501 | |
| 3502 | } |
| 3503 | |
| 3504 | bool ObjectLifetimes::PreCallValidateDebugReportMessageEXT( |
| 3505 | VkInstance instance, |
| 3506 | VkDebugReportFlagsEXT flags, |
| 3507 | VkDebugReportObjectTypeEXT objectType, |
| 3508 | uint64_t object, |
| 3509 | size_t location, |
| 3510 | int32_t messageCode, |
| 3511 | const char* pLayerPrefix, |
| 3512 | const char* pMessage) { |
| 3513 | bool skip = false; |
| 3514 | skip |= ValidateObject(instance, instance, kVulkanObjectTypeInstance, false, "VUID-vkDebugReportMessageEXT-instance-parameter", kVUIDUndefined); |
| 3515 | |
| 3516 | return skip; |
| 3517 | } |
| 3518 | |
| 3519 | bool ObjectLifetimes::PreCallValidateDebugMarkerSetObjectTagEXT( |
| 3520 | VkDevice device, |
| 3521 | const VkDebugMarkerObjectTagInfoEXT* pTagInfo) { |
| 3522 | bool skip = false; |
| 3523 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkDebugMarkerSetObjectTagEXT-device-parameter", kVUIDUndefined); |
| 3524 | |
| 3525 | return skip; |
| 3526 | } |
| 3527 | |
| 3528 | bool ObjectLifetimes::PreCallValidateDebugMarkerSetObjectNameEXT( |
| 3529 | VkDevice device, |
| 3530 | const VkDebugMarkerObjectNameInfoEXT* pNameInfo) { |
| 3531 | bool skip = false; |
| 3532 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkDebugMarkerSetObjectNameEXT-device-parameter", kVUIDUndefined); |
| 3533 | |
| 3534 | return skip; |
| 3535 | } |
| 3536 | |
| 3537 | bool ObjectLifetimes::PreCallValidateCmdDebugMarkerBeginEXT( |
| 3538 | VkCommandBuffer commandBuffer, |
| 3539 | const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { |
| 3540 | bool skip = false; |
| 3541 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdDebugMarkerBeginEXT-commandBuffer-parameter", kVUIDUndefined); |
| 3542 | |
| 3543 | return skip; |
| 3544 | } |
| 3545 | |
| 3546 | bool ObjectLifetimes::PreCallValidateCmdDebugMarkerEndEXT( |
| 3547 | VkCommandBuffer commandBuffer) { |
| 3548 | bool skip = false; |
| 3549 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdDebugMarkerEndEXT-commandBuffer-parameter", kVUIDUndefined); |
| 3550 | |
| 3551 | return skip; |
| 3552 | } |
| 3553 | |
| 3554 | bool ObjectLifetimes::PreCallValidateCmdDebugMarkerInsertEXT( |
| 3555 | VkCommandBuffer commandBuffer, |
| 3556 | const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { |
| 3557 | bool skip = false; |
| 3558 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdDebugMarkerInsertEXT-commandBuffer-parameter", kVUIDUndefined); |
| 3559 | |
| 3560 | return skip; |
| 3561 | } |
| 3562 | |
| 3563 | bool ObjectLifetimes::PreCallValidateCmdBindTransformFeedbackBuffersEXT( |
| 3564 | VkCommandBuffer commandBuffer, |
| 3565 | uint32_t firstBinding, |
| 3566 | uint32_t bindingCount, |
| 3567 | const VkBuffer* pBuffers, |
| 3568 | const VkDeviceSize* pOffsets, |
| 3569 | const VkDeviceSize* pSizes) { |
| 3570 | bool skip = false; |
| 3571 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdBindTransformFeedbackBuffersEXT-commandBuffer-parameter", "VUID-vkCmdBindTransformFeedbackBuffersEXT-commonparent"); |
| 3572 | if (pBuffers) { |
| 3573 | for (uint32_t index0 = 0; index0 < bindingCount; ++index0) { |
| 3574 | skip |= ValidateObject(commandBuffer, pBuffers[index0], kVulkanObjectTypeBuffer, false, "VUID-vkCmdBindTransformFeedbackBuffersEXT-pBuffers-parameter", "VUID-vkCmdBindTransformFeedbackBuffersEXT-commonparent"); |
| 3575 | } |
| 3576 | } |
| 3577 | |
| 3578 | return skip; |
| 3579 | } |
| 3580 | |
| 3581 | bool ObjectLifetimes::PreCallValidateCmdBeginTransformFeedbackEXT( |
| 3582 | VkCommandBuffer commandBuffer, |
| 3583 | uint32_t firstCounterBuffer, |
| 3584 | uint32_t counterBufferCount, |
| 3585 | const VkBuffer* pCounterBuffers, |
| 3586 | const VkDeviceSize* pCounterBufferOffsets) { |
| 3587 | bool skip = false; |
| 3588 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdBeginTransformFeedbackEXT-commandBuffer-parameter", "VUID-vkCmdBeginTransformFeedbackEXT-commonparent"); |
| 3589 | if (pCounterBuffers) { |
| 3590 | for (uint32_t index0 = 0; index0 < counterBufferCount; ++index0) { |
| 3591 | skip |= ValidateObject(commandBuffer, pCounterBuffers[index0], kVulkanObjectTypeBuffer, true, kVUIDUndefined, "VUID-vkCmdBeginTransformFeedbackEXT-commonparent"); |
| 3592 | } |
| 3593 | } |
| 3594 | |
| 3595 | return skip; |
| 3596 | } |
| 3597 | |
| 3598 | bool ObjectLifetimes::PreCallValidateCmdEndTransformFeedbackEXT( |
| 3599 | VkCommandBuffer commandBuffer, |
| 3600 | uint32_t firstCounterBuffer, |
| 3601 | uint32_t counterBufferCount, |
| 3602 | const VkBuffer* pCounterBuffers, |
| 3603 | const VkDeviceSize* pCounterBufferOffsets) { |
| 3604 | bool skip = false; |
| 3605 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdEndTransformFeedbackEXT-commandBuffer-parameter", "VUID-vkCmdEndTransformFeedbackEXT-commonparent"); |
| 3606 | if (pCounterBuffers) { |
| 3607 | for (uint32_t index0 = 0; index0 < counterBufferCount; ++index0) { |
| 3608 | skip |= ValidateObject(commandBuffer, pCounterBuffers[index0], kVulkanObjectTypeBuffer, true, kVUIDUndefined, "VUID-vkCmdEndTransformFeedbackEXT-commonparent"); |
| 3609 | } |
| 3610 | } |
| 3611 | |
| 3612 | return skip; |
| 3613 | } |
| 3614 | |
| 3615 | bool ObjectLifetimes::PreCallValidateCmdBeginQueryIndexedEXT( |
| 3616 | VkCommandBuffer commandBuffer, |
| 3617 | VkQueryPool queryPool, |
| 3618 | uint32_t query, |
| 3619 | VkQueryControlFlags flags, |
| 3620 | uint32_t index) { |
| 3621 | bool skip = false; |
| 3622 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdBeginQueryIndexedEXT-commandBuffer-parameter", "VUID-vkCmdBeginQueryIndexedEXT-commonparent"); |
| 3623 | skip |= ValidateObject(commandBuffer, queryPool, kVulkanObjectTypeQueryPool, false, "VUID-vkCmdBeginQueryIndexedEXT-queryPool-parameter", "VUID-vkCmdBeginQueryIndexedEXT-commonparent"); |
| 3624 | |
| 3625 | return skip; |
| 3626 | } |
| 3627 | |
| 3628 | bool ObjectLifetimes::PreCallValidateCmdEndQueryIndexedEXT( |
| 3629 | VkCommandBuffer commandBuffer, |
| 3630 | VkQueryPool queryPool, |
| 3631 | uint32_t query, |
| 3632 | uint32_t index) { |
| 3633 | bool skip = false; |
| 3634 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdEndQueryIndexedEXT-commandBuffer-parameter", "VUID-vkCmdEndQueryIndexedEXT-commonparent"); |
| 3635 | skip |= ValidateObject(commandBuffer, queryPool, kVulkanObjectTypeQueryPool, false, "VUID-vkCmdEndQueryIndexedEXT-queryPool-parameter", "VUID-vkCmdEndQueryIndexedEXT-commonparent"); |
| 3636 | |
| 3637 | return skip; |
| 3638 | } |
| 3639 | |
| 3640 | bool ObjectLifetimes::PreCallValidateCmdDrawIndirectByteCountEXT( |
| 3641 | VkCommandBuffer commandBuffer, |
| 3642 | uint32_t instanceCount, |
| 3643 | uint32_t firstInstance, |
| 3644 | VkBuffer counterBuffer, |
| 3645 | VkDeviceSize counterBufferOffset, |
| 3646 | uint32_t counterOffset, |
| 3647 | uint32_t vertexStride) { |
| 3648 | bool skip = false; |
| 3649 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdDrawIndirectByteCountEXT-commandBuffer-parameter", "VUID-vkCmdDrawIndirectByteCountEXT-commonparent"); |
| 3650 | skip |= ValidateObject(commandBuffer, counterBuffer, kVulkanObjectTypeBuffer, false, "VUID-vkCmdDrawIndirectByteCountEXT-counterBuffer-parameter", "VUID-vkCmdDrawIndirectByteCountEXT-commonparent"); |
| 3651 | |
| 3652 | return skip; |
| 3653 | } |
| 3654 | |
| 3655 | bool ObjectLifetimes::PreCallValidateGetImageViewHandleNVX( |
| 3656 | VkDevice device, |
| 3657 | const VkImageViewHandleInfoNVX* pInfo) { |
| 3658 | bool skip = false; |
| 3659 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetImageViewHandleNVX-device-parameter", kVUIDUndefined); |
| 3660 | |
| 3661 | return skip; |
| 3662 | } |
| 3663 | |
| 3664 | bool ObjectLifetimes::PreCallValidateCmdDrawIndirectCountAMD( |
| 3665 | VkCommandBuffer commandBuffer, |
| 3666 | VkBuffer buffer, |
| 3667 | VkDeviceSize offset, |
| 3668 | VkBuffer countBuffer, |
| 3669 | VkDeviceSize countBufferOffset, |
| 3670 | uint32_t maxDrawCount, |
| 3671 | uint32_t stride) { |
| 3672 | bool skip = false; |
| 3673 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdDrawIndirectCountKHR-commandBuffer-parameter", "VUID-vkCmdDrawIndirectCountKHR-commonparent"); |
| 3674 | skip |= ValidateObject(commandBuffer, buffer, kVulkanObjectTypeBuffer, false, "VUID-vkCmdDrawIndirectCountKHR-buffer-parameter", "VUID-vkCmdDrawIndirectCountKHR-commonparent"); |
| 3675 | skip |= ValidateObject(commandBuffer, countBuffer, kVulkanObjectTypeBuffer, false, "VUID-vkCmdDrawIndirectCountKHR-countBuffer-parameter", "VUID-vkCmdDrawIndirectCountKHR-commonparent"); |
| 3676 | |
| 3677 | return skip; |
| 3678 | } |
| 3679 | |
| 3680 | bool ObjectLifetimes::PreCallValidateCmdDrawIndexedIndirectCountAMD( |
| 3681 | VkCommandBuffer commandBuffer, |
| 3682 | VkBuffer buffer, |
| 3683 | VkDeviceSize offset, |
| 3684 | VkBuffer countBuffer, |
| 3685 | VkDeviceSize countBufferOffset, |
| 3686 | uint32_t maxDrawCount, |
| 3687 | uint32_t stride) { |
| 3688 | bool skip = false; |
| 3689 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdDrawIndexedIndirectCountKHR-commandBuffer-parameter", "VUID-vkCmdDrawIndexedIndirectCountKHR-commonparent"); |
| 3690 | skip |= ValidateObject(commandBuffer, buffer, kVulkanObjectTypeBuffer, false, "VUID-vkCmdDrawIndexedIndirectCountKHR-buffer-parameter", "VUID-vkCmdDrawIndexedIndirectCountKHR-commonparent"); |
| 3691 | skip |= ValidateObject(commandBuffer, countBuffer, kVulkanObjectTypeBuffer, false, "VUID-vkCmdDrawIndexedIndirectCountKHR-countBuffer-parameter", "VUID-vkCmdDrawIndexedIndirectCountKHR-commonparent"); |
| 3692 | |
| 3693 | return skip; |
| 3694 | } |
| 3695 | |
| 3696 | bool ObjectLifetimes::PreCallValidateGetShaderInfoAMD( |
| 3697 | VkDevice device, |
| 3698 | VkPipeline pipeline, |
| 3699 | VkShaderStageFlagBits shaderStage, |
| 3700 | VkShaderInfoTypeAMD infoType, |
| 3701 | size_t* pInfoSize, |
| 3702 | void* pInfo) { |
| 3703 | bool skip = false; |
| 3704 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetShaderInfoAMD-device-parameter", kVUIDUndefined); |
| 3705 | skip |= ValidateObject(device, pipeline, kVulkanObjectTypePipeline, false, "VUID-vkGetShaderInfoAMD-pipeline-parameter", "VUID-vkGetShaderInfoAMD-pipeline-parent"); |
| 3706 | |
| 3707 | return skip; |
| 3708 | } |
| 3709 | |
| 3710 | #ifdef VK_USE_PLATFORM_GGP |
| 3711 | |
| 3712 | bool ObjectLifetimes::PreCallValidateCreateStreamDescriptorSurfaceGGP( |
| 3713 | VkInstance instance, |
| 3714 | const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, |
| 3715 | const VkAllocationCallbacks* pAllocator, |
| 3716 | VkSurfaceKHR* pSurface) { |
| 3717 | bool skip = false; |
| 3718 | skip |= ValidateObject(instance, instance, kVulkanObjectTypeInstance, false, "VUID-vkCreateStreamDescriptorSurfaceGGP-instance-parameter", kVUIDUndefined); |
| 3719 | |
| 3720 | return skip; |
| 3721 | } |
| 3722 | |
| 3723 | void ObjectLifetimes::PostCallRecordCreateStreamDescriptorSurfaceGGP( |
| 3724 | VkInstance instance, |
| 3725 | const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, |
| 3726 | const VkAllocationCallbacks* pAllocator, |
| 3727 | VkSurfaceKHR* pSurface, |
| 3728 | VkResult result) { |
| 3729 | if (result != VK_SUCCESS) return; |
| 3730 | CreateObject(instance, *pSurface, kVulkanObjectTypeSurfaceKHR, pAllocator); |
| 3731 | |
| 3732 | } |
| 3733 | #endif // VK_USE_PLATFORM_GGP |
| 3734 | |
| 3735 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceExternalImageFormatPropertiesNV( |
| 3736 | VkPhysicalDevice physicalDevice, |
| 3737 | VkFormat format, |
| 3738 | VkImageType type, |
| 3739 | VkImageTiling tiling, |
| 3740 | VkImageUsageFlags usage, |
| 3741 | VkImageCreateFlags flags, |
| 3742 | VkExternalMemoryHandleTypeFlagsNV externalHandleType, |
| 3743 | VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) { |
| 3744 | bool skip = false; |
| 3745 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-physicalDevice-parameter", kVUIDUndefined); |
| 3746 | |
| 3747 | return skip; |
| 3748 | } |
| 3749 | |
| 3750 | #ifdef VK_USE_PLATFORM_WIN32_KHR |
| 3751 | |
| 3752 | bool ObjectLifetimes::PreCallValidateGetMemoryWin32HandleNV( |
| 3753 | VkDevice device, |
| 3754 | VkDeviceMemory memory, |
| 3755 | VkExternalMemoryHandleTypeFlagsNV handleType, |
| 3756 | HANDLE* pHandle) { |
| 3757 | bool skip = false; |
| 3758 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetMemoryWin32HandleNV-device-parameter", kVUIDUndefined); |
| 3759 | skip |= ValidateObject(device, memory, kVulkanObjectTypeDeviceMemory, false, "VUID-vkGetMemoryWin32HandleNV-memory-parameter", "VUID-vkGetMemoryWin32HandleNV-memory-parent"); |
| 3760 | |
| 3761 | return skip; |
| 3762 | } |
| 3763 | #endif // VK_USE_PLATFORM_WIN32_KHR |
| 3764 | |
| 3765 | #ifdef VK_USE_PLATFORM_VI_NN |
| 3766 | |
| 3767 | bool ObjectLifetimes::PreCallValidateCreateViSurfaceNN( |
| 3768 | VkInstance instance, |
| 3769 | const VkViSurfaceCreateInfoNN* pCreateInfo, |
| 3770 | const VkAllocationCallbacks* pAllocator, |
| 3771 | VkSurfaceKHR* pSurface) { |
| 3772 | bool skip = false; |
| 3773 | skip |= ValidateObject(instance, instance, kVulkanObjectTypeInstance, false, "VUID-vkCreateViSurfaceNN-instance-parameter", kVUIDUndefined); |
| 3774 | |
| 3775 | return skip; |
| 3776 | } |
| 3777 | |
| 3778 | void ObjectLifetimes::PostCallRecordCreateViSurfaceNN( |
| 3779 | VkInstance instance, |
| 3780 | const VkViSurfaceCreateInfoNN* pCreateInfo, |
| 3781 | const VkAllocationCallbacks* pAllocator, |
| 3782 | VkSurfaceKHR* pSurface, |
| 3783 | VkResult result) { |
| 3784 | if (result != VK_SUCCESS) return; |
| 3785 | CreateObject(instance, *pSurface, kVulkanObjectTypeSurfaceKHR, pAllocator); |
| 3786 | |
| 3787 | } |
| 3788 | #endif // VK_USE_PLATFORM_VI_NN |
| 3789 | |
| 3790 | bool ObjectLifetimes::PreCallValidateCmdBeginConditionalRenderingEXT( |
| 3791 | VkCommandBuffer commandBuffer, |
| 3792 | const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin) { |
| 3793 | bool skip = false; |
| 3794 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdBeginConditionalRenderingEXT-commandBuffer-parameter", kVUIDUndefined); |
| 3795 | if (pConditionalRenderingBegin) { |
| 3796 | skip |= ValidateObject(commandBuffer, pConditionalRenderingBegin->buffer, kVulkanObjectTypeBuffer, false, "VUID-VkConditionalRenderingBeginInfoEXT-buffer-parameter", kVUIDUndefined); |
| 3797 | } |
| 3798 | |
| 3799 | return skip; |
| 3800 | } |
| 3801 | |
| 3802 | bool ObjectLifetimes::PreCallValidateCmdEndConditionalRenderingEXT( |
| 3803 | VkCommandBuffer commandBuffer) { |
| 3804 | bool skip = false; |
| 3805 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdEndConditionalRenderingEXT-commandBuffer-parameter", kVUIDUndefined); |
| 3806 | |
| 3807 | return skip; |
| 3808 | } |
| 3809 | |
| 3810 | bool ObjectLifetimes::PreCallValidateCmdProcessCommandsNVX( |
| 3811 | VkCommandBuffer commandBuffer, |
| 3812 | const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo) { |
| 3813 | bool skip = false; |
| 3814 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdProcessCommandsNVX-commandBuffer-parameter", kVUIDUndefined); |
| 3815 | if (pProcessCommandsInfo) { |
| 3816 | skip |= ValidateObject(commandBuffer, pProcessCommandsInfo->objectTable, kVulkanObjectTypeObjectTableNVX, false, "VUID-VkCmdProcessCommandsInfoNVX-objectTable-parameter", "VUID-VkCmdProcessCommandsInfoNVX-commonparent"); |
| 3817 | skip |= ValidateObject(commandBuffer, pProcessCommandsInfo->indirectCommandsLayout, kVulkanObjectTypeIndirectCommandsLayoutNVX, false, "VUID-VkCmdProcessCommandsInfoNVX-indirectCommandsLayout-parameter", "VUID-VkCmdProcessCommandsInfoNVX-commonparent"); |
| 3818 | if (pProcessCommandsInfo->pIndirectCommandsTokens) { |
| 3819 | for (uint32_t index1 = 0; index1 < pProcessCommandsInfo->indirectCommandsTokenCount; ++index1) { |
| 3820 | skip |= ValidateObject(commandBuffer, pProcessCommandsInfo->pIndirectCommandsTokens[index1].buffer, kVulkanObjectTypeBuffer, false, "VUID-VkIndirectCommandsTokenNVX-buffer-parameter", kVUIDUndefined); |
| 3821 | } |
| 3822 | } |
| 3823 | skip |= ValidateObject(commandBuffer, pProcessCommandsInfo->targetCommandBuffer, kVulkanObjectTypeCommandBuffer, true, "VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-parameter", "VUID-VkCmdProcessCommandsInfoNVX-commonparent"); |
| 3824 | skip |= ValidateObject(commandBuffer, pProcessCommandsInfo->sequencesCountBuffer, kVulkanObjectTypeBuffer, true, "VUID-VkCmdProcessCommandsInfoNVX-sequencesCountBuffer-parameter", "VUID-VkCmdProcessCommandsInfoNVX-commonparent"); |
| 3825 | skip |= ValidateObject(commandBuffer, pProcessCommandsInfo->sequencesIndexBuffer, kVulkanObjectTypeBuffer, true, "VUID-VkCmdProcessCommandsInfoNVX-sequencesIndexBuffer-parameter", "VUID-VkCmdProcessCommandsInfoNVX-commonparent"); |
| 3826 | } |
| 3827 | |
| 3828 | return skip; |
| 3829 | } |
| 3830 | |
| 3831 | bool ObjectLifetimes::PreCallValidateCmdReserveSpaceForCommandsNVX( |
| 3832 | VkCommandBuffer commandBuffer, |
| 3833 | const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo) { |
| 3834 | bool skip = false; |
| 3835 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdReserveSpaceForCommandsNVX-commandBuffer-parameter", kVUIDUndefined); |
| 3836 | if (pReserveSpaceInfo) { |
| 3837 | skip |= ValidateObject(commandBuffer, pReserveSpaceInfo->objectTable, kVulkanObjectTypeObjectTableNVX, false, "VUID-VkCmdReserveSpaceForCommandsInfoNVX-objectTable-parameter", "VUID-VkCmdReserveSpaceForCommandsInfoNVX-commonparent"); |
| 3838 | skip |= ValidateObject(commandBuffer, pReserveSpaceInfo->indirectCommandsLayout, kVulkanObjectTypeIndirectCommandsLayoutNVX, false, "VUID-VkCmdReserveSpaceForCommandsInfoNVX-indirectCommandsLayout-parameter", "VUID-VkCmdReserveSpaceForCommandsInfoNVX-commonparent"); |
| 3839 | } |
| 3840 | |
| 3841 | return skip; |
| 3842 | } |
| 3843 | |
| 3844 | bool ObjectLifetimes::PreCallValidateCreateIndirectCommandsLayoutNVX( |
| 3845 | VkDevice device, |
| 3846 | const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo, |
| 3847 | const VkAllocationCallbacks* pAllocator, |
| 3848 | VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout) { |
| 3849 | bool skip = false; |
| 3850 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkCreateIndirectCommandsLayoutNVX-device-parameter", kVUIDUndefined); |
| 3851 | |
| 3852 | return skip; |
| 3853 | } |
| 3854 | |
| 3855 | void ObjectLifetimes::PostCallRecordCreateIndirectCommandsLayoutNVX( |
| 3856 | VkDevice device, |
| 3857 | const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo, |
| 3858 | const VkAllocationCallbacks* pAllocator, |
| 3859 | VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout, |
| 3860 | VkResult result) { |
| 3861 | if (result != VK_SUCCESS) return; |
| 3862 | CreateObject(device, *pIndirectCommandsLayout, kVulkanObjectTypeIndirectCommandsLayoutNVX, pAllocator); |
| 3863 | |
| 3864 | } |
| 3865 | |
| 3866 | bool ObjectLifetimes::PreCallValidateDestroyIndirectCommandsLayoutNVX( |
| 3867 | VkDevice device, |
| 3868 | VkIndirectCommandsLayoutNVX indirectCommandsLayout, |
| 3869 | const VkAllocationCallbacks* pAllocator) { |
| 3870 | bool skip = false; |
| 3871 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkDestroyIndirectCommandsLayoutNVX-device-parameter", kVUIDUndefined); |
| 3872 | skip |= ValidateObject(device, indirectCommandsLayout, kVulkanObjectTypeIndirectCommandsLayoutNVX, false, "VUID-vkDestroyIndirectCommandsLayoutNVX-indirectCommandsLayout-parameter", "VUID-vkDestroyIndirectCommandsLayoutNVX-indirectCommandsLayout-parent"); |
| 3873 | skip |= ValidateDestroyObject(device, indirectCommandsLayout, kVulkanObjectTypeIndirectCommandsLayoutNVX, pAllocator, kVUIDUndefined, kVUIDUndefined); |
| 3874 | |
| 3875 | return skip; |
| 3876 | } |
| 3877 | |
| 3878 | void ObjectLifetimes::PreCallRecordDestroyIndirectCommandsLayoutNVX( |
| 3879 | VkDevice device, |
| 3880 | VkIndirectCommandsLayoutNVX indirectCommandsLayout, |
| 3881 | const VkAllocationCallbacks* pAllocator) { |
| 3882 | RecordDestroyObject(device, indirectCommandsLayout, kVulkanObjectTypeIndirectCommandsLayoutNVX); |
| 3883 | |
| 3884 | } |
| 3885 | |
| 3886 | bool ObjectLifetimes::PreCallValidateCreateObjectTableNVX( |
| 3887 | VkDevice device, |
| 3888 | const VkObjectTableCreateInfoNVX* pCreateInfo, |
| 3889 | const VkAllocationCallbacks* pAllocator, |
| 3890 | VkObjectTableNVX* pObjectTable) { |
| 3891 | bool skip = false; |
| 3892 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkCreateObjectTableNVX-device-parameter", kVUIDUndefined); |
| 3893 | |
| 3894 | return skip; |
| 3895 | } |
| 3896 | |
| 3897 | void ObjectLifetimes::PostCallRecordCreateObjectTableNVX( |
| 3898 | VkDevice device, |
| 3899 | const VkObjectTableCreateInfoNVX* pCreateInfo, |
| 3900 | const VkAllocationCallbacks* pAllocator, |
| 3901 | VkObjectTableNVX* pObjectTable, |
| 3902 | VkResult result) { |
| 3903 | if (result != VK_SUCCESS) return; |
| 3904 | CreateObject(device, *pObjectTable, kVulkanObjectTypeObjectTableNVX, pAllocator); |
| 3905 | |
| 3906 | } |
| 3907 | |
| 3908 | bool ObjectLifetimes::PreCallValidateDestroyObjectTableNVX( |
| 3909 | VkDevice device, |
| 3910 | VkObjectTableNVX objectTable, |
| 3911 | const VkAllocationCallbacks* pAllocator) { |
| 3912 | bool skip = false; |
| 3913 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkDestroyObjectTableNVX-device-parameter", kVUIDUndefined); |
| 3914 | skip |= ValidateObject(device, objectTable, kVulkanObjectTypeObjectTableNVX, false, "VUID-vkDestroyObjectTableNVX-objectTable-parameter", "VUID-vkDestroyObjectTableNVX-objectTable-parent"); |
| 3915 | skip |= ValidateDestroyObject(device, objectTable, kVulkanObjectTypeObjectTableNVX, pAllocator, kVUIDUndefined, kVUIDUndefined); |
| 3916 | |
| 3917 | return skip; |
| 3918 | } |
| 3919 | |
| 3920 | void ObjectLifetimes::PreCallRecordDestroyObjectTableNVX( |
| 3921 | VkDevice device, |
| 3922 | VkObjectTableNVX objectTable, |
| 3923 | const VkAllocationCallbacks* pAllocator) { |
| 3924 | RecordDestroyObject(device, objectTable, kVulkanObjectTypeObjectTableNVX); |
| 3925 | |
| 3926 | } |
| 3927 | |
| 3928 | bool ObjectLifetimes::PreCallValidateRegisterObjectsNVX( |
| 3929 | VkDevice device, |
| 3930 | VkObjectTableNVX objectTable, |
| 3931 | uint32_t objectCount, |
| 3932 | const VkObjectTableEntryNVX* const* ppObjectTableEntries, |
| 3933 | const uint32_t* pObjectIndices) { |
| 3934 | bool skip = false; |
| 3935 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkRegisterObjectsNVX-device-parameter", kVUIDUndefined); |
| 3936 | skip |= ValidateObject(device, objectTable, kVulkanObjectTypeObjectTableNVX, false, "VUID-vkRegisterObjectsNVX-objectTable-parameter", "VUID-vkRegisterObjectsNVX-objectTable-parent"); |
| 3937 | |
| 3938 | return skip; |
| 3939 | } |
| 3940 | |
| 3941 | bool ObjectLifetimes::PreCallValidateUnregisterObjectsNVX( |
| 3942 | VkDevice device, |
| 3943 | VkObjectTableNVX objectTable, |
| 3944 | uint32_t objectCount, |
| 3945 | const VkObjectEntryTypeNVX* pObjectEntryTypes, |
| 3946 | const uint32_t* pObjectIndices) { |
| 3947 | bool skip = false; |
| 3948 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkUnregisterObjectsNVX-device-parameter", kVUIDUndefined); |
| 3949 | skip |= ValidateObject(device, objectTable, kVulkanObjectTypeObjectTableNVX, false, "VUID-vkUnregisterObjectsNVX-objectTable-parameter", "VUID-vkUnregisterObjectsNVX-objectTable-parent"); |
| 3950 | |
| 3951 | return skip; |
| 3952 | } |
| 3953 | |
| 3954 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceGeneratedCommandsPropertiesNVX( |
| 3955 | VkPhysicalDevice physicalDevice, |
| 3956 | VkDeviceGeneratedCommandsFeaturesNVX* pFeatures, |
| 3957 | VkDeviceGeneratedCommandsLimitsNVX* pLimits) { |
| 3958 | bool skip = false; |
| 3959 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX-physicalDevice-parameter", kVUIDUndefined); |
| 3960 | |
| 3961 | return skip; |
| 3962 | } |
| 3963 | |
| 3964 | bool ObjectLifetimes::PreCallValidateCmdSetViewportWScalingNV( |
| 3965 | VkCommandBuffer commandBuffer, |
| 3966 | uint32_t firstViewport, |
| 3967 | uint32_t viewportCount, |
| 3968 | const VkViewportWScalingNV* pViewportWScalings) { |
| 3969 | bool skip = false; |
| 3970 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdSetViewportWScalingNV-commandBuffer-parameter", kVUIDUndefined); |
| 3971 | |
| 3972 | return skip; |
| 3973 | } |
| 3974 | |
| 3975 | bool ObjectLifetimes::PreCallValidateReleaseDisplayEXT( |
| 3976 | VkPhysicalDevice physicalDevice, |
| 3977 | VkDisplayKHR display) { |
| 3978 | bool skip = false; |
| 3979 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkReleaseDisplayEXT-physicalDevice-parameter", kVUIDUndefined); |
| 3980 | skip |= ValidateObject(physicalDevice, display, kVulkanObjectTypeDisplayKHR, false, "VUID-vkReleaseDisplayEXT-display-parameter", kVUIDUndefined); |
| 3981 | |
| 3982 | return skip; |
| 3983 | } |
| 3984 | |
| 3985 | #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT |
| 3986 | |
| 3987 | bool ObjectLifetimes::PreCallValidateAcquireXlibDisplayEXT( |
| 3988 | VkPhysicalDevice physicalDevice, |
| 3989 | Display* dpy, |
| 3990 | VkDisplayKHR display) { |
| 3991 | bool skip = false; |
| 3992 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkAcquireXlibDisplayEXT-physicalDevice-parameter", kVUIDUndefined); |
| 3993 | skip |= ValidateObject(physicalDevice, display, kVulkanObjectTypeDisplayKHR, false, "VUID-vkAcquireXlibDisplayEXT-display-parameter", kVUIDUndefined); |
| 3994 | |
| 3995 | return skip; |
| 3996 | } |
| 3997 | #endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT |
| 3998 | |
| 3999 | #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT |
| 4000 | |
| 4001 | bool ObjectLifetimes::PreCallValidateGetRandROutputDisplayEXT( |
| 4002 | VkPhysicalDevice physicalDevice, |
| 4003 | Display* dpy, |
| 4004 | RROutput rrOutput, |
| 4005 | VkDisplayKHR* pDisplay) { |
| 4006 | bool skip = false; |
| 4007 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetRandROutputDisplayEXT-physicalDevice-parameter", kVUIDUndefined); |
| 4008 | |
| 4009 | return skip; |
| 4010 | } |
| 4011 | |
| 4012 | void ObjectLifetimes::PostCallRecordGetRandROutputDisplayEXT( |
| 4013 | VkPhysicalDevice physicalDevice, |
| 4014 | Display* dpy, |
| 4015 | RROutput rrOutput, |
| 4016 | VkDisplayKHR* pDisplay, |
| 4017 | VkResult result) { |
| 4018 | if (result != VK_SUCCESS) return; |
| 4019 | CreateObject(physicalDevice, *pDisplay, kVulkanObjectTypeDisplayKHR, nullptr); |
| 4020 | |
| 4021 | } |
| 4022 | #endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT |
| 4023 | |
| 4024 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceSurfaceCapabilities2EXT( |
| 4025 | VkPhysicalDevice physicalDevice, |
| 4026 | VkSurfaceKHR surface, |
| 4027 | VkSurfaceCapabilities2EXT* pSurfaceCapabilities) { |
| 4028 | bool skip = false; |
| 4029 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceSurfaceCapabilities2EXT-physicalDevice-parameter", "VUID-vkGetPhysicalDeviceSurfaceCapabilities2EXT-commonparent"); |
| 4030 | skip |= ValidateObject(physicalDevice, surface, kVulkanObjectTypeSurfaceKHR, false, "VUID-vkGetPhysicalDeviceSurfaceCapabilities2EXT-surface-parameter", "VUID-vkGetPhysicalDeviceSurfaceCapabilities2EXT-commonparent"); |
| 4031 | |
| 4032 | return skip; |
| 4033 | } |
| 4034 | |
| 4035 | bool ObjectLifetimes::PreCallValidateDisplayPowerControlEXT( |
| 4036 | VkDevice device, |
| 4037 | VkDisplayKHR display, |
| 4038 | const VkDisplayPowerInfoEXT* pDisplayPowerInfo) { |
| 4039 | bool skip = false; |
| 4040 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkDisplayPowerControlEXT-device-parameter", kVUIDUndefined); |
| 4041 | skip |= ValidateObject(device, display, kVulkanObjectTypeDisplayKHR, false, "VUID-vkDisplayPowerControlEXT-display-parameter", kVUIDUndefined); |
| 4042 | |
| 4043 | return skip; |
| 4044 | } |
| 4045 | |
| 4046 | bool ObjectLifetimes::PreCallValidateRegisterDeviceEventEXT( |
| 4047 | VkDevice device, |
| 4048 | const VkDeviceEventInfoEXT* pDeviceEventInfo, |
| 4049 | const VkAllocationCallbacks* pAllocator, |
| 4050 | VkFence* pFence) { |
| 4051 | bool skip = false; |
| 4052 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkRegisterDeviceEventEXT-device-parameter", kVUIDUndefined); |
| 4053 | |
| 4054 | return skip; |
| 4055 | } |
| 4056 | |
| 4057 | void ObjectLifetimes::PostCallRecordRegisterDeviceEventEXT( |
| 4058 | VkDevice device, |
| 4059 | const VkDeviceEventInfoEXT* pDeviceEventInfo, |
| 4060 | const VkAllocationCallbacks* pAllocator, |
| 4061 | VkFence* pFence, |
| 4062 | VkResult result) { |
| 4063 | if (result != VK_SUCCESS) return; |
| 4064 | CreateObject(device, *pFence, kVulkanObjectTypeFence, pAllocator); |
| 4065 | |
| 4066 | } |
| 4067 | |
| 4068 | bool ObjectLifetimes::PreCallValidateRegisterDisplayEventEXT( |
| 4069 | VkDevice device, |
| 4070 | VkDisplayKHR display, |
| 4071 | const VkDisplayEventInfoEXT* pDisplayEventInfo, |
| 4072 | const VkAllocationCallbacks* pAllocator, |
| 4073 | VkFence* pFence) { |
| 4074 | bool skip = false; |
| 4075 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkRegisterDisplayEventEXT-device-parameter", kVUIDUndefined); |
| 4076 | skip |= ValidateObject(device, display, kVulkanObjectTypeDisplayKHR, false, "VUID-vkRegisterDisplayEventEXT-display-parameter", kVUIDUndefined); |
| 4077 | |
| 4078 | return skip; |
| 4079 | } |
| 4080 | |
| 4081 | void ObjectLifetimes::PostCallRecordRegisterDisplayEventEXT( |
| 4082 | VkDevice device, |
| 4083 | VkDisplayKHR display, |
| 4084 | const VkDisplayEventInfoEXT* pDisplayEventInfo, |
| 4085 | const VkAllocationCallbacks* pAllocator, |
| 4086 | VkFence* pFence, |
| 4087 | VkResult result) { |
| 4088 | if (result != VK_SUCCESS) return; |
| 4089 | CreateObject(device, *pFence, kVulkanObjectTypeFence, pAllocator); |
| 4090 | |
| 4091 | } |
| 4092 | |
| 4093 | bool ObjectLifetimes::PreCallValidateGetSwapchainCounterEXT( |
| 4094 | VkDevice device, |
| 4095 | VkSwapchainKHR swapchain, |
| 4096 | VkSurfaceCounterFlagBitsEXT counter, |
| 4097 | uint64_t* pCounterValue) { |
| 4098 | bool skip = false; |
| 4099 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetSwapchainCounterEXT-device-parameter", "VUID-vkGetSwapchainCounterEXT-commonparent"); |
| 4100 | skip |= ValidateObject(device, swapchain, kVulkanObjectTypeSwapchainKHR, false, "VUID-vkGetSwapchainCounterEXT-swapchain-parameter", "VUID-vkGetSwapchainCounterEXT-commonparent"); |
| 4101 | |
| 4102 | return skip; |
| 4103 | } |
| 4104 | |
| 4105 | bool ObjectLifetimes::PreCallValidateGetRefreshCycleDurationGOOGLE( |
| 4106 | VkDevice device, |
| 4107 | VkSwapchainKHR swapchain, |
| 4108 | VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) { |
| 4109 | bool skip = false; |
| 4110 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetRefreshCycleDurationGOOGLE-device-parameter", "VUID-vkGetRefreshCycleDurationGOOGLE-commonparent"); |
| 4111 | skip |= ValidateObject(device, swapchain, kVulkanObjectTypeSwapchainKHR, false, "VUID-vkGetRefreshCycleDurationGOOGLE-swapchain-parameter", "VUID-vkGetRefreshCycleDurationGOOGLE-commonparent"); |
| 4112 | |
| 4113 | return skip; |
| 4114 | } |
| 4115 | |
| 4116 | bool ObjectLifetimes::PreCallValidateGetPastPresentationTimingGOOGLE( |
| 4117 | VkDevice device, |
| 4118 | VkSwapchainKHR swapchain, |
| 4119 | uint32_t* pPresentationTimingCount, |
| 4120 | VkPastPresentationTimingGOOGLE* pPresentationTimings) { |
| 4121 | bool skip = false; |
| 4122 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetPastPresentationTimingGOOGLE-device-parameter", "VUID-vkGetPastPresentationTimingGOOGLE-commonparent"); |
| 4123 | skip |= ValidateObject(device, swapchain, kVulkanObjectTypeSwapchainKHR, false, "VUID-vkGetPastPresentationTimingGOOGLE-swapchain-parameter", "VUID-vkGetPastPresentationTimingGOOGLE-commonparent"); |
| 4124 | |
| 4125 | return skip; |
| 4126 | } |
| 4127 | |
| 4128 | bool ObjectLifetimes::PreCallValidateCmdSetDiscardRectangleEXT( |
| 4129 | VkCommandBuffer commandBuffer, |
| 4130 | uint32_t firstDiscardRectangle, |
| 4131 | uint32_t discardRectangleCount, |
| 4132 | const VkRect2D* pDiscardRectangles) { |
| 4133 | bool skip = false; |
| 4134 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdSetDiscardRectangleEXT-commandBuffer-parameter", kVUIDUndefined); |
| 4135 | |
| 4136 | return skip; |
| 4137 | } |
| 4138 | |
| 4139 | bool ObjectLifetimes::PreCallValidateSetHdrMetadataEXT( |
| 4140 | VkDevice device, |
| 4141 | uint32_t swapchainCount, |
| 4142 | const VkSwapchainKHR* pSwapchains, |
| 4143 | const VkHdrMetadataEXT* pMetadata) { |
| 4144 | bool skip = false; |
| 4145 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkSetHdrMetadataEXT-device-parameter", "VUID-vkSetHdrMetadataEXT-commonparent"); |
| 4146 | if (pSwapchains) { |
| 4147 | for (uint32_t index0 = 0; index0 < swapchainCount; ++index0) { |
| 4148 | skip |= ValidateObject(device, pSwapchains[index0], kVulkanObjectTypeSwapchainKHR, false, "VUID-vkSetHdrMetadataEXT-pSwapchains-parameter", "VUID-vkSetHdrMetadataEXT-commonparent"); |
| 4149 | } |
| 4150 | } |
| 4151 | |
| 4152 | return skip; |
| 4153 | } |
| 4154 | |
| 4155 | #ifdef VK_USE_PLATFORM_IOS_MVK |
| 4156 | |
| 4157 | bool ObjectLifetimes::PreCallValidateCreateIOSSurfaceMVK( |
| 4158 | VkInstance instance, |
| 4159 | const VkIOSSurfaceCreateInfoMVK* pCreateInfo, |
| 4160 | const VkAllocationCallbacks* pAllocator, |
| 4161 | VkSurfaceKHR* pSurface) { |
| 4162 | bool skip = false; |
| 4163 | skip |= ValidateObject(instance, instance, kVulkanObjectTypeInstance, false, "VUID-vkCreateIOSSurfaceMVK-instance-parameter", kVUIDUndefined); |
| 4164 | |
| 4165 | return skip; |
| 4166 | } |
| 4167 | |
| 4168 | void ObjectLifetimes::PostCallRecordCreateIOSSurfaceMVK( |
| 4169 | VkInstance instance, |
| 4170 | const VkIOSSurfaceCreateInfoMVK* pCreateInfo, |
| 4171 | const VkAllocationCallbacks* pAllocator, |
| 4172 | VkSurfaceKHR* pSurface, |
| 4173 | VkResult result) { |
| 4174 | if (result != VK_SUCCESS) return; |
| 4175 | CreateObject(instance, *pSurface, kVulkanObjectTypeSurfaceKHR, pAllocator); |
| 4176 | |
| 4177 | } |
| 4178 | #endif // VK_USE_PLATFORM_IOS_MVK |
| 4179 | |
| 4180 | #ifdef VK_USE_PLATFORM_MACOS_MVK |
| 4181 | |
| 4182 | bool ObjectLifetimes::PreCallValidateCreateMacOSSurfaceMVK( |
| 4183 | VkInstance instance, |
| 4184 | const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, |
| 4185 | const VkAllocationCallbacks* pAllocator, |
| 4186 | VkSurfaceKHR* pSurface) { |
| 4187 | bool skip = false; |
| 4188 | skip |= ValidateObject(instance, instance, kVulkanObjectTypeInstance, false, "VUID-vkCreateMacOSSurfaceMVK-instance-parameter", kVUIDUndefined); |
| 4189 | |
| 4190 | return skip; |
| 4191 | } |
| 4192 | |
| 4193 | void ObjectLifetimes::PostCallRecordCreateMacOSSurfaceMVK( |
| 4194 | VkInstance instance, |
| 4195 | const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, |
| 4196 | const VkAllocationCallbacks* pAllocator, |
| 4197 | VkSurfaceKHR* pSurface, |
| 4198 | VkResult result) { |
| 4199 | if (result != VK_SUCCESS) return; |
| 4200 | CreateObject(instance, *pSurface, kVulkanObjectTypeSurfaceKHR, pAllocator); |
| 4201 | |
| 4202 | } |
| 4203 | #endif // VK_USE_PLATFORM_MACOS_MVK |
| 4204 | |
| 4205 | bool ObjectLifetimes::PreCallValidateSetDebugUtilsObjectNameEXT( |
| 4206 | VkDevice device, |
| 4207 | const VkDebugUtilsObjectNameInfoEXT* pNameInfo) { |
| 4208 | bool skip = false; |
| 4209 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkSetDebugUtilsObjectNameEXT-device-parameter", kVUIDUndefined); |
| 4210 | |
| 4211 | return skip; |
| 4212 | } |
| 4213 | |
| 4214 | bool ObjectLifetimes::PreCallValidateSetDebugUtilsObjectTagEXT( |
| 4215 | VkDevice device, |
| 4216 | const VkDebugUtilsObjectTagInfoEXT* pTagInfo) { |
| 4217 | bool skip = false; |
| 4218 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkSetDebugUtilsObjectTagEXT-device-parameter", kVUIDUndefined); |
| 4219 | |
| 4220 | return skip; |
| 4221 | } |
| 4222 | |
| 4223 | bool ObjectLifetimes::PreCallValidateQueueBeginDebugUtilsLabelEXT( |
| 4224 | VkQueue queue, |
| 4225 | const VkDebugUtilsLabelEXT* pLabelInfo) { |
| 4226 | bool skip = false; |
| 4227 | skip |= ValidateObject(queue, queue, kVulkanObjectTypeQueue, false, "VUID-vkQueueBeginDebugUtilsLabelEXT-queue-parameter", kVUIDUndefined); |
| 4228 | |
| 4229 | return skip; |
| 4230 | } |
| 4231 | |
| 4232 | bool ObjectLifetimes::PreCallValidateQueueEndDebugUtilsLabelEXT( |
| 4233 | VkQueue queue) { |
| 4234 | bool skip = false; |
| 4235 | skip |= ValidateObject(queue, queue, kVulkanObjectTypeQueue, false, "VUID-vkQueueEndDebugUtilsLabelEXT-queue-parameter", kVUIDUndefined); |
| 4236 | |
| 4237 | return skip; |
| 4238 | } |
| 4239 | |
| 4240 | bool ObjectLifetimes::PreCallValidateQueueInsertDebugUtilsLabelEXT( |
| 4241 | VkQueue queue, |
| 4242 | const VkDebugUtilsLabelEXT* pLabelInfo) { |
| 4243 | bool skip = false; |
| 4244 | skip |= ValidateObject(queue, queue, kVulkanObjectTypeQueue, false, "VUID-vkQueueInsertDebugUtilsLabelEXT-queue-parameter", kVUIDUndefined); |
| 4245 | |
| 4246 | return skip; |
| 4247 | } |
| 4248 | |
| 4249 | bool ObjectLifetimes::PreCallValidateCmdBeginDebugUtilsLabelEXT( |
| 4250 | VkCommandBuffer commandBuffer, |
| 4251 | const VkDebugUtilsLabelEXT* pLabelInfo) { |
| 4252 | bool skip = false; |
| 4253 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdBeginDebugUtilsLabelEXT-commandBuffer-parameter", kVUIDUndefined); |
| 4254 | |
| 4255 | return skip; |
| 4256 | } |
| 4257 | |
| 4258 | bool ObjectLifetimes::PreCallValidateCmdEndDebugUtilsLabelEXT( |
| 4259 | VkCommandBuffer commandBuffer) { |
| 4260 | bool skip = false; |
| 4261 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdEndDebugUtilsLabelEXT-commandBuffer-parameter", kVUIDUndefined); |
| 4262 | |
| 4263 | return skip; |
| 4264 | } |
| 4265 | |
| 4266 | bool ObjectLifetimes::PreCallValidateCmdInsertDebugUtilsLabelEXT( |
| 4267 | VkCommandBuffer commandBuffer, |
| 4268 | const VkDebugUtilsLabelEXT* pLabelInfo) { |
| 4269 | bool skip = false; |
| 4270 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdInsertDebugUtilsLabelEXT-commandBuffer-parameter", kVUIDUndefined); |
| 4271 | |
| 4272 | return skip; |
| 4273 | } |
| 4274 | |
| 4275 | bool ObjectLifetimes::PreCallValidateCreateDebugUtilsMessengerEXT( |
| 4276 | VkInstance instance, |
| 4277 | const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, |
| 4278 | const VkAllocationCallbacks* pAllocator, |
| 4279 | VkDebugUtilsMessengerEXT* pMessenger) { |
| 4280 | bool skip = false; |
| 4281 | skip |= ValidateObject(instance, instance, kVulkanObjectTypeInstance, false, "VUID-vkCreateDebugUtilsMessengerEXT-instance-parameter", kVUIDUndefined); |
| 4282 | |
| 4283 | return skip; |
| 4284 | } |
| 4285 | |
| 4286 | void ObjectLifetimes::PostCallRecordCreateDebugUtilsMessengerEXT( |
| 4287 | VkInstance instance, |
| 4288 | const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, |
| 4289 | const VkAllocationCallbacks* pAllocator, |
| 4290 | VkDebugUtilsMessengerEXT* pMessenger, |
| 4291 | VkResult result) { |
| 4292 | if (result != VK_SUCCESS) return; |
| 4293 | CreateObject(instance, *pMessenger, kVulkanObjectTypeDebugUtilsMessengerEXT, pAllocator); |
| 4294 | |
| 4295 | } |
| 4296 | |
| 4297 | bool ObjectLifetimes::PreCallValidateDestroyDebugUtilsMessengerEXT( |
| 4298 | VkInstance instance, |
| 4299 | VkDebugUtilsMessengerEXT messenger, |
| 4300 | const VkAllocationCallbacks* pAllocator) { |
| 4301 | bool skip = false; |
| 4302 | skip |= ValidateObject(instance, instance, kVulkanObjectTypeInstance, false, "VUID-vkDestroyDebugUtilsMessengerEXT-instance-parameter", kVUIDUndefined); |
| 4303 | skip |= ValidateObject(instance, messenger, kVulkanObjectTypeDebugUtilsMessengerEXT, false, "VUID-vkDestroyDebugUtilsMessengerEXT-messenger-parameter", "VUID-vkDestroyDebugUtilsMessengerEXT-messenger-parent"); |
| 4304 | skip |= ValidateDestroyObject(instance, messenger, kVulkanObjectTypeDebugUtilsMessengerEXT, pAllocator, kVUIDUndefined, kVUIDUndefined); |
| 4305 | |
| 4306 | return skip; |
| 4307 | } |
| 4308 | |
| 4309 | void ObjectLifetimes::PreCallRecordDestroyDebugUtilsMessengerEXT( |
| 4310 | VkInstance instance, |
| 4311 | VkDebugUtilsMessengerEXT messenger, |
| 4312 | const VkAllocationCallbacks* pAllocator) { |
| 4313 | RecordDestroyObject(instance, messenger, kVulkanObjectTypeDebugUtilsMessengerEXT); |
| 4314 | |
| 4315 | } |
| 4316 | |
| 4317 | bool ObjectLifetimes::PreCallValidateSubmitDebugUtilsMessageEXT( |
| 4318 | VkInstance instance, |
| 4319 | VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, |
| 4320 | VkDebugUtilsMessageTypeFlagsEXT messageTypes, |
| 4321 | const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData) { |
| 4322 | bool skip = false; |
| 4323 | skip |= ValidateObject(instance, instance, kVulkanObjectTypeInstance, false, "VUID-vkSubmitDebugUtilsMessageEXT-instance-parameter", kVUIDUndefined); |
| 4324 | |
| 4325 | return skip; |
| 4326 | } |
| 4327 | |
| 4328 | #ifdef VK_USE_PLATFORM_ANDROID_KHR |
| 4329 | |
| 4330 | bool ObjectLifetimes::PreCallValidateGetAndroidHardwareBufferPropertiesANDROID( |
| 4331 | VkDevice device, |
| 4332 | const struct AHardwareBuffer* buffer, |
| 4333 | VkAndroidHardwareBufferPropertiesANDROID* pProperties) { |
| 4334 | bool skip = false; |
| 4335 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetAndroidHardwareBufferPropertiesANDROID-device-parameter", kVUIDUndefined); |
| 4336 | |
| 4337 | return skip; |
| 4338 | } |
| 4339 | #endif // VK_USE_PLATFORM_ANDROID_KHR |
| 4340 | |
| 4341 | #ifdef VK_USE_PLATFORM_ANDROID_KHR |
| 4342 | |
| 4343 | bool ObjectLifetimes::PreCallValidateGetMemoryAndroidHardwareBufferANDROID( |
| 4344 | VkDevice device, |
| 4345 | const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, |
| 4346 | struct AHardwareBuffer** pBuffer) { |
| 4347 | bool skip = false; |
| 4348 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetMemoryAndroidHardwareBufferANDROID-device-parameter", kVUIDUndefined); |
| 4349 | if (pInfo) { |
| 4350 | skip |= ValidateObject(device, pInfo->memory, kVulkanObjectTypeDeviceMemory, false, "VUID-VkMemoryGetAndroidHardwareBufferInfoANDROID-memory-parameter", kVUIDUndefined); |
| 4351 | } |
| 4352 | |
| 4353 | return skip; |
| 4354 | } |
| 4355 | #endif // VK_USE_PLATFORM_ANDROID_KHR |
| 4356 | |
| 4357 | bool ObjectLifetimes::PreCallValidateCmdSetSampleLocationsEXT( |
| 4358 | VkCommandBuffer commandBuffer, |
| 4359 | const VkSampleLocationsInfoEXT* pSampleLocationsInfo) { |
| 4360 | bool skip = false; |
| 4361 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdSetSampleLocationsEXT-commandBuffer-parameter", kVUIDUndefined); |
| 4362 | |
| 4363 | return skip; |
| 4364 | } |
| 4365 | |
| 4366 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceMultisamplePropertiesEXT( |
| 4367 | VkPhysicalDevice physicalDevice, |
| 4368 | VkSampleCountFlagBits samples, |
| 4369 | VkMultisamplePropertiesEXT* pMultisampleProperties) { |
| 4370 | bool skip = false; |
| 4371 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceMultisamplePropertiesEXT-physicalDevice-parameter", kVUIDUndefined); |
| 4372 | |
| 4373 | return skip; |
| 4374 | } |
| 4375 | |
| 4376 | bool ObjectLifetimes::PreCallValidateGetImageDrmFormatModifierPropertiesEXT( |
| 4377 | VkDevice device, |
| 4378 | VkImage image, |
| 4379 | VkImageDrmFormatModifierPropertiesEXT* pProperties) { |
| 4380 | bool skip = false; |
| 4381 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetImageDrmFormatModifierPropertiesEXT-device-parameter", kVUIDUndefined); |
| 4382 | skip |= ValidateObject(device, image, kVulkanObjectTypeImage, false, "VUID-vkGetImageDrmFormatModifierPropertiesEXT-image-parameter", "VUID-vkGetImageDrmFormatModifierPropertiesEXT-image-parent"); |
| 4383 | |
| 4384 | return skip; |
| 4385 | } |
| 4386 | |
| 4387 | bool ObjectLifetimes::PreCallValidateCreateValidationCacheEXT( |
| 4388 | VkDevice device, |
| 4389 | const VkValidationCacheCreateInfoEXT* pCreateInfo, |
| 4390 | const VkAllocationCallbacks* pAllocator, |
| 4391 | VkValidationCacheEXT* pValidationCache) { |
| 4392 | bool skip = false; |
| 4393 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkCreateValidationCacheEXT-device-parameter", kVUIDUndefined); |
| 4394 | |
| 4395 | return skip; |
| 4396 | } |
| 4397 | |
| 4398 | void ObjectLifetimes::PostCallRecordCreateValidationCacheEXT( |
| 4399 | VkDevice device, |
| 4400 | const VkValidationCacheCreateInfoEXT* pCreateInfo, |
| 4401 | const VkAllocationCallbacks* pAllocator, |
| 4402 | VkValidationCacheEXT* pValidationCache, |
| 4403 | VkResult result) { |
| 4404 | if (result != VK_SUCCESS) return; |
| 4405 | CreateObject(device, *pValidationCache, kVulkanObjectTypeValidationCacheEXT, pAllocator); |
| 4406 | |
| 4407 | } |
| 4408 | |
| 4409 | bool ObjectLifetimes::PreCallValidateDestroyValidationCacheEXT( |
| 4410 | VkDevice device, |
| 4411 | VkValidationCacheEXT validationCache, |
| 4412 | const VkAllocationCallbacks* pAllocator) { |
| 4413 | bool skip = false; |
| 4414 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkDestroyValidationCacheEXT-device-parameter", kVUIDUndefined); |
| 4415 | skip |= ValidateObject(device, validationCache, kVulkanObjectTypeValidationCacheEXT, true, "VUID-vkDestroyValidationCacheEXT-validationCache-parameter", "VUID-vkDestroyValidationCacheEXT-validationCache-parent"); |
| 4416 | skip |= ValidateDestroyObject(device, validationCache, kVulkanObjectTypeValidationCacheEXT, pAllocator, kVUIDUndefined, kVUIDUndefined); |
| 4417 | |
| 4418 | return skip; |
| 4419 | } |
| 4420 | |
| 4421 | void ObjectLifetimes::PreCallRecordDestroyValidationCacheEXT( |
| 4422 | VkDevice device, |
| 4423 | VkValidationCacheEXT validationCache, |
| 4424 | const VkAllocationCallbacks* pAllocator) { |
| 4425 | RecordDestroyObject(device, validationCache, kVulkanObjectTypeValidationCacheEXT); |
| 4426 | |
| 4427 | } |
| 4428 | |
| 4429 | bool ObjectLifetimes::PreCallValidateMergeValidationCachesEXT( |
| 4430 | VkDevice device, |
| 4431 | VkValidationCacheEXT dstCache, |
| 4432 | uint32_t srcCacheCount, |
| 4433 | const VkValidationCacheEXT* pSrcCaches) { |
| 4434 | bool skip = false; |
| 4435 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkMergeValidationCachesEXT-device-parameter", kVUIDUndefined); |
| 4436 | skip |= ValidateObject(device, dstCache, kVulkanObjectTypeValidationCacheEXT, false, "VUID-vkMergeValidationCachesEXT-dstCache-parameter", "VUID-vkMergeValidationCachesEXT-dstCache-parent"); |
| 4437 | if (pSrcCaches) { |
| 4438 | for (uint32_t index0 = 0; index0 < srcCacheCount; ++index0) { |
| 4439 | skip |= ValidateObject(device, pSrcCaches[index0], kVulkanObjectTypeValidationCacheEXT, false, "VUID-vkMergeValidationCachesEXT-pSrcCaches-parameter", "VUID-vkMergeValidationCachesEXT-pSrcCaches-parent"); |
| 4440 | } |
| 4441 | } |
| 4442 | |
| 4443 | return skip; |
| 4444 | } |
| 4445 | |
| 4446 | bool ObjectLifetimes::PreCallValidateGetValidationCacheDataEXT( |
| 4447 | VkDevice device, |
| 4448 | VkValidationCacheEXT validationCache, |
| 4449 | size_t* pDataSize, |
| 4450 | void* pData) { |
| 4451 | bool skip = false; |
| 4452 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetValidationCacheDataEXT-device-parameter", kVUIDUndefined); |
| 4453 | skip |= ValidateObject(device, validationCache, kVulkanObjectTypeValidationCacheEXT, false, "VUID-vkGetValidationCacheDataEXT-validationCache-parameter", "VUID-vkGetValidationCacheDataEXT-validationCache-parent"); |
| 4454 | |
| 4455 | return skip; |
| 4456 | } |
| 4457 | |
| 4458 | bool ObjectLifetimes::PreCallValidateCmdBindShadingRateImageNV( |
| 4459 | VkCommandBuffer commandBuffer, |
| 4460 | VkImageView imageView, |
| 4461 | VkImageLayout imageLayout) { |
| 4462 | bool skip = false; |
| 4463 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdBindShadingRateImageNV-commandBuffer-parameter", "VUID-vkCmdBindShadingRateImageNV-commonparent"); |
| 4464 | skip |= ValidateObject(commandBuffer, imageView, kVulkanObjectTypeImageView, true, "VUID-vkCmdBindShadingRateImageNV-imageView-parameter", "VUID-vkCmdBindShadingRateImageNV-commonparent"); |
| 4465 | |
| 4466 | return skip; |
| 4467 | } |
| 4468 | |
| 4469 | bool ObjectLifetimes::PreCallValidateCmdSetViewportShadingRatePaletteNV( |
| 4470 | VkCommandBuffer commandBuffer, |
| 4471 | uint32_t firstViewport, |
| 4472 | uint32_t viewportCount, |
| 4473 | const VkShadingRatePaletteNV* pShadingRatePalettes) { |
| 4474 | bool skip = false; |
| 4475 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdSetViewportShadingRatePaletteNV-commandBuffer-parameter", kVUIDUndefined); |
| 4476 | |
| 4477 | return skip; |
| 4478 | } |
| 4479 | |
| 4480 | bool ObjectLifetimes::PreCallValidateCmdSetCoarseSampleOrderNV( |
| 4481 | VkCommandBuffer commandBuffer, |
| 4482 | VkCoarseSampleOrderTypeNV sampleOrderType, |
| 4483 | uint32_t customSampleOrderCount, |
| 4484 | const VkCoarseSampleOrderCustomNV* pCustomSampleOrders) { |
| 4485 | bool skip = false; |
| 4486 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdSetCoarseSampleOrderNV-commandBuffer-parameter", kVUIDUndefined); |
| 4487 | |
| 4488 | return skip; |
| 4489 | } |
| 4490 | |
| 4491 | bool ObjectLifetimes::PreCallValidateCreateAccelerationStructureNV( |
| 4492 | VkDevice device, |
| 4493 | const VkAccelerationStructureCreateInfoNV* pCreateInfo, |
| 4494 | const VkAllocationCallbacks* pAllocator, |
| 4495 | VkAccelerationStructureNV* pAccelerationStructure) { |
| 4496 | bool skip = false; |
| 4497 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkCreateAccelerationStructureNV-device-parameter", kVUIDUndefined); |
| 4498 | if (pCreateInfo) { |
| 4499 | } |
| 4500 | |
| 4501 | return skip; |
| 4502 | } |
| 4503 | |
| 4504 | void ObjectLifetimes::PostCallRecordCreateAccelerationStructureNV( |
| 4505 | VkDevice device, |
| 4506 | const VkAccelerationStructureCreateInfoNV* pCreateInfo, |
| 4507 | const VkAllocationCallbacks* pAllocator, |
| 4508 | VkAccelerationStructureNV* pAccelerationStructure, |
| 4509 | VkResult result) { |
| 4510 | if (result != VK_SUCCESS) return; |
| 4511 | CreateObject(device, *pAccelerationStructure, kVulkanObjectTypeAccelerationStructureNV, pAllocator); |
| 4512 | |
| 4513 | } |
| 4514 | |
| 4515 | bool ObjectLifetimes::PreCallValidateDestroyAccelerationStructureNV( |
| 4516 | VkDevice device, |
| 4517 | VkAccelerationStructureNV accelerationStructure, |
| 4518 | const VkAllocationCallbacks* pAllocator) { |
| 4519 | bool skip = false; |
| 4520 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkDestroyAccelerationStructureNV-device-parameter", kVUIDUndefined); |
| 4521 | skip |= ValidateObject(device, accelerationStructure, kVulkanObjectTypeAccelerationStructureNV, false, "VUID-vkDestroyAccelerationStructureNV-accelerationStructure-parameter", "VUID-vkDestroyAccelerationStructureNV-accelerationStructure-parent"); |
| 4522 | skip |= ValidateDestroyObject(device, accelerationStructure, kVulkanObjectTypeAccelerationStructureNV, pAllocator, kVUIDUndefined, kVUIDUndefined); |
| 4523 | |
| 4524 | return skip; |
| 4525 | } |
| 4526 | |
| 4527 | void ObjectLifetimes::PreCallRecordDestroyAccelerationStructureNV( |
| 4528 | VkDevice device, |
| 4529 | VkAccelerationStructureNV accelerationStructure, |
| 4530 | const VkAllocationCallbacks* pAllocator) { |
| 4531 | RecordDestroyObject(device, accelerationStructure, kVulkanObjectTypeAccelerationStructureNV); |
| 4532 | |
| 4533 | } |
| 4534 | |
| 4535 | bool ObjectLifetimes::PreCallValidateGetAccelerationStructureMemoryRequirementsNV( |
| 4536 | VkDevice device, |
| 4537 | const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, |
| 4538 | VkMemoryRequirements2KHR* pMemoryRequirements) { |
| 4539 | bool skip = false; |
| 4540 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetAccelerationStructureMemoryRequirementsNV-device-parameter", kVUIDUndefined); |
| 4541 | if (pInfo) { |
| 4542 | skip |= ValidateObject(device, pInfo->accelerationStructure, kVulkanObjectTypeAccelerationStructureNV, false, "VUID-VkAccelerationStructureMemoryRequirementsInfoNV-accelerationStructure-parameter", kVUIDUndefined); |
| 4543 | } |
| 4544 | |
| 4545 | return skip; |
| 4546 | } |
| 4547 | |
| 4548 | bool ObjectLifetimes::PreCallValidateBindAccelerationStructureMemoryNV( |
| 4549 | VkDevice device, |
| 4550 | uint32_t bindInfoCount, |
| 4551 | const VkBindAccelerationStructureMemoryInfoNV* pBindInfos) { |
| 4552 | bool skip = false; |
| 4553 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkBindAccelerationStructureMemoryNV-device-parameter", kVUIDUndefined); |
| 4554 | if (pBindInfos) { |
| 4555 | for (uint32_t index0 = 0; index0 < bindInfoCount; ++index0) { |
| 4556 | skip |= ValidateObject(device, pBindInfos[index0].accelerationStructure, kVulkanObjectTypeAccelerationStructureNV, false, "VUID-VkBindAccelerationStructureMemoryInfoNV-accelerationStructure-parameter", "VUID-VkBindAccelerationStructureMemoryInfoNV-commonparent"); |
| 4557 | skip |= ValidateObject(device, pBindInfos[index0].memory, kVulkanObjectTypeDeviceMemory, false, "VUID-VkBindAccelerationStructureMemoryInfoNV-memory-parameter", "VUID-VkBindAccelerationStructureMemoryInfoNV-commonparent"); |
| 4558 | } |
| 4559 | } |
| 4560 | |
| 4561 | return skip; |
| 4562 | } |
| 4563 | |
| 4564 | bool ObjectLifetimes::PreCallValidateCmdBuildAccelerationStructureNV( |
| 4565 | VkCommandBuffer commandBuffer, |
| 4566 | const VkAccelerationStructureInfoNV* pInfo, |
| 4567 | VkBuffer instanceData, |
| 4568 | VkDeviceSize instanceOffset, |
| 4569 | VkBool32 update, |
| 4570 | VkAccelerationStructureNV dst, |
| 4571 | VkAccelerationStructureNV src, |
| 4572 | VkBuffer scratch, |
| 4573 | VkDeviceSize scratchOffset) { |
| 4574 | bool skip = false; |
| 4575 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdBuildAccelerationStructureNV-commandBuffer-parameter", "VUID-vkCmdBuildAccelerationStructureNV-commonparent"); |
| 4576 | if (pInfo) { |
| 4577 | if (pInfo->pGeometries) { |
| 4578 | for (uint32_t index1 = 0; index1 < pInfo->geometryCount; ++index1) { |
| 4579 | } |
| 4580 | } |
| 4581 | } |
| 4582 | skip |= ValidateObject(commandBuffer, instanceData, kVulkanObjectTypeBuffer, true, "VUID-vkCmdBuildAccelerationStructureNV-instanceData-parameter", "VUID-vkCmdBuildAccelerationStructureNV-commonparent"); |
| 4583 | skip |= ValidateObject(commandBuffer, dst, kVulkanObjectTypeAccelerationStructureNV, false, "VUID-vkCmdBuildAccelerationStructureNV-dst-parameter", "VUID-vkCmdBuildAccelerationStructureNV-commonparent"); |
| 4584 | skip |= ValidateObject(commandBuffer, src, kVulkanObjectTypeAccelerationStructureNV, true, "VUID-vkCmdBuildAccelerationStructureNV-src-parameter", "VUID-vkCmdBuildAccelerationStructureNV-commonparent"); |
| 4585 | skip |= ValidateObject(commandBuffer, scratch, kVulkanObjectTypeBuffer, false, "VUID-vkCmdBuildAccelerationStructureNV-scratch-parameter", "VUID-vkCmdBuildAccelerationStructureNV-commonparent"); |
| 4586 | |
| 4587 | return skip; |
| 4588 | } |
| 4589 | |
| 4590 | bool ObjectLifetimes::PreCallValidateCmdCopyAccelerationStructureNV( |
| 4591 | VkCommandBuffer commandBuffer, |
| 4592 | VkAccelerationStructureNV dst, |
| 4593 | VkAccelerationStructureNV src, |
| 4594 | VkCopyAccelerationStructureModeNV mode) { |
| 4595 | bool skip = false; |
| 4596 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdCopyAccelerationStructureNV-commandBuffer-parameter", "VUID-vkCmdCopyAccelerationStructureNV-commonparent"); |
| 4597 | skip |= ValidateObject(commandBuffer, dst, kVulkanObjectTypeAccelerationStructureNV, false, "VUID-vkCmdCopyAccelerationStructureNV-dst-parameter", "VUID-vkCmdCopyAccelerationStructureNV-commonparent"); |
| 4598 | skip |= ValidateObject(commandBuffer, src, kVulkanObjectTypeAccelerationStructureNV, false, "VUID-vkCmdCopyAccelerationStructureNV-src-parameter", "VUID-vkCmdCopyAccelerationStructureNV-commonparent"); |
| 4599 | |
| 4600 | return skip; |
| 4601 | } |
| 4602 | |
| 4603 | bool ObjectLifetimes::PreCallValidateCmdTraceRaysNV( |
| 4604 | VkCommandBuffer commandBuffer, |
| 4605 | VkBuffer raygenShaderBindingTableBuffer, |
| 4606 | VkDeviceSize raygenShaderBindingOffset, |
| 4607 | VkBuffer missShaderBindingTableBuffer, |
| 4608 | VkDeviceSize missShaderBindingOffset, |
| 4609 | VkDeviceSize missShaderBindingStride, |
| 4610 | VkBuffer hitShaderBindingTableBuffer, |
| 4611 | VkDeviceSize hitShaderBindingOffset, |
| 4612 | VkDeviceSize hitShaderBindingStride, |
| 4613 | VkBuffer callableShaderBindingTableBuffer, |
| 4614 | VkDeviceSize callableShaderBindingOffset, |
| 4615 | VkDeviceSize callableShaderBindingStride, |
| 4616 | uint32_t width, |
| 4617 | uint32_t height, |
| 4618 | uint32_t depth) { |
| 4619 | bool skip = false; |
| 4620 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdTraceRaysNV-commandBuffer-parameter", "VUID-vkCmdTraceRaysNV-commonparent"); |
| 4621 | skip |= ValidateObject(commandBuffer, raygenShaderBindingTableBuffer, kVulkanObjectTypeBuffer, false, "VUID-vkCmdTraceRaysNV-raygenShaderBindingTableBuffer-parameter", "VUID-vkCmdTraceRaysNV-commonparent"); |
| 4622 | skip |= ValidateObject(commandBuffer, missShaderBindingTableBuffer, kVulkanObjectTypeBuffer, true, "VUID-vkCmdTraceRaysNV-missShaderBindingTableBuffer-parameter", "VUID-vkCmdTraceRaysNV-commonparent"); |
| 4623 | skip |= ValidateObject(commandBuffer, hitShaderBindingTableBuffer, kVulkanObjectTypeBuffer, true, "VUID-vkCmdTraceRaysNV-hitShaderBindingTableBuffer-parameter", "VUID-vkCmdTraceRaysNV-commonparent"); |
| 4624 | skip |= ValidateObject(commandBuffer, callableShaderBindingTableBuffer, kVulkanObjectTypeBuffer, true, "VUID-vkCmdTraceRaysNV-callableShaderBindingTableBuffer-parameter", "VUID-vkCmdTraceRaysNV-commonparent"); |
| 4625 | |
| 4626 | return skip; |
| 4627 | } |
| 4628 | |
| 4629 | bool ObjectLifetimes::PreCallValidateCreateRayTracingPipelinesNV( |
| 4630 | VkDevice device, |
| 4631 | VkPipelineCache pipelineCache, |
| 4632 | uint32_t createInfoCount, |
| 4633 | const VkRayTracingPipelineCreateInfoNV* pCreateInfos, |
| 4634 | const VkAllocationCallbacks* pAllocator, |
| 4635 | VkPipeline* pPipelines) { |
| 4636 | bool skip = false; |
| 4637 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkCreateRayTracingPipelinesNV-device-parameter", kVUIDUndefined); |
| 4638 | skip |= ValidateObject(device, pipelineCache, kVulkanObjectTypePipelineCache, true, "VUID-vkCreateRayTracingPipelinesNV-pipelineCache-parameter", "VUID-vkCreateRayTracingPipelinesNV-pipelineCache-parent"); |
| 4639 | if (pCreateInfos) { |
| 4640 | for (uint32_t index0 = 0; index0 < createInfoCount; ++index0) { |
| 4641 | if (pCreateInfos[index0].pStages) { |
| 4642 | for (uint32_t index1 = 0; index1 < pCreateInfos[index0].stageCount; ++index1) { |
| 4643 | skip |= ValidateObject(device, pCreateInfos[index0].pStages[index1].module, kVulkanObjectTypeShaderModule, false, "VUID-VkPipelineShaderStageCreateInfo-module-parameter", kVUIDUndefined); |
| 4644 | } |
| 4645 | } |
| 4646 | skip |= ValidateObject(device, pCreateInfos[index0].layout, kVulkanObjectTypePipelineLayout, false, "VUID-VkRayTracingPipelineCreateInfoNV-layout-parameter", "VUID-VkRayTracingPipelineCreateInfoNV-commonparent"); |
| 4647 | skip |= ValidateObject(device, pCreateInfos[index0].basePipelineHandle, kVulkanObjectTypePipeline, true, kVUIDUndefined, "VUID-VkRayTracingPipelineCreateInfoNV-commonparent"); |
| 4648 | } |
| 4649 | } |
| 4650 | |
| 4651 | return skip; |
| 4652 | } |
| 4653 | |
| 4654 | void ObjectLifetimes::PostCallRecordCreateRayTracingPipelinesNV( |
| 4655 | VkDevice device, |
| 4656 | VkPipelineCache pipelineCache, |
| 4657 | uint32_t createInfoCount, |
| 4658 | const VkRayTracingPipelineCreateInfoNV* pCreateInfos, |
| 4659 | const VkAllocationCallbacks* pAllocator, |
| 4660 | VkPipeline* pPipelines, |
| 4661 | VkResult result) { |
| 4662 | if (VK_ERROR_VALIDATION_FAILED_EXT == result) return; |
| 4663 | if (pPipelines) { |
| 4664 | for (uint32_t index = 0; index < createInfoCount; index++) { |
| 4665 | if (!pPipelines[index]) continue; |
| 4666 | CreateObject(device, pPipelines[index], kVulkanObjectTypePipeline, pAllocator); |
| 4667 | } |
| 4668 | } |
| 4669 | |
| 4670 | } |
| 4671 | |
| 4672 | bool ObjectLifetimes::PreCallValidateGetRayTracingShaderGroupHandlesNV( |
| 4673 | VkDevice device, |
| 4674 | VkPipeline pipeline, |
| 4675 | uint32_t firstGroup, |
| 4676 | uint32_t groupCount, |
| 4677 | size_t dataSize, |
| 4678 | void* pData) { |
| 4679 | bool skip = false; |
| 4680 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetRayTracingShaderGroupHandlesNV-device-parameter", kVUIDUndefined); |
| 4681 | skip |= ValidateObject(device, pipeline, kVulkanObjectTypePipeline, false, "VUID-vkGetRayTracingShaderGroupHandlesNV-pipeline-parameter", "VUID-vkGetRayTracingShaderGroupHandlesNV-pipeline-parent"); |
| 4682 | |
| 4683 | return skip; |
| 4684 | } |
| 4685 | |
| 4686 | bool ObjectLifetimes::PreCallValidateGetAccelerationStructureHandleNV( |
| 4687 | VkDevice device, |
| 4688 | VkAccelerationStructureNV accelerationStructure, |
| 4689 | size_t dataSize, |
| 4690 | void* pData) { |
| 4691 | bool skip = false; |
| 4692 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetAccelerationStructureHandleNV-device-parameter", kVUIDUndefined); |
| 4693 | skip |= ValidateObject(device, accelerationStructure, kVulkanObjectTypeAccelerationStructureNV, false, "VUID-vkGetAccelerationStructureHandleNV-accelerationStructure-parameter", "VUID-vkGetAccelerationStructureHandleNV-accelerationStructure-parent"); |
| 4694 | |
| 4695 | return skip; |
| 4696 | } |
| 4697 | |
| 4698 | bool ObjectLifetimes::PreCallValidateCmdWriteAccelerationStructuresPropertiesNV( |
| 4699 | VkCommandBuffer commandBuffer, |
| 4700 | uint32_t accelerationStructureCount, |
| 4701 | const VkAccelerationStructureNV* pAccelerationStructures, |
| 4702 | VkQueryType queryType, |
| 4703 | VkQueryPool queryPool, |
| 4704 | uint32_t firstQuery) { |
| 4705 | bool skip = false; |
| 4706 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdWriteAccelerationStructuresPropertiesNV-commandBuffer-parameter", "VUID-vkCmdWriteAccelerationStructuresPropertiesNV-commonparent"); |
| 4707 | if (pAccelerationStructures) { |
| 4708 | for (uint32_t index0 = 0; index0 < accelerationStructureCount; ++index0) { |
| 4709 | skip |= ValidateObject(commandBuffer, pAccelerationStructures[index0], kVulkanObjectTypeAccelerationStructureNV, false, "VUID-vkCmdWriteAccelerationStructuresPropertiesNV-pAccelerationStructures-parameter", "VUID-vkCmdWriteAccelerationStructuresPropertiesNV-commonparent"); |
| 4710 | } |
| 4711 | } |
| 4712 | skip |= ValidateObject(commandBuffer, queryPool, kVulkanObjectTypeQueryPool, false, "VUID-vkCmdWriteAccelerationStructuresPropertiesNV-queryPool-parameter", "VUID-vkCmdWriteAccelerationStructuresPropertiesNV-commonparent"); |
| 4713 | |
| 4714 | return skip; |
| 4715 | } |
| 4716 | |
| 4717 | bool ObjectLifetimes::PreCallValidateCompileDeferredNV( |
| 4718 | VkDevice device, |
| 4719 | VkPipeline pipeline, |
| 4720 | uint32_t shader) { |
| 4721 | bool skip = false; |
| 4722 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkCompileDeferredNV-device-parameter", kVUIDUndefined); |
| 4723 | skip |= ValidateObject(device, pipeline, kVulkanObjectTypePipeline, false, "VUID-vkCompileDeferredNV-pipeline-parameter", "VUID-vkCompileDeferredNV-pipeline-parent"); |
| 4724 | |
| 4725 | return skip; |
| 4726 | } |
| 4727 | |
| 4728 | bool ObjectLifetimes::PreCallValidateGetMemoryHostPointerPropertiesEXT( |
| 4729 | VkDevice device, |
| 4730 | VkExternalMemoryHandleTypeFlagBits handleType, |
| 4731 | const void* pHostPointer, |
| 4732 | VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties) { |
| 4733 | bool skip = false; |
| 4734 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetMemoryHostPointerPropertiesEXT-device-parameter", kVUIDUndefined); |
| 4735 | |
| 4736 | return skip; |
| 4737 | } |
| 4738 | |
| 4739 | bool ObjectLifetimes::PreCallValidateCmdWriteBufferMarkerAMD( |
| 4740 | VkCommandBuffer commandBuffer, |
| 4741 | VkPipelineStageFlagBits pipelineStage, |
| 4742 | VkBuffer dstBuffer, |
| 4743 | VkDeviceSize dstOffset, |
| 4744 | uint32_t marker) { |
| 4745 | bool skip = false; |
| 4746 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdWriteBufferMarkerAMD-commandBuffer-parameter", "VUID-vkCmdWriteBufferMarkerAMD-commonparent"); |
| 4747 | skip |= ValidateObject(commandBuffer, dstBuffer, kVulkanObjectTypeBuffer, false, "VUID-vkCmdWriteBufferMarkerAMD-dstBuffer-parameter", "VUID-vkCmdWriteBufferMarkerAMD-commonparent"); |
| 4748 | |
| 4749 | return skip; |
| 4750 | } |
| 4751 | |
| 4752 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceCalibrateableTimeDomainsEXT( |
| 4753 | VkPhysicalDevice physicalDevice, |
| 4754 | uint32_t* pTimeDomainCount, |
| 4755 | VkTimeDomainEXT* pTimeDomains) { |
| 4756 | bool skip = false; |
| 4757 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceCalibrateableTimeDomainsEXT-physicalDevice-parameter", kVUIDUndefined); |
| 4758 | |
| 4759 | return skip; |
| 4760 | } |
| 4761 | |
| 4762 | bool ObjectLifetimes::PreCallValidateGetCalibratedTimestampsEXT( |
| 4763 | VkDevice device, |
| 4764 | uint32_t timestampCount, |
| 4765 | const VkCalibratedTimestampInfoEXT* pTimestampInfos, |
| 4766 | uint64_t* pTimestamps, |
| 4767 | uint64_t* pMaxDeviation) { |
| 4768 | bool skip = false; |
| 4769 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetCalibratedTimestampsEXT-device-parameter", kVUIDUndefined); |
| 4770 | |
| 4771 | return skip; |
| 4772 | } |
| 4773 | |
| 4774 | bool ObjectLifetimes::PreCallValidateCmdDrawMeshTasksNV( |
| 4775 | VkCommandBuffer commandBuffer, |
| 4776 | uint32_t taskCount, |
| 4777 | uint32_t firstTask) { |
| 4778 | bool skip = false; |
| 4779 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdDrawMeshTasksNV-commandBuffer-parameter", kVUIDUndefined); |
| 4780 | |
| 4781 | return skip; |
| 4782 | } |
| 4783 | |
| 4784 | bool ObjectLifetimes::PreCallValidateCmdDrawMeshTasksIndirectNV( |
| 4785 | VkCommandBuffer commandBuffer, |
| 4786 | VkBuffer buffer, |
| 4787 | VkDeviceSize offset, |
| 4788 | uint32_t drawCount, |
| 4789 | uint32_t stride) { |
| 4790 | bool skip = false; |
| 4791 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdDrawMeshTasksIndirectNV-commandBuffer-parameter", "VUID-vkCmdDrawMeshTasksIndirectNV-commonparent"); |
| 4792 | skip |= ValidateObject(commandBuffer, buffer, kVulkanObjectTypeBuffer, false, "VUID-vkCmdDrawMeshTasksIndirectNV-buffer-parameter", "VUID-vkCmdDrawMeshTasksIndirectNV-commonparent"); |
| 4793 | |
| 4794 | return skip; |
| 4795 | } |
| 4796 | |
| 4797 | bool ObjectLifetimes::PreCallValidateCmdDrawMeshTasksIndirectCountNV( |
| 4798 | VkCommandBuffer commandBuffer, |
| 4799 | VkBuffer buffer, |
| 4800 | VkDeviceSize offset, |
| 4801 | VkBuffer countBuffer, |
| 4802 | VkDeviceSize countBufferOffset, |
| 4803 | uint32_t maxDrawCount, |
| 4804 | uint32_t stride) { |
| 4805 | bool skip = false; |
| 4806 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdDrawMeshTasksIndirectCountNV-commandBuffer-parameter", "VUID-vkCmdDrawMeshTasksIndirectCountNV-commonparent"); |
| 4807 | skip |= ValidateObject(commandBuffer, buffer, kVulkanObjectTypeBuffer, false, "VUID-vkCmdDrawMeshTasksIndirectCountNV-buffer-parameter", "VUID-vkCmdDrawMeshTasksIndirectCountNV-commonparent"); |
| 4808 | skip |= ValidateObject(commandBuffer, countBuffer, kVulkanObjectTypeBuffer, false, "VUID-vkCmdDrawMeshTasksIndirectCountNV-countBuffer-parameter", "VUID-vkCmdDrawMeshTasksIndirectCountNV-commonparent"); |
| 4809 | |
| 4810 | return skip; |
| 4811 | } |
| 4812 | |
| 4813 | bool ObjectLifetimes::PreCallValidateCmdSetExclusiveScissorNV( |
| 4814 | VkCommandBuffer commandBuffer, |
| 4815 | uint32_t firstExclusiveScissor, |
| 4816 | uint32_t exclusiveScissorCount, |
| 4817 | const VkRect2D* pExclusiveScissors) { |
| 4818 | bool skip = false; |
| 4819 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdSetExclusiveScissorNV-commandBuffer-parameter", kVUIDUndefined); |
| 4820 | |
| 4821 | return skip; |
| 4822 | } |
| 4823 | |
| 4824 | bool ObjectLifetimes::PreCallValidateCmdSetCheckpointNV( |
| 4825 | VkCommandBuffer commandBuffer, |
| 4826 | const void* pCheckpointMarker) { |
| 4827 | bool skip = false; |
| 4828 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdSetCheckpointNV-commandBuffer-parameter", kVUIDUndefined); |
| 4829 | |
| 4830 | return skip; |
| 4831 | } |
| 4832 | |
| 4833 | bool ObjectLifetimes::PreCallValidateGetQueueCheckpointDataNV( |
| 4834 | VkQueue queue, |
| 4835 | uint32_t* pCheckpointDataCount, |
| 4836 | VkCheckpointDataNV* pCheckpointData) { |
| 4837 | bool skip = false; |
| 4838 | skip |= ValidateObject(queue, queue, kVulkanObjectTypeQueue, false, "VUID-vkGetQueueCheckpointDataNV-queue-parameter", kVUIDUndefined); |
| 4839 | |
| 4840 | return skip; |
| 4841 | } |
| 4842 | |
| 4843 | bool ObjectLifetimes::PreCallValidateInitializePerformanceApiINTEL( |
| 4844 | VkDevice device, |
| 4845 | const VkInitializePerformanceApiInfoINTEL* pInitializeInfo) { |
| 4846 | bool skip = false; |
| 4847 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkInitializePerformanceApiINTEL-device-parameter", kVUIDUndefined); |
| 4848 | |
| 4849 | return skip; |
| 4850 | } |
| 4851 | |
| 4852 | bool ObjectLifetimes::PreCallValidateUninitializePerformanceApiINTEL( |
| 4853 | VkDevice device) { |
| 4854 | bool skip = false; |
| 4855 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkUninitializePerformanceApiINTEL-device-parameter", kVUIDUndefined); |
| 4856 | |
| 4857 | return skip; |
| 4858 | } |
| 4859 | |
| 4860 | bool ObjectLifetimes::PreCallValidateCmdSetPerformanceMarkerINTEL( |
| 4861 | VkCommandBuffer commandBuffer, |
| 4862 | const VkPerformanceMarkerInfoINTEL* pMarkerInfo) { |
| 4863 | bool skip = false; |
| 4864 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdSetPerformanceMarkerINTEL-commandBuffer-parameter", kVUIDUndefined); |
| 4865 | |
| 4866 | return skip; |
| 4867 | } |
| 4868 | |
| 4869 | bool ObjectLifetimes::PreCallValidateCmdSetPerformanceStreamMarkerINTEL( |
| 4870 | VkCommandBuffer commandBuffer, |
| 4871 | const VkPerformanceStreamMarkerInfoINTEL* pMarkerInfo) { |
| 4872 | bool skip = false; |
| 4873 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdSetPerformanceStreamMarkerINTEL-commandBuffer-parameter", kVUIDUndefined); |
| 4874 | |
| 4875 | return skip; |
| 4876 | } |
| 4877 | |
| 4878 | bool ObjectLifetimes::PreCallValidateCmdSetPerformanceOverrideINTEL( |
| 4879 | VkCommandBuffer commandBuffer, |
| 4880 | const VkPerformanceOverrideInfoINTEL* pOverrideInfo) { |
| 4881 | bool skip = false; |
| 4882 | skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, "VUID-vkCmdSetPerformanceOverrideINTEL-commandBuffer-parameter", kVUIDUndefined); |
| 4883 | |
| 4884 | return skip; |
| 4885 | } |
| 4886 | |
| 4887 | bool ObjectLifetimes::PreCallValidateGetPerformanceParameterINTEL( |
| 4888 | VkDevice device, |
| 4889 | VkPerformanceParameterTypeINTEL parameter, |
| 4890 | VkPerformanceValueINTEL* pValue) { |
| 4891 | bool skip = false; |
| 4892 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetPerformanceParameterINTEL-device-parameter", kVUIDUndefined); |
| 4893 | |
| 4894 | return skip; |
| 4895 | } |
| 4896 | |
| 4897 | bool ObjectLifetimes::PreCallValidateSetLocalDimmingAMD( |
| 4898 | VkDevice device, |
| 4899 | VkSwapchainKHR swapChain, |
| 4900 | VkBool32 localDimmingEnable) { |
| 4901 | bool skip = false; |
| 4902 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkSetLocalDimmingAMD-device-parameter", "VUID-vkSetLocalDimmingAMD-commonparent"); |
| 4903 | skip |= ValidateObject(device, swapChain, kVulkanObjectTypeSwapchainKHR, false, "VUID-vkSetLocalDimmingAMD-swapChain-parameter", "VUID-vkSetLocalDimmingAMD-commonparent"); |
| 4904 | |
| 4905 | return skip; |
| 4906 | } |
| 4907 | |
| 4908 | #ifdef VK_USE_PLATFORM_FUCHSIA |
| 4909 | |
| 4910 | bool ObjectLifetimes::PreCallValidateCreateImagePipeSurfaceFUCHSIA( |
| 4911 | VkInstance instance, |
| 4912 | const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, |
| 4913 | const VkAllocationCallbacks* pAllocator, |
| 4914 | VkSurfaceKHR* pSurface) { |
| 4915 | bool skip = false; |
| 4916 | skip |= ValidateObject(instance, instance, kVulkanObjectTypeInstance, false, "VUID-vkCreateImagePipeSurfaceFUCHSIA-instance-parameter", kVUIDUndefined); |
| 4917 | |
| 4918 | return skip; |
| 4919 | } |
| 4920 | |
| 4921 | void ObjectLifetimes::PostCallRecordCreateImagePipeSurfaceFUCHSIA( |
| 4922 | VkInstance instance, |
| 4923 | const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, |
| 4924 | const VkAllocationCallbacks* pAllocator, |
| 4925 | VkSurfaceKHR* pSurface, |
| 4926 | VkResult result) { |
| 4927 | if (result != VK_SUCCESS) return; |
| 4928 | CreateObject(instance, *pSurface, kVulkanObjectTypeSurfaceKHR, pAllocator); |
| 4929 | |
| 4930 | } |
| 4931 | #endif // VK_USE_PLATFORM_FUCHSIA |
| 4932 | |
| 4933 | #ifdef VK_USE_PLATFORM_METAL_EXT |
| 4934 | |
| 4935 | bool ObjectLifetimes::PreCallValidateCreateMetalSurfaceEXT( |
| 4936 | VkInstance instance, |
| 4937 | const VkMetalSurfaceCreateInfoEXT* pCreateInfo, |
| 4938 | const VkAllocationCallbacks* pAllocator, |
| 4939 | VkSurfaceKHR* pSurface) { |
| 4940 | bool skip = false; |
| 4941 | skip |= ValidateObject(instance, instance, kVulkanObjectTypeInstance, false, "VUID-vkCreateMetalSurfaceEXT-instance-parameter", kVUIDUndefined); |
| 4942 | |
| 4943 | return skip; |
| 4944 | } |
| 4945 | |
| 4946 | void ObjectLifetimes::PostCallRecordCreateMetalSurfaceEXT( |
| 4947 | VkInstance instance, |
| 4948 | const VkMetalSurfaceCreateInfoEXT* pCreateInfo, |
| 4949 | const VkAllocationCallbacks* pAllocator, |
| 4950 | VkSurfaceKHR* pSurface, |
| 4951 | VkResult result) { |
| 4952 | if (result != VK_SUCCESS) return; |
| 4953 | CreateObject(instance, *pSurface, kVulkanObjectTypeSurfaceKHR, pAllocator); |
| 4954 | |
| 4955 | } |
| 4956 | #endif // VK_USE_PLATFORM_METAL_EXT |
| 4957 | |
| 4958 | bool ObjectLifetimes::PreCallValidateGetBufferDeviceAddressEXT( |
| 4959 | VkDevice device, |
| 4960 | const VkBufferDeviceAddressInfoEXT* pInfo) { |
| 4961 | bool skip = false; |
| 4962 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetBufferDeviceAddressEXT-device-parameter", kVUIDUndefined); |
| 4963 | |
| 4964 | return skip; |
| 4965 | } |
| 4966 | |
| 4967 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceCooperativeMatrixPropertiesNV( |
| 4968 | VkPhysicalDevice physicalDevice, |
| 4969 | uint32_t* pPropertyCount, |
| 4970 | VkCooperativeMatrixPropertiesNV* pProperties) { |
| 4971 | bool skip = false; |
| 4972 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceCooperativeMatrixPropertiesNV-physicalDevice-parameter", kVUIDUndefined); |
| 4973 | |
| 4974 | return skip; |
| 4975 | } |
| 4976 | |
| 4977 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( |
| 4978 | VkPhysicalDevice physicalDevice, |
| 4979 | uint32_t* pCombinationCount, |
| 4980 | VkFramebufferMixedSamplesCombinationNV* pCombinations) { |
| 4981 | bool skip = false; |
| 4982 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV-physicalDevice-parameter", kVUIDUndefined); |
| 4983 | |
| 4984 | return skip; |
| 4985 | } |
| 4986 | |
| 4987 | #ifdef VK_USE_PLATFORM_WIN32_KHR |
| 4988 | |
| 4989 | bool ObjectLifetimes::PreCallValidateGetPhysicalDeviceSurfacePresentModes2EXT( |
| 4990 | VkPhysicalDevice physicalDevice, |
| 4991 | const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, |
| 4992 | uint32_t* pPresentModeCount, |
| 4993 | VkPresentModeKHR* pPresentModes) { |
| 4994 | bool skip = false; |
| 4995 | skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, "VUID-vkGetPhysicalDeviceSurfacePresentModes2EXT-physicalDevice-parameter", kVUIDUndefined); |
| 4996 | if (pSurfaceInfo) { |
| 4997 | skip |= ValidateObject(physicalDevice, pSurfaceInfo->surface, kVulkanObjectTypeSurfaceKHR, false, "VUID-VkPhysicalDeviceSurfaceInfo2KHR-surface-parameter", kVUIDUndefined); |
| 4998 | } |
| 4999 | |
| 5000 | return skip; |
| 5001 | } |
| 5002 | #endif // VK_USE_PLATFORM_WIN32_KHR |
| 5003 | |
| 5004 | #ifdef VK_USE_PLATFORM_WIN32_KHR |
| 5005 | |
| 5006 | bool ObjectLifetimes::PreCallValidateAcquireFullScreenExclusiveModeEXT( |
| 5007 | VkDevice device, |
| 5008 | VkSwapchainKHR swapchain) { |
| 5009 | bool skip = false; |
| 5010 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkAcquireFullScreenExclusiveModeEXT-device-parameter", "VUID-vkAcquireFullScreenExclusiveModeEXT-commonparent"); |
| 5011 | skip |= ValidateObject(device, swapchain, kVulkanObjectTypeSwapchainKHR, false, "VUID-vkAcquireFullScreenExclusiveModeEXT-swapchain-parameter", "VUID-vkAcquireFullScreenExclusiveModeEXT-commonparent"); |
| 5012 | |
| 5013 | return skip; |
| 5014 | } |
| 5015 | #endif // VK_USE_PLATFORM_WIN32_KHR |
| 5016 | |
| 5017 | #ifdef VK_USE_PLATFORM_WIN32_KHR |
| 5018 | |
| 5019 | bool ObjectLifetimes::PreCallValidateReleaseFullScreenExclusiveModeEXT( |
| 5020 | VkDevice device, |
| 5021 | VkSwapchainKHR swapchain) { |
| 5022 | bool skip = false; |
| 5023 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, kVUIDUndefined, kVUIDUndefined); |
| 5024 | skip |= ValidateObject(device, swapchain, kVulkanObjectTypeSwapchainKHR, false, kVUIDUndefined, kVUIDUndefined); |
| 5025 | |
| 5026 | return skip; |
| 5027 | } |
| 5028 | #endif // VK_USE_PLATFORM_WIN32_KHR |
| 5029 | |
| 5030 | #ifdef VK_USE_PLATFORM_WIN32_KHR |
| 5031 | |
| 5032 | bool ObjectLifetimes::PreCallValidateGetDeviceGroupSurfacePresentModes2EXT( |
| 5033 | VkDevice device, |
| 5034 | const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, |
| 5035 | VkDeviceGroupPresentModeFlagsKHR* pModes) { |
| 5036 | bool skip = false; |
| 5037 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkGetDeviceGroupSurfacePresentModes2EXT-device-parameter", kVUIDUndefined); |
| 5038 | if (pSurfaceInfo) { |
| 5039 | skip |= ValidateObject(device, pSurfaceInfo->surface, kVulkanObjectTypeSurfaceKHR, false, "VUID-VkPhysicalDeviceSurfaceInfo2KHR-surface-parameter", kVUIDUndefined); |
| 5040 | } |
| 5041 | |
| 5042 | return skip; |
| 5043 | } |
| 5044 | #endif // VK_USE_PLATFORM_WIN32_KHR |
| 5045 | |
| 5046 | bool ObjectLifetimes::PreCallValidateCreateHeadlessSurfaceEXT( |
| 5047 | VkInstance instance, |
| 5048 | const VkHeadlessSurfaceCreateInfoEXT* pCreateInfo, |
| 5049 | const VkAllocationCallbacks* pAllocator, |
| 5050 | VkSurfaceKHR* pSurface) { |
| 5051 | bool skip = false; |
| 5052 | skip |= ValidateObject(instance, instance, kVulkanObjectTypeInstance, false, "VUID-vkCreateHeadlessSurfaceEXT-instance-parameter", kVUIDUndefined); |
| 5053 | |
| 5054 | return skip; |
| 5055 | } |
| 5056 | |
| 5057 | void ObjectLifetimes::PostCallRecordCreateHeadlessSurfaceEXT( |
| 5058 | VkInstance instance, |
| 5059 | const VkHeadlessSurfaceCreateInfoEXT* pCreateInfo, |
| 5060 | const VkAllocationCallbacks* pAllocator, |
| 5061 | VkSurfaceKHR* pSurface, |
| 5062 | VkResult result) { |
| 5063 | if (result != VK_SUCCESS) return; |
| 5064 | CreateObject(instance, *pSurface, kVulkanObjectTypeSurfaceKHR, pAllocator); |
| 5065 | |
| 5066 | } |
| 5067 | |
| 5068 | bool ObjectLifetimes::PreCallValidateResetQueryPoolEXT( |
| 5069 | VkDevice device, |
| 5070 | VkQueryPool queryPool, |
| 5071 | uint32_t firstQuery, |
| 5072 | uint32_t queryCount) { |
| 5073 | bool skip = false; |
| 5074 | skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, "VUID-vkResetQueryPoolEXT-device-parameter", kVUIDUndefined); |
| 5075 | skip |= ValidateObject(device, queryPool, kVulkanObjectTypeQueryPool, false, "VUID-vkResetQueryPoolEXT-queryPool-parameter", "VUID-vkResetQueryPoolEXT-queryPool-parent"); |
| 5076 | |
| 5077 | return skip; |
| 5078 | } |
| 5079 | |
| 5080 | |