diff options
author | Liam <byteslice@airmail.cc> | 2023-03-18 02:26:04 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-03-22 14:35:16 +0100 |
commit | fb49ec19c1fb6030fcc960077e82c998290d0ab8 (patch) | |
tree | aa5f53cbbfc2b255923bcf362ee0009938ed8187 /src/core/hle/kernel/k_memory_layout.cpp | |
parent | Merge pull request #9955 from liamwhite/color-blend-equation (diff) | |
download | yuzu-fb49ec19c1fb6030fcc960077e82c998290d0ab8.tar yuzu-fb49ec19c1fb6030fcc960077e82c998290d0ab8.tar.gz yuzu-fb49ec19c1fb6030fcc960077e82c998290d0ab8.tar.bz2 yuzu-fb49ec19c1fb6030fcc960077e82c998290d0ab8.tar.lz yuzu-fb49ec19c1fb6030fcc960077e82c998290d0ab8.tar.xz yuzu-fb49ec19c1fb6030fcc960077e82c998290d0ab8.tar.zst yuzu-fb49ec19c1fb6030fcc960077e82c998290d0ab8.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/k_memory_layout.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/core/hle/kernel/k_memory_layout.cpp b/src/core/hle/kernel/k_memory_layout.cpp index 9ff751119..af40092c0 100644 --- a/src/core/hle/kernel/k_memory_layout.cpp +++ b/src/core/hle/kernel/k_memory_layout.cpp @@ -85,7 +85,8 @@ bool KMemoryRegionTree::Insert(u64 address, size_t size, u32 type_id, u32 new_at return true; } -VAddr KMemoryRegionTree::GetRandomAlignedRegion(size_t size, size_t alignment, u32 type_id) { +KVirtualAddress KMemoryRegionTree::GetRandomAlignedRegion(size_t size, size_t alignment, + u32 type_id) { // We want to find the total extents of the type id. const auto extents = this->GetDerivedRegionExtents(static_cast<KMemoryRegionType>(type_id)); @@ -130,11 +131,13 @@ KMemoryLayout::KMemoryLayout() m_virtual_linear_tree{m_memory_region_allocator}, m_physical_linear_tree{ m_memory_region_allocator} {} -void KMemoryLayout::InitializeLinearMemoryRegionTrees(PAddr aligned_linear_phys_start, - VAddr linear_virtual_start) { +void KMemoryLayout::InitializeLinearMemoryRegionTrees(KPhysicalAddress aligned_linear_phys_start, + KVirtualAddress linear_virtual_start) { // Set static differences. - m_linear_phys_to_virt_diff = linear_virtual_start - aligned_linear_phys_start; - m_linear_virt_to_phys_diff = aligned_linear_phys_start - linear_virtual_start; + m_linear_phys_to_virt_diff = + GetInteger(linear_virtual_start) - GetInteger(aligned_linear_phys_start); + m_linear_virt_to_phys_diff = + GetInteger(aligned_linear_phys_start) - GetInteger(linear_virtual_start); // Initialize linear trees. for (auto& region : GetPhysicalMemoryRegionTree()) { |