diff options
| author | 2022-10-06 21:29:53 +0200 | |
|---|---|---|
| committer | 2022-10-06 21:29:53 +0200 | |
| commit | 1effa578f12f79d7816e3543291f302f126cc1d2 (patch) | |
| tree | 14803b31b6817294d40d57446f6fa94c5ff3fe9a /src/video_core/host1x/control.cpp | |
| parent | Merge pull request #9025 from FernandoS27/slava-ukrayini (diff) | |
| parent | vulkan_blitter: Fix pool allocation double free. (diff) | |
| download | yuzu-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/video_core/host1x/control.cpp')
| -rw-r--r-- | src/video_core/host1x/control.cpp | 33 |
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 | |||
| 8 | namespace Tegra::Host1x { | ||
| 9 | |||
| 10 | Control::Control(Host1x& host1x_) : host1x(host1x_) {} | ||
| 11 | |||
| 12 | Control::~Control() = default; | ||
| 13 | |||
| 14 | void 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 | |||
| 29 | void Control::Execute(u32 data) { | ||
| 30 | host1x.GetSyncpointManager().WaitHost(data, syncpoint_value); | ||
| 31 | } | ||
| 32 | |||
| 33 | } // namespace Tegra::Host1x | ||