mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-07 00:28:56 +00:00
TextureCache: Support saving cache entries, including EFB copies
This commit is contained in:
parent
b26bb0605b
commit
1082468133
10 changed files with 418 additions and 48 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue