mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-12-23 00:40:58 +01:00
Merge pull request #10091 from Kelebek1/bc_bugggggg
Fix buffer overlap checking skipping a page for stream score right expand
This commit is contained in:
commit
d89b98d8e8
1 changed files with 3 additions and 3 deletions
|
@ -1278,7 +1278,7 @@ typename BufferCache<P>::OverlapResult BufferCache<P>::ResolveOverlaps(VAddr cpu
|
||||||
const VAddr overlap_cpu_addr = overlap.CpuAddr();
|
const VAddr overlap_cpu_addr = overlap.CpuAddr();
|
||||||
const bool expands_left = overlap_cpu_addr < begin;
|
const bool expands_left = overlap_cpu_addr < begin;
|
||||||
if (expands_left) {
|
if (expands_left) {
|
||||||
cpu_addr = begin = overlap_cpu_addr;
|
begin = overlap_cpu_addr;
|
||||||
}
|
}
|
||||||
const VAddr overlap_end = overlap_cpu_addr + overlap.SizeBytes();
|
const VAddr overlap_end = overlap_cpu_addr + overlap.SizeBytes();
|
||||||
const bool expands_right = overlap_end > end;
|
const bool expands_right = overlap_end > end;
|
||||||
|
@ -1292,7 +1292,7 @@ typename BufferCache<P>::OverlapResult BufferCache<P>::ResolveOverlaps(VAddr cpu
|
||||||
has_stream_leap = true;
|
has_stream_leap = true;
|
||||||
if (expands_right) {
|
if (expands_right) {
|
||||||
begin -= CACHING_PAGESIZE * 256;
|
begin -= CACHING_PAGESIZE * 256;
|
||||||
cpu_addr = begin;
|
cpu_addr = begin - CACHING_PAGESIZE;
|
||||||
}
|
}
|
||||||
if (expands_left) {
|
if (expands_left) {
|
||||||
end += CACHING_PAGESIZE * 256;
|
end += CACHING_PAGESIZE * 256;
|
||||||
|
@ -1315,7 +1315,7 @@ void BufferCache<P>::JoinOverlap(BufferId new_buffer_id, BufferId overlap_id,
|
||||||
if (accumulate_stream_score) {
|
if (accumulate_stream_score) {
|
||||||
new_buffer.IncreaseStreamScore(overlap.StreamScore() + 1);
|
new_buffer.IncreaseStreamScore(overlap.StreamScore() + 1);
|
||||||
}
|
}
|
||||||
boost::container::small_vector<BufferCopy, 1> copies;
|
boost::container::small_vector<BufferCopy, 10> copies;
|
||||||
const size_t dst_base_offset = overlap.CpuAddr() - new_buffer.CpuAddr();
|
const size_t dst_base_offset = overlap.CpuAddr() - new_buffer.CpuAddr();
|
||||||
copies.push_back(BufferCopy{
|
copies.push_back(BufferCopy{
|
||||||
.src_offset = 0,
|
.src_offset = 0,
|
||||||
|
|
Loading…
Reference in a new issue