TextureCache: EFB copies kept across a savestate load on OpenGL too

Loading a state on OpenGL no longer throws the texture cache away after
restoring it: the EFB copies the state carries, the XFB copies among
them, are found again as on the other backends, instead of the next
picture being decoded from RAM, which the copies never wrote, and shown
as garbage.
This commit is contained in:
LibretroAdmin authored and libretroadmin committed 2026-11-07 00:43:00 +01:00
1 parent 6eecf67db6
commit 6bdbdfefd5
1 file changed
-12
@@ -56,9 +56,6 @@
#include "VideoCommon/VertexManagerBase.h"
#include "VideoCommon/VideoCommon.h"
#include "VideoCommon/VideoConfig.h"
#ifdef __LIBRETRO__
#include "VideoCommon/VideoBackendBase.h"
#endif
static const u64 TEXHASH_INVALID = 0;
// Sonic the Fighters (inside Sonic Gems Collection) loops a 64 frames animation
@@ -562,16 +559,7 @@ void TextureCacheBase::DoState(PointerWrap& p)
if (p.IsWriteMode() || p.IsMeasureMode())
DoSaveState(p);
else
{
DoLoadState(p);
#ifdef __LIBRETRO__
if (p.IsReadMode() &&
g_video_backend && g_video_backend->GetConfigName() == "OGL")
{
Invalidate();
}
#endif
}
}
void TextureCacheBase::DoSaveState(PointerWrap& p)