layers: OT: null out handles in pipeline creation if we dont call down
authorChris Forbes <chrisforbes@google.com>
Wed, 30 Nov 2016 01:56:52 +0000 (14:56 +1300)
committerChris Forbes <chrisforbes@google.com>
Thu, 1 Dec 2016 18:48:08 +0000 (07:48 +1300)
Signed-off-by: Chris Forbes <chrisforbes@google.com>
layers/object_tracker.cpp

index b444354..c0ebb45 100644 (file)
@@ -3619,6 +3619,9 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipeli
     }
     lock.unlock();
     if (skip_call) {
+        for (uint32_t i = 0; i < createInfoCount; i++) {
+            pPipelines[i] = VK_NULL_HANDLE;
+        }
         return VK_ERROR_VALIDATION_FAILED_EXT;
     }
     VkResult result = get_dispatch_table(ot_device_table_map, device)
@@ -3661,6 +3664,9 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateComputePipelines(VkDevice device, VkPipelin
     }
     lock.unlock();
     if (skip_call) {
+        for (uint32_t i = 0; i < createInfoCount; i++) {
+            pPipelines[i] = VK_NULL_HANDLE;
+        }
         return VK_ERROR_VALIDATION_FAILED_EXT;
     }
     VkResult result = get_dispatch_table(ot_device_table_map, device)