summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/AsyncShaderCompiler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoCommon/AsyncShaderCompiler.cpp')
-rw-r--r--Source/Core/VideoCommon/AsyncShaderCompiler.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/AsyncShaderCompiler.cpp b/Source/Core/VideoCommon/AsyncShaderCompiler.cpp
index c69354628d..e312525eb9 100644
--- a/Source/Core/VideoCommon/AsyncShaderCompiler.cpp
+++ b/Source/Core/VideoCommon/AsyncShaderCompiler.cpp
@@ -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)
{