summaryrefslogtreecommitdiff
path: root/src/video_core/rasterizer_accelerated.h
diff options
context:
space:
mode:
authorGravatar Lioncash2019-11-26 14:10:49 -0500
committerGravatar Lioncash2019-11-26 21:55:37 -0500
commit536fc7f0ea77e08d68c760f387c307d258804e3b (patch)
treee979df531bf1222788cc26144531c6e6f5cca1d1 /src/video_core/rasterizer_accelerated.h
parentcore/memory: Move memory read/write implementation functions into an anonymou... (diff)
downloadyuzu-536fc7f0ea77e08d68c760f387c307d258804e3b.tar.gz
yuzu-536fc7f0ea77e08d68c760f387c307d258804e3b.tar.xz
yuzu-536fc7f0ea77e08d68c760f387c307d258804e3b.zip
core: Prepare various classes for memory read/write migration
Amends a few interfaces to be able to handle the migration over to the new Memory class by passing the class by reference as a function parameter where necessary. Notably, within the filesystem services, this eliminates two ReadBlock() calls by using the helper functions of HLERequestContext to do that for us.
Diffstat (limited to 'src/video_core/rasterizer_accelerated.h')
-rw-r--r--src/video_core/rasterizer_accelerated.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/video_core/rasterizer_accelerated.h b/src/video_core/rasterizer_accelerated.h
index 8f7e3547e..315798e7c 100644
--- a/src/video_core/rasterizer_accelerated.h
+++ b/src/video_core/rasterizer_accelerated.h
@@ -11,12 +11,16 @@
11#include "common/common_types.h" 11#include "common/common_types.h"
12#include "video_core/rasterizer_interface.h" 12#include "video_core/rasterizer_interface.h"
13 13
14namespace Memory {
15class Memory;
16}
17
14namespace VideoCore { 18namespace VideoCore {
15 19
16/// Implements the shared part in GPU accelerated rasterizers in RasterizerInterface. 20/// Implements the shared part in GPU accelerated rasterizers in RasterizerInterface.
17class RasterizerAccelerated : public RasterizerInterface { 21class RasterizerAccelerated : public RasterizerInterface {
18public: 22public:
19 explicit RasterizerAccelerated(); 23 explicit RasterizerAccelerated(Memory::Memory& cpu_memory_);
20 ~RasterizerAccelerated() override; 24 ~RasterizerAccelerated() override;
21 25
22 void UpdatePagesCachedCount(VAddr addr, u64 size, int delta) override; 26 void UpdatePagesCachedCount(VAddr addr, u64 size, int delta) override;
@@ -24,8 +28,9 @@ public:
24private: 28private:
25 using CachedPageMap = boost::icl::interval_map<u64, int>; 29 using CachedPageMap = boost::icl::interval_map<u64, int>;
26 CachedPageMap cached_pages; 30 CachedPageMap cached_pages;
27
28 std::mutex pages_mutex; 31 std::mutex pages_mutex;
32
33 Memory::Memory& cpu_memory;
29}; 34};
30 35
31} // namespace VideoCore 36} // namespace VideoCore