From a5a320720ad497b2df71c93e456409ba4ef78c94 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 14 Jul 2024 17:44:22 +1000 Subject: [PATCH] GPU/HW: Fix incorrect dirty rect union Reduces GPU usage during screen waves effect in Um Jammer Lammy from over 70% down to 3% on my 7900GRE at 9x. --- src/core/gpu_hw.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/gpu_hw.cpp b/src/core/gpu_hw.cpp index 6fd95958a..f827e7705 100644 --- a/src/core/gpu_hw.cpp +++ b/src/core/gpu_hw.cpp @@ -659,7 +659,7 @@ void GPU_HW::AddDrawnRectangle(const GSVector4i rect) // Normally, we would check for overlap here. But the GPU's texture cache won't actually reload until the page // changes, or it samples a larger region, so we can get away without doing so. This reduces copies considerably in // games like Mega Man Legends 2. - m_vram_dirty_draw_rect = m_vram_dirty_draw_rect.runion(m_clamped_drawing_area); + m_vram_dirty_draw_rect = m_vram_dirty_draw_rect.runion(rect); } void GPU_HW::AddUnclampedDrawnRectangle(const GSVector4i rect)