layers: Add VUIDs to new objecttracker checks

Change-Id: I0d2d893b68aea7df294796cf42a8c6d46fbfd441
diff --git a/layers/object_tracker.cpp b/layers/object_tracker.cpp
index c7424c2..87ca7c7 100644
--- a/layers/object_tracker.cpp
+++ b/layers/object_tracker.cpp
@@ -5045,9 +5045,8 @@
     bool skip = false;
     {
         std::lock_guard<std::mutex> lock(global_lock);
-        skip |=
-            ValidateObject(device, device, kVulkanObjectTypeDevice, false, VALIDATION_ERROR_UNDEFINED, VALIDATION_ERROR_UNDEFINED);
-        skip |= ValidateObject(device, swapchain, kVulkanObjectTypeSwapchainKHR, false, VALIDATION_ERROR_UNDEFINED,
+        skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, VALIDATION_ERROR_03293, VALIDATION_ERROR_UNDEFINED);
+        skip |= ValidateObject(device, swapchain, kVulkanObjectTypeSwapchainKHR, false, VALIDATION_ERROR_03294,
                                VALIDATION_ERROR_UNDEFINED);
     }
     if (skip) {
@@ -5063,10 +5062,10 @@
     bool skip = false;
     {
         std::lock_guard<std::mutex> lock(global_lock);
-        skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, VALIDATION_ERROR_UNDEFINED,
+        skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, VALIDATION_ERROR_03283,
                                VALIDATION_ERROR_UNDEFINED);
-        skip |= ValidateObject(physicalDevice, pSurfaceInfo->surface, kVulkanObjectTypeSurfaceKHR, false,
-                               VALIDATION_ERROR_UNDEFINED, VALIDATION_ERROR_UNDEFINED);
+        skip |= ValidateObject(physicalDevice, pSurfaceInfo->surface, kVulkanObjectTypeSurfaceKHR, false, VALIDATION_ERROR_03288,
+                               VALIDATION_ERROR_UNDEFINED);
     }
     if (skip) {
         return VK_ERROR_VALIDATION_FAILED_EXT;
@@ -5083,7 +5082,7 @@
     bool skip = false;
     {
         std::lock_guard<std::mutex> lock(global_lock);
-        skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, VALIDATION_ERROR_UNDEFINED,
+        skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, VALIDATION_ERROR_03289,
                                VALIDATION_ERROR_UNDEFINED);
         skip |= ValidateObject(physicalDevice, pSurfaceInfo->surface, kVulkanObjectTypeSurfaceKHR, false,
                                VALIDATION_ERROR_UNDEFINED, VALIDATION_ERROR_UNDEFINED);
diff --git a/layers/vk_validation_error_database.txt b/layers/vk_validation_error_database.txt
index b0c0207..bda6e03 100644
--- a/layers/vk_validation_error_database.txt
+++ b/layers/vk_validation_error_database.txt
@@ -3083,18 +3083,18 @@
 VALIDATION_ERROR_03280~^~N~^~Unknown~^~vkCmdBlitImage~^~For more information refer to Vulkan Spec Section '18.5. Image Copies with Scaling' which states 'dstImageLayout must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#vkCmdBlitImage)~^~
 VALIDATION_ERROR_03281~^~N~^~Unknown~^~vkCmdResolveImage~^~For more information refer to Vulkan Spec Section '18.6. Resolving Multisample Images' which states 'srcImageLayout must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#vkCmdResolveImage)~^~
 VALIDATION_ERROR_03282~^~N~^~Unknown~^~vkCmdResolveImage~^~For more information refer to Vulkan Spec Section '18.6. Resolving Multisample Images' which states 'dstImageLayout must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#vkCmdResolveImage)~^~
-VALIDATION_ERROR_03283~^~N~^~Unknown~^~vkGetPhysicalDeviceSurfaceCapabilities2KHR~^~For more information refer to Vulkan Spec Section '30.5. Surface Queries' which states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#vkGetPhysicalDeviceSurfaceCapabilities2KHR)~^~implicit
+VALIDATION_ERROR_03283~^~Y~^~Unknown~^~vkGetPhysicalDeviceSurfaceCapabilities2KHR~^~For more information refer to Vulkan Spec Section '30.5. Surface Queries' which states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#vkGetPhysicalDeviceSurfaceCapabilities2KHR)~^~implicit
 VALIDATION_ERROR_03284~^~N~^~Unknown~^~vkGetPhysicalDeviceSurfaceCapabilities2KHR~^~For more information refer to Vulkan Spec Section '30.5. Surface Queries' which states 'pSurfaceInfo must be a pointer to a valid VkPhysicalDeviceSurfaceInfo2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#vkGetPhysicalDeviceSurfaceCapabilities2KHR)~^~implicit
 VALIDATION_ERROR_03285~^~N~^~Unknown~^~vkGetPhysicalDeviceSurfaceCapabilities2KHR~^~For more information refer to Vulkan Spec Section '30.5. Surface Queries' which states 'pSurfaceCapabilities must be a pointer to a VkSurfaceCapabilities2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#vkGetPhysicalDeviceSurfaceCapabilities2KHR)~^~implicit
 VALIDATION_ERROR_03286~^~N~^~Unknown~^~vkGetPhysicalDeviceSurfaceCapabilities2KHR~^~For more information refer to Vulkan Spec Section '30.5. Surface Queries' which states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkPhysicalDeviceSurfaceInfo2KHR)~^~implicit
 VALIDATION_ERROR_03287~^~N~^~Unknown~^~vkGetPhysicalDeviceSurfaceCapabilities2KHR~^~For more information refer to Vulkan Spec Section '30.5. Surface Queries' which states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkPhysicalDeviceSurfaceInfo2KHR)~^~implicit
-VALIDATION_ERROR_03288~^~N~^~Unknown~^~vkGetPhysicalDeviceSurfaceCapabilities2KHR~^~For more information refer to Vulkan Spec Section '30.5. Surface Queries' which states 'surface must be a valid VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkPhysicalDeviceSurfaceInfo2KHR)~^~implicit
-VALIDATION_ERROR_03289~^~N~^~Unknown~^~vkGetPhysicalDeviceSurfaceFormats2KHR~^~For more information refer to Vulkan Spec Section '30.5. Surface Queries' which states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#vkGetPhysicalDeviceSurfaceFormats2KHR)~^~implicit
+VALIDATION_ERROR_03288~^~Y~^~Unknown~^~vkGetPhysicalDeviceSurfaceCapabilities2KHR~^~For more information refer to Vulkan Spec Section '30.5. Surface Queries' which states 'surface must be a valid VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkPhysicalDeviceSurfaceInfo2KHR)~^~implicit
+VALIDATION_ERROR_03289~^~Y~^~Unknown~^~vkGetPhysicalDeviceSurfaceFormats2KHR~^~For more information refer to Vulkan Spec Section '30.5. Surface Queries' which states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#vkGetPhysicalDeviceSurfaceFormats2KHR)~^~implicit
 VALIDATION_ERROR_03290~^~N~^~Unknown~^~vkGetPhysicalDeviceSurfaceFormats2KHR~^~For more information refer to Vulkan Spec Section '30.5. Surface Queries' which states 'pSurfaceInfo must be a pointer to a valid VkPhysicalDeviceSurfaceInfo2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#vkGetPhysicalDeviceSurfaceFormats2KHR)~^~implicit
 VALIDATION_ERROR_03291~^~N~^~Unknown~^~vkGetPhysicalDeviceSurfaceFormats2KHR~^~For more information refer to Vulkan Spec Section '30.5. Surface Queries' which states 'pSurfaceFormatCount must be a pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#vkGetPhysicalDeviceSurfaceFormats2KHR)~^~implicit
 VALIDATION_ERROR_03292~^~N~^~Unknown~^~vkGetPhysicalDeviceSurfaceFormats2KHR~^~For more information refer to Vulkan Spec Section '30.5. Surface Queries' which states 'If the value referenced by pSurfaceFormatCount is not 0, and pSurfaceFormats is not NULL, pSurfaceFormats must be a pointer to an array of pSurfaceFormatCount VkSurfaceFormat2KHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#vkGetPhysicalDeviceSurfaceFormats2KHR)~^~implicit
-VALIDATION_ERROR_03293~^~N~^~Unknown~^~vkGetSwapchainStatusKHR~^~For more information refer to Vulkan Spec Section '30.8. WSI Swapchain' which states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#vkGetSwapchainStatusKHR)~^~implicit
-VALIDATION_ERROR_03294~^~N~^~Unknown~^~vkGetSwapchainStatusKHR~^~For more information refer to Vulkan Spec Section '30.8. WSI Swapchain' which states 'swapchain must be a valid VkSwapchainKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#vkGetSwapchainStatusKHR)~^~implicit
+VALIDATION_ERROR_03293~^~Y~^~Unknown~^~vkGetSwapchainStatusKHR~^~For more information refer to Vulkan Spec Section '30.8. WSI Swapchain' which states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#vkGetSwapchainStatusKHR)~^~implicit
+VALIDATION_ERROR_03294~^~Y~^~Unknown~^~vkGetSwapchainStatusKHR~^~For more information refer to Vulkan Spec Section '30.8. WSI Swapchain' which states 'swapchain must be a valid VkSwapchainKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#vkGetSwapchainStatusKHR)~^~implicit
 VALIDATION_ERROR_03295~^~N~^~Unknown~^~vkCreateSwapchainKHR~^~For more information refer to Vulkan Spec Section '30.8. WSI Swapchain' which states 'minImageCount must be 1 if presentMode is either VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR or VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkSwapchainCreateFlagBitsKHR)~^~
 VALIDATION_ERROR_03296~^~N~^~Unknown~^~vkCreateSwapchainKHR~^~For more information refer to Vulkan Spec Section '30.8. WSI Swapchain' which states 'imageUsage must be a subset of the supported usage flags present in the sharedPresentSupportedUsageFlags member of the VkSharedPresentSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilities2KHR for the surface if presentMode is set to either VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR or VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkSwapchainCreateFlagBitsKHR)~^~
 VALIDATION_ERROR_03297~^~N~^~Unknown~^~vkQueuePresentKHR~^~For more information refer to Vulkan Spec Section '30.8. WSI Swapchain' which states 'swapchainCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPresentTimesInfoGOOGLE-swapchainCount-01247)~^~implicit