summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Kelebek12023-04-24 14:07:32 +0100
committerGravatar Kelebek12023-05-26 10:35:46 +0100
commit7ce181edcf1af2efe8d3b4a162cffb4ba6ff5bc9 (patch)
tree7c0c0627d8481dd40eda86655977dfb71ed84b5d /src
parentMerge pull request #10422 from liamwhite/gc (diff)
downloadyuzu-7ce181edcf1af2efe8d3b4a162cffb4ba6ff5bc9.tar.gz
yuzu-7ce181edcf1af2efe8d3b4a162cffb4ba6ff5bc9.tar.xz
yuzu-7ce181edcf1af2efe8d3b4a162cffb4ba6ff5bc9.zip
Fix buffer overlap checking skipping a page for stream score right expand
Diffstat (limited to 'src')
-rw-r--r--src/video_core/buffer_cache/buffer_cache.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h
index 65494097b..88d3b2515 100644
--- a/src/video_core/buffer_cache/buffer_cache.h
+++ b/src/video_core/buffer_cache/buffer_cache.h
@@ -1262,7 +1262,7 @@ typename BufferCache<P>::OverlapResult BufferCache<P>::ResolveOverlaps(VAddr cpu
1262 const VAddr overlap_cpu_addr = overlap.CpuAddr(); 1262 const VAddr overlap_cpu_addr = overlap.CpuAddr();
1263 const bool expands_left = overlap_cpu_addr < begin; 1263 const bool expands_left = overlap_cpu_addr < begin;
1264 if (expands_left) { 1264 if (expands_left) {
1265 cpu_addr = begin = overlap_cpu_addr; 1265 begin = overlap_cpu_addr;
1266 } 1266 }
1267 const VAddr overlap_end = overlap_cpu_addr + overlap.SizeBytes(); 1267 const VAddr overlap_end = overlap_cpu_addr + overlap.SizeBytes();
1268 const bool expands_right = overlap_end > end; 1268 const bool expands_right = overlap_end > end;
@@ -1276,7 +1276,7 @@ typename BufferCache<P>::OverlapResult BufferCache<P>::ResolveOverlaps(VAddr cpu
1276 has_stream_leap = true; 1276 has_stream_leap = true;
1277 if (expands_right) { 1277 if (expands_right) {
1278 begin -= CACHING_PAGESIZE * 256; 1278 begin -= CACHING_PAGESIZE * 256;
1279 cpu_addr = begin; 1279 cpu_addr = begin - CACHING_PAGESIZE;
1280 } 1280 }
1281 if (expands_left) { 1281 if (expands_left) {
1282 end += CACHING_PAGESIZE * 256; 1282 end += CACHING_PAGESIZE * 256;
@@ -1299,7 +1299,7 @@ void BufferCache<P>::JoinOverlap(BufferId new_buffer_id, BufferId overlap_id,
1299 if (accumulate_stream_score) { 1299 if (accumulate_stream_score) {
1300 new_buffer.IncreaseStreamScore(overlap.StreamScore() + 1); 1300 new_buffer.IncreaseStreamScore(overlap.StreamScore() + 1);
1301 } 1301 }
1302 boost::container::small_vector<BufferCopy, 1> copies; 1302 boost::container::small_vector<BufferCopy, 10> copies;
1303 const size_t dst_base_offset = overlap.CpuAddr() - new_buffer.CpuAddr(); 1303 const size_t dst_base_offset = overlap.CpuAddr() - new_buffer.CpuAddr();
1304 copies.push_back(BufferCopy{ 1304 copies.push_back(BufferCopy{
1305 .src_offset = 0, 1305 .src_offset = 0,