summaryrefslogtreecommitdiff
path: root/src/video_core/gpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/gpu.h')
-rw-r--r--src/video_core/gpu.h34
1 files changed, 19 insertions, 15 deletions
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h
index 6313702f2..ac7aec6a4 100644
--- a/src/video_core/gpu.h
+++ b/src/video_core/gpu.h
@@ -16,8 +16,8 @@ class System;
16} 16}
17 17
18namespace VideoCore { 18namespace VideoCore {
19class RasterizerInterface; 19class RendererBase;
20} 20} // namespace VideoCore
21 21
22namespace Tegra { 22namespace Tegra {
23 23
@@ -121,7 +121,8 @@ enum class EngineID {
121 121
122class GPU final { 122class GPU final {
123public: 123public:
124 explicit GPU(Core::System& system, VideoCore::RasterizerInterface& rasterizer); 124 explicit GPU(Core::System& system, VideoCore::RendererBase& renderer);
125
125 ~GPU(); 126 ~GPU();
126 127
127 struct MethodCall { 128 struct MethodCall {
@@ -201,8 +202,23 @@ public:
201 } regs{}; 202 } regs{};
202 203
203private: 204private:
205 void ProcessBindMethod(const MethodCall& method_call);
206 void ProcessSemaphoreTriggerMethod();
207 void ProcessSemaphoreRelease();
208 void ProcessSemaphoreAcquire();
209
210 // Calls a GPU puller method.
211 void CallPullerMethod(const MethodCall& method_call);
212 // Calls a GPU engine method.
213 void CallEngineMethod(const MethodCall& method_call);
214 // Determines where the method should be executed.
215 bool ExecuteMethodOnEngine(const MethodCall& method_call);
216
217private:
204 std::unique_ptr<Tegra::DmaPusher> dma_pusher; 218 std::unique_ptr<Tegra::DmaPusher> dma_pusher;
205 std::unique_ptr<Tegra::MemoryManager> memory_manager; 219 std::unique_ptr<Tegra::MemoryManager> memory_manager;
220
221 VideoCore::RendererBase& renderer;
206 222
207 /// Mapping of command subchannels to their bound engine ids. 223 /// Mapping of command subchannels to their bound engine ids.
208 std::array<EngineID, 8> bound_engines = {}; 224 std::array<EngineID, 8> bound_engines = {};
@@ -217,18 +233,6 @@ private:
217 std::unique_ptr<Engines::MaxwellDMA> maxwell_dma; 233 std::unique_ptr<Engines::MaxwellDMA> maxwell_dma;
218 /// Inline memory engine 234 /// Inline memory engine
219 std::unique_ptr<Engines::KeplerMemory> kepler_memory; 235 std::unique_ptr<Engines::KeplerMemory> kepler_memory;
220
221 void ProcessBindMethod(const MethodCall& method_call);
222 void ProcessSemaphoreTriggerMethod();
223 void ProcessSemaphoreRelease();
224 void ProcessSemaphoreAcquire();
225
226 // Calls a GPU puller method.
227 void CallPullerMethod(const MethodCall& method_call);
228 // Calls a GPU engine method.
229 void CallEngineMethod(const MethodCall& method_call);
230 // Determines where the method should be executed.
231 bool ExecuteMethodOnEngine(const MethodCall& method_call);
232}; 236};
233 237
234#define ASSERT_REG_POSITION(field_name, position) \ 238#define ASSERT_REG_POSITION(field_name, position) \