summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-04-06 02:18:27 +0200
committerLioncash <mathew1800@gmail.com>2019-04-06 02:18:29 +0200
commit9dec087fca5944b6e4ee5f0f76c0716a93a9fe4d (patch)
tree13001b2f2e22d963ab0043daf17d6220cc59ad75 /src
parentMerge pull request #2282 from bunnei/gpu-asynch-v2 (diff)
downloadyuzu-9dec087fca5944b6e4ee5f0f76c0716a93a9fe4d.tar
yuzu-9dec087fca5944b6e4ee5f0f76c0716a93a9fe4d.tar.gz
yuzu-9dec087fca5944b6e4ee5f0f76c0716a93a9fe4d.tar.bz2
yuzu-9dec087fca5944b6e4ee5f0f76c0716a93a9fe4d.tar.lz
yuzu-9dec087fca5944b6e4ee5f0f76c0716a93a9fe4d.tar.xz
yuzu-9dec087fca5944b6e4ee5f0f76c0716a93a9fe4d.tar.zst
yuzu-9dec087fca5944b6e4ee5f0f76c0716a93a9fe4d.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/memory_manager.cpp4
-rw-r--r--src/video_core/memory_manager.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/memory_manager.cpp b/src/video_core/memory_manager.cpp
index e76b59842..124a3c6d2 100644
--- a/src/video_core/memory_manager.cpp
+++ b/src/video_core/memory_manager.cpp
@@ -99,12 +99,12 @@ bool MemoryManager::IsAddressValid(GPUVAddr addr) const {
return (addr >> page_bits) < page_table.pointers.size();
}
-std::optional<VAddr> MemoryManager::GpuToCpuAddress(GPUVAddr addr) {
+std::optional<VAddr> MemoryManager::GpuToCpuAddress(GPUVAddr addr) const {
if (!IsAddressValid(addr)) {
return {};
}
- VAddr cpu_addr{page_table.backing_addr[addr >> page_bits]};
+ const VAddr cpu_addr{page_table.backing_addr[addr >> page_bits]};
if (cpu_addr) {
return cpu_addr + (addr & page_mask);
}
diff --git a/src/video_core/memory_manager.h b/src/video_core/memory_manager.h
index 34744bb27..c3b4d7ae7 100644
--- a/src/video_core/memory_manager.h
+++ b/src/video_core/memory_manager.h
@@ -50,7 +50,7 @@ public:
GPUVAddr MapBufferEx(VAddr cpu_addr, u64 size);
GPUVAddr MapBufferEx(VAddr cpu_addr, GPUVAddr addr, u64 size);
GPUVAddr UnmapBuffer(GPUVAddr addr, u64 size);
- std::optional<VAddr> GpuToCpuAddress(GPUVAddr addr);
+ std::optional<VAddr> GpuToCpuAddress(GPUVAddr addr) const;
template <typename T>
T Read(GPUVAddr addr);