mirror of https://github.com/PCSX2/pcsx2.git
GS: Fix crash on shutdown when using software renderer
This commit is contained in:
parent
e9a624ab54
commit
8989b69ce8
|
@ -108,6 +108,8 @@ void GSshutdown()
|
|||
|
||||
void GSclose()
|
||||
{
|
||||
GSTextureReplacements::Shutdown();
|
||||
|
||||
if (g_gs_renderer)
|
||||
{
|
||||
g_gs_renderer->Destroy();
|
||||
|
@ -290,6 +292,7 @@ bool GSreopen(bool recreate_display, bool recreate_renderer, const Pcsx2Config::
|
|||
const u32 gamecrc = g_gs_renderer->GetGameCRC();
|
||||
if (recreate_renderer)
|
||||
{
|
||||
GSTextureReplacements::Shutdown();
|
||||
g_gs_renderer->Destroy();
|
||||
g_gs_renderer.reset();
|
||||
}
|
||||
|
@ -773,7 +776,8 @@ void GSUpdateConfig(const Pcsx2Config::GSOptions& new_config)
|
|||
g_gs_device->ClearSamplerCache();
|
||||
|
||||
// texture dumping/replacement options
|
||||
GSTextureReplacements::UpdateConfig(old_config);
|
||||
if (GSConfig.UseHardwareRenderer())
|
||||
GSTextureReplacements::UpdateConfig(old_config);
|
||||
|
||||
// clear the hash texture cache since we might have replacements now
|
||||
// also clear it when dumping changes, since we want to dump everything being used
|
||||
|
|
|
@ -55,7 +55,6 @@ GSRendererHW::~GSRendererHW()
|
|||
void GSRendererHW::Destroy()
|
||||
{
|
||||
g_texture_cache->RemoveAll();
|
||||
GSTextureReplacements::Shutdown();
|
||||
GSRenderer::Destroy();
|
||||
}
|
||||
|
||||
|
|
|
@ -47,8 +47,6 @@ GSTextureCache::GSTextureCache()
|
|||
|
||||
GSTextureCache::~GSTextureCache()
|
||||
{
|
||||
GSTextureReplacements::Shutdown();
|
||||
|
||||
RemoveAll();
|
||||
|
||||
_aligned_free(s_unswizzle_buffer);
|
||||
|
|
Loading…
Reference in New Issue