diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2016-11-16 10:05:30 -0700 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2016-11-16 13:01:55 -0700 |
| commit | c1fbb2ab616d4023a16f80df3055e6b1a71a1f09 (patch) | |
| tree | 41d8c0c961b522ba6611c89004f25bd882a4f2ac /layers/core_validation.cpp | |
| parent | 068e7d0a403c76b0dd0984bed6f701d86efd1645 (diff) | |
| download | usermoji-c1fbb2ab616d4023a16f80df3055e6b1a71a1f09.tar.xz | |
layers: Move val to PreCallCreateGraphicsPipelines
In core validation, created a pre-call function and moved the
validation calls into it.
Change-Id: Ib7831c3d2f36628e24b90083be902ac724f25483
Diffstat (limited to 'layers/core_validation.cpp')
| -rw-r--r-- | layers/core_validation.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 47725502..c27e6172 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -6778,6 +6778,17 @@ void set_pipeline_state(PIPELINE_STATE *pPipe) { } } +static bool PreCallCreateGraphicsPipelines(layer_data *device_data, uint32_t count, + const VkGraphicsPipelineCreateInfo *create_infos, vector<PIPELINE_STATE *> &pipe_state) { + bool skip = false; + layer_data *phy_dev_data = get_my_data_ptr(get_dispatch_key(device_data->instance_data), layer_data_map); + + for (uint32_t i = 0; i < count; i++) { + skip |= verifyPipelineCreateState(device_data, pipe_state, i); + } + return skip; +} + VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t count, const VkGraphicsPipelineCreateInfo *pCreateInfos, const VkAllocationCallbacks *pAllocator, @@ -6801,10 +6812,10 @@ CreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t pPipeState[i]->initGraphicsPipeline(&pCreateInfos[i]); pPipeState[i]->render_pass_ci.initialize(getRenderPassState(dev_data, pCreateInfos[i].renderPass)->createInfo.ptr()); pPipeState[i]->pipeline_layout = *getPipelineLayout(dev_data, pCreateInfos[i].layout); - - skip_call |= verifyPipelineCreateState(dev_data, pPipeState, i); } + skip_call |= PreCallCreateGraphicsPipelines(dev_data, count, pCreateInfos, pPipeState); + if (!skip_call) { lock.unlock(); result = |
