summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvdrv
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-06-07 21:16:54 +0200
committerFernandoS27 <fsahmkow27@gmail.com>2019-07-05 21:49:12 +0200
commit7039ece0a0effbb62c18fba3ac57bdb3d89b27c8 (patch)
tree7e8fd29fece34f724c22bb2c828118684285ae25 /src/core/hle/service/nvdrv
parentvideo_core: Implement GPU side Syncpoints (diff)
downloadyuzu-7039ece0a0effbb62c18fba3ac57bdb3d89b27c8.tar
yuzu-7039ece0a0effbb62c18fba3ac57bdb3d89b27c8.tar.gz
yuzu-7039ece0a0effbb62c18fba3ac57bdb3d89b27c8.tar.bz2
yuzu-7039ece0a0effbb62c18fba3ac57bdb3d89b27c8.tar.lz
yuzu-7039ece0a0effbb62c18fba3ac57bdb3d89b27c8.tar.xz
yuzu-7039ece0a0effbb62c18fba3ac57bdb3d89b27c8.tar.zst
yuzu-7039ece0a0effbb62c18fba3ac57bdb3d89b27c8.zip
Diffstat (limited to 'src/core/hle/service/nvdrv')
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp6
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_gpu.h1
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(), &params, 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