aboutsummaryrefslogtreecommitdiff
path: root/src/core/memory.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-08-28 10:57:56 -0400
committerLioncash <mathew1800@gmail.com>2018-08-28 11:11:50 -0400
commitb4a81f9bca87a8537a15bea5cee003c9aae23999 (patch)
treead65e21b3984d876241fc478d7624abfceb55e86 /src/core/memory.cpp
parentf727e5f0de63ee5946ac59eaae994133d1486d8e (diff)
gpu: Make memory_manager private
Makes the class interface consistent and provides accessors for obtaining a reference to the memory manager instance. Given we also return references, this makes our more flimsy uses of const apparent, given const doesn't propagate through pointers in the way one would typically expect. This makes our mutable state more apparent in some places.
Diffstat (limited to 'src/core/memory.cpp')
-rw-r--r--src/core/memory.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/memory.cpp b/src/core/memory.cpp
index 1133bcbaf0..bc34bfd6d3 100644
--- a/src/core/memory.cpp
+++ b/src/core/memory.cpp
@@ -264,7 +264,7 @@ void RasterizerMarkRegionCached(Tegra::GPUVAddr gpu_addr, u64 size, bool cached)
u64 num_pages = ((gpu_addr + size - 1) >> PAGE_BITS) - (gpu_addr >> PAGE_BITS) + 1;
for (unsigned i = 0; i < num_pages; ++i, gpu_addr += PAGE_SIZE) {
boost::optional<VAddr> maybe_vaddr =
- Core::System::GetInstance().GPU().memory_manager->GpuToCpuAddress(gpu_addr);
+ Core::System::GetInstance().GPU().MemoryManager().GpuToCpuAddress(gpu_addr);
// The GPU <-> CPU virtual memory mapping is not 1:1
if (!maybe_vaddr) {
LOG_ERROR(HW_Memory,
@@ -346,7 +346,7 @@ void RasterizerFlushVirtualRegion(VAddr start, u64 size, FlushMode mode) {
const VAddr overlap_end = std::min(end, region_end);
const std::vector<Tegra::GPUVAddr> gpu_addresses =
- system_instance.GPU().memory_manager->CpuToGpuAddress(overlap_start);
+ system_instance.GPU().MemoryManager().CpuToGpuAddress(overlap_start);
if (gpu_addresses.empty()) {
return;