Move Presenting, Dumping and ImGui out of Renderer

This commit is contained in:
Scott Mansell
2023-01-27 17:03:15 +13:00
parent c38c76abad
commit 0d4537d60f
29 changed files with 1766 additions and 1394 deletions

View File

@ -44,12 +44,14 @@
#include "VideoCommon/CPMemory.h"
#include "VideoCommon/CommandProcessor.h"
#include "VideoCommon/Fifo.h"
#include "VideoCommon/FrameDumper.h"
#include "VideoCommon/FramebufferManager.h"
#include "VideoCommon/GeometryShaderManager.h"
#include "VideoCommon/IndexGenerator.h"
#include "VideoCommon/OpcodeDecoding.h"
#include "VideoCommon/PixelEngine.h"
#include "VideoCommon/PixelShaderManager.h"
#include "VideoCommon/Present.h"
#include "VideoCommon/RenderBase.h"
#include "VideoCommon/TMEM.h"
#include "VideoCommon/TextureCacheBase.h"
@ -322,6 +324,8 @@ void VideoBackendBase::InitializeShared()
// do not initialize again for the config window
m_initialized = true;
g_presenter = std::make_unique<VideoCommon::Presenter>();
auto& system = Core::System::GetInstance();
auto& command_processor = system.GetCommandProcessor();
command_processor.Init(system);
@ -333,6 +337,7 @@ void VideoBackendBase::InitializeShared()
system.GetGeometryShaderManager().Init();
system.GetPixelShaderManager().Init();
TMEM::Init();
g_frame_dumper = std::make_unique<FrameDumper>();
g_Config.VerifyValidity();
UpdateActiveConfig();
@ -340,6 +345,9 @@ void VideoBackendBase::InitializeShared()
void VideoBackendBase::ShutdownShared()
{
g_frame_dumper.reset();
g_presenter.reset();
if (g_shader_cache)
g_shader_cache->Shutdown();
if (g_renderer)