Ryujinx/src/Ryujinx.Graphics.Gpu/Memory
riperiperi eb1ce41b00
GPU: Migrate buffers on GPU project, pre-emptively flush device local mappings (#6794)
* GPU: Migrate buffers on GPU project, pre-emptively flush device local mappings

Essentially retreading #4540, but it's on the GPU project now instead of the backend. This allows us to have a lot more control + knowledge of where the buffer backing has been changed and allows us to pre-emptively flush pages to host memory for quicker readback. It will allow us to do other stuff in the future, but we'll get there when we get there.

Performance greatly improved in Hyrule Warriors: Age of Calamity. Performance notably improved in TOTK (average). Performance for BOTW restored to how it was before #4911, perhaps a bit better.

- Rewrites a bunch of buffer migration stuff. Might want to tighten up how dispose stuff works.
- Fixed an issue where the copy for texture pre-flush would happen _after_ the syncpoint.

TODO: remove a page from pre-flush if it isn't flushed after a certain number of copies.

* Add copy deactivation

* Fix dependent virtual buffers

* Remove logging

* Fix format issues (maybe)

* Vulkan: Remove backing swap

* Add explicit memory access types for most buffers

* Fix typo

* Add device local force expiry, change buffer inheritance behaviour

* General cleanup, OGL fix

* BufferPreFlush comments

* BufferBackingState comments

* Add an extra precaution to BufferMigration

This is very unlikely, but it's important to cover loose ends like this.

* Address some feedback

* Docs
2024-05-19 16:53:37 -03:00
..
Buffer.cs GPU: Migrate buffers on GPU project, pre-emptively flush device local mappings (#6794) 2024-05-19 16:53:37 -03:00
BufferBackingState.cs GPU: Migrate buffers on GPU project, pre-emptively flush device local mappings (#6794) 2024-05-19 16:53:37 -03:00
BufferBounds.cs Add support for large sampler arrays on Vulkan (#6489) 2024-04-07 18:25:55 -03:00
BufferCache.cs GPU: Migrate buffers on GPU project, pre-emptively flush device local mappings (#6794) 2024-05-19 16:53:37 -03:00
BufferCacheEntry.cs editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
BufferManager.cs GPU: Migrate buffers on GPU project, pre-emptively flush device local mappings (#6794) 2024-05-19 16:53:37 -03:00
BufferMigration.cs GPU: Migrate buffers on GPU project, pre-emptively flush device local mappings (#6794) 2024-05-19 16:53:37 -03:00
BufferModifiedRangeList.cs GPU: Migrate buffers on GPU project, pre-emptively flush device local mappings (#6794) 2024-05-19 16:53:37 -03:00
BufferPreFlush.cs GPU: Migrate buffers on GPU project, pre-emptively flush device local mappings (#6794) 2024-05-19 16:53:37 -03:00
BufferStage.cs GPU: Migrate buffers on GPU project, pre-emptively flush device local mappings (#6794) 2024-05-19 16:53:37 -03:00
BufferTextureArrayBinding.cs Add support for large sampler arrays on Vulkan (#6489) 2024-04-07 18:25:55 -03:00
BufferTextureBinding.cs Implement support for multi-range buffers using Vulkan sparse mappings (#5427) 2023-12-04 20:30:19 +01:00
BufferUpdater.cs Geometry shader emulation for macOS (#5551) 2023-08-29 21:10:34 -03:00
CounterCache.cs editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
GpuRegionHandle.cs editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
IndexBuffer.cs Implement support for multi-range buffers using Vulkan sparse mappings (#5427) 2023-12-04 20:30:19 +01:00
MemoryManager.cs Texture loading: reduce memory allocations (#6623) 2024-04-14 17:06:14 -03:00
MultiRangeBuffer.cs Implement virtual buffer dependencies (#6190) 2024-02-22 11:03:07 -03:00
MultiRangeWritableBlock.cs editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
PhysicalMemory.cs Texture loading: reduce memory allocations (#6623) 2024-04-14 17:06:14 -03:00
PteKind.cs [Ryujinx.Graphics.Gpu] Address dotnet-format issues (#5367) 2023-07-02 02:47:54 +02:00
ResourceKind.cs [Ryujinx.Graphics.Gpu] Address dotnet-format issues (#5367) 2023-07-02 02:47:54 +02:00
SupportBufferUpdater.cs editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
UnmapEventArgs.cs editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
VertexBuffer.cs Implement support for multi-range buffers using Vulkan sparse mappings (#5427) 2023-12-04 20:30:19 +01:00
VirtualRangeCache.cs chore: remove repetitive words (#6500) 2024-03-16 19:49:54 +01:00