loader: Remove instance validation checks from debug_report.c
authorMark Lobodzinski <mark@lunarg.com>
Wed, 23 Sep 2015 20:45:29 +0000 (14:45 -0600)
committerMark Lobodzinski <mark@lunarg.com>
Wed, 23 Sep 2015 20:48:24 +0000 (14:48 -0600)
Cannot reach these points with an invalid instance value.

loader/debug_report.c

index 8a6bf5dee249681ead007087c5b3d5bea867f655..63c86c6f5718fabd4bfe51ca327998c131d85c93 100644 (file)
@@ -141,19 +141,11 @@ VkResult VKAPI loader_DbgCreateMsgCallback(
     VkResult res;
     uint32_t storage_idx;
 
-    /* TODOVV: move to validation layer */
-//    if (instance == VK_NULL_HANDLE)
-//        return VK_ERROR_INVALID_HANDLE;
-
     for (inst = loader.instances; inst; inst = inst->next) {
         if ((VkInstance) inst == instance)
             break;
     }
 
-    /* TODOVV: move to validation layer */
-//    if (inst == VK_NULL_HANDLE)
-//        return VK_ERROR_INVALID_HANDLE;
-
     icd_info = calloc(sizeof(VkDbgMsgCallback), inst->total_icd_count);
     if (!icd_info) {
         return VK_ERROR_OUT_OF_HOST_MEMORY;
@@ -212,19 +204,11 @@ VkResult VKAPI loader_DbgDestroyMsgCallback(
     VkResult res = VK_SUCCESS;
     struct loader_instance *inst;
 
-    /* TODOVV: Move to validation layer */
-//    if (instance == VK_NULL_HANDLE)
-//        return VK_ERROR_INVALID_HANDLE;
-
     for (inst = loader.instances; inst; inst = inst->next) {
         if ((VkInstance) inst == instance)
             break;
     }
 
-    /* TODOVV: Move to validation layer */
-//    if (inst == VK_NULL_HANDLE)
-//        return VK_ERROR_INVALID_HANDLE;
-
     icd_info = *(VkDbgMsgCallback **) &msgCallback;
     storage_idx = 0;
     for (icd = inst->icds; icd; icd = icd->next) {