diff options
| author | 2020-12-28 01:02:06 -0500 | |
|---|---|---|
| committer | 2021-01-07 14:33:45 -0500 | |
| commit | 2c27127d04a155fe0f893e84263d58f14473785d (patch) | |
| tree | e72b7d973f5c0dd4a553f815a632bf8fcc687998 /src/video_core/cdma_pusher.cpp | |
| parent | Merge pull request #5306 from MerryMage/ignore-library-Open (diff) | |
| download | yuzu-2c27127d04a155fe0f893e84263d58f14473785d.tar.gz yuzu-2c27127d04a155fe0f893e84263d58f14473785d.tar.xz yuzu-2c27127d04a155fe0f893e84263d58f14473785d.zip | |
nvdec syncpt incorporation
laying the groundwork for async gpu, although this does not fully implement async nvdec operations
Diffstat (limited to 'src/video_core/cdma_pusher.cpp')
| -rw-r--r-- | src/video_core/cdma_pusher.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/video_core/cdma_pusher.cpp b/src/video_core/cdma_pusher.cpp index e3e7432f7..94679d5d1 100644 --- a/src/video_core/cdma_pusher.cpp +++ b/src/video_core/cdma_pusher.cpp | |||
| @@ -33,8 +33,7 @@ CDmaPusher::CDmaPusher(GPU& gpu_) | |||
| 33 | : gpu{gpu_}, nvdec_processor(std::make_shared<Nvdec>(gpu)), | 33 | : gpu{gpu_}, nvdec_processor(std::make_shared<Nvdec>(gpu)), |
| 34 | vic_processor(std::make_unique<Vic>(gpu, nvdec_processor)), | 34 | vic_processor(std::make_unique<Vic>(gpu, nvdec_processor)), |
| 35 | host1x_processor(std::make_unique<Host1x>(gpu)), | 35 | host1x_processor(std::make_unique<Host1x>(gpu)), |
| 36 | nvdec_sync(std::make_unique<SyncptIncrManager>(gpu)), | 36 | sync_manager(std::make_unique<SyncptIncrManager>(gpu)) {} |
| 37 | vic_sync(std::make_unique<SyncptIncrManager>(gpu)) {} | ||
| 38 | 37 | ||
| 39 | CDmaPusher::~CDmaPusher() = default; | 38 | CDmaPusher::~CDmaPusher() = default; |
| 40 | 39 | ||
| @@ -110,10 +109,10 @@ void CDmaPusher::ExecuteCommand(u32 state_offset, u32 data) { | |||
| 110 | const auto syncpoint_id = static_cast<u32>(data & 0xFF); | 109 | const auto syncpoint_id = static_cast<u32>(data & 0xFF); |
| 111 | const auto cond = static_cast<u32>((data >> 8) & 0xFF); | 110 | const auto cond = static_cast<u32>((data >> 8) & 0xFF); |
| 112 | if (cond == 0) { | 111 | if (cond == 0) { |
| 113 | nvdec_sync->Increment(syncpoint_id); | 112 | sync_manager->Increment(syncpoint_id); |
| 114 | } else { | 113 | } else { |
| 115 | nvdec_sync->IncrementWhenDone(static_cast<u32>(current_class), syncpoint_id); | 114 | sync_manager->SignalDone( |
| 116 | nvdec_sync->SignalDone(syncpoint_id); | 115 | sync_manager->IncrementWhenDone(static_cast<u32>(current_class), syncpoint_id)); |
| 117 | } | 116 | } |
| 118 | break; | 117 | break; |
| 119 | } | 118 | } |
| @@ -135,10 +134,10 @@ void CDmaPusher::ExecuteCommand(u32 state_offset, u32 data) { | |||
| 135 | const auto syncpoint_id = static_cast<u32>(data & 0xFF); | 134 | const auto syncpoint_id = static_cast<u32>(data & 0xFF); |
| 136 | const auto cond = static_cast<u32>((data >> 8) & 0xFF); | 135 | const auto cond = static_cast<u32>((data >> 8) & 0xFF); |
| 137 | if (cond == 0) { | 136 | if (cond == 0) { |
| 138 | vic_sync->Increment(syncpoint_id); | 137 | sync_manager->Increment(syncpoint_id); |
| 139 | } else { | 138 | } else { |
| 140 | vic_sync->IncrementWhenDone(static_cast<u32>(current_class), syncpoint_id); | 139 | sync_manager->SignalDone( |
| 141 | vic_sync->SignalDone(syncpoint_id); | 140 | sync_manager->IncrementWhenDone(static_cast<u32>(current_class), syncpoint_id)); |
| 142 | } | 141 | } |
| 143 | break; | 142 | break; |
| 144 | } | 143 | } |