early-access version 2450
This commit is contained in:
parent
0956837e51
commit
119ad710e0
2 changed files with 16 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 2448.
|
This is the source code for early-access 2450.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
|
|
@ -1495,19 +1495,29 @@ typename BufferCache<P>::OverlapResult BufferCache<P>::ResolveOverlaps(VAddr cpu
|
||||||
overlap_ids.push_back(overlap_id);
|
overlap_ids.push_back(overlap_id);
|
||||||
overlap.Pick();
|
overlap.Pick();
|
||||||
const VAddr overlap_cpu_addr = overlap.CpuAddr();
|
const VAddr overlap_cpu_addr = overlap.CpuAddr();
|
||||||
|
bool goes_left = false;
|
||||||
if (overlap_cpu_addr < begin) {
|
if (overlap_cpu_addr < begin) {
|
||||||
|
goes_left = true;
|
||||||
cpu_addr = begin = overlap_cpu_addr;
|
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();
|
stream_score += overlap.StreamScore();
|
||||||
if (stream_score > STREAM_LEAP_THRESHOLD && !has_stream_leap) {
|
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
|
// 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.
|
// as a stream buffer. Increase the size to skip constantly recreating buffers.
|
||||||
has_stream_leap = true;
|
has_stream_leap = true;
|
||||||
begin -= PAGE_SIZE * 256;
|
if (goes_right) {
|
||||||
cpu_addr = begin;
|
begin -= PAGE_SIZE * 256;
|
||||||
end += PAGE_SIZE * 256;
|
cpu_addr = begin;
|
||||||
|
}
|
||||||
|
if (goes_left) {
|
||||||
|
end += PAGE_SIZE * 256;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return OverlapResult{
|
return OverlapResult{
|
||||||
|
|
Loading…
Reference in a new issue