diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2017-05-15 15:55:28 -0600 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2017-05-15 16:24:26 -0600 |
| commit | dbf90117196fd46a5cd4958a510275c8e35e91dc (patch) | |
| tree | 8c1307a5d1901f78c50361fe9448e026923bd84a | |
| parent | 6a2fe40c31c278bd23f40d6ec872172afa311f1e (diff) | |
| download | usermoji-dbf90117196fd46a5cd4958a510275c8e35e91dc.tar.xz | |
layers: Add VUIDs to new objecttracker checks
Change-Id: I0d2d893b68aea7df294796cf42a8c6d46fbfd441
| -rw-r--r-- | layers/object_tracker.cpp | 13 | ||||
| -rw-r--r-- | layers/vk_validation_error_database.txt | 10 |
2 files changed, 11 insertions, 12 deletions
diff --git a/layers/object_tracker.cpp b/layers/object_tracker.cpp index c7424c23..87ca7c7d 100644 --- a/layers/object_tracker.cpp +++ b/layers/object_tracker.cpp @@ -5045,9 +5045,8 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainStatusKHR(VkDevice device, VkSwapchai 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 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysic 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_03288, VALIDATION_ERROR_UNDEFINED); - skip |= ValidateObject(physicalDevice, pSurfaceInfo->surface, kVulkanObjectTypeSurfaceKHR, false, - VALIDATION_ERROR_UNDEFINED, VALIDATION_ERROR_UNDEFINED); } if (skip) { return VK_ERROR_VALIDATION_FAILED_EXT; @@ -5083,7 +5082,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDev 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 b0c02078..bda6e037 100644 --- a/layers/vk_validation_error_database.txt +++ b/layers/vk_validation_error_database.txt @@ -3083,18 +3083,18 @@ VALIDATION_ERROR_03279~^~N~^~Unknown~^~vkCmdBlitImage~^~For more information ref 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 |
