From 8942047d419f6d2d0c56adad689fbf3bcd4d2961 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Fri, 7 Jun 2019 20:41:06 -0400 Subject: Gpu: Implement Hardware Interrupt Manager and manage GPU interrupts --- src/core/hardware_interrupt_manager.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/core/hardware_interrupt_manager.h (limited to 'src/core/hardware_interrupt_manager.h') diff --git a/src/core/hardware_interrupt_manager.h b/src/core/hardware_interrupt_manager.h new file mode 100644 index 000000000..fc565c88b --- /dev/null +++ b/src/core/hardware_interrupt_manager.h @@ -0,0 +1,24 @@ +#pragma once + +#include "common/common_types.h" +#include "core/core_timing.h" + +namespace Core { +class System; +} + +namespace Core::Hardware { + +class InterruptManager { +public: + InterruptManager(Core::System& system); + ~InterruptManager() = default; + + void InterruptGPU(const u32 event_index); + +private: + Core::System& system; + Core::Timing::EventType* gpu_interrupt_event{}; +}; + +} // namespace Core::Hardware -- cgit v1.2.3 From 7d1b974bcaf72c32910dcf4ff2d435f91cf40609 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Wed, 12 Jun 2019 07:52:49 -0400 Subject: GPU: Correct Interrupts to interrupt on syncpt/value instead of event, mirroring hardware --- src/core/hardware_interrupt_manager.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/hardware_interrupt_manager.h') diff --git a/src/core/hardware_interrupt_manager.h b/src/core/hardware_interrupt_manager.h index fc565c88b..590392f75 100644 --- a/src/core/hardware_interrupt_manager.h +++ b/src/core/hardware_interrupt_manager.h @@ -14,7 +14,7 @@ public: InterruptManager(Core::System& system); ~InterruptManager() = default; - void InterruptGPU(const u32 event_index); + void GPUInterruptSyncpt(const u32 syncpoint_id, const u32 value); private: Core::System& system; -- cgit v1.2.3 From d20ede40b1e9cd0539982fb1feb3b13af3501ea2 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Tue, 18 Jun 2019 20:53:21 -0400 Subject: NVServices: Styling, define constructors as explicit and corrections --- src/core/hardware_interrupt_manager.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/core/hardware_interrupt_manager.h') diff --git a/src/core/hardware_interrupt_manager.h b/src/core/hardware_interrupt_manager.h index 590392f75..494db883a 100644 --- a/src/core/hardware_interrupt_manager.h +++ b/src/core/hardware_interrupt_manager.h @@ -1,20 +1,27 @@ +// Copyright 2019 Yuzu Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + #pragma once #include "common/common_types.h" -#include "core/core_timing.h" namespace Core { class System; } +namespace Core::Timing { +struct EventType; +} + namespace Core::Hardware { class InterruptManager { public: - InterruptManager(Core::System& system); - ~InterruptManager() = default; + explicit InterruptManager(Core::System& system); + ~InterruptManager(); - void GPUInterruptSyncpt(const u32 syncpoint_id, const u32 value); + void GPUInterruptSyncpt(u32 syncpoint_id, u32 value); private: Core::System& system; -- cgit v1.2.3