summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-07-26 20:26:44 +0200
committerGitHub <noreply@github.com>2019-07-26 20:26:44 +0200
commit52f54c728d9691f113f0736fab8fbc60b408dceb (patch)
treee02db0d667f818aacbd27e54927ef91e875eb2c2 /src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp
parentMerge pull request #2739 from lioncash/cflow (diff)
parentNVServices: Correct delayed responses. (diff)
downloadyuzu-52f54c728d9691f113f0736fab8fbc60b408dceb.tar
yuzu-52f54c728d9691f113f0736fab8fbc60b408dceb.tar.gz
yuzu-52f54c728d9691f113f0736fab8fbc60b408dceb.tar.bz2
yuzu-52f54c728d9691f113f0736fab8fbc60b408dceb.tar.lz
yuzu-52f54c728d9691f113f0736fab8fbc60b408dceb.tar.xz
yuzu-52f54c728d9691f113f0736fab8fbc60b408dceb.tar.zst
yuzu-52f54c728d9691f113f0736fab8fbc60b408dceb.zip
Diffstat (limited to 'src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp')
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp
index 0e28755bd..988effd90 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp
@@ -12,10 +12,11 @@
namespace Service::Nvidia::Devices {
-nvhost_ctrl_gpu::nvhost_ctrl_gpu() = default;
+nvhost_ctrl_gpu::nvhost_ctrl_gpu(Core::System& system) : nvdevice(system) {}
nvhost_ctrl_gpu::~nvhost_ctrl_gpu() = default;
-u32 nvhost_ctrl_gpu::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) {
+u32 nvhost_ctrl_gpu::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output,
+ IoctlCtrl& ctrl) {
LOG_DEBUG(Service_NVDRV, "called, command=0x{:08X}, input_size=0x{:X}, output_size=0x{:X}",
command.raw, input.size(), output.size());
@@ -185,7 +186,7 @@ u32 nvhost_ctrl_gpu::GetGpuTime(const std::vector<u8>& input, std::vector<u8>& o
IoctlGetGpuTime params{};
std::memcpy(&params, input.data(), input.size());
- const auto ns = Core::Timing::CyclesToNs(Core::System::GetInstance().CoreTiming().GetTicks());
+ const auto ns = Core::Timing::CyclesToNs(system.CoreTiming().GetTicks());
params.gpu_time = static_cast<u64_le>(ns.count());
std::memcpy(output.data(), &params, output.size());
return 0;