diff --git a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp index db65007e1c710..398baada9feb6 100644 --- a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp +++ b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp @@ -2872,7 +2872,7 @@ bool GSTextureCache::CopyRGBFromDepthToColor(Target* dst, Target* depth_src) dst->m_TEX0.TBP0, psm_str(dst->m_TEX0.PSM)); // The depth target might be larger (Driv3r). - const GSVector2i new_size = depth_src->GetUnscaledSize().max(dst->GetUnscaledSize()); + const GSVector2i new_size = dst->GetUnscaledSize().max(GSVector2i(depth_src->m_valid.z, depth_src->m_valid.w)); const GSVector2i new_scaled_size = ScaleRenderTargetSize(new_size, dst->GetScale()); const bool needs_new_tex = (new_size != dst->m_unscaled_size); GSTexture* tex = dst->m_texture; @@ -2884,6 +2884,9 @@ bool GSTextureCache::CopyRGBFromDepthToColor(Target* dst, Target* depth_src) return false; m_target_memory_usage = (m_target_memory_usage - dst->m_texture->GetMemUsage()) + tex->GetMemUsage(); + + // Inject new size into hash cache to avoid future resizes. + GetTargetSize(dst->m_TEX0.TBP0, dst->m_TEX0.TBW, dst->m_TEX0.PSM, new_size.x, new_size.y); } // Remove any dirty rectangles contained by this update, we don't want to pull from local memory.