mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-04-24 21:39:08 -05:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user