TextureCache: Refactor with smart pointers

The whole ownership model was getting a bit of a mess, with a some
of special cases to deal with. And I'm planning to make it even more
complex in the future.
So here is some upfront work to convert it over to reference counted
pointers.
This commit is contained in:
Scott Mansell
2022-07-25 17:20:33 +12:00
parent c1fd4a2013
commit 606c18210d
14 changed files with 248 additions and 276 deletions

View File

@ -44,6 +44,7 @@
#include "VideoCommon/CPMemory.h"
#include "VideoCommon/CommandProcessor.h"
#include "VideoCommon/Fifo.h"
#include "VideoCommon/FramebufferManager.h"
#include "VideoCommon/GeometryShaderManager.h"
#include "VideoCommon/IndexGenerator.h"
#include "VideoCommon/OpcodeDecoding.h"
@ -339,6 +340,20 @@ void VideoBackendBase::InitializeShared()
void VideoBackendBase::ShutdownShared()
{
if (g_shader_cache)
g_shader_cache->Shutdown();
if (g_renderer)
g_renderer->Shutdown();
if (g_texture_cache)
g_texture_cache->Shutdown();
g_perf_query.reset();
g_texture_cache.reset();
g_framebuffer_manager.reset();
g_shader_cache.reset();
g_vertex_manager.reset();
g_renderer.reset();
m_initialized = false;
auto& system = Core::System::GetInstance();