From 05f3bbfa4d22bf50e803dfb1c75657e1a9f953a7 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Fri, 7 Oct 2022 11:52:44 -0700 Subject: [PATCH] Include tangent/binormal cache in savestates This theoretically matters for RS2/RS3, although in practice these games reconfigure it each frame so it shouldn't matter for savestates. --- Source/Core/Core/State.cpp | 2 +- Source/Core/VideoCommon/VertexManagerBase.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/State.cpp b/Source/Core/Core/State.cpp index 1f38fe1e17..7e81035b2a 100644 --- a/Source/Core/Core/State.cpp +++ b/Source/Core/Core/State.cpp @@ -94,7 +94,7 @@ static size_t s_state_writes_in_queue; static std::condition_variable s_state_write_queue_is_empty; // Don't forget to increase this after doing changes on the savestate system -constexpr u32 STATE_VERSION = 151; // Last changed in PR 11125 +constexpr u32 STATE_VERSION = 152; // Last changed in PR 11131 // Maps savestate versions to Dolphin versions. // Versions after 42 don't need to be added to this list, diff --git a/Source/Core/VideoCommon/VertexManagerBase.cpp b/Source/Core/VideoCommon/VertexManagerBase.cpp index e77e6e4525..c208f81097 100644 --- a/Source/Core/VideoCommon/VertexManagerBase.cpp +++ b/Source/Core/VideoCommon/VertexManagerBase.cpp @@ -564,6 +564,8 @@ void VertexManagerBase::DoState(PointerWrap& p) } p.Do(m_zslope); + p.Do(VertexLoaderManager::tangent_cache); + p.Do(VertexLoaderManager::binormal_cache); } void VertexManagerBase::CalculateZSlope(NativeVertexFormat* format)