From abcdc84bad04df0297e5c98ccf591cbab0825d6c Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Tue, 22 Jun 2021 18:49:27 +0200 Subject: [PATCH] early-access version 1805 --- README.md | 2 +- src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 52cdf357c..6bc9fb186 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 1804. +This is the source code for early-access 1805. ## Legal Notice 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 7dc41d875..6dc3bd5da 100755 --- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp @@ -146,6 +146,14 @@ NvResult nvhost_as_gpu::Remap(const std::vector& input, std::vector& out LOG_DEBUG(Service_NVDRV, "remap entry, offset=0x{:X} handle=0x{:X} pages=0x{:X}", entry.offset, entry.nvmap_handle, entry.pages); + if (entry.nvmap_handle == 0) { + // If nvmap handle is null, we should unmap instead. + const auto offset{static_cast(entry.offset) << 0x10}; + const auto size{static_cast(entry.pages) << 0x10}; + system.GPU().MemoryManager().Unmap(offset, size); + continue; + } + const auto object{nvmap_dev->GetObject(entry.nvmap_handle)}; if (!object) { LOG_CRITICAL(Service_NVDRV, "invalid nvmap_handle={:X}", entry.nvmap_handle);