diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2022-02-05 18:15:26 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2022-10-06 21:00:52 +0200 |
commit | 4d60410dd979fb688de7735d2b4b25a557bdeac7 (patch) | |
tree | b472c870acc010ef938f8d0d478d5e511f94aa11 /src/core/hle/service/nvdrv/devices/nvmap.cpp | |
parent | Vulkan: Fix Scissor on Clears (diff) | |
download | yuzu-4d60410dd979fb688de7735d2b4b25a557bdeac7.tar yuzu-4d60410dd979fb688de7735d2b4b25a557bdeac7.tar.gz yuzu-4d60410dd979fb688de7735d2b4b25a557bdeac7.tar.bz2 yuzu-4d60410dd979fb688de7735d2b4b25a557bdeac7.tar.lz yuzu-4d60410dd979fb688de7735d2b4b25a557bdeac7.tar.xz yuzu-4d60410dd979fb688de7735d2b4b25a557bdeac7.tar.zst yuzu-4d60410dd979fb688de7735d2b4b25a557bdeac7.zip |
Diffstat (limited to 'src/core/hle/service/nvdrv/devices/nvmap.cpp')
-rw-r--r-- | src/core/hle/service/nvdrv/devices/nvmap.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvmap.cpp b/src/core/hle/service/nvdrv/devices/nvmap.cpp index 279997e81..992c117f1 100644 --- a/src/core/hle/service/nvdrv/devices/nvmap.cpp +++ b/src/core/hle/service/nvdrv/devices/nvmap.cpp @@ -9,6 +9,8 @@ #include "common/assert.h" #include "common/logging/log.h" #include "core/core.h" +#include "core/hle/kernel/k_page_table.h" +#include "core/hle/kernel/k_process.h" #include "core/hle/service/nvdrv/core/container.h" #include "core/hle/service/nvdrv/core/nvmap.h" #include "core/hle/service/nvdrv/devices/nvmap.h" @@ -136,6 +138,10 @@ NvResult nvmap::IocAlloc(const std::vector<u8>& input, std::vector<u8>& output) LOG_CRITICAL(Service_NVDRV, "Object failed to allocate, handle={:08X}", params.handle); return result; } + ASSERT(system.CurrentProcess() + ->PageTable() + .LockForDeviceAddressSpace(handle_description->address, handle_description->size) + .IsSuccess()); std::memcpy(output.data(), ¶ms, sizeof(params)); return result; } @@ -256,6 +262,10 @@ NvResult nvmap::IocFree(const std::vector<u8>& input, std::vector<u8>& output) { } if (auto freeInfo{file.FreeHandle(params.handle, false)}) { + ASSERT(system.CurrentProcess() + ->PageTable() + .UnlockForDeviceAddressSpace(freeInfo->address, freeInfo->size) + .IsSuccess()); params.address = freeInfo->address; params.size = static_cast<u32>(freeInfo->size); params.flags.raw = 0; |