ryubing-ryujinx/src/Ryujinx.Graphics.Gpu/Engine/Threed
riperiperi ecbf303266
GPU: Avoid using garbage size for non-cb0 storage buffers (#4999)
* GPU: Avoid using garbage size for non-cb0 storage buffers

In the depths area, Tears of the Kingdom uses a global memory access with address on constant buffer slot 6. This isn't standard and thus doesn't actually have a size 8 bytes after it, so we were reading back a garbage size that ended up very large (at least in version 1.1.0), and would synchronize a lot of data per frame.

This PR makes storage buffers created from addresses outside constant buffer slot 0 get their size as the number of bytes remaining in the GPU mapping starting at the given virtual address. This should bound the buffer to a reasonable size, and ideally stop it crossing into other memory.

* Limit max size

* Add TODO

* Feedback
2023-05-18 08:56:34 +02:00
..
Blender Move solution and projects to src 2023-04-27 23:51:14 +02:00
ConditionalRendering.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
ConstantBufferUpdater.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
DrawManager.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
DrawState.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
IbStreamer.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
IndirectDrawType.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
RenderTargetUpdateFlags.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
SemaphoreUpdater.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
SpecializationStateUpdater.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
StateUpdater.cs GPU: Avoid using garbage size for non-cb0 storage buffers (#4999) 2023-05-18 08:56:34 +02:00
StateUpdateTracker.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
ThreedClass.cs GPU: Pre-emptively flush textures that are flushed often (to imported memory when available) (#4711) 2023-05-01 16:05:12 -03:00
ThreedClassState.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00