From 491d39503e75c093069e4b99323e813303dc824b Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 5 Oct 2026 13:17:47 +0000 Subject: [PATCH] Wake every pipeline waiter when shader work is queued or promoted Compiler workers and renderer waiters share g_pipelineCv. notify_one could wake a renderer thread instead of a compiler, leaving a queued pipeline until some later wake-up; with skip_unready_pipelines its draws stay missing that much longer. Promoting a background build to priority now wakes the workers too. From upstream patchzyy/Wiicompiled 6f14bde (#244, KartPad 956d811e). Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01Wg7mB8ogCWmp9GH19Uc82B --- aurora-main/lib/gfx/pipeline_cache.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aurora-main/lib/gfx/pipeline_cache.cpp b/aurora-main/lib/gfx/pipeline_cache.cpp index b854e9d..d24757d 100644 --- a/aurora-main/lib/gfx/pipeline_cache.cpp +++ b/aurora-main/lib/gfx/pipeline_cache.cpp @@ -426,6 +426,7 @@ static PendingPipeline* touch_pending_pipeline(PipelineRef hash, bool prioritize g_priorityPipelines.emplace_back(std::move(*backgroundIt)); g_backgroundPipelines.erase(backgroundIt); + g_pipelineCv.notify_all(); return &g_priorityPipelines.back(); } @@ -566,7 +567,8 @@ static PipelineRef find_pipeline_impl(ShaderType type, const PipelineConfig& con } if (notifyWorker) { - g_pipelineCv.notify_one(); + // Compiler workers and renderer waiters share this condition variable. + g_pipelineCv.notify_all(); } if (notifyWaiters) { g_pipelineCv.notify_all();