Commit 91b819a9 by Tim Van Patten Committed by Commit Bot

Vulkan: Always reset during createPipelineLayout()

We need to always call reset() during createPipelineLayout(), particularly to reset the descriptor pools to handle the new descriptor set layouts that are generated by new immutable samplers. Otherwise, DynamicDescriptorPool::init() will detect that a pool is attempting to be created with a mis-matching descriptor set layout handle. Bug: angleproject:4307 Test: Manually verify Cut the Rope doesn't crash Change-Id: I0993bc37170e3ddf45c50abdfefda1d7f782b801 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2441127Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCourtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Tim Van Patten <timvp@google.com>
parent 3705fc41
...@@ -743,14 +743,7 @@ angle::Result ProgramExecutableVk::createPipelineLayout( ...@@ -743,14 +743,7 @@ angle::Result ProgramExecutableVk::createPipelineLayout(
gl::ShaderMap<const gl::ProgramState *> programStates; gl::ShaderMap<const gl::ProgramState *> programStates;
fillProgramStateMap(contextVk, &programStates); fillProgramStateMap(contextVk, &programStates);
// If 'activeTextures' is null, this is creating a new pipeline layout, rather than re-creating reset(contextVk);
// one due to (for example) the addition of an immutable sampler. Creating a new pipeline layout
// requires a reset before proceeding to clean anything up from the last pipeline layout
// creation.
if (activeTextures == nullptr)
{
reset(contextVk);
}
// Store a reference to the pipeline and descriptor set layouts. This will create them if they // Store a reference to the pipeline and descriptor set layouts. This will create them if they
// don't already exist in the cache. // don't already exist in the cache.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment