summaryrefslogtreecommitdiff
path: root/src/core/hardware_interrupt_manager.cpp
diff options
context:
space:
mode:
authorGravatar Fernando S2022-10-06 21:29:53 +0200
committerGravatar GitHub2022-10-06 21:29:53 +0200
commit1effa578f12f79d7816e3543291f302f126cc1d2 (patch)
tree14803b31b6817294d40d57446f6fa94c5ff3fe9a /src/core/hardware_interrupt_manager.cpp
parentMerge pull request #9025 from FernandoS27/slava-ukrayini (diff)
parentvulkan_blitter: Fix pool allocation double free. (diff)
downloadyuzu-1effa578f12f79d7816e3543291f302f126cc1d2.tar.gz
yuzu-1effa578f12f79d7816e3543291f302f126cc1d2.tar.xz
yuzu-1effa578f12f79d7816e3543291f302f126cc1d2.zip
Merge pull request #8467 from FernandoS27/yfc-rel-1
Project yuzu Fried Chicken (Y.F.C.) Part 1
Diffstat (limited to 'src/core/hardware_interrupt_manager.cpp')
-rw-r--r--src/core/hardware_interrupt_manager.cpp32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/core/hardware_interrupt_manager.cpp b/src/core/hardware_interrupt_manager.cpp
deleted file mode 100644
index d08cc3315..000000000
--- a/src/core/hardware_interrupt_manager.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
1// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#include "core/core.h"
5#include "core/core_timing.h"
6#include "core/hardware_interrupt_manager.h"
7#include "core/hle/service/nvdrv/nvdrv_interface.h"
8#include "core/hle/service/sm/sm.h"
9
10namespace Core::Hardware {
11
12InterruptManager::InterruptManager(Core::System& system_in) : system(system_in) {
13 gpu_interrupt_event = Core::Timing::CreateEvent(
14 "GPUInterrupt",
15 [this](std::uintptr_t message, u64 time,
16 std::chrono::nanoseconds) -> std::optional<std::chrono::nanoseconds> {
17 auto nvdrv = system.ServiceManager().GetService<Service::Nvidia::NVDRV>("nvdrv");
18 const u32 syncpt = static_cast<u32>(message >> 32);
19 const u32 value = static_cast<u32>(message);
20 nvdrv->SignalGPUInterruptSyncpt(syncpt, value);
21 return std::nullopt;
22 });
23}
24
25InterruptManager::~InterruptManager() = default;
26
27void InterruptManager::GPUInterruptSyncpt(const u32 syncpoint_id, const u32 value) {
28 const u64 msg = (static_cast<u64>(syncpoint_id) << 32ULL) | value;
29 system.CoreTiming().ScheduleEvent(std::chrono::nanoseconds{10}, gpu_interrupt_event, msg);
30}
31
32} // namespace Core::Hardware