diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-06-07 15:16:54 -0400 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2019-07-05 15:49:12 -0400 |
commit | 7039ece0a0effbb62c18fba3ac57bdb3d89b27c8 (patch) | |
tree | 7e8fd29fece34f724c22bb2c828118684285ae25 | |
parent | 82b829625b89a706dd0d867c529f533fe928710c (diff) |
nv_services: Create GPU channels correctly
-rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp | 6 | ||||
-rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_gpu.h | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp index 9d1107594..8083f5a87 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp @@ -119,8 +119,10 @@ u32 nvhost_gpu::AllocGPFIFOEx2(const std::vector<u8>& input, std::vector<u8>& ou params.num_entries, params.flags, params.unk0, params.unk1, params.unk2, params.unk3); - params.fence_out.id = 0; - params.fence_out.value = 0; + auto& gpu = Core::System::GetInstance().GPU(); + params.fence_out.id = channels; + params.fence_out.value = gpu.GetSyncpointValue(channels); + channels++; std::memcpy(output.data(), ¶ms, output.size()); return 0; } diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_gpu.h index 0729eeb8d..54378cb5d 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.h @@ -190,6 +190,7 @@ private: u32 ChannelSetTimeout(const std::vector<u8>& input, std::vector<u8>& output); std::shared_ptr<nvmap> nvmap_dev; + u32 channels{}; }; } // namespace Service::Nvidia::Devices |