summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvdrv
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2024-02-01 12:42:11 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2024-02-01 13:00:36 +0100
commitf740d8b9be1b42dae9ac6d7311a55b0c34b5a8e1 (patch)
tree9338fba6a364f7f0eafcfb949183df85b4e0cdad /src/core/hle/service/nvdrv
parentMerge pull request #12870 from liamwhite/mac-ci (diff)
downloadyuzu-f740d8b9be1b42dae9ac6d7311a55b0c34b5a8e1.tar
yuzu-f740d8b9be1b42dae9ac6d7311a55b0c34b5a8e1.tar.gz
yuzu-f740d8b9be1b42dae9ac6d7311a55b0c34b5a8e1.tar.bz2
yuzu-f740d8b9be1b42dae9ac6d7311a55b0c34b5a8e1.tar.lz
yuzu-f740d8b9be1b42dae9ac6d7311a55b0c34b5a8e1.tar.xz
yuzu-f740d8b9be1b42dae9ac6d7311a55b0c34b5a8e1.tar.zst
yuzu-f740d8b9be1b42dae9ac6d7311a55b0c34b5a8e1.zip
Diffstat (limited to 'src/core/hle/service/nvdrv')
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp
index e6646ba04..68fe38874 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp
@@ -123,6 +123,8 @@ NvResult nvhost_as_gpu::AllocAsEx(IoctlAllocAsEx& params) {
vm.va_range_end = params.va_range_end;
}
+ const u64 max_big_page_bits = Common::Log2Ceil64(vm.va_range_end);
+
const auto start_pages{static_cast<u32>(vm.va_range_start >> VM::PAGE_SIZE_BITS)};
const auto end_pages{static_cast<u32>(vm.va_range_split >> VM::PAGE_SIZE_BITS)};
vm.small_page_allocator = std::make_shared<VM::Allocator>(start_pages, end_pages);
@@ -132,8 +134,8 @@ NvResult nvhost_as_gpu::AllocAsEx(IoctlAllocAsEx& params) {
static_cast<u32>((vm.va_range_end - vm.va_range_split) >> vm.big_page_size_bits)};
vm.big_page_allocator = std::make_unique<VM::Allocator>(start_big_pages, end_big_pages);
- gmmu = std::make_shared<Tegra::MemoryManager>(system, 40, vm.big_page_size_bits,
- VM::PAGE_SIZE_BITS);
+ gmmu = std::make_shared<Tegra::MemoryManager>(system, max_big_page_bits, vm.va_range_split,
+ vm.big_page_size_bits, VM::PAGE_SIZE_BITS);
system.GPU().InitAddressSpace(*gmmu);
vm.initialised = true;