Inherit buffer tracking handles rather than recreating on resize (#2330)
This greatly speeds up games that constantly resize buffers, and removes stuttering on games that resize large buffers occasionally: - Large improvement on Super Mario 3D All-Stars (#1663 needed for best performance) - Improvement to Hyrule Warriors: AoC, and UE4 games. These games can still stutter due to texture creation/loading. - Small improvement to other games, potential 1-frame stutters avoided. `ForceSynchronizeMemory`, which was added with POWER, is no longer needed. Some tests have been added for the MultiRegionHandle.
This commit is contained in:
parent
e053663f27
commit
12a7a2ead8
11 changed files with 255 additions and 58 deletions
|
@ -134,13 +134,14 @@ namespace Ryujinx.Memory.Tracking
|
|||
/// </summary>
|
||||
/// <param name="address">CPU virtual address of the region</param>
|
||||
/// <param name="size">Size of the region</param>
|
||||
/// <param name="handles">Handles to inherit state from or reuse. When none are present, provide null</param>
|
||||
/// <param name="granularity">Desired granularity of write tracking</param>
|
||||
/// <returns>The memory tracking handle</returns>
|
||||
public MultiRegionHandle BeginGranularTracking(ulong address, ulong size, ulong granularity)
|
||||
public MultiRegionHandle BeginGranularTracking(ulong address, ulong size, IEnumerable<IRegionHandle> handles, ulong granularity)
|
||||
{
|
||||
(address, size) = PageAlign(address, size);
|
||||
|
||||
return new MultiRegionHandle(this, address, size, granularity);
|
||||
return new MultiRegionHandle(this, address, size, handles, granularity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue