summaryrefslogtreecommitdiffstats
path: root/src/video_core/dma_pusher.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-11-28 01:17:33 +0100
committerbunnei <bunneidev@gmail.com>2018-11-28 01:17:33 +0100
commitac74b71d7530452126792c5fa0bf01fe7378ba00 (patch)
tree7db6044f15ded8659aff9fd822d41139c495e171 /src/video_core/dma_pusher.h
parentgpu: Move command list profiling to DmaPusher::DispatchCalls. (diff)
downloadyuzu-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 '')
-rw-r--r--src/video_core/dma_pusher.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/video_core/dma_pusher.h b/src/video_core/dma_pusher.h
index 39d98e46e..16e0697c4 100644
--- a/src/video_core/dma_pusher.h
+++ b/src/video_core/dma_pusher.h
@@ -4,6 +4,7 @@
#pragma once
+#include <vector>
#include <queue>
#include "common/bit_field.h"
@@ -45,6 +46,8 @@ static_assert(sizeof(CommandHeader) == sizeof(u32), "CommandHeader has incorrect
class GPU;
+using CommandList = std::vector<Tegra::CommandListHeader>;
+
/**
* The DmaPusher class implements DMA submission to FIFOs, providing an area of memory that the
* emulated app fills with commands and tells PFIFO to process. The pushbuffers are then assembled
@@ -57,8 +60,8 @@ public:
explicit DmaPusher(GPU& gpu);
~DmaPusher();
- void Push(const CommandListHeader& command_list_header) {
- dma_pushbuffer.push(command_list_header);
+ void Push(CommandList&& entries) {
+ dma_pushbuffer.push(std::move(entries));
}
void DispatchCalls();
@@ -72,7 +75,8 @@ private:
GPU& gpu;
- std::queue<CommandListHeader> dma_pushbuffer;
+ std::queue<CommandList> dma_pushbuffer; ///< Queue of command lists to be processed
+ std::size_t dma_pushbuffer_subindex{}; ///< Index within a command list within the pushbuffer
struct DmaState {
u32 method; ///< Current method