diff options
author | bunnei <bunneidev@gmail.com> | 2020-10-27 05:58:59 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2020-11-01 09:52:34 +0100 |
commit | 4a3fd97e4803a68ee260a0d9e38f293967b783b4 (patch) | |
tree | f8f608b0cfd660f66d3c2213c3eb9b2b6ca21765 /src/core/hle/service/nvdrv/nvdrv.cpp | |
parent | hle: service: nvdrv: Implement SyncpointManager, to manage syncpoints. (diff) | |
download | yuzu-4a3fd97e4803a68ee260a0d9e38f293967b783b4.tar yuzu-4a3fd97e4803a68ee260a0d9e38f293967b783b4.tar.gz yuzu-4a3fd97e4803a68ee260a0d9e38f293967b783b4.tar.bz2 yuzu-4a3fd97e4803a68ee260a0d9e38f293967b783b4.tar.lz yuzu-4a3fd97e4803a68ee260a0d9e38f293967b783b4.tar.xz yuzu-4a3fd97e4803a68ee260a0d9e38f293967b783b4.tar.zst yuzu-4a3fd97e4803a68ee260a0d9e38f293967b783b4.zip |
Diffstat (limited to 'src/core/hle/service/nvdrv/nvdrv.cpp')
-rw-r--r-- | src/core/hle/service/nvdrv/nvdrv.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/hle/service/nvdrv/nvdrv.cpp b/src/core/hle/service/nvdrv/nvdrv.cpp index e6a205c8e..26c1bf751 100644 --- a/src/core/hle/service/nvdrv/nvdrv.cpp +++ b/src/core/hle/service/nvdrv/nvdrv.cpp @@ -21,6 +21,7 @@ #include "core/hle/service/nvdrv/interface.h" #include "core/hle/service/nvdrv/nvdrv.h" #include "core/hle/service/nvdrv/nvmemp.h" +#include "core/hle/service/nvdrv/syncpoint_manager.h" #include "core/hle/service/nvflinger/nvflinger.h" namespace Service::Nvidia { @@ -40,7 +41,7 @@ Module::Module(Core::System& system) : syncpoint_manager{system.GPU()} { auto& kernel = system.Kernel(); for (u32 i = 0; i < MaxNvEvents; i++) { std::string event_label = fmt::format("NVDRV::NvEvent_{}", i); - events_interface.events[i] = Kernel::WritableEvent::CreateEventPair(kernel, event_label); + events_interface.events[i] = {Kernel::WritableEvent::CreateEventPair(kernel, event_label)}; events_interface.status[i] = EventState::Free; events_interface.registered[i] = false; } @@ -95,17 +96,17 @@ 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].writable->Signal(); + events_interface.events[i].event.writable->Signal(); } } } std::shared_ptr<Kernel::ReadableEvent> Module::GetEvent(const u32 event_id) const { - return events_interface.events[event_id].readable; + return events_interface.events[event_id].event.readable; } std::shared_ptr<Kernel::WritableEvent> Module::GetEventWriteable(const u32 event_id) const { - return events_interface.events[event_id].writable; + return events_interface.events[event_id].event.writable; } } // namespace Service::Nvidia |