TextureCache: Support saving cache entries, including EFB copies

This commit is contained in:
Stenzek
2019-06-29 19:27:53 +10:00
parent b26bb0605b
commit 1082468133
10 changed files with 418 additions and 48 deletions

View File

@ -241,7 +241,7 @@ void VideoBackendBase::DoState(PointerWrap& p)
{
if (!SConfig::GetInstance().bCPUThread)
{
DoStateGPUThread(p);
VideoCommon_DoState(p);
return;
}
@ -255,34 +255,6 @@ void VideoBackendBase::DoState(PointerWrap& p)
Fifo::GpuMaySleep();
}
void VideoBackendBase::DoStateGPUThread(PointerWrap& p)
{
bool software = false;
p.Do(software);
if (p.GetMode() == PointerWrap::MODE_READ && software == true)
{
// change mode to abort load of incompatible save state.
p.SetMode(PointerWrap::MODE_VERIFY);
}
VideoCommon_DoState(p);
p.DoMarker("VideoCommon");
// Refresh state.
if (p.GetMode() == PointerWrap::MODE_READ)
{
// Inform backend of new state from registers.
g_vertex_manager->Flush();
g_texture_cache->Invalidate();
BPReload();
// Clear all caches that touch RAM
// (? these don't appear to touch any emulation state that gets saved. moved to on load only.)
VertexLoaderManager::MarkAllDirty();
}
}
void VideoBackendBase::InitializeShared()
{
memset(&g_main_cp_state, 0, sizeof(g_main_cp_state));