diff options
Diffstat (limited to 'src/core/hle/service/nvdrv')
-rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp | 6 | ||||
-rw-r--r-- | src/core/hle/service/nvdrv/interface.cpp | 6 | ||||
-rw-r--r-- | src/core/hle/service/nvdrv/nvdrv.cpp | 8 | ||||
-rw-r--r-- | src/core/hle/service/nvdrv/nvdrv.h | 4 |
4 files changed, 12 insertions, 12 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp index e99da24ab..775e76330 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp @@ -108,14 +108,14 @@ NvResult nvhost_ctrl::IocCtrlEventWait(const std::vector<u8>& input, std::vector // This is mostly to take into account unimplemented features. As synced // gpu is always synced. if (!gpu.IsAsync()) { - event.event->GetWritableEvent()->Signal(); + event.event->GetWritableEvent().Signal(); return NvResult::Success; } auto lock = gpu.LockSync(); const u32 current_syncpoint_value = event.fence.value; const s32 diff = current_syncpoint_value - params.threshold; if (diff >= 0) { - event.event->GetWritableEvent()->Signal(); + event.event->GetWritableEvent().Signal(); params.value = current_syncpoint_value; std::memcpy(output.data(), ¶ms, sizeof(params)); return NvResult::Success; @@ -142,7 +142,7 @@ NvResult nvhost_ctrl::IocCtrlEventWait(const std::vector<u8>& input, std::vector params.value = ((params.syncpt_id & 0xfff) << 16) | 0x10000000; } params.value |= event_id; - event.event->GetWritableEvent()->Clear(); + event.event->GetWritableEvent().Clear(); gpu.RegisterSyncptInterrupt(params.syncpt_id, target_value); std::memcpy(output.data(), ¶ms, sizeof(params)); return NvResult::Timeout; diff --git a/src/core/hle/service/nvdrv/interface.cpp b/src/core/hle/service/nvdrv/interface.cpp index 8e359040f..dc9b9341f 100644 --- a/src/core/hle/service/nvdrv/interface.cpp +++ b/src/core/hle/service/nvdrv/interface.cpp @@ -187,9 +187,9 @@ void NVDRV::QueryEvent(Kernel::HLERequestContext& ctx) { if (event_id < MaxNvEvents) { IPC::ResponseBuilder rb{ctx, 3, 1}; rb.Push(RESULT_SUCCESS); - auto event = nvdrv->GetEvent(event_id); - event->Clear(); - rb.PushCopyObjects(event.get()); + auto& event = nvdrv->GetEvent(event_id); + event.Clear(); + rb.PushCopyObjects(event); rb.PushEnum(NvResult::Success); } else { IPC::ResponseBuilder rb{ctx, 3}; diff --git a/src/core/hle/service/nvdrv/nvdrv.cpp b/src/core/hle/service/nvdrv/nvdrv.cpp index 2fbf61cd6..74796dce1 100644 --- a/src/core/hle/service/nvdrv/nvdrv.cpp +++ b/src/core/hle/service/nvdrv/nvdrv.cpp @@ -176,16 +176,16 @@ void Module::SignalSyncpt(const u32 syncpoint_id, const u32 value) { if (events_interface.assigned_syncpt[i] == syncpoint_id && events_interface.assigned_value[i] == value) { events_interface.LiberateEvent(i); - events_interface.events[i].event->GetWritableEvent()->Signal(); + events_interface.events[i].event->GetWritableEvent().Signal(); } } } -std::shared_ptr<Kernel::KReadableEvent> Module::GetEvent(const u32 event_id) const { - return SharedFrom(events_interface.events[event_id].event->GetReadableEvent()); +Kernel::KReadableEvent& Module::GetEvent(const u32 event_id) { + return events_interface.events[event_id].event->GetReadableEvent(); } -std::shared_ptr<Kernel::KWritableEvent> Module::GetEventWriteable(const u32 event_id) const { +Kernel::KWritableEvent& Module::GetEventWriteable(const u32 event_id) { return events_interface.events[event_id].event->GetWritableEvent(); } diff --git a/src/core/hle/service/nvdrv/nvdrv.h b/src/core/hle/service/nvdrv/nvdrv.h index ea5dbbdf9..a43ceb7ae 100644 --- a/src/core/hle/service/nvdrv/nvdrv.h +++ b/src/core/hle/service/nvdrv/nvdrv.h @@ -136,9 +136,9 @@ public: void SignalSyncpt(const u32 syncpoint_id, const u32 value); - std::shared_ptr<Kernel::KReadableEvent> GetEvent(u32 event_id) const; + Kernel::KReadableEvent& GetEvent(u32 event_id); - std::shared_ptr<Kernel::KWritableEvent> GetEventWriteable(u32 event_id) const; + Kernel::KWritableEvent& GetEventWriteable(u32 event_id); private: /// Manages syncpoints on the host |