diff options
author | bunnei <bunneidev@gmail.com> | 2019-02-24 06:15:35 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2019-03-16 05:38:48 +0100 |
commit | 574e89d924b484b846f4eb522c5a62af9d63e801 (patch) | |
tree | 24b2d6e21b9e3aff77f2242eb94ec49a2b8e67c9 /src/video_core/memory_manager.h | |
parent | Merge pull request #2237 from bunnei/cache-host-addr (diff) | |
download | yuzu-574e89d924b484b846f4eb522c5a62af9d63e801.tar yuzu-574e89d924b484b846f4eb522c5a62af9d63e801.tar.gz yuzu-574e89d924b484b846f4eb522c5a62af9d63e801.tar.bz2 yuzu-574e89d924b484b846f4eb522c5a62af9d63e801.tar.lz yuzu-574e89d924b484b846f4eb522c5a62af9d63e801.tar.xz yuzu-574e89d924b484b846f4eb522c5a62af9d63e801.tar.zst yuzu-574e89d924b484b846f4eb522c5a62af9d63e801.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/memory_manager.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/video_core/memory_manager.h b/src/video_core/memory_manager.h index fb03497ca..425e2f31c 100644 --- a/src/video_core/memory_manager.h +++ b/src/video_core/memory_manager.h @@ -27,12 +27,27 @@ public: GPUVAddr UnmapBuffer(GPUVAddr gpu_addr, u64 size); GPUVAddr GetRegionEnd(GPUVAddr region_start) const; std::optional<VAddr> GpuToCpuAddress(GPUVAddr gpu_addr); - std::vector<GPUVAddr> CpuToGpuAddress(VAddr cpu_addr) const; static constexpr u64 PAGE_BITS = 16; static constexpr u64 PAGE_SIZE = 1 << PAGE_BITS; static constexpr u64 PAGE_MASK = PAGE_SIZE - 1; + u8 Read8(GPUVAddr addr); + u16 Read16(GPUVAddr addr); + u32 Read32(GPUVAddr addr); + u64 Read64(GPUVAddr addr); + + void Write8(GPUVAddr addr, u8 data); + void Write16(GPUVAddr addr, u16 data); + void Write32(GPUVAddr addr, u32 data); + void Write64(GPUVAddr addr, u64 data); + + u8* GetPointer(GPUVAddr vaddr); + + void ReadBlock(GPUVAddr src_addr, void* dest_buffer, std::size_t size); + void WriteBlock(GPUVAddr dest_addr, const void* src_buffer, std::size_t size); + void CopyBlock(VAddr dest_addr, VAddr src_addr, std::size_t size); + private: enum class PageStatus : u64 { Unmapped = 0xFFFFFFFFFFFFFFFFULL, |