From da53bcee60fced902479b72b40ed26b099fa9938 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Thu, 11 Jun 2020 00:58:57 -0300 Subject: 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. --- src/video_core/gpu.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/video_core/gpu.h') 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&& 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 renderer); + /// Calls a GPU method. void CallMethod(const MethodCall& method_call); @@ -345,8 +346,8 @@ private: bool ExecuteMethodOnEngine(u32 method); protected: - std::unique_ptr dma_pusher; Core::System& system; + std::unique_ptr dma_pusher; std::unique_ptr renderer; private: -- cgit v1.2.3