summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl
diff options
context:
space:
mode:
authorMerry <git@mary.rs>2022-04-07 20:32:40 +0200
committerMerry <git@mary.rs>2022-04-07 20:44:07 +0200
commitbbc585881a69b899bfaa9c2982c87a2034d4331e (patch)
treeaa24a84a9a885da4a112d943ec267b02bba83e39 /src/video_core/renderer_opengl
parentinput_common: Replace lock_guard with scoped_lock (diff)
downloadyuzu-bbc585881a69b899bfaa9c2982c87a2034d4331e.tar
yuzu-bbc585881a69b899bfaa9c2982c87a2034d4331e.tar.gz
yuzu-bbc585881a69b899bfaa9c2982c87a2034d4331e.tar.bz2
yuzu-bbc585881a69b899bfaa9c2982c87a2034d4331e.tar.lz
yuzu-bbc585881a69b899bfaa9c2982c87a2034d4331e.tar.xz
yuzu-bbc585881a69b899bfaa9c2982c87a2034d4331e.tar.zst
yuzu-bbc585881a69b899bfaa9c2982c87a2034d4331e.zip
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r--src/video_core/renderer_opengl/gl_graphics_pipeline.cpp2
-rw-r--r--src/video_core/renderer_opengl/gl_shader_cache.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp b/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp
index 9e6732abd..fd40966d5 100644
--- a/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp
+++ b/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp
@@ -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();
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp
index 6423992c3..05c5e702c 100644
--- a/src/video_core/renderer_opengl/gl_shader_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp
@@ -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));
}