diff options
Diffstat (limited to 'src/video_core/cdma_pusher.cpp')
| -rw-r--r-- | src/video_core/cdma_pusher.cpp | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/video_core/cdma_pusher.cpp b/src/video_core/cdma_pusher.cpp index 8e890a85e..148126347 100644 --- a/src/video_core/cdma_pusher.cpp +++ b/src/video_core/cdma_pusher.cpp | |||
| @@ -2,20 +2,22 @@ | |||
| 2 | // SPDX-License-Identifier: MIT | 2 | // SPDX-License-Identifier: MIT |
| 3 | 3 | ||
| 4 | #include <bit> | 4 | #include <bit> |
| 5 | #include "command_classes/host1x.h" | ||
| 6 | #include "command_classes/nvdec.h" | ||
| 7 | #include "command_classes/vic.h" | ||
| 8 | #include "video_core/cdma_pusher.h" | 5 | #include "video_core/cdma_pusher.h" |
| 9 | #include "video_core/command_classes/sync_manager.h" | ||
| 10 | #include "video_core/engines/maxwell_3d.h" | 6 | #include "video_core/engines/maxwell_3d.h" |
| 11 | #include "video_core/gpu.h" | 7 | #include "video_core/gpu.h" |
| 8 | #include "video_core/host1x/control.h" | ||
| 9 | #include "video_core/host1x/nvdec.h" | ||
| 10 | #include "video_core/host1x/nvdec_common.h" | ||
| 11 | #include "video_core/host1x/sync_manager.h" | ||
| 12 | #include "video_core/host1x/vic.h" | ||
| 13 | #include "video_core/memory_manager.h" | ||
| 12 | 14 | ||
| 13 | namespace Tegra { | 15 | namespace Tegra { |
| 14 | CDmaPusher::CDmaPusher(GPU& gpu_) | 16 | CDmaPusher::CDmaPusher(GPU& gpu_) |
| 15 | : gpu{gpu_}, nvdec_processor(std::make_shared<Nvdec>(gpu)), | 17 | : gpu{gpu_}, nvdec_processor(std::make_shared<Host1x::Nvdec>(gpu)), |
| 16 | vic_processor(std::make_unique<Vic>(gpu, nvdec_processor)), | 18 | vic_processor(std::make_unique<Host1x::Vic>(gpu, nvdec_processor)), |
| 17 | host1x_processor(std::make_unique<Host1x>(gpu)), | 19 | host1x_processor(std::make_unique<Host1x::Control>(gpu)), |
| 18 | sync_manager(std::make_unique<SyncptIncrManager>(gpu)) {} | 20 | sync_manager(std::make_unique<Host1x::SyncptIncrManager>(gpu)) {} |
| 19 | 21 | ||
| 20 | CDmaPusher::~CDmaPusher() = default; | 22 | CDmaPusher::~CDmaPusher() = default; |
| 21 | 23 | ||
| @@ -109,16 +111,17 @@ void CDmaPusher::ExecuteCommand(u32 state_offset, u32 data) { | |||
| 109 | case ThiMethod::SetMethod1: | 111 | case ThiMethod::SetMethod1: |
| 110 | LOG_DEBUG(Service_NVDRV, "VIC method 0x{:X}, Args=({})", | 112 | LOG_DEBUG(Service_NVDRV, "VIC method 0x{:X}, Args=({})", |
| 111 | static_cast<u32>(vic_thi_state.method_0), data); | 113 | static_cast<u32>(vic_thi_state.method_0), data); |
| 112 | vic_processor->ProcessMethod(static_cast<Vic::Method>(vic_thi_state.method_0), data); | 114 | vic_processor->ProcessMethod(static_cast<Host1x::Vic::Method>(vic_thi_state.method_0), |
| 115 | data); | ||
| 113 | break; | 116 | break; |
| 114 | default: | 117 | default: |
| 115 | break; | 118 | break; |
| 116 | } | 119 | } |
| 117 | break; | 120 | break; |
| 118 | case ChClassId::Host1x: | 121 | case ChClassId::Control: |
| 119 | // This device is mainly for syncpoint synchronization | 122 | // This device is mainly for syncpoint synchronization |
| 120 | LOG_DEBUG(Service_NVDRV, "Host1X Class Method"); | 123 | LOG_DEBUG(Service_NVDRV, "Host1X Class Method"); |
| 121 | host1x_processor->ProcessMethod(static_cast<Host1x::Method>(offset), data); | 124 | host1x_processor->ProcessMethod(static_cast<Host1x::Control::Method>(offset), data); |
| 122 | break; | 125 | break; |
| 123 | default: | 126 | default: |
| 124 | UNIMPLEMENTED_MSG("Current class not implemented {:X}", static_cast<u32>(current_class)); | 127 | UNIMPLEMENTED_MSG("Current class not implemented {:X}", static_cast<u32>(current_class)); |