diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-06-12 07:52:49 -0400 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2019-07-05 15:49:26 -0400 |
commit | 7d1b974bcaf72c32910dcf4ff2d435f91cf40609 (patch) | |
tree | 64c69a14a9135b0027dea0d7e832e52710d7d8a8 /src/core/hardware_interrupt_manager.cpp | |
parent | 61697864c3c8abc35ce957f5f0a0dacd7a8e96f9 (diff) |
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.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/hardware_interrupt_manager.cpp b/src/core/hardware_interrupt_manager.cpp index 463d2916c5..c3fffa8949 100644 --- a/src/core/hardware_interrupt_manager.cpp +++ b/src/core/hardware_interrupt_manager.cpp @@ -8,14 +8,17 @@ namespace Core::Hardware { InterruptManager::InterruptManager(Core::System& system_in) : system(system_in) { gpu_interrupt_event = - system.CoreTiming().RegisterEvent("GPUInterrupt", [this](u64 event_index, s64) { + system.CoreTiming().RegisterEvent("GPUInterrupt", [this](u64 message, s64) { auto nvdrv = system.ServiceManager().GetService<Service::Nvidia::NVDRV>("nvdrv"); - nvdrv->SignalGPUInterrupt(static_cast<u32>(event_index)); + const u32 syncpt = static_cast<u32>(message >> 32); + const u32 value = static_cast<u32>(message & 0x00000000FFFFFFFFULL); + nvdrv->SignalGPUInterruptSyncpt(syncpt, value); }); } -void InterruptManager::InterruptGPU(const u32 event_index) { - system.CoreTiming().ScheduleEvent(10, gpu_interrupt_event, static_cast<u64>(event_index)); +void InterruptManager::GPUInterruptSyncpt(const u32 syncpoint_id, const u32 value) { + const u64 msg = (static_cast<u64>(syncpoint_id) << 32ULL) | value; + system.CoreTiming().ScheduleEvent(10, gpu_interrupt_event, msg); } } // namespace Core::Hardware |