mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-20 14:05:45 +00:00
video_core/memory_manager: Add BytesToMapEnd
Track map address sizes in a flat ordered map and add a method to query the number of bytes until the end of a map in a given address.
This commit is contained in:
parent
811407d4d2
commit
0e885adf4a
2 changed files with 27 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue