mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-30 07:54:15 +01:00
Batch contiguous GMMU ranges into one
This commit is contained in:
parent
e52dbf202f
commit
77d76ed05a
@ -253,7 +253,11 @@ namespace skyline {
|
||||
if (cpuAccessCallback)
|
||||
cpuAccessCallback(cpuBlock);
|
||||
|
||||
ranges.push_back(cpuBlock);
|
||||
// Batch contiguous ranges into one
|
||||
if (!ranges.empty() && ranges.back().data() + ranges.back().size() == cpuBlock.data())
|
||||
ranges.back() = {ranges.back().data(), ranges.back().size() + cpuBlock.size()};
|
||||
else
|
||||
ranges.push_back(cpuBlock);
|
||||
} else {
|
||||
ranges.push_back(span<u8>{static_cast<u8*>(nullptr), blockSize});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user