diff options
| author | bunnei <bunneidev@gmail.com> | 2018-10-17 18:40:34 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-17 18:40:34 -0400 |
| commit | f912a82a8efe9a699fef74acb0db9f1779295c32 (patch) | |
| tree | 716cce6c0c286c224f3eeb196cdb1bbb4a42850e /src/video_core/memory_manager.cpp | |
| parent | 6e8752881ca4ee3f2ae9259d3df13e03bbf53938 (diff) | |
| parent | 648b55c6b90347c0bf823c095abd8de5ba42fdc6 (diff) | |
Merge pull request #1497 from bunnei/flush-framebuffers
Implement flushing in the rasterizer cache
Diffstat (limited to 'src/video_core/memory_manager.cpp')
| -rw-r--r-- | src/video_core/memory_manager.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/video_core/memory_manager.cpp b/src/video_core/memory_manager.cpp index ca923d17d..022d4ab74 100644 --- a/src/video_core/memory_manager.cpp +++ b/src/video_core/memory_manager.cpp @@ -87,6 +87,16 @@ GPUVAddr MemoryManager::UnmapBuffer(GPUVAddr gpu_addr, u64 size) { return gpu_addr; } +GPUVAddr MemoryManager::GetRegionEnd(GPUVAddr region_start) const { + for (const auto& region : mapped_regions) { + const GPUVAddr region_end{region.gpu_addr + region.size}; + if (region_start >= region.gpu_addr && region_start < region_end) { + return region_end; + } + } + return {}; +} + boost::optional<GPUVAddr> MemoryManager::FindFreeBlock(u64 size, u64 align) { GPUVAddr gpu_addr = 0; u64 free_space = 0; |
