1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-11-18 10:26:54 +00:00
Ryujinx/Ryujinx.Memory
riperiperi a16682cfd3
Allow _volatile to be set from MultiRegionHandle checks again (#3830)
* 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
2022-11-18 02:54:20 +00:00
..
Range Support memory aliasing (#2954) 2022-05-02 20:30:02 -03:00
Tracking Allow _volatile to be set from MultiRegionHandle checks again (#3830) 2022-11-18 02:54:20 +00:00
WindowsShared Fix partial unmap reprotection on Windows (#3702) 2022-09-14 17:46:37 +02:00
AddressSpaceManager.cs Support memory aliasing (#2954) 2022-05-02 20:30:02 -03:00
InvalidAccessHandler.cs POWER - Performance Optimizations With Extensive Ramifications (#2286) 2021-05-24 22:52:44 +02:00
InvalidMemoryRegionException.cs Update InvalidMemoryRegionException.cs to abide by English rules. (#1834) 2020-12-25 04:09:02 +01:00
IRefCounted.cs POWER - Performance Optimizations With Extensive Ramifications (#2286) 2021-05-24 22:52:44 +02:00
IVirtualMemoryManager.cs Support memory aliasing (#2954) 2022-05-02 20:30:02 -03:00
IWritableBlock.cs Return mapped buffer pointer directly for flush, WriteableRegion for textures (#2494) 2021-07-19 19:10:54 -03:00
MemoryAllocationFlags.cs Move partial unmap handler to the native signal handler (#3437) 2022-07-29 19:16:29 -03:00
MemoryBlock.cs Move partial unmap handler to the native signal handler (#3437) 2022-07-29 19:16:29 -03:00
MemoryConstants.cs Implement a new physical memory manager and replace DeviceMemory (#856) 2020-05-04 08:54:50 +10:00
MemoryManagement.cs Move partial unmap handler to the native signal handler (#3437) 2022-07-29 19:16:29 -03:00
MemoryManagementUnix.cs Fix mapping leaks caused by UnmapView not working on Linux (#3650) 2022-10-19 01:02:45 +00:00
MemoryManagementWindows.cs Move partial unmap handler to the native signal handler (#3437) 2022-07-29 19:16:29 -03:00
MemoryManagerUnixHelper.cs Support memory aliasing (#2954) 2022-05-02 20:30:02 -03:00
MemoryNotContiguousException.cs IPC refactor part 2: Use ReplyAndReceive on HLE services and remove special handling from kernel (#1458) 2020-12-02 00:23:43 +01:00
MemoryPermission.cs POWER - Performance Optimizations With Extensive Ramifications (#2286) 2021-05-24 22:52:44 +02:00
MemoryProtectionException.cs Implement a new physical memory manager and replace DeviceMemory (#856) 2020-05-04 08:54:50 +10:00
NativeMemoryManager.cs POWER - Performance Optimizations With Extensive Ramifications (#2286) 2021-05-24 22:52:44 +02:00
PageTable.cs Support memory aliasing (#2954) 2022-05-02 20:30:02 -03:00
Ryujinx.Memory.csproj infra: Migrate to .NET 7 (#3795) 2022-11-09 20:22:43 +01:00
WritableRegion.cs Return mapped buffer pointer directly for flush, WriteableRegion for textures (#2494) 2021-07-19 19:10:54 -03:00