diff options
author | bunnei <bunneidev@gmail.com> | 2018-11-28 01:17:33 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-11-28 01:17:33 +0100 |
commit | ac74b71d7530452126792c5fa0bf01fe7378ba00 (patch) | |
tree | 7db6044f15ded8659aff9fd822d41139c495e171 /src/core/hle | |
parent | gpu: Move command list profiling to DmaPusher::DispatchCalls. (diff) | |
download | yuzu-ac74b71d7530452126792c5fa0bf01fe7378ba00.tar yuzu-ac74b71d7530452126792c5fa0bf01fe7378ba00.tar.gz yuzu-ac74b71d7530452126792c5fa0bf01fe7378ba00.tar.bz2 yuzu-ac74b71d7530452126792c5fa0bf01fe7378ba00.tar.lz yuzu-ac74b71d7530452126792c5fa0bf01fe7378ba00.tar.xz yuzu-ac74b71d7530452126792c5fa0bf01fe7378ba00.tar.zst yuzu-ac74b71d7530452126792c5fa0bf01fe7378ba00.zip |
Diffstat (limited to 'src/core/hle')
-rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp index 39a58b685..2e2b0ae1c 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp @@ -128,11 +128,9 @@ u32 nvhost_gpu::AllocateObjectContext(const std::vector<u8>& input, std::vector< return 0; } -static void PushGPUEntries(const std::vector<Tegra::CommandListHeader>& entries) { +static void PushGPUEntries(Tegra::CommandList&& entries) { auto& dma_pusher{Core::System::GetInstance().GPU().DmaPusher()}; - for (const auto& entry : entries) { - dma_pusher.Push(entry); - } + dma_pusher.Push(std::move(entries)); dma_pusher.DispatchCalls(); } @@ -149,11 +147,11 @@ u32 nvhost_gpu::SubmitGPFIFO(const std::vector<u8>& input, std::vector<u8>& outp params.num_entries * sizeof(Tegra::CommandListHeader), "Incorrect input size"); - std::vector<Tegra::CommandListHeader> entries(params.num_entries); + Tegra::CommandList entries(params.num_entries); std::memcpy(entries.data(), &input[sizeof(IoctlSubmitGpfifo)], params.num_entries * sizeof(Tegra::CommandListHeader)); - PushGPUEntries(entries); + PushGPUEntries(std::move(entries)); params.fence_out.id = 0; params.fence_out.value = 0; @@ -170,11 +168,11 @@ u32 nvhost_gpu::KickoffPB(const std::vector<u8>& input, std::vector<u8>& output) LOG_WARNING(Service_NVDRV, "(STUBBED) called, gpfifo={:X}, num_entries={:X}, flags={:X}", params.address, params.num_entries, params.flags); - std::vector<Tegra::CommandListHeader> entries(params.num_entries); + Tegra::CommandList entries(params.num_entries); Memory::ReadBlock(params.address, entries.data(), params.num_entries * sizeof(Tegra::CommandListHeader)); - PushGPUEntries(entries); + PushGPUEntries(std::move(entries)); params.fence_out.id = 0; params.fence_out.value = 0; |