diff options
| author | bunnei <bunneidev@gmail.com> | 2022-04-08 14:01:42 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-08 14:01:42 -0700 |
| commit | 04efd729d6b86b133d1ccacfcab77235e247f766 (patch) | |
| tree | 2a896020311d81e739adf0d2803d589f88ece313 /src/video_core/renderer_vulkan/pipeline_statistics.cpp | |
| parent | 21359936b84b30b7b83de31d86ee2bbe0bc668d3 (diff) | |
| parent | d79274a5d973f6000e20df6261d7624c89cbff59 (diff) | |
Merge pull request #8169 from merryhime/scoped_lock
Replace lock_guard with scoped_lock
Diffstat (limited to 'src/video_core/renderer_vulkan/pipeline_statistics.cpp')
| -rw-r--r-- | src/video_core/renderer_vulkan/pipeline_statistics.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/renderer_vulkan/pipeline_statistics.cpp b/src/video_core/renderer_vulkan/pipeline_statistics.cpp index bfec931a6..7ccadf084 100644 --- a/src/video_core/renderer_vulkan/pipeline_statistics.cpp +++ b/src/video_core/renderer_vulkan/pipeline_statistics.cpp @@ -57,7 +57,7 @@ void PipelineStatistics::Collect(VkPipeline pipeline) { stage_stats.basic_block_count = GetUint64(statistic); } } - std::lock_guard lock{mutex}; + std::scoped_lock lock{mutex}; collected_stats.push_back(stage_stats); } } @@ -66,7 +66,7 @@ void PipelineStatistics::Report() const { double num{}; Stats total; { - std::lock_guard lock{mutex}; + std::scoped_lock lock{mutex}; for (const Stats& stats : collected_stats) { total.code_size += stats.code_size; total.register_count += stats.register_count; |
