diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-06-10 18:03:30 +0200 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2019-07-05 21:49:22 +0200 |
commit | 24408cce9bd899a6709c03b25e318123f4de7371 (patch) | |
tree | 5d9bf14216dfbf7930ad953797ab46d02c2911dc /src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp | |
parent | gpu_asynch: Simplify synchronization to a simpler consumer->producer scheme. (diff) | |
download | yuzu-24408cce9bd899a6709c03b25e318123f4de7371.tar yuzu-24408cce9bd899a6709c03b25e318123f4de7371.tar.gz yuzu-24408cce9bd899a6709c03b25e318123f4de7371.tar.bz2 yuzu-24408cce9bd899a6709c03b25e318123f4de7371.tar.lz yuzu-24408cce9bd899a6709c03b25e318123f4de7371.tar.xz yuzu-24408cce9bd899a6709c03b25e318123f4de7371.tar.zst yuzu-24408cce9bd899a6709c03b25e318123f4de7371.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp index 8083f5a87..13e80bfad 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp @@ -13,7 +13,8 @@ namespace Service::Nvidia::Devices { -nvhost_gpu::nvhost_gpu(std::shared_ptr<nvmap> nvmap_dev) : nvmap_dev(std::move(nvmap_dev)) {} +nvhost_gpu::nvhost_gpu(Core::System& system, std::shared_ptr<nvmap> nvmap_dev) + : nvdevice(system), nvmap_dev(std::move(nvmap_dev)) {} nvhost_gpu::~nvhost_gpu() = default; u32 nvhost_gpu::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) { @@ -119,7 +120,7 @@ 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); - auto& gpu = Core::System::GetInstance().GPU(); + auto& gpu = system.GPU(); params.fence_out.id = channels; params.fence_out.value = gpu.GetSyncpointValue(channels); channels++; @@ -158,7 +159,7 @@ u32 nvhost_gpu::SubmitGPFIFO(const std::vector<u8>& input, std::vector<u8>& outp UNIMPLEMENTED_IF(params.flags.add_wait.Value() != 0); UNIMPLEMENTED_IF(params.flags.add_increment.Value() != 0); - auto& gpu = Core::System::GetInstance().GPU(); + auto& gpu = system.GPU(); u32 current_syncpoint_value = gpu.GetSyncpointValue(params.fence_out.id); if (params.flags.increment.Value()) { params.fence_out.value += current_syncpoint_value; @@ -189,7 +190,7 @@ u32 nvhost_gpu::KickoffPB(const std::vector<u8>& input, std::vector<u8>& output) UNIMPLEMENTED_IF(params.flags.add_wait.Value() != 0); UNIMPLEMENTED_IF(params.flags.add_increment.Value() != 0); - auto& gpu = Core::System::GetInstance().GPU(); + auto& gpu = system.GPU(); u32 current_syncpoint_value = gpu.GetSyncpointValue(params.fence_out.id); if (params.flags.increment.Value()) { params.fence_out.value += current_syncpoint_value; |