From f82ce06fdcac90cbda2d4becc53a17cd9333fbe9 Mon Sep 17 00:00:00 2001 From: Rui Pinheiro Date: Sat, 11 Aug 2018 22:46:54 +0100 Subject: [PATCH] Fix typo in buffered_section::overlaps_page If "address" is not page-aligned, the calculated end address for the corresponding page is incorrect which can lead to false positives, causing some textures to be re-uploaded unnecessarily. This commit fixes this typo. --- rpcs3/Emu/RSX/rsx_cache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpcs3/Emu/RSX/rsx_cache.h b/rpcs3/Emu/RSX/rsx_cache.h index d8560dbe9f..dff669bddc 100644 --- a/rpcs3/Emu/RSX/rsx_cache.h +++ b/rpcs3/Emu/RSX/rsx_cache.h @@ -240,7 +240,7 @@ namespace rsx std::tuple> overlaps_page(const std::pair& old_range, u32 address, overlap_test_bounds bounds) const { const u32 page_base = address & ~4095; - const u32 page_limit = address + 4096; + const u32 page_limit = page_base + 4096; const u32 compare_min = std::min(old_range.first, page_base); const u32 compare_max = std::max(old_range.second, page_limit);