summaryrefslogtreecommitdiff
path: root/src/video_core/dma_pusher.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/dma_pusher.h')
-rw-r--r--src/video_core/dma_pusher.h39
1 files changed, 29 insertions, 10 deletions
diff --git a/src/video_core/dma_pusher.h b/src/video_core/dma_pusher.h
index 872fd146a..938f0f11c 100644
--- a/src/video_core/dma_pusher.h
+++ b/src/video_core/dma_pusher.h
@@ -10,6 +10,7 @@
10#include "common/bit_field.h" 10#include "common/bit_field.h"
11#include "common/common_types.h" 11#include "common/common_types.h"
12#include "video_core/engines/engine_interface.h" 12#include "video_core/engines/engine_interface.h"
13#include "video_core/engines/puller.h"
13 14
14namespace Core { 15namespace Core {
15class System; 16class System;
@@ -17,7 +18,12 @@ class System;
17 18
18namespace Tegra { 19namespace Tegra {
19 20
21namespace Control {
22struct ChannelState;
23}
24
20class GPU; 25class GPU;
26class MemoryManager;
21 27
22enum class SubmissionMode : u32 { 28enum class SubmissionMode : u32 {
23 IncreasingOld = 0, 29 IncreasingOld = 0,
@@ -31,24 +37,32 @@ enum class SubmissionMode : u32 {
31// Note that, traditionally, methods are treated as 4-byte addressable locations, and hence 37// Note that, traditionally, methods are treated as 4-byte addressable locations, and hence
32// their numbers are written down multiplied by 4 in Docs. Here we are not multiply by 4. 38// their numbers are written down multiplied by 4 in Docs. Here we are not multiply by 4.
33// So the values you see in docs might be multiplied by 4. 39// So the values you see in docs might be multiplied by 4.
40// Register documentation:
41// https://github.com/NVIDIA/open-gpu-doc/blob/ab27fc22db5de0d02a4cabe08e555663b62db4d4/classes/host/cla26f.h
42//
43// Register Description (approx):
44// https://github.com/NVIDIA/open-gpu-doc/blob/ab27fc22db5de0d02a4cabe08e555663b62db4d4/manuals/volta/gv100/dev_pbdma.ref.txt
34enum class BufferMethods : u32 { 45enum class BufferMethods : u32 {
35 BindObject = 0x0, 46 BindObject = 0x0,
47 Illegal = 0x1,
36 Nop = 0x2, 48 Nop = 0x2,
37 SemaphoreAddressHigh = 0x4, 49 SemaphoreAddressHigh = 0x4,
38 SemaphoreAddressLow = 0x5, 50 SemaphoreAddressLow = 0x5,
39 SemaphoreSequence = 0x6, 51 SemaphoreSequencePayload = 0x6,
40 SemaphoreTrigger = 0x7, 52 SemaphoreOperation = 0x7,
41 NotifyIntr = 0x8, 53 NonStallInterrupt = 0x8,
42 WrcacheFlush = 0x9, 54 WrcacheFlush = 0x9,
43 Unk28 = 0xA, 55 MemOpA = 0xA,
44 UnkCacheFlush = 0xB, 56 MemOpB = 0xB,
57 MemOpC = 0xC,
58 MemOpD = 0xD,
45 RefCnt = 0x14, 59 RefCnt = 0x14,
46 SemaphoreAcquire = 0x1A, 60 SemaphoreAcquire = 0x1A,
47 SemaphoreRelease = 0x1B, 61 SemaphoreRelease = 0x1B,
48 FenceValue = 0x1C, 62 SyncpointPayload = 0x1C,
49 FenceAction = 0x1D, 63 SyncpointOperation = 0x1D,
50 WaitForInterrupt = 0x1E, 64 WaitForIdle = 0x1E,
51 Unk7c = 0x1F, 65 CRCCheck = 0x1F,
52 Yield = 0x20, 66 Yield = 0x20,
53 NonPullerMethods = 0x40, 67 NonPullerMethods = 0x40,
54}; 68};
@@ -102,7 +116,8 @@ struct CommandList final {
102 */ 116 */
103class DmaPusher final { 117class DmaPusher final {
104public: 118public:
105 explicit DmaPusher(Core::System& system_, GPU& gpu_); 119 explicit DmaPusher(Core::System& system_, GPU& gpu_, MemoryManager& memory_manager_,
120 Control::ChannelState& channel_state_);
106 ~DmaPusher(); 121 ~DmaPusher();
107 122
108 void Push(CommandList&& entries) { 123 void Push(CommandList&& entries) {
@@ -115,6 +130,8 @@ public:
115 subchannels[subchannel_id] = engine; 130 subchannels[subchannel_id] = engine;
116 } 131 }
117 132
133 void BindRasterizer(VideoCore::RasterizerInterface* rasterizer);
134
118private: 135private:
119 static constexpr u32 non_puller_methods = 0x40; 136 static constexpr u32 non_puller_methods = 0x40;
120 static constexpr u32 max_subchannels = 8; 137 static constexpr u32 max_subchannels = 8;
@@ -148,6 +165,8 @@ private:
148 165
149 GPU& gpu; 166 GPU& gpu;
150 Core::System& system; 167 Core::System& system;
168 MemoryManager& memory_manager;
169 mutable Engines::Puller puller;
151}; 170};
152 171
153} // namespace Tegra 172} // namespace Tegra