early-access version 2450

This commit is contained in:
pineappleEA 2022-01-31 12:25:49 +01:00
parent 0956837e51
commit 119ad710e0
2 changed files with 16 additions and 6 deletions

View File

@ -1,7 +1,7 @@
yuzu emulator early access
=============
This is the source code for early-access 2448.
This is the source code for early-access 2450.
## Legal Notice

View File

@ -1495,19 +1495,29 @@ typename BufferCache<P>::OverlapResult BufferCache<P>::ResolveOverlaps(VAddr cpu
overlap_ids.push_back(overlap_id);
overlap.Pick();
const VAddr overlap_cpu_addr = overlap.CpuAddr();
bool goes_left = false;
if (overlap_cpu_addr < begin) {
goes_left = true;
cpu_addr = begin = overlap_cpu_addr;
}
end = std::max(end, overlap_cpu_addr + overlap.SizeBytes());
const VAddr overlap_end = overlap_cpu_addr + overlap.SizeBytes();
bool goes_right = false;
if (overlap_end > end) {
goes_right = true;
end = overlap_end;
}
stream_score += overlap.StreamScore();
if (stream_score > STREAM_LEAP_THRESHOLD && !has_stream_leap) {
// When this memory region has been joined a bunch of times, we assume it's being used
// as a stream buffer. Increase the size to skip constantly recreating buffers.
has_stream_leap = true;
begin -= PAGE_SIZE * 256;
cpu_addr = begin;
end += PAGE_SIZE * 256;
if (goes_right) {
begin -= PAGE_SIZE * 256;
cpu_addr = begin;
}
if (goes_left) {
end += PAGE_SIZE * 256;
}
}
}
return OverlapResult{