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)
This commit is contained in:
Scott Mansell
2023-01-27 11:34:59 +13:00
parent e57eb04ed3
commit 8a23629345
21 changed files with 645 additions and 531 deletions

View File

@ -324,7 +324,9 @@ void VideoBackendBase::InitializeShared()
// do not initialize again for the config window
m_initialized = true;
g_renderer = std::make_unique<Renderer>();
g_presenter = std::make_unique<VideoCommon::Presenter>();
g_frame_dumper = std::make_unique<FrameDumper>();
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<FrameDumper>();
if (!g_renderer->Initialize() || !g_presenter->Initialize())
{
PanicAlertFmtT("Failed to initialize renderer classes");
Shutdown();
return;
}
g_Config.VerifyValidity();
UpdateActiveConfig();