diff options
| author | Stenzek <stenzek@gmail.com> | 2019-06-29 19:27:53 +1000 |
|---|---|---|
| committer | Stenzek <stenzek@gmail.com> | 2019-07-24 04:10:38 +1000 |
| commit | 1082468133342586ae2a5986408d163ce5aa14ca (patch) | |
| tree | ac7fb57285770d9bf07b080b79360ca1b7db9386 /Source/Core/VideoCommon/VideoState.cpp | |
| parent | b26bb0605b962456720519b273f171919ebfb65d (diff) | |
TextureCache: Support saving cache entries, including EFB copies
Diffstat (limited to 'Source/Core/VideoCommon/VideoState.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VideoState.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/VideoState.cpp b/Source/Core/VideoCommon/VideoState.cpp index ab84e1b001..0fdeebcfa1 100644 --- a/Source/Core/VideoCommon/VideoState.cpp +++ b/Source/Core/VideoCommon/VideoState.cpp @@ -13,6 +13,8 @@ #include "VideoCommon/GeometryShaderManager.h" #include "VideoCommon/PixelEngine.h" #include "VideoCommon/PixelShaderManager.h" +#include "VideoCommon/RenderBase.h" +#include "VideoCommon/TextureCacheBase.h" #include "VideoCommon/TextureDecoder.h" #include "VideoCommon/VertexManagerBase.h" #include "VideoCommon/VertexShaderManager.h" @@ -21,6 +23,15 @@ void VideoCommon_DoState(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); + } + // BP Memory p.Do(bpmem); p.DoMarker("BP Memory"); @@ -63,5 +74,16 @@ void VideoCommon_DoState(PointerWrap& p) BoundingBox::DoState(p); p.DoMarker("BoundingBox"); - // TODO: search for more data that should be saved and add it here + g_texture_cache->DoState(p); + p.DoMarker("TextureCache"); + + g_renderer->DoState(p); + p.DoMarker("Renderer"); + + // Refresh state. + if (p.GetMode() == PointerWrap::MODE_READ) + { + // Inform backend of new state from registers. + BPReload(); + } } |
