VideoCommon: add method to async shader compiler to clear pending/completed work (used on shutdown), this will in turn clear up any resources that the worker items may have held onto

This commit is contained in:
iwubcode
2025-11-20 22:12:09 -06:00
parent 4f30aaf1ca
commit 75c66e35c6
4 changed files with 25 additions and 0 deletions
@@ -68,6 +68,19 @@ bool AsyncShaderCompiler::HasCompletedWork()
return !m_completed_work.empty();
}
void AsyncShaderCompiler::ClearAllWork()
{
{
std::lock_guard<std::mutex> guard(m_pending_work_lock);
m_pending_work.clear();
}
{
std::lock_guard<std::mutex> guard(m_completed_work_lock);
m_completed_work.clear();
}
}
bool AsyncShaderCompiler::WaitUntilCompletion(
const std::function<void(size_t, size_t)>& progress_callback)
{