diff options
author | Liam <byteslice@airmail.cc> | 2023-12-15 03:41:28 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-12-15 04:10:21 +0100 |
commit | 2a3f84aaf28cb526121e016a9e6699fce7223407 (patch) | |
tree | afb41b9da9839a24bfcf42bd0138c6f5c7a40ead /src | |
parent | video_core: use interval map for page count tracking (diff) | |
download | yuzu-2a3f84aaf28cb526121e016a9e6699fce7223407.tar yuzu-2a3f84aaf28cb526121e016a9e6699fce7223407.tar.gz yuzu-2a3f84aaf28cb526121e016a9e6699fce7223407.tar.bz2 yuzu-2a3f84aaf28cb526121e016a9e6699fce7223407.tar.lz yuzu-2a3f84aaf28cb526121e016a9e6699fce7223407.tar.xz yuzu-2a3f84aaf28cb526121e016a9e6699fce7223407.tar.zst yuzu-2a3f84aaf28cb526121e016a9e6699fce7223407.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/video_core/rasterizer_accelerated.cpp | 2 | ||||
-rw-r--r-- | src/video_core/rasterizer_accelerated.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/video_core/rasterizer_accelerated.cpp b/src/video_core/rasterizer_accelerated.cpp index 3abfd5ff3..3c9477f6e 100644 --- a/src/video_core/rasterizer_accelerated.cpp +++ b/src/video_core/rasterizer_accelerated.cpp @@ -29,6 +29,8 @@ RasterizerAccelerated::RasterizerAccelerated(Memory& cpu_memory_) : map{}, cpu_m RasterizerAccelerated::~RasterizerAccelerated() = default; void RasterizerAccelerated::UpdatePagesCachedCount(VAddr addr, u64 size, bool cache) { + std::scoped_lock lk{map_lock}; + // Align sizes. addr = Common::AlignDown(addr, YUZU_PAGESIZE); size = Common::AlignUp(size, YUZU_PAGESIZE); diff --git a/src/video_core/rasterizer_accelerated.h b/src/video_core/rasterizer_accelerated.h index cd1c706de..f1968f186 100644 --- a/src/video_core/rasterizer_accelerated.h +++ b/src/video_core/rasterizer_accelerated.h @@ -3,6 +3,7 @@ #pragma once +#include <mutex> #include <boost/icl/interval_map.hpp> #include "common/common_types.h" @@ -30,6 +31,7 @@ private: using IntervalType = IntervalMap::interval_type; IntervalMap map; + std::mutex map_lock; Core::Memory::Memory& cpu_memory; }; |