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