diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-06-08 04:13:40 +0200 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2019-07-05 21:49:16 +0200 |
commit | eef55f493b636bfc57389e9c541ddf2c39f6f826 (patch) | |
tree | db7e0db06edb8dc80b67b111b4fdb06d464a1eb5 /src/core/hle | |
parent | nv_services: Stub CtrlEventSignal (diff) | |
download | yuzu-eef55f493b636bfc57389e9c541ddf2c39f6f826.tar yuzu-eef55f493b636bfc57389e9c541ddf2c39f6f826.tar.gz yuzu-eef55f493b636bfc57389e9c541ddf2c39f6f826.tar.bz2 yuzu-eef55f493b636bfc57389e9c541ddf2c39f6f826.tar.lz yuzu-eef55f493b636bfc57389e9c541ddf2c39f6f826.tar.xz yuzu-eef55f493b636bfc57389e9c541ddf2c39f6f826.tar.zst yuzu-eef55f493b636bfc57389e9c541ddf2c39f6f826.zip |
Diffstat (limited to 'src/core/hle')
-rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp index 8f47d63e3..8e28c2fa4 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp @@ -60,10 +60,12 @@ u32 nvhost_ctrl::IocCtrlEventWait(const std::vector<u8>& input, std::vector<u8>& } auto& gpu = Core::System::GetInstance().GPU(); + gpu.Guard(true); u32 current_syncpoint_value = gpu.GetSyncpointValue(params.syncpt_id); if (current_syncpoint_value >= params.threshold) { params.value = current_syncpoint_value; std::memcpy(output.data(), ¶ms, sizeof(params)); + gpu.Guard(false); return NvResult::Success; } @@ -73,6 +75,7 @@ u32 nvhost_ctrl::IocCtrlEventWait(const std::vector<u8>& input, std::vector<u8>& if (params.timeout == 0) { std::memcpy(output.data(), ¶ms, sizeof(params)); + gpu.Guard(false); return NvResult::Timeout; } @@ -81,6 +84,7 @@ u32 nvhost_ctrl::IocCtrlEventWait(const std::vector<u8>& input, std::vector<u8>& event_id = params.value & 0x00FF; if (event_id >= 64) { std::memcpy(output.data(), ¶ms, sizeof(params)); + gpu.Guard(false); return NvResult::BadParameter; } } else { @@ -100,9 +104,11 @@ u32 nvhost_ctrl::IocCtrlEventWait(const std::vector<u8>& input, std::vector<u8>& params.value |= event_id; gpu.RegisterEvent(event_id, params.syncpt_id, params.threshold); std::memcpy(output.data(), ¶ms, sizeof(params)); + gpu.Guard(false); return NvResult::Timeout; } std::memcpy(output.data(), ¶ms, sizeof(params)); + gpu.Guard(false); return NvResult::BadParameter; } |