mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-02-21 16:43:35 +00:00
Fix storage buffers being lost when bindings are out of order
(also avoid allocations when changing bindings)
This commit is contained in:
parent
db3a28f731
commit
f6c2f7a8d6
1 changed files with 5 additions and 2 deletions
|
@ -145,8 +145,11 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
public void SetStorageBuffers(CommandBuffer commandBuffer, int first, ReadOnlySpan<BufferRange> buffers)
|
||||
{
|
||||
Array.Resize(ref _storageBuffers, first + buffers.Length);
|
||||
Array.Resize(ref _storageBufferRefs, first + buffers.Length);
|
||||
if (_storageBuffers.Length < first + buffers.Length)
|
||||
{
|
||||
Array.Resize(ref _storageBuffers, first + buffers.Length);
|
||||
Array.Resize(ref _storageBufferRefs, first + buffers.Length);
|
||||
}
|
||||
|
||||
for (int i = 0; i < buffers.Length; i++)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue