diff --git a/pcsx2/GS/Renderers/Common/GSRenderer.cpp b/pcsx2/GS/Renderers/Common/GSRenderer.cpp index 73262ccf05b37..4542e2a70bed3 100644 --- a/pcsx2/GS/Renderers/Common/GSRenderer.cpp +++ b/pcsx2/GS/Renderers/Common/GSRenderer.cpp @@ -944,6 +944,11 @@ bool GSRenderer::IsIdleFrame() const return (m_last_draw_n == s_n && m_last_transfer_n == s_transfer_n); } +int GSRenderer::GetLastVSyncDraw() const +{ + return m_last_draw_n; +} + bool GSRenderer::SaveSnapshotToMemory(u32 window_width, u32 window_height, bool apply_aspect, bool crop_borders, u32* width, u32* height, std::vector* pixels) { diff --git a/pcsx2/GS/Renderers/Common/GSRenderer.h b/pcsx2/GS/Renderers/Common/GSRenderer.h index c5b56ef7907a3..e061ff9e9e69a 100644 --- a/pcsx2/GS/Renderers/Common/GSRenderer.h +++ b/pcsx2/GS/Renderers/Common/GSRenderer.h @@ -68,6 +68,7 @@ class GSRenderer : public GSState virtual GSTexture* LookupPaletteSource(u32 CBP, u32 CPSM, u32 CBW, GSVector2i& offset, float* scale, const GSVector2i& size); bool IsIdleFrame() const; + int GetLastVSyncDraw() const; bool SaveSnapshotToMemory(u32 window_width, u32 window_height, bool apply_aspect, bool crop_borders, u32* width, u32* height, std::vector* pixels); diff --git a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp index cd9037bd56c6f..5747609fcb624 100644 --- a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp +++ b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp @@ -113,11 +113,11 @@ void GSRendererHW::VSync(u32 field, bool registers_written, bool idle_frame) { // If it did draws very recently, we should keep the recent stuff in case it hasn't been preloaded/used yet. // Rocky Legend does this with the main menu FMV's. - if (s_last_transfer_draw_n == s_n) + if (s_last_transfer_draw_n > (s_n - 5) && s_last_transfer_draw_n >= GetLastVSyncDraw()) { for (auto iter = m_draw_transfers.rbegin(); iter != m_draw_transfers.rend(); iter++) { - if ((s_n - iter->draw) > 5) + if ((s_n - iter->draw) > 50) { m_draw_transfers.erase(m_draw_transfers.begin(), std::next(iter).base()); break; diff --git a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp index 3ac50e7fd4f7c..021928776e14c 100644 --- a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp +++ b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp @@ -2411,11 +2411,10 @@ GSTextureCache::Target* GSTextureCache::LookupDisplayTarget(GIFRegTEX0 TEX0, con else ++iter; - if (eerect.rintersect(newrect).eq(newrect)) - { - can_create = true; - break; - } + // In theory it might not be a full rect, but it should be enough to display *something*. + // It's also possible we haven't saved enough of the transfers to fill the rect if the game draws the picture in lots of small transfers. + can_create = true; + break; } else ++iter;