diff options
Diffstat (limited to 'src/core/hardware_interrupt_manager.cpp')
| -rw-r--r-- | src/core/hardware_interrupt_manager.cpp | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/core/hardware_interrupt_manager.cpp b/src/core/hardware_interrupt_manager.cpp deleted file mode 100644 index d08cc3315..000000000 --- a/src/core/hardware_interrupt_manager.cpp +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include "core/core.h" | ||
| 5 | #include "core/core_timing.h" | ||
| 6 | #include "core/hardware_interrupt_manager.h" | ||
| 7 | #include "core/hle/service/nvdrv/nvdrv_interface.h" | ||
| 8 | #include "core/hle/service/sm/sm.h" | ||
| 9 | |||
| 10 | namespace Core::Hardware { | ||
| 11 | |||
| 12 | InterruptManager::InterruptManager(Core::System& system_in) : system(system_in) { | ||
| 13 | gpu_interrupt_event = Core::Timing::CreateEvent( | ||
| 14 | "GPUInterrupt", | ||
| 15 | [this](std::uintptr_t message, u64 time, | ||
| 16 | std::chrono::nanoseconds) -> std::optional<std::chrono::nanoseconds> { | ||
| 17 | auto nvdrv = system.ServiceManager().GetService<Service::Nvidia::NVDRV>("nvdrv"); | ||
| 18 | const u32 syncpt = static_cast<u32>(message >> 32); | ||
| 19 | const u32 value = static_cast<u32>(message); | ||
| 20 | nvdrv->SignalGPUInterruptSyncpt(syncpt, value); | ||
| 21 | return std::nullopt; | ||
| 22 | }); | ||
| 23 | } | ||
| 24 | |||
| 25 | InterruptManager::~InterruptManager() = default; | ||
| 26 | |||
| 27 | void InterruptManager::GPUInterruptSyncpt(const u32 syncpoint_id, const u32 value) { | ||
| 28 | const u64 msg = (static_cast<u64>(syncpoint_id) << 32ULL) | value; | ||
| 29 | system.CoreTiming().ScheduleEvent(std::chrono::nanoseconds{10}, gpu_interrupt_event, msg); | ||
| 30 | } | ||
| 31 | |||
| 32 | } // namespace Core::Hardware | ||