aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/buffer_cache/buffer_base.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/buffer_cache/buffer_base.h')
-rw-r--r--src/video_core/buffer_cache/buffer_base.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/video_core/buffer_cache/buffer_base.h b/src/video_core/buffer_cache/buffer_base.h
index 40e98e3952..bec2dac246 100644
--- a/src/video_core/buffer_cache/buffer_base.h
+++ b/src/video_core/buffer_cache/buffer_base.h
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -39,7 +42,8 @@ public:
static constexpr u64 BASE_PAGE_SIZE = 1ULL << BASE_PAGE_BITS;
explicit BufferBase(VAddr cpu_addr_, u64 size_bytes_)
- : cpu_addr{cpu_addr_}, size_bytes{size_bytes_} {}
+ : cpu_addr_cached{static_cast<DAddr>(cpu_addr_)}, cpu_addr{cpu_addr_},
+ size_bytes{size_bytes_} {}
explicit BufferBase(NullBufferParams) {}
@@ -97,6 +101,8 @@ public:
return cpu_addr;
}
+ DAddr cpu_addr_cached = 0;
+
/// Returns the offset relative to the given CPU address
/// @pre IsInBounds returns true
[[nodiscard]] u32 Offset(VAddr other_cpu_addr) const noexcept {