diff options
| author | 2023-06-01 09:06:07 -0400 | |
|---|---|---|
| committer | 2023-06-01 09:06:07 -0400 | |
| commit | d89b98d8e8428852b39a094f18461f1f049e01b6 (patch) | |
| tree | 240cef1e84173900aba72feaecda0f76f23f1be5 /src | |
| parent | Merge pull request #10530 from Kelebek1/syncpt_oob (diff) | |
| parent | Fix buffer overlap checking skipping a page for stream score right expand (diff) | |
| download | yuzu-d89b98d8e8428852b39a094f18461f1f049e01b6.tar.gz yuzu-d89b98d8e8428852b39a094f18461f1f049e01b6.tar.xz yuzu-d89b98d8e8428852b39a094f18461f1f049e01b6.zip | |
Merge pull request #10091 from Kelebek1/bc_bugggggg
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.h | 6 |
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 427afd5fc..f1ad5f7cb 100644 --- a/src/video_core/buffer_cache/buffer_cache.h +++ b/src/video_core/buffer_cache/buffer_cache.h | |||
| @@ -1278,7 +1278,7 @@ typename BufferCache<P>::OverlapResult BufferCache<P>::ResolveOverlaps(VAddr cpu | |||
| 1278 | const VAddr overlap_cpu_addr = overlap.CpuAddr(); | 1278 | const VAddr overlap_cpu_addr = overlap.CpuAddr(); |
| 1279 | const bool expands_left = overlap_cpu_addr < begin; | 1279 | const bool expands_left = overlap_cpu_addr < begin; |
| 1280 | if (expands_left) { | 1280 | if (expands_left) { |
| 1281 | cpu_addr = begin = overlap_cpu_addr; | 1281 | begin = overlap_cpu_addr; |
| 1282 | } | 1282 | } |
| 1283 | const VAddr overlap_end = overlap_cpu_addr + overlap.SizeBytes(); | 1283 | const VAddr overlap_end = overlap_cpu_addr + overlap.SizeBytes(); |
| 1284 | const bool expands_right = overlap_end > end; | 1284 | const bool expands_right = overlap_end > end; |
| @@ -1292,7 +1292,7 @@ typename BufferCache<P>::OverlapResult BufferCache<P>::ResolveOverlaps(VAddr cpu | |||
| 1292 | has_stream_leap = true; | 1292 | has_stream_leap = true; |
| 1293 | if (expands_right) { | 1293 | if (expands_right) { |
| 1294 | begin -= CACHING_PAGESIZE * 256; | 1294 | begin -= CACHING_PAGESIZE * 256; |
| 1295 | cpu_addr = begin; | 1295 | cpu_addr = begin - CACHING_PAGESIZE; |
| 1296 | } | 1296 | } |
| 1297 | if (expands_left) { | 1297 | if (expands_left) { |
| 1298 | end += CACHING_PAGESIZE * 256; | 1298 | end += CACHING_PAGESIZE * 256; |
| @@ -1315,7 +1315,7 @@ void BufferCache<P>::JoinOverlap(BufferId new_buffer_id, BufferId overlap_id, | |||
| 1315 | if (accumulate_stream_score) { | 1315 | if (accumulate_stream_score) { |
| 1316 | new_buffer.IncreaseStreamScore(overlap.StreamScore() + 1); | 1316 | new_buffer.IncreaseStreamScore(overlap.StreamScore() + 1); |
| 1317 | } | 1317 | } |
| 1318 | boost::container::small_vector<BufferCopy, 1> copies; | 1318 | boost::container::small_vector<BufferCopy, 10> copies; |
| 1319 | const size_t dst_base_offset = overlap.CpuAddr() - new_buffer.CpuAddr(); | 1319 | const size_t dst_base_offset = overlap.CpuAddr() - new_buffer.CpuAddr(); |
| 1320 | copies.push_back(BufferCopy{ | 1320 | copies.push_back(BufferCopy{ |
| 1321 | .src_offset = 0, | 1321 | .src_offset = 0, |