summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-06-20 03:55:00 +0200
committerLioncash <mathew1800@gmail.com>2020-06-20 03:55:02 +0200
commit4514b80b3eedff01e994f225ea3d2da292c23e01 (patch)
treef4894851ef442ef8de20bf878decbdad4b5a9ef6
parentMerge pull request #4080 from ogniK5377/audren-RendererInfo (diff)
downloadyuzu-4514b80b3eedff01e994f225ea3d2da292c23e01.tar
yuzu-4514b80b3eedff01e994f225ea3d2da292c23e01.tar.gz
yuzu-4514b80b3eedff01e994f225ea3d2da292c23e01.tar.bz2
yuzu-4514b80b3eedff01e994f225ea3d2da292c23e01.tar.lz
yuzu-4514b80b3eedff01e994f225ea3d2da292c23e01.tar.xz
yuzu-4514b80b3eedff01e994f225ea3d2da292c23e01.tar.zst
yuzu-4514b80b3eedff01e994f225ea3d2da292c23e01.zip
-rw-r--r--src/video_core/buffer_cache/buffer_cache.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h
index 308d8b55f..bae1d527c 100644
--- a/src/video_core/buffer_cache/buffer_cache.h
+++ b/src/video_core/buffer_cache/buffer_cache.h
@@ -47,7 +47,7 @@ public:
bool is_written = false, bool use_fast_cbuf = false) {
std::lock_guard lock{mutex};
- const auto& memory_manager = system.GPU().MemoryManager();
+ auto& memory_manager = system.GPU().MemoryManager();
const std::optional<VAddr> cpu_addr_opt = memory_manager.GpuToCpuAddress(gpu_addr);
if (!cpu_addr_opt) {
return {GetEmptyBuffer(size), 0};
@@ -59,7 +59,6 @@ public:
constexpr std::size_t max_stream_size = 0x800;
if (use_fast_cbuf || size < max_stream_size) {
if (!is_written && !IsRegionWritten(cpu_addr, cpu_addr + size - 1)) {
- auto& memory_manager = system.GPU().MemoryManager();
const bool is_granular = memory_manager.IsGranularRange(gpu_addr, size);
if (use_fast_cbuf) {
u8* dest;