From 7039ece0a0effbb62c18fba3ac57bdb3d89b27c8 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Fri, 7 Jun 2019 15:16:54 -0400 Subject: [PATCH] nv_services: Create GPU channels correctly --- src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp | 6 ++++-- 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& input, std::vector& 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& input, std::vector& output); std::shared_ptr nvmap_dev; + u32 channels{}; }; } // namespace Service::Nvidia::Devices