aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/host1x/host1x.cpp
diff options
context:
space:
mode:
authordarktux <darktux@y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion>2024-04-05 01:58:29 +0200
committerBriar <205427297+icybriarr@users.noreply.github.com>2025-04-04 03:40:46 +0200
commit616619c8f754dc1a783d91aa5b32f45e8df74172 (patch)
tree4aa2bdd001cbf38b58439f59e62ee7705af6a253 /src/video_core/host1x/host1x.cpp
parent19a93a3fd1dd6a7db074d254990db073d62b08e3 (diff)
Port changes from Early Access
Diffstat (limited to 'src/video_core/host1x/host1x.cpp')
-rw-r--r--src/video_core/host1x/host1x.cpp26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/video_core/host1x/host1x.cpp b/src/video_core/host1x/host1x.cpp
index e923bfa228..293bca6d79 100644
--- a/src/video_core/host1x/host1x.cpp
+++ b/src/video_core/host1x/host1x.cpp
@@ -3,10 +3,10 @@
#include "core/core.h"
#include "video_core/host1x/host1x.h"
+#include "video_core/host1x/nvdec.h"
+#include "video_core/host1x/vic.h"
-namespace Tegra {
-
-namespace Host1x {
+namespace Tegra::Host1x {
Host1x::Host1x(Core::System& system_)
: system{system_}, syncpoint_manager{},
@@ -15,6 +15,22 @@ Host1x::Host1x(Core::System& system_)
Host1x::~Host1x() = default;
-} // namespace Host1x
+void Host1x::StartDevice(s32 fd, ChannelType type, u32 syncpt) {
+ switch (type) {
+ case ChannelType::NvDec:
+ devices[fd] = std::make_unique<Tegra::Host1x::Nvdec>(*this, fd, syncpt, frame_queue);
+ break;
+ case ChannelType::VIC:
+ devices[fd] = std::make_unique<Tegra::Host1x::Vic>(*this, fd, syncpt, frame_queue);
+ break;
+ default:
+ LOG_ERROR(HW_GPU, "Unimplemented host1x device {}", static_cast<u32>(type));
+ break;
+ }
+}
+
+void Host1x::StopDevice(s32 fd, ChannelType type) {
+ devices.erase(fd);
+}
-} // namespace Tegra
+} // namespace Tegra::Host1x