diff options
author | riperiperi <rhy3756547@hotmail.com> | 2022-10-08 15:28:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-08 11:28:27 -0300 |
commit | 1ca0517c99af1914b887d6197b816c84537a9145 (patch) | |
tree | ea0042b2bd1f178991142c8a7b0ad339488eb244 /Ryujinx.Graphics.Vulkan/BufferManager.cs | |
parent | 599d485bffc9080d1c54acce929bbda0c7077499 (diff) |
Vulkan: Fix some issues with CacheByRange (#3743)1.1.296
* Fix some issues with CacheByRange
- Cache now clears under more circumstances, the most important being the fast path write.
- Cache supports partial clear which should help when more buffers join.
- Fixed an issue with I8->I16 conversion where it wouldn't register the buffer for use on dispose.
Should hopefully fix issues with https://github.com/Ryujinx/Ryujinx-Games-List/issues/4010 and maybe others.
* Fix collection modified exception
* Fix accidental use of parameterless constructor
* Replay DynamicState when restoring from helper shader
Diffstat (limited to 'Ryujinx.Graphics.Vulkan/BufferManager.cs')
-rw-r--r-- | Ryujinx.Graphics.Vulkan/BufferManager.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Vulkan/BufferManager.cs b/Ryujinx.Graphics.Vulkan/BufferManager.cs index e4820a30..57d67242 100644 --- a/Ryujinx.Graphics.Vulkan/BufferManager.cs +++ b/Ryujinx.Graphics.Vulkan/BufferManager.cs @@ -124,6 +124,16 @@ namespace Ryujinx.Graphics.Vulkan return null; } + public Auto<DisposableBuffer> GetBuffer(CommandBuffer commandBuffer, BufferHandle handle, int offset, int size, bool isWrite) + { + if (TryGetBuffer(handle, out var holder)) + { + return holder.GetBuffer(commandBuffer, offset, size, isWrite); + } + + return null; + } + public Auto<DisposableBuffer> GetBufferI8ToI16(CommandBufferScoped cbs, BufferHandle handle, int offset, int size) { if (TryGetBuffer(handle, out var holder)) |