summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-08-24 06:37:54 +0200
committerLioncash <mathew1800@gmail.com>2020-08-24 06:37:57 +0200
commit5bce81c3d6940acab92701ca284f4be79ae2a689 (patch)
treeb8644e73f926f4d0f4a60a2ba3e6cd20028756fd
parentMerge pull request #4571 from lioncash/fence (diff)
downloadyuzu-5bce81c3d6940acab92701ca284f4be79ae2a689.tar
yuzu-5bce81c3d6940acab92701ca284f4be79ae2a689.tar.gz
yuzu-5bce81c3d6940acab92701ca284f4be79ae2a689.tar.bz2
yuzu-5bce81c3d6940acab92701ca284f4be79ae2a689.tar.lz
yuzu-5bce81c3d6940acab92701ca284f4be79ae2a689.tar.xz
yuzu-5bce81c3d6940acab92701ca284f4be79ae2a689.tar.zst
yuzu-5bce81c3d6940acab92701ca284f4be79ae2a689.zip
-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 844164645..7f97f889a 100644
--- a/src/video_core/memory_manager.cpp
+++ b/src/video_core/memory_manager.cpp
@@ -312,10 +312,10 @@ void MemoryManager::CopyBlockUnsafe(GPUVAddr gpu_dest_addr, GPUVAddr gpu_src_add
WriteBlockUnsafe(gpu_dest_addr, tmp_buffer.data(), size);
}
-bool MemoryManager::IsGranularRange(GPUVAddr gpu_addr, std::size_t size) {
+bool MemoryManager::IsGranularRange(GPUVAddr gpu_addr, std::size_t size) const {
const auto cpu_addr{GpuToCpuAddress(gpu_addr)};
if (!cpu_addr) {
- return {};
+ return false;
}
const std::size_t page{(*cpu_addr & Core::Memory::PAGE_MASK) + size};
return page <= Core::Memory::PAGE_SIZE;
diff --git a/src/video_core/memory_manager.h b/src/video_core/memory_manager.h
index 681bd9588..dbd2dba52 100644
--- a/src/video_core/memory_manager.h
+++ b/src/video_core/memory_manager.h
@@ -109,7 +109,7 @@ public:
/**
* IsGranularRange checks if a gpu region can be simply read with a pointer.
*/
- bool IsGranularRange(GPUVAddr gpu_addr, std::size_t size);
+ bool IsGranularRange(GPUVAddr gpu_addr, std::size_t size) const;
GPUVAddr Map(VAddr cpu_addr, GPUVAddr gpu_addr, std::size_t size);
GPUVAddr MapAllocate(VAddr cpu_addr, std::size_t size, std::size_t align);