mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-15 18:22:51 +00:00
NVASGPU: Fix Remap.
This commit is contained in:
parent
ad038609c8
commit
c77b8df12e
|
@ -144,6 +144,14 @@ NvResult nvhost_as_gpu::Remap(const std::vector<u8>& input, std::vector<u8>& 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<GPUVAddr>(entry.offset) << 0x10};
|
||||
const auto size{static_cast<u64>(entry.pages) << 0x10};
|
||||
system.GPU().MemoryManager().Unmap(offset, size);
|
||||
continue;
|
||||
}
|
||||
|
||||
const auto object{nvmap.GetHandle(entry.nvmap_handle)};
|
||||
if (!object) {
|
||||
LOG_CRITICAL(Service_NVDRV, "invalid nvmap_handle={:X}", entry.nvmap_handle);
|
||||
|
|
Loading…
Reference in a new issue