diff options
author | riperiperi <rhy3756547@hotmail.com> | 2022-11-24 07:50:59 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-24 07:50:59 +0000 |
commit | ece36b274da3957d727387d2f7c96adbd0f29bc3 (patch) | |
tree | e4f024265342c69eba254083a4308c32a5aad83d /Ryujinx.Graphics.GAL/Multithreading/ThreadedPipeline.cs | |
parent | f3cc2e5703e5df5c359ce1789a4fb0d73fb9a637 (diff) |
GAL: Send all buffer assignments at once rather than individually (#3881)1.1.377
* GAL: Send all buffer assignments at once rather than individually
The `(int first, BufferRange[] ranges)` method call has very significant performance implications when the bindings are spread out, which they generally always are in Vulkan. This change makes it so that these methods are only called a maximum of one time per draw.
Significantly improves GPU thread performance in Pokemon Scarlet/Violet.
* Address Feedback
Removed SetUniformBuffers(int first, ReadOnlySpan<BufferRange> buffers)
Diffstat (limited to 'Ryujinx.Graphics.GAL/Multithreading/ThreadedPipeline.cs')
-rw-r--r-- | Ryujinx.Graphics.GAL/Multithreading/ThreadedPipeline.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Ryujinx.Graphics.GAL/Multithreading/ThreadedPipeline.cs b/Ryujinx.Graphics.GAL/Multithreading/ThreadedPipeline.cs index 52d69933..ba120867 100644 --- a/Ryujinx.Graphics.GAL/Multithreading/ThreadedPipeline.cs +++ b/Ryujinx.Graphics.GAL/Multithreading/ThreadedPipeline.cs @@ -275,9 +275,9 @@ namespace Ryujinx.Graphics.GAL.Multithreading _renderer.QueueCommand(); } - public void SetStorageBuffers(int first, ReadOnlySpan<BufferRange> buffers) + public void SetStorageBuffers(ReadOnlySpan<BufferAssignment> buffers) { - _renderer.New<SetStorageBuffersCommand>().Set(first, _renderer.CopySpan(buffers)); + _renderer.New<SetStorageBuffersCommand>().Set(_renderer.CopySpan(buffers)); _renderer.QueueCommand(); } @@ -293,9 +293,9 @@ namespace Ryujinx.Graphics.GAL.Multithreading _renderer.QueueCommand(); } - public void SetUniformBuffers(int first, ReadOnlySpan<BufferRange> buffers) + public void SetUniformBuffers(ReadOnlySpan<BufferAssignment> buffers) { - _renderer.New<SetUniformBuffersCommand>().Set(first, _renderer.CopySpan(buffers)); + _renderer.New<SetUniformBuffersCommand>().Set(_renderer.CopySpan(buffers)); _renderer.QueueCommand(); } |