summaryrefslogtreecommitdiff
path: root/src/core/hardware_interrupt_manager.cpp
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2019-06-18 20:53:21 -0400
committerGravatar FernandoS272019-07-05 15:49:32 -0400
commitd20ede40b1e9cd0539982fb1feb3b13af3501ea2 (patch)
treea084fedd90a6a3cc3e11b099f4ddfe194d49c8ea /src/core/hardware_interrupt_manager.cpp
parentNVFlinger: Correct GCC compile error (diff)
downloadyuzu-d20ede40b1e9cd0539982fb1feb3b13af3501ea2.tar.gz
yuzu-d20ede40b1e9cd0539982fb1feb3b13af3501ea2.tar.xz
yuzu-d20ede40b1e9cd0539982fb1feb3b13af3501ea2.zip
NVServices: Styling, define constructors as explicit and corrections
Diffstat (limited to 'src/core/hardware_interrupt_manager.cpp')
-rw-r--r--src/core/hardware_interrupt_manager.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core/hardware_interrupt_manager.cpp b/src/core/hardware_interrupt_manager.cpp
index c3fffa894..c2115db2d 100644
--- a/src/core/hardware_interrupt_manager.cpp
+++ b/src/core/hardware_interrupt_manager.cpp
@@ -1,5 +1,9 @@
1// Copyright 2019 Yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
1 4
2#include "core/core.h" 5#include "core/core.h"
6#include "core/core_timing.h"
3#include "core/hardware_interrupt_manager.h" 7#include "core/hardware_interrupt_manager.h"
4#include "core/hle/service/nvdrv/interface.h" 8#include "core/hle/service/nvdrv/interface.h"
5#include "core/hle/service/sm/sm.h" 9#include "core/hle/service/sm/sm.h"
@@ -11,11 +15,13 @@ InterruptManager::InterruptManager(Core::System& system_in) : system(system_in)
11 system.CoreTiming().RegisterEvent("GPUInterrupt", [this](u64 message, s64) { 15 system.CoreTiming().RegisterEvent("GPUInterrupt", [this](u64 message, s64) {
12 auto nvdrv = system.ServiceManager().GetService<Service::Nvidia::NVDRV>("nvdrv"); 16 auto nvdrv = system.ServiceManager().GetService<Service::Nvidia::NVDRV>("nvdrv");
13 const u32 syncpt = static_cast<u32>(message >> 32); 17 const u32 syncpt = static_cast<u32>(message >> 32);
14 const u32 value = static_cast<u32>(message & 0x00000000FFFFFFFFULL); 18 const u32 value = static_cast<u32>(message);
15 nvdrv->SignalGPUInterruptSyncpt(syncpt, value); 19 nvdrv->SignalGPUInterruptSyncpt(syncpt, value);
16 }); 20 });
17} 21}
18 22
23InterruptManager::~InterruptManager() = default;
24
19void InterruptManager::GPUInterruptSyncpt(const u32 syncpoint_id, const u32 value) { 25void InterruptManager::GPUInterruptSyncpt(const u32 syncpoint_id, const u32 value) {
20 const u64 msg = (static_cast<u64>(syncpoint_id) << 32ULL) | value; 26 const u64 msg = (static_cast<u64>(syncpoint_id) << 32ULL) | value;
21 system.CoreTiming().ScheduleEvent(10, gpu_interrupt_event, msg); 27 system.CoreTiming().ScheduleEvent(10, gpu_interrupt_event, msg);