Vulkan: Clear pipelines before shaders when use flags change

The pipeline deletion callbacks block on in-flight compiles, which use the
shader module promises that the shaders' deletion callbacks free. Queueing
the shaders first freed the promises under a pending compile.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-09-29 09:35:17 -06:00
1 parent b912b5823b
commit 4df1b9c2c3
1 file changed
+3 -1
+3 -1
View File
@@ -258,8 +258,10 @@ void GPU_Vulkan::BeginHostFrame(const DisplayLayoutConfig &config) {
WARN_LOG(Log::G3D, "Shader use flags changed, clearing all shaders and depth buffers");
// TODO: Not all shaders need to be recompiled. In fact, quite few? Of course, depends on
// the use flag change.. This is a major frame rate hitch in the start of a race in Outrun.
shaderManager_->ClearShaders();
// Pipelines first: their deletion callbacks block on in-flight compiles, which use the shader modules
// that the shaders' own (later) deletion callbacks free.
pipelineManager_->Clear();
shaderManager_->ClearShaders();
framebufferManager_->ClearAllDepthBuffers();
gstate_c.useFlagsChanged = false;
}