diff options
| author | Jon Ashburn <jon@lunarg.com> | 2016-06-30 09:01:27 -0600 |
|---|---|---|
| committer | Jon Ashburn <jon@lunarg.com> | 2016-06-30 11:18:44 -0600 |
| commit | 9323e68e7766b5b1da61fec1eae72d4bd4895bb7 (patch) | |
| tree | c58ebb5269b3e92b248be294099d98eafca8a04c | |
| parent | 46fa001f431ddd9b989d563724014022096f5258 (diff) | |
| download | usermoji-9323e68e7766b5b1da61fec1eae72d4bd4895bb7.tar.xz | |
layers: Add some comments to swapchain for more KHR_display validation
Change-Id: I9d5cf4f6f8f0f9c5177155deaa18fe521c7620a9
| -rw-r--r-- | layers/swapchain.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/layers/swapchain.cpp b/layers/swapchain.cpp index f120c7a1..e472c988 100644 --- a/layers/swapchain.cpp +++ b/layers/swapchain.cpp @@ -954,6 +954,7 @@ GetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t if (!pPropertyCount) { skipCall |= LOG_ERROR_NULL_POINTER(VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT, pPhysicalDevice->pInstance, "pPropertyCount"); } + // TODO add check for the count being consistent lock.unlock(); if (!skipCall) { @@ -985,6 +986,7 @@ GetPhysicalDeviceDisplayPlanePropertiesKHR(VkPhysicalDevice physicalDevice, uint if (!pPropertyCount) { skipCall |= LOG_ERROR_NULL_POINTER(VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT, pPhysicalDevice->pInstance, "pPropertyCount"); } + // TODO add check for the count being consistent lock.unlock(); if (!skipCall) { @@ -996,6 +998,7 @@ GetPhysicalDeviceDisplayPlanePropertiesKHR(VkPhysicalDevice physicalDevice, uint pPhysicalDevice->displayPlanePropertyCount = *pPropertyCount; pPhysicalDevice->gotDisplayPlanePropertyCount = true; } + // TODO store the properties for later checks lock.unlock(); return result; @@ -1025,6 +1028,7 @@ GetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice physicalDevice, uint32_t pl if (!pDisplayCount) { skipCall |= LOG_ERROR_NULL_POINTER(VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT, pPhysicalDevice->pInstance, "pDisplayCount"); } + // TODO add check for the count being consistent if (!pPhysicalDevice->gotDisplayPlanePropertyCount) { @@ -1050,6 +1054,7 @@ GetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice physicalDevice, uint32_t pl return result; } + // TODO validate the returned display objects return VK_ERROR_VALIDATION_FAILED_EXT; } @@ -1075,12 +1080,14 @@ GetDisplayModePropertiesKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR displa if (!pPropertyCount) { skipCall |= LOG_ERROR_NULL_POINTER(VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT, pPhysicalDevice->pInstance, "pPropertyCount"); } + // TODO add check for the count being consistent lock.unlock(); if (!skipCall) { result = my_data->instance_dispatch_table->GetDisplayModePropertiesKHR(physicalDevice, display, pPropertyCount, pProperties); return result; } + // TODO store the displayMode for later checking return VK_ERROR_VALIDATION_FAILED_EXT; } @@ -1108,6 +1115,7 @@ CreateDisplayModeKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, cons } lock.unlock(); + // TODO more validation checks needed if (!skipCall) { result = my_data->instance_dispatch_table->CreateDisplayModeKHR(physicalDevice, display, pCreateInfo, pAllocator, pMode); return result; @@ -1194,6 +1202,7 @@ CreateDisplayPlaneSurfaceKHR(VkInstance instance, const VkDisplaySurfaceCreateIn } } + // TODO more validation checks if (!skipCall) { // Call down the call chain: lock.unlock(); |
