From e449ad74721762948197b728865d88904445728a Mon Sep 17 00:00:00 2001 From: Stenzek Date: Wed, 11 Jan 2023 22:01:40 +1000 Subject: [PATCH] GS/TextureCache: Check PSM matches before expanding target Mercenaries is doing a 128x4095 write in PSMT4, which when upscaling, goes beyond the limits of most GPUs. --- pcsx2/GS/Renderers/HW/GSTextureCache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp index 586adad5b4..1ef5264bc0 100644 --- a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp +++ b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp @@ -781,7 +781,7 @@ void GSTextureCache::ExpandTarget(const GIFRegBITBLTBUF& BITBLTBUF, const GSVect { Target* t = *i; - if (TEX0.TBP0 == t->m_TEX0.TBP0 && t->Overlaps(TEX0.TBP0, TEX0.TBW, TEX0.PSM, r)) + if (TEX0.TBP0 == t->m_TEX0.TBP0 && TEX0.PSM == t->m_TEX0.PSM && t->Overlaps(TEX0.TBP0, TEX0.TBW, TEX0.PSM, r)) { list.MoveFront(i.Index());