summaryrefslogtreecommitdiff
path: root/src/video_core/dma_pusher.h
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2020-04-27 22:07:21 -0400
committerGravatar Fernando Sahmkow2020-04-27 22:07:21 -0400
commitb87422a86f4dd3b59ef91c3ce37945865a6cfbef (patch)
treef7a0231f8a226f2dc73ca84fe77aa066f8b912d4 /src/video_core/dma_pusher.h
parentVideoCore/Engines: Refactor Engines CallMethod. (diff)
downloadyuzu-b87422a86f4dd3b59ef91c3ce37945865a6cfbef.tar.gz
yuzu-b87422a86f4dd3b59ef91c3ce37945865a6cfbef.tar.xz
yuzu-b87422a86f4dd3b59ef91c3ce37945865a6cfbef.zip
VideoCore/GPU: Delegate subchannel engines to the dma pusher.
Diffstat (limited to 'src/video_core/dma_pusher.h')
-rw-r--r--src/video_core/dma_pusher.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/video_core/dma_pusher.h b/src/video_core/dma_pusher.h
index 6cef71306..e8b714e94 100644
--- a/src/video_core/dma_pusher.h
+++ b/src/video_core/dma_pusher.h
@@ -4,11 +4,13 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <array>
7#include <vector> 8#include <vector>
8#include <queue> 9#include <queue>
9 10
10#include "common/bit_field.h" 11#include "common/bit_field.h"
11#include "common/common_types.h" 12#include "common/common_types.h"
13#include "video_core/engines/engine_interface.h"
12 14
13namespace Core { 15namespace Core {
14class System; 16class System;
@@ -69,7 +71,13 @@ public:
69 71
70 void DispatchCalls(); 72 void DispatchCalls();
71 73
74 void BindSubchannel(Tegra::Engines::EngineInterface* engine, u32 subchannel_id) {
75 subchannels[subchannel_id] = engine;
76 }
77
72private: 78private:
79 static constexpr u32 non_puller_methods = 0x40;
80 static constexpr u32 max_subchannels = 8;
73 bool Step(); 81 bool Step();
74 82
75 void SetState(const CommandHeader& command_header); 83 void SetState(const CommandHeader& command_header);
@@ -88,6 +96,7 @@ private:
88 u32 method_count; ///< Current method count 96 u32 method_count; ///< Current method count
89 u32 length_pending; ///< Large NI command length pending 97 u32 length_pending; ///< Large NI command length pending
90 bool non_incrementing; ///< Current command's NI flag 98 bool non_incrementing; ///< Current command's NI flag
99 bool is_last_call;
91 }; 100 };
92 101
93 DmaState dma_state{}; 102 DmaState dma_state{};
@@ -96,6 +105,8 @@ private:
96 GPUVAddr dma_mget{}; ///< main pushbuffer last read address 105 GPUVAddr dma_mget{}; ///< main pushbuffer last read address
97 bool ib_enable{true}; ///< IB mode enabled 106 bool ib_enable{true}; ///< IB mode enabled
98 107
108 std::array<Tegra::Engines::EngineInterface*, max_subchannels> subchannels{};
109
99 GPU& gpu; 110 GPU& gpu;
100 Core::System& system; 111 Core::System& system;
101}; 112};