summaryrefslogtreecommitdiff
path: root/src/video_core/host1x/control.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/host1x/control.cpp')
-rw-r--r--src/video_core/host1x/control.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/video_core/host1x/control.cpp b/src/video_core/host1x/control.cpp
new file mode 100644
index 000000000..dceefdb7f
--- /dev/null
+++ b/src/video_core/host1x/control.cpp
@@ -0,0 +1,33 @@
1// SPDX-FileCopyrightText: 2021 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-3.0-or-later
3
4#include "common/assert.h"
5#include "video_core/host1x/control.h"
6#include "video_core/host1x/host1x.h"
7
8namespace Tegra::Host1x {
9
10Control::Control(Host1x& host1x_) : host1x(host1x_) {}
11
12Control::~Control() = default;
13
14void Control::ProcessMethod(Method method, u32 argument) {
15 switch (method) {
16 case Method::LoadSyncptPayload32:
17 syncpoint_value = argument;
18 break;
19 case Method::WaitSyncpt:
20 case Method::WaitSyncpt32:
21 Execute(argument);
22 break;
23 default:
24 UNIMPLEMENTED_MSG("Control method 0x{:X}", static_cast<u32>(method));
25 break;
26 }
27}
28
29void Control::Execute(u32 data) {
30 host1x.GetSyncpointManager().WaitHost(data, syncpoint_value);
31}
32
33} // namespace Tegra::Host1x