summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexManagerBase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoCommon/VertexManagerBase.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexManagerBase.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/VertexManagerBase.cpp b/Source/Core/VideoCommon/VertexManagerBase.cpp
index 527a836d63..f1150dc340 100644
--- a/Source/Core/VideoCommon/VertexManagerBase.cpp
+++ b/Source/Core/VideoCommon/VertexManagerBase.cpp
@@ -461,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);
}