summaryrefslogtreecommitdiff
path: root/src/core/hardware_interrupt_manager.cpp
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2019-06-12 07:52:49 -0400
committerGravatar FernandoS272019-07-05 15:49:26 -0400
commit7d1b974bcaf72c32910dcf4ff2d435f91cf40609 (patch)
tree64c69a14a9135b0027dea0d7e832e52710d7d8a8 /src/core/hardware_interrupt_manager.cpp
parentnvflinger: Make the force 30 fps still force 30 fps (diff)
downloadyuzu-7d1b974bcaf72c32910dcf4ff2d435f91cf40609.tar.gz
yuzu-7d1b974bcaf72c32910dcf4ff2d435f91cf40609.tar.xz
yuzu-7d1b974bcaf72c32910dcf4ff2d435f91cf40609.zip
GPU: Correct Interrupts to interrupt on syncpt/value instead of event, mirroring hardware
Diffstat (limited to 'src/core/hardware_interrupt_manager.cpp')
-rw-r--r--src/core/hardware_interrupt_manager.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/hardware_interrupt_manager.cpp b/src/core/hardware_interrupt_manager.cpp
index 463d2916c..c3fffa894 100644
--- a/src/core/hardware_interrupt_manager.cpp
+++ b/src/core/hardware_interrupt_manager.cpp
@@ -8,14 +8,17 @@ namespace Core::Hardware {
8 8
9InterruptManager::InterruptManager(Core::System& system_in) : system(system_in) { 9InterruptManager::InterruptManager(Core::System& system_in) : system(system_in) {
10 gpu_interrupt_event = 10 gpu_interrupt_event =
11 system.CoreTiming().RegisterEvent("GPUInterrupt", [this](u64 event_index, s64) { 11 system.CoreTiming().RegisterEvent("GPUInterrupt", [this](u64 message, s64) {
12 auto nvdrv = system.ServiceManager().GetService<Service::Nvidia::NVDRV>("nvdrv"); 12 auto nvdrv = system.ServiceManager().GetService<Service::Nvidia::NVDRV>("nvdrv");
13 nvdrv->SignalGPUInterrupt(static_cast<u32>(event_index)); 13 const u32 syncpt = static_cast<u32>(message >> 32);
14 const u32 value = static_cast<u32>(message & 0x00000000FFFFFFFFULL);
15 nvdrv->SignalGPUInterruptSyncpt(syncpt, value);
14 }); 16 });
15} 17}
16 18
17void InterruptManager::InterruptGPU(const u32 event_index) { 19void InterruptManager::GPUInterruptSyncpt(const u32 syncpoint_id, const u32 value) {
18 system.CoreTiming().ScheduleEvent(10, gpu_interrupt_event, static_cast<u64>(event_index)); 20 const u64 msg = (static_cast<u64>(syncpoint_id) << 32ULL) | value;
21 system.CoreTiming().ScheduleEvent(10, gpu_interrupt_event, msg);
19} 22}
20 23
21} // namespace Core::Hardware 24} // namespace Core::Hardware