From 8a236293455e9a71aa6fb400a6253c27540e403b Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Fri, 27 Jan 2023 11:34:59 +1300 Subject: Split AbstractGfx out of Renderer Almost all the virtual functions in Renderer are part of dolphin's "graphics api abstraction layer", which has slowly formed over the last decade or two. Most of the work was done previously with the introduction of the various "AbstractX" classes, associated with texture cache cleanups and implementation of newer graphics APIs (Direct3D 12, Vulkan, Metal). We are simply taking the last step and yeeting these functions out of Renderer. This "AbstractGfx" class is now completely agnostic of any details from the flipper/hollywood GPU we are emulating, though somewhat specialized. (Will not build, this commit only contains changes outside VideoBackends) --- Source/Core/VideoCommon/VideoBackendBase.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Source/Core/VideoCommon/VideoBackendBase.cpp') diff --git a/Source/Core/VideoCommon/VideoBackendBase.cpp b/Source/Core/VideoCommon/VideoBackendBase.cpp index 167848b425..40fcd8b0f4 100644 --- a/Source/Core/VideoCommon/VideoBackendBase.cpp +++ b/Source/Core/VideoCommon/VideoBackendBase.cpp @@ -324,7 +324,9 @@ void VideoBackendBase::InitializeShared() // do not initialize again for the config window m_initialized = true; + g_renderer = std::make_unique(); g_presenter = std::make_unique(); + g_frame_dumper = std::make_unique(); auto& system = Core::System::GetInstance(); auto& command_processor = system.GetCommandProcessor(); @@ -337,7 +339,13 @@ void VideoBackendBase::InitializeShared() system.GetGeometryShaderManager().Init(); system.GetPixelShaderManager().Init(); TMEM::Init(); - g_frame_dumper = std::make_unique(); + + if (!g_renderer->Initialize() || !g_presenter->Initialize()) + { + PanicAlertFmtT("Failed to initialize renderer classes"); + Shutdown(); + return; + } g_Config.VerifyValidity(); UpdateActiveConfig(); -- cgit v1.2.3