diff options
| author | 2018-07-02 09:42:48 -0500 | |
|---|---|---|
| committer | 2018-07-02 09:42:48 -0500 | |
| commit | e9d147349bd90b7b2ee6d0f9f5825de28c3a018e (patch) | |
| tree | e9bcfdf0b43aef549e5bbd2058e7368a17735500 /src | |
| parent | Merge pull request #595 from bunnei/raster-cache (diff) | |
| download | yuzu-e9d147349bd90b7b2ee6d0f9f5825de28c3a018e.tar.gz yuzu-e9d147349bd90b7b2ee6d0f9f5825de28c3a018e.tar.xz yuzu-e9d147349bd90b7b2ee6d0f9f5825de28c3a018e.zip | |
GPU: Allow GpuToCpuAddress to return boost::none for unmapped addresses.
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/memory_manager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/memory_manager.cpp b/src/video_core/memory_manager.cpp index 5cefce9fc..2f814a184 100644 --- a/src/video_core/memory_manager.cpp +++ b/src/video_core/memory_manager.cpp | |||
| @@ -100,9 +100,9 @@ boost::optional<GPUVAddr> MemoryManager::FindFreeBlock(u64 size, u64 align) { | |||
| 100 | 100 | ||
| 101 | boost::optional<VAddr> MemoryManager::GpuToCpuAddress(GPUVAddr gpu_addr) { | 101 | boost::optional<VAddr> MemoryManager::GpuToCpuAddress(GPUVAddr gpu_addr) { |
| 102 | VAddr base_addr = PageSlot(gpu_addr); | 102 | VAddr base_addr = PageSlot(gpu_addr); |
| 103 | ASSERT(base_addr != static_cast<u64>(PageStatus::Unmapped)); | ||
| 104 | 103 | ||
| 105 | if (base_addr == static_cast<u64>(PageStatus::Allocated)) { | 104 | if (base_addr == static_cast<u64>(PageStatus::Allocated) || |
| 105 | base_addr == static_cast<u64>(PageStatus::Unmapped)) { | ||
| 106 | return {}; | 106 | return {}; |
| 107 | } | 107 | } |
| 108 | 108 | ||