mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-30 23:20:16 +00:00
a16682cfd3
* Allow _volatile to be set from MultiRegionHandle checks again Tracking handles have a `_volatile` flag which indicates that the resource being tracked is modified every time it is used under a new sequence number. This is used to reduce the time spent reprotecting memory for tracking writes to commonly modified buffers, like constant buffers. This optimisation works by detecting if a buffer is modified every time a check happens. If a buffer is checked but it is not dirty, then that data is likely not modified every sequence number, and should use memory protection for write tracking. If the opposite is the case all the time, it is faster to just assume it's dirty as we'd just be wasting time protecting the memory. The new MultiRegionBitmap could not notify handles that they had been checked as part of the fast bitmap lookup, so bindings larger than 4096 bytes wouldn't trigger it at all. This meant that they would be subject to a ton of reprotection if they were modified often. This does mean there are two separate sources for a _volatile set: VolatileOrDirty + _checkCount, and the bitmap check. These shouldn't interfere with each other, though. This fixes performance regressions from #3775 in Pokemon Sword, and hopefully Yu-Gi-Oh! RUSH DUEL: Dawn of the Battle Royale. May affect other games. * Fix stupid mistake |
||
---|---|---|
.. | ||
AbstractRegion.cs | ||
BitMap.cs | ||
ConcurrentBitmap.cs | ||
IMultiRegionHandle.cs | ||
IRegionHandle.cs | ||
MemoryTracking.cs | ||
MultiRegionHandle.cs | ||
PreciseRegionSignal.cs | ||
RegionHandle.cs | ||
RegionSignal.cs | ||
SmartMultiRegionHandle.cs | ||
VirtualRegion.cs |