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) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wg7mB8ogCWmp9GH19Uc82B
This commit is contained in:
Claude committed 2026-10-05 13:17:47 +00:00
1 parent a132a82952
commit 491d39503e
1 file changed
+3 -1
+3 -1
View File
@@ -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();