diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-06-11 00:58:57 -0300 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-08-22 01:51:45 -0300 |
commit | da53bcee60fced902479b72b40ed26b099fa9938 (patch) | |
tree | b83232ad60b7725090b31bd3e347c9df774ced40 /src/video_core/gpu.h | |
parent | ada9b7fb77f0c30a71396c1084616d912245ccab (diff) |
video_core: Initialize renderer with a GPU
Add an extra step in GPU initialization to be able to initialize render
backends with a valid GPU instance.
Diffstat (limited to 'src/video_core/gpu.h')
-rw-r--r-- | src/video_core/gpu.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h index ebfc7b0c7..c7d11deb2 100644 --- a/src/video_core/gpu.h +++ b/src/video_core/gpu.h @@ -142,11 +142,6 @@ class MemoryManager; class GPU { public: - explicit GPU(Core::System& system, std::unique_ptr<VideoCore::RendererBase>&& renderer, - bool is_async); - - virtual ~GPU(); - struct MethodCall { u32 method{}; u32 argument{}; @@ -162,6 +157,12 @@ public: method_count(method_count) {} }; + explicit GPU(Core::System& system, bool is_async); + virtual ~GPU(); + + /// Binds a renderer to the GPU. + void BindRenderer(std::unique_ptr<VideoCore::RendererBase> renderer); + /// Calls a GPU method. void CallMethod(const MethodCall& method_call); @@ -345,8 +346,8 @@ private: bool ExecuteMethodOnEngine(u32 method); protected: - std::unique_ptr<Tegra::DmaPusher> dma_pusher; Core::System& system; + std::unique_ptr<Tegra::DmaPusher> dma_pusher; std::unique_ptr<VideoCore::RendererBase> renderer; private: |