From 9e871937250cb92a13336c6c06186c41f19e1738 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Thu, 11 Jun 2020 21:24:45 -0300 Subject: video_core: Remove all Core::System references in renderer Now that the GPU is initialized when video backends are initialized, it's no longer needed to query components once the game is running: it can be done when yuzu is booting. This allows us to pass components between constructors and in the process remove all Core::System references in the video backend. --- src/video_core/renderer_opengl/renderer_opengl.h | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'src/video_core/renderer_opengl/renderer_opengl.h') diff --git a/src/video_core/renderer_opengl/renderer_opengl.h b/src/video_core/renderer_opengl/renderer_opengl.h index 52ea76b7d..5329577fb 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.h +++ b/src/video_core/renderer_opengl/renderer_opengl.h @@ -16,16 +16,25 @@ namespace Core { class System; -} +class TelemetrySession; +} // namespace Core namespace Core::Frontend { class EmuWindow; } +namespace Core::Memory { +class Memory; +} + namespace Layout { struct FramebufferLayout; } +namespace Tegra { +class GPU; +} + namespace OpenGL { /// Structure used for storing information about the textures for the Switch screen @@ -56,7 +65,8 @@ class FrameMailbox; class RendererOpenGL final : public VideoCore::RendererBase { public: - explicit RendererOpenGL(Core::System& system, Core::Frontend::EmuWindow& emu_window, + explicit RendererOpenGL(Core::TelemetrySession& telemetry_session, + Core::Frontend::EmuWindow& emu_window, Core::Memory::Memory& cpu_memory, Tegra::GPU& gpu, std::unique_ptr context); ~RendererOpenGL() override; @@ -94,12 +104,13 @@ private: bool Present(int timeout_ms); - Core::System& system; + Core::TelemetrySession& telemetry_session; Core::Frontend::EmuWindow& emu_window; + Core::Memory::Memory& cpu_memory; Tegra::GPU& gpu; - const Device device; - StateTracker state_tracker{system}; + const Device device; + StateTracker state_tracker{gpu}; // OpenGL object IDs OGLBuffer vertex_buffer; -- cgit v1.2.3