From 10c6d891190e407cf4fbcf6eb8ce2506ddf388ec Mon Sep 17 00:00:00 2001 From: bunnei Date: Sat, 21 Apr 2018 14:40:51 -0400 Subject: memory_manager: Add implement CpuToGpuAddress. --- src/video_core/memory_manager.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/video_core/memory_manager.h') diff --git a/src/video_core/memory_manager.h b/src/video_core/memory_manager.h index 246c8fb7e..7d745101f 100644 --- a/src/video_core/memory_manager.h +++ b/src/video_core/memory_manager.h @@ -6,6 +6,7 @@ #include #include +#include #include @@ -26,6 +27,7 @@ public: GPUVAddr MapBufferEx(VAddr cpu_addr, u64 size); GPUVAddr MapBufferEx(VAddr cpu_addr, GPUVAddr gpu_addr, u64 size); boost::optional GpuToCpuAddress(GPUVAddr gpu_addr); + std::vector CpuToGpuAddress(VAddr cpu_addr) const; static constexpr u64 PAGE_BITS = 16; static constexpr u64 PAGE_SIZE = 1 << PAGE_BITS; @@ -51,6 +53,14 @@ private: using PageBlock = std::array; std::array, PAGE_TABLE_SIZE> page_table{}; + + struct MappedRegion { + VAddr cpu_addr; + GPUVAddr gpu_addr; + u64 size; + }; + + std::vector mapped_regions; }; } // namespace Tegra -- cgit v1.2.3