diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-01-22 22:31:08 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-01-22 22:31:12 +0100 |
commit | bda177ef409242c7ce200f55c1d8eea0e5aba6d3 (patch) | |
tree | 813849d9bf6d6570a40c5606e3c7c92549764e7d /src/video_core/memory_manager.h | |
parent | Merge pull request #5784 from v1993/patch-1 (diff) | |
download | yuzu-bda177ef409242c7ce200f55c1d8eea0e5aba6d3.tar yuzu-bda177ef409242c7ce200f55c1d8eea0e5aba6d3.tar.gz yuzu-bda177ef409242c7ce200f55c1d8eea0e5aba6d3.tar.bz2 yuzu-bda177ef409242c7ce200f55c1d8eea0e5aba6d3.tar.lz yuzu-bda177ef409242c7ce200f55c1d8eea0e5aba6d3.tar.xz yuzu-bda177ef409242c7ce200f55c1d8eea0e5aba6d3.tar.zst yuzu-bda177ef409242c7ce200f55c1d8eea0e5aba6d3.zip |
Diffstat (limited to 'src/video_core/memory_manager.h')
-rw-r--r-- | src/video_core/memory_manager.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/video_core/memory_manager.h b/src/video_core/memory_manager.h index c35e57689..ca8e8328e 100644 --- a/src/video_core/memory_manager.h +++ b/src/video_core/memory_manager.h @@ -85,6 +85,9 @@ public: [[nodiscard]] u8* GetPointer(GPUVAddr addr); [[nodiscard]] const u8* GetPointer(GPUVAddr addr) const; + /// Returns the number of bytes until the end of the memory map containing the given GPU address + [[nodiscard]] size_t BytesToMapEnd(GPUVAddr gpu_addr) const noexcept; + /** * ReadBlock and WriteBlock are full read and write operations over virtual * GPU Memory. It's important to use these when GPU memory may not be continuous @@ -150,6 +153,9 @@ private: VideoCore::RasterizerInterface* rasterizer = nullptr; std::vector<PageEntry> page_table; + + using MapRange = std::pair<GPUVAddr, size_t>; + std::vector<MapRange> map_ranges; }; } // namespace Tegra |