layers: CV: null out pipelines on validation failure
authorChris Forbes <chrisforbes@google.com>
Wed, 30 Nov 2016 01:26:50 +0000 (14:26 +1300)
committerChris Forbes <chrisforbes@google.com>
Thu, 1 Dec 2016 18:48:08 +0000 (07:48 +1300)
If we don't call down the chain, creation of all the pipelines failed.
Callers expect to inspect the handles for partial success -- don't leave
uninitialized junk here.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
layers/core_validation.cpp

index 5957a66..8ab9a64 100644 (file)
@@ -6871,6 +6871,7 @@ CreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t
     if (skip) {
         for (i = 0; i < count; i++) {
             delete pipe_state[i];
+            pPipelines[i] = VK_NULL_HANDLE;
         }
     } else {
         lock.unlock();