diff options
| author | Connor McLaughlin <stenzek@gmail.com> | 2019-07-25 13:50:57 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-25 13:50:57 +1000 |
| commit | ac9912bad3ad35b1ef27151ba724a3424c110acc (patch) | |
| tree | 3f6873682f9c6f2570ed0123be82475cc62873d4 /Source/Core/VideoCommon/VertexManagerBase.cpp | |
| parent | d82e0e0761aa8cf08048aed64011f0edf5d967a8 (diff) | |
| parent | 2d4d61e967baa460fa45abd4fd6bccfb12fe3cac (diff) | |
Merge pull request #6321 from stenzek/efb-savestates
Support saving EFB and texture cache in save states
Diffstat (limited to 'Source/Core/VideoCommon/VertexManagerBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VertexManagerBase.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/VertexManagerBase.cpp b/Source/Core/VideoCommon/VertexManagerBase.cpp index c9fa12f6bb..f1150dc340 100644 --- a/Source/Core/VideoCommon/VertexManagerBase.cpp +++ b/Source/Core/VideoCommon/VertexManagerBase.cpp @@ -338,9 +338,6 @@ void VertexManagerBase::Flush() m_is_flushed = true; - // loading a state will invalidate BP, so check for it - g_video_backend->CheckInvalidState(); - #if defined(_DEBUG) || defined(DEBUGFAST) PRIM_LOG("frame%d:\n texgen=%u, numchan=%u, dualtex=%u, ztex=%u, cole=%u, alpe=%u, ze=%u", g_ActiveConfig.iSaveTargetId, xfmem.numTexGen.numTexGens, xfmem.numChan.numColorChans, @@ -464,6 +461,16 @@ void VertexManagerBase::Flush() void VertexManagerBase::DoState(PointerWrap& p) { + if (p.GetMode() == PointerWrap::MODE_READ) + { + // Flush old vertex data before loading state. + Flush(); + + // 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(); + } + p.Do(m_zslope); } |
