diff options
| author | 2021-11-05 03:10:20 +0100 | |
|---|---|---|
| committer | 2022-10-06 21:00:51 +0200 | |
| commit | c77b8df12efab9f36f007ff3b309d43588a71260 (patch) | |
| tree | d253b2f25b6b566ccd779de4ac3b4bf1e7b9c3d5 /src | |
| parent | NVDRV: Fix clearing when destroying. (diff) | |
| download | yuzu-c77b8df12efab9f36f007ff3b309d43588a71260.tar.gz yuzu-c77b8df12efab9f36f007ff3b309d43588a71260.tar.xz yuzu-c77b8df12efab9f36f007ff3b309d43588a71260.zip | |
NVASGPU: Fix Remap.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp index 9283d6aec..b1c683511 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp | |||
| @@ -144,6 +144,14 @@ NvResult nvhost_as_gpu::Remap(const std::vector<u8>& input, std::vector<u8>& out | |||
| 144 | LOG_DEBUG(Service_NVDRV, "remap entry, offset=0x{:X} handle=0x{:X} pages=0x{:X}", | 144 | LOG_DEBUG(Service_NVDRV, "remap entry, offset=0x{:X} handle=0x{:X} pages=0x{:X}", |
| 145 | entry.offset, entry.nvmap_handle, entry.pages); | 145 | entry.offset, entry.nvmap_handle, entry.pages); |
| 146 | 146 | ||
| 147 | if (entry.nvmap_handle == 0) { | ||
| 148 | // If nvmap handle is null, we should unmap instead. | ||
| 149 | const auto offset{static_cast<GPUVAddr>(entry.offset) << 0x10}; | ||
| 150 | const auto size{static_cast<u64>(entry.pages) << 0x10}; | ||
| 151 | system.GPU().MemoryManager().Unmap(offset, size); | ||
| 152 | continue; | ||
| 153 | } | ||
| 154 | |||
| 147 | const auto object{nvmap.GetHandle(entry.nvmap_handle)}; | 155 | const auto object{nvmap.GetHandle(entry.nvmap_handle)}; |
| 148 | if (!object) { | 156 | if (!object) { |
| 149 | LOG_CRITICAL(Service_NVDRV, "invalid nvmap_handle={:X}", entry.nvmap_handle); | 157 | LOG_CRITICAL(Service_NVDRV, "invalid nvmap_handle={:X}", entry.nvmap_handle); |