summaryrefslogtreecommitdiff
path: root/src/core/hardware_interrupt_manager.cpp
diff options
context:
space:
mode:
authorGravatar Fernando S2022-07-10 10:29:56 +0200
committerGravatar GitHub2022-07-10 10:29:56 +0200
commit25e47738f71e6a6469ff251dd84e28289133dad1 (patch)
treec431a3b1ee04fb4da60e08ab21d78a5813e9b528 /src/core/hardware_interrupt_manager.cpp
parentMerge pull request #8531 from FernandoS27/core-timing-fix-reg (diff)
parentPR (diff)
downloadyuzu-25e47738f71e6a6469ff251dd84e28289133dad1.tar.gz
yuzu-25e47738f71e6a6469ff251dd84e28289133dad1.tar.xz
yuzu-25e47738f71e6a6469ff251dd84e28289133dad1.zip
Merge pull request #8561 from Kelebek1/Audio-CoreTiming
Rework CoreTiming events
Diffstat (limited to 'src/core/hardware_interrupt_manager.cpp')
-rw-r--r--src/core/hardware_interrupt_manager.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/hardware_interrupt_manager.cpp b/src/core/hardware_interrupt_manager.cpp
index d2d968a76..d08cc3315 100644
--- a/src/core/hardware_interrupt_manager.cpp
+++ b/src/core/hardware_interrupt_manager.cpp
@@ -11,11 +11,14 @@ namespace Core::Hardware {
11 11
12InterruptManager::InterruptManager(Core::System& system_in) : system(system_in) { 12InterruptManager::InterruptManager(Core::System& system_in) : system(system_in) {
13 gpu_interrupt_event = Core::Timing::CreateEvent( 13 gpu_interrupt_event = Core::Timing::CreateEvent(
14 "GPUInterrupt", [this](std::uintptr_t message, std::chrono::nanoseconds) { 14 "GPUInterrupt",
15 [this](std::uintptr_t message, u64 time,
16 std::chrono::nanoseconds) -> std::optional<std::chrono::nanoseconds> {
15 auto nvdrv = system.ServiceManager().GetService<Service::Nvidia::NVDRV>("nvdrv"); 17 auto nvdrv = system.ServiceManager().GetService<Service::Nvidia::NVDRV>("nvdrv");
16 const u32 syncpt = static_cast<u32>(message >> 32); 18 const u32 syncpt = static_cast<u32>(message >> 32);
17 const u32 value = static_cast<u32>(message); 19 const u32 value = static_cast<u32>(message);
18 nvdrv->SignalGPUInterruptSyncpt(syncpt, value); 20 nvdrv->SignalGPUInterruptSyncpt(syncpt, value);
21 return std::nullopt;
19 }); 22 });
20} 23}
21 24