aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/device_memory.cpp
diff options
context:
space:
mode:
authorGPUCode <[email protected]>2023-11-17 22:23:48 +0200
committert895 <[email protected]>2023-11-25 00:46:47 -0500
commit48388376206aaa7d887b41030019035a06203867 (patch)
tree6dc27b3fc69d7ec4a1d4247fd0a00b7542ef72d4 /src/core/device_memory.cpp
parent2e02efbdd047ce125c7d0af418619f4e120df798 (diff)
downloadyuzu-android-48388376206aaa7d887b41030019035a06203867.tar.gz
yuzu-android-48388376206aaa7d887b41030019035a06203867.zip
device_memory: Enable direct mapped addresses for nce
Diffstat (limited to 'src/core/device_memory.cpp')
-rw-r--r--src/core/device_memory.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/core/device_memory.cpp b/src/core/device_memory.cpp
index de3f8ef8f..0528a8e3b 100644
--- a/src/core/device_memory.cpp
+++ b/src/core/device_memory.cpp
@@ -6,15 +6,20 @@
namespace Core {
-#ifdef ANDROID
+#ifdef ARCHITECTURE_arm64
constexpr size_t VirtualReserveSize = 1ULL << 38;
#else
constexpr size_t VirtualReserveSize = 1ULL << 39;
#endif
-DeviceMemory::DeviceMemory()
+DeviceMemory::DeviceMemory(bool direct_mapped_address)
: buffer{Kernel::Board::Nintendo::Nx::KSystemControl::Init::GetIntendedMemorySize(),
- VirtualReserveSize} {}
+ VirtualReserveSize} {
+ if (direct_mapped_address) {
+ buffer.EnableDirectMappedAddress();
+ }
+}
+
DeviceMemory::~DeviceMemory() = default;
} // namespace Core