diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2023-12-24 18:20:02 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-01-19 03:12:30 +0100 |
commit | 7a9d1ad2f873003e6aad637e8749b77b91247da3 (patch) | |
tree | e167a5d5ad73dbd78dc4b5c165b12a1220a167f4 /src/core/hle/service/nvdrv/devices/nvhost_vic.cpp | |
parent | Core: Initial implementation of device memory mapping (diff) | |
download | yuzu-7a9d1ad2f873003e6aad637e8749b77b91247da3.tar yuzu-7a9d1ad2f873003e6aad637e8749b77b91247da3.tar.gz yuzu-7a9d1ad2f873003e6aad637e8749b77b91247da3.tar.bz2 yuzu-7a9d1ad2f873003e6aad637e8749b77b91247da3.tar.lz yuzu-7a9d1ad2f873003e6aad637e8749b77b91247da3.tar.xz yuzu-7a9d1ad2f873003e6aad637e8749b77b91247da3.tar.zst yuzu-7a9d1ad2f873003e6aad637e8749b77b91247da3.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_vic.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp b/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp index 87f8d7c22..d4c93ea5d 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp @@ -33,7 +33,7 @@ NvResult nvhost_vic::Ioctl1(DeviceFD fd, Ioctl command, std::span<const u8> inpu case 0x3: return WrapFixed(this, &nvhost_vic::GetWaitbase, input, output); case 0x9: - return WrapFixedVariable(this, &nvhost_vic::MapBuffer, input, output); + return WrapFixedVariable(this, &nvhost_vic::MapBuffer, input, output, fd); case 0xa: return WrapFixedVariable(this, &nvhost_vic::UnmapBuffer, input, output); default: @@ -68,7 +68,9 @@ NvResult nvhost_vic::Ioctl3(DeviceFD fd, Ioctl command, std::span<const u8> inpu return NvResult::NotImplemented; } -void nvhost_vic::OnOpen(DeviceFD fd) {} +void nvhost_vic::OnOpen(size_t session_id, DeviceFD fd) { + sessions[fd] = session_id; +} void nvhost_vic::OnClose(DeviceFD fd) { auto& host1x_file = core.Host1xDeviceFile(); @@ -76,6 +78,10 @@ void nvhost_vic::OnClose(DeviceFD fd) { if (iter != host1x_file.fd_to_id.end()) { system.GPU().ClearCdmaInstance(iter->second); } + auto it = sessions.find(fd); + if (it != sessions.end()) { + sessions.erase(it); + } } } // namespace Service::Nvidia::Devices |