diff options
| author | Chris Forbes <chrisforbes@google.com> | 2016-11-30 14:41:35 +1300 |
|---|---|---|
| committer | Chris Forbes <chrisforbes@google.com> | 2016-12-02 07:48:08 +1300 |
| commit | 1e230b47b250d0d5a73465e29759d25bd7f2bf21 (patch) | |
| tree | 784b0d86acc541bd3f9868beb992b82c34eee25f | |
| parent | a5ac5539c9d119a73f755d7246044d91f9d340eb (diff) | |
| download | usermoji-1e230b47b250d0d5a73465e29759d25bd7f2bf21.tar.xz | |
layers: Don't make a mess of partial pipeline creation failure
Previously we'd end up with a VK_NULL_HANDLE -> junk PIPELINE_STATE
mapping, which confuses other things.
Signed-off-by: Chris Forbes <chrisforbes@google.com>
| -rw-r--r-- | layers/core_validation.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 729de863..5e0a7c93 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -6879,8 +6879,13 @@ CreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t auto result = dev_data->dispatch_table.CreateGraphicsPipelines(device, pipelineCache, count, pCreateInfos, pAllocator, pPipelines); lock.lock(); for (i = 0; i < count; i++) { - pipe_state[i]->pipeline = pPipelines[i]; - dev_data->pipelineMap[pipe_state[i]->pipeline] = pipe_state[i]; + if (pPipelines[i] == VK_NULL_HANDLE) { + delete pipe_state[i]; + } + else { + pipe_state[i]->pipeline = pPipelines[i]; + dev_data->pipelineMap[pipe_state[i]->pipeline] = pipe_state[i]; + } } return result; |
