diff options
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp index 874d5e1c3..2e2b0ae1c 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp | |||
| @@ -8,7 +8,6 @@ | |||
| 8 | #include "core/core.h" | 8 | #include "core/core.h" |
| 9 | #include "core/hle/service/nvdrv/devices/nvhost_gpu.h" | 9 | #include "core/hle/service/nvdrv/devices/nvhost_gpu.h" |
| 10 | #include "core/memory.h" | 10 | #include "core/memory.h" |
| 11 | #include "video_core/command_processor.h" | ||
| 12 | #include "video_core/gpu.h" | 11 | #include "video_core/gpu.h" |
| 13 | #include "video_core/memory_manager.h" | 12 | #include "video_core/memory_manager.h" |
| 14 | 13 | ||
| @@ -129,6 +128,12 @@ u32 nvhost_gpu::AllocateObjectContext(const std::vector<u8>& input, std::vector< | |||
| 129 | return 0; | 128 | return 0; |
| 130 | } | 129 | } |
| 131 | 130 | ||
| 131 | static void PushGPUEntries(Tegra::CommandList&& entries) { | ||
| 132 | auto& dma_pusher{Core::System::GetInstance().GPU().DmaPusher()}; | ||
| 133 | dma_pusher.Push(std::move(entries)); | ||
| 134 | dma_pusher.DispatchCalls(); | ||
| 135 | } | ||
| 136 | |||
| 132 | u32 nvhost_gpu::SubmitGPFIFO(const std::vector<u8>& input, std::vector<u8>& output) { | 137 | u32 nvhost_gpu::SubmitGPFIFO(const std::vector<u8>& input, std::vector<u8>& output) { |
| 133 | if (input.size() < sizeof(IoctlSubmitGpfifo)) { | 138 | if (input.size() < sizeof(IoctlSubmitGpfifo)) { |
| 134 | UNIMPLEMENTED(); | 139 | UNIMPLEMENTED(); |
| @@ -142,11 +147,11 @@ u32 nvhost_gpu::SubmitGPFIFO(const std::vector<u8>& input, std::vector<u8>& outp | |||
| 142 | params.num_entries * sizeof(Tegra::CommandListHeader), | 147 | params.num_entries * sizeof(Tegra::CommandListHeader), |
| 143 | "Incorrect input size"); | 148 | "Incorrect input size"); |
| 144 | 149 | ||
| 145 | std::vector<Tegra::CommandListHeader> entries(params.num_entries); | 150 | Tegra::CommandList entries(params.num_entries); |
| 146 | std::memcpy(entries.data(), &input[sizeof(IoctlSubmitGpfifo)], | 151 | std::memcpy(entries.data(), &input[sizeof(IoctlSubmitGpfifo)], |
| 147 | params.num_entries * sizeof(Tegra::CommandListHeader)); | 152 | params.num_entries * sizeof(Tegra::CommandListHeader)); |
| 148 | 153 | ||
| 149 | Core::System::GetInstance().GPU().ProcessCommandLists(entries); | 154 | PushGPUEntries(std::move(entries)); |
| 150 | 155 | ||
| 151 | params.fence_out.id = 0; | 156 | params.fence_out.id = 0; |
| 152 | params.fence_out.value = 0; | 157 | params.fence_out.value = 0; |
| @@ -163,11 +168,11 @@ u32 nvhost_gpu::KickoffPB(const std::vector<u8>& input, std::vector<u8>& output) | |||
| 163 | LOG_WARNING(Service_NVDRV, "(STUBBED) called, gpfifo={:X}, num_entries={:X}, flags={:X}", | 168 | LOG_WARNING(Service_NVDRV, "(STUBBED) called, gpfifo={:X}, num_entries={:X}, flags={:X}", |
| 164 | params.address, params.num_entries, params.flags); | 169 | params.address, params.num_entries, params.flags); |
| 165 | 170 | ||
| 166 | std::vector<Tegra::CommandListHeader> entries(params.num_entries); | 171 | Tegra::CommandList entries(params.num_entries); |
| 167 | Memory::ReadBlock(params.address, entries.data(), | 172 | Memory::ReadBlock(params.address, entries.data(), |
| 168 | params.num_entries * sizeof(Tegra::CommandListHeader)); | 173 | params.num_entries * sizeof(Tegra::CommandListHeader)); |
| 169 | 174 | ||
| 170 | Core::System::GetInstance().GPU().ProcessCommandLists(entries); | 175 | PushGPUEntries(std::move(entries)); |
| 171 | 176 | ||
| 172 | params.fence_out.id = 0; | 177 | params.fence_out.id = 0; |
| 173 | params.fence_out.value = 0; | 178 | params.fence_out.value = 0; |