diff options
Diffstat (limited to '')
-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; }; |