diff options
| author | bunnei <bunneidev@gmail.com> | 2021-01-29 22:56:29 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-29 22:56:29 -0800 |
| commit | 5861bacafd76b76bc196e9522e0315fb243635f8 (patch) | |
| tree | 4445cb6a55c7eb3f0e41f91866b9c00d782f5f33 /src/video_core/memory_manager.h | |
| parent | f67cfebada84072b9c433c4cffd51a35c868261c (diff) | |
| parent | bda177ef409242c7ce200f55c1d8eea0e5aba6d3 (diff) | |
Merge pull request #5795 from ReinUsesLisp/bytes-to-map-end
video_core/memory_manager: Add BytesToMapEnd
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 a52fbbd8c..b468a67de 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 @@ -151,6 +154,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 |
