Skip to content

Commit

Permalink
GPU/HW: Fix incorrect dirty rect union
Browse files Browse the repository at this point in the history
Reduces GPU usage during screen waves effect in Um Jammer Lammy from
over 70% down to 3% on my 7900GRE at 9x.
  • Loading branch information
stenzek committed Jul 14, 2024
1 parent 5d4f6e4 commit a5a3207
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/gpu_hw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a5a3207

Please sign in to comment.