mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-17 04:27:56 -05:00
video_core: Replace lock_guard with scoped_lock
This commit is contained in:
@ -253,7 +253,7 @@ GraphicsPipeline::GraphicsPipeline(
|
||||
}
|
||||
}
|
||||
if (in_parallel) {
|
||||
std::lock_guard lock{built_mutex};
|
||||
std::scoped_lock lock{built_mutex};
|
||||
built_fence.Create();
|
||||
// Flush this context to ensure compilation commands and fence are in the GPU pipe.
|
||||
glFlush();
|
||||
|
@ -258,7 +258,7 @@ void ShaderCache::LoadDiskResources(u64 title_id, std::stop_token stop_loading,
|
||||
[this, key, env = std::move(env), &state, &callback](Context* ctx) mutable {
|
||||
ctx->pools.ReleaseContents();
|
||||
auto pipeline{CreateComputePipeline(ctx->pools, key, env)};
|
||||
std::lock_guard lock{state.mutex};
|
||||
std::scoped_lock lock{state.mutex};
|
||||
if (pipeline) {
|
||||
compute_cache.emplace(key, std::move(pipeline));
|
||||
}
|
||||
@ -280,7 +280,7 @@ void ShaderCache::LoadDiskResources(u64 title_id, std::stop_token stop_loading,
|
||||
}
|
||||
ctx->pools.ReleaseContents();
|
||||
auto pipeline{CreateGraphicsPipeline(ctx->pools, key, MakeSpan(env_ptrs), false)};
|
||||
std::lock_guard lock{state.mutex};
|
||||
std::scoped_lock lock{state.mutex};
|
||||
if (pipeline) {
|
||||
graphics_cache.emplace(key, std::move(pipeline));
|
||||
}
|
||||
|
Reference in New Issue
Block a user