layers: Add some comments to swapchain for more KHR_display validation
authorJon Ashburn <jon@lunarg.com>
Thu, 30 Jun 2016 15:01:27 +0000 (09:01 -0600)
committerJon Ashburn <jon@lunarg.com>
Thu, 30 Jun 2016 17:18:44 +0000 (11:18 -0600)
Change-Id: I9d5cf4f6f8f0f9c5177155deaa18fe521c7620a9

layers/swapchain.cpp

index f120c7a..e472c98 100644 (file)
@@ -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();