Ryujinx/Ryujinx.Graphics.Gpu/Memory
riperiperi 7c5ead1c19
Fast path for Inline2Memory buffer write that skips write tracking (#2624)
* Fast path for Inline2Memory buffer write

This PR adds a method to PhysicalMemory that attempts to write all cached resources directly, so that memory tracking can be avoided. The goal of this is both to avoid flushing buffer data, and to avoid raising the sequence number when data is written, which causes buffer and texture handles to be re-checked.

This currently only targets buffers, with a side check on textures that falls back to a tracked write if any exist within the target range. It's not expected to write textures from here - this is just a mechanism to protect us if someone does decide to do that. It's possible to add a fast path for this in future (and for ShaderCache, once that starts using tracking)

The forced read before inline2memory begins has been skipped, as the data is fully written when the transfer is completed anyways. This allows us to flush on read in emergency situations, but still write the new data over the flushed data.

Improves performance on Xenoblade 2 and DE, which was flushing buffer data on the GPU thread when trying to write compute data. May improve performance in other games that write SSBOs from compute, and update data in the same/nearby pages often.

Super Smash Bros Ultimate should probably be tested to make sure the vertex explosions haven't returned, as I think that's what this AdvanceSequence was for.

* ForceDirty before write, to make sure data does not flush over the new write
2021-09-19 15:09:53 +02:00
..
Buffer.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
BufferBounds.cs Implement lazy flush-on-read for Buffers (SSBO/Copy) (#1790) 2021-01-17 17:08:06 -03:00
BufferCache.cs Add support for HLE macros and accelerate MultiDrawElementsIndirectCount #2 (#2557) 2021-08-26 23:50:28 +02:00
BufferCacheEntry.cs POWER - Performance Optimizations With Extensive Ramifications (#2286) 2021-05-24 22:52:44 +02:00
BufferManager.cs Enable transform feedback buffer flush (#2552) 2021-08-17 14:09:27 -03:00
BufferModifiedRangeList.cs Array based RangeList that caches Address/EndAddress (#2642) 2021-09-19 14:22:26 +02:00
BufferTextureBinding.cs Improve Buffer Textures and flush Image Stores (#2088) 2021-03-08 18:43:39 -03:00
CounterCache.cs Implement Counter Queue and Partial Host Conditional Rendering (#1167) 2020-05-04 12:24:59 +10:00
GpuRegionHandle.cs POWER - Performance Optimizations With Extensive Ramifications (#2286) 2021-05-24 22:52:44 +02:00
IndexBuffer.cs Add XML documentation to Ryujinx.Graphics.Gpu.Memory 2020-01-09 02:13:00 +01:00
MemoryManager.cs Handle indirect draw counts with non-zero draw starts properly (#2593) 2021-08-29 16:52:38 -03:00
PhysicalMemory.cs Fast path for Inline2Memory buffer write that skips write tracking (#2624) 2021-09-19 15:09:53 +02:00
ResourceName.cs Add XML documentation to Ryujinx.Graphics.Gpu.Memory 2020-01-09 02:13:00 +01:00
UnmapEventArgs.cs Initial conditional rendering support (#1012) 2020-04-22 16:00:11 +10:00
VertexBuffer.cs Add XML documentation to Ryujinx.Graphics.Gpu.Memory 2020-01-09 02:13:00 +01:00