From 4e501f1a7082b0ea2d5f0d3250828d5d476acb99 Mon Sep 17 00:00:00 2001 From: sunshineinabox Date: Sat, 28 Sep 2024 10:46:01 -0700 Subject: [PATCH] Fix vertex buffer binding indices in Vulkan pipeline introduced from previous commit. --- src/Ryujinx.Graphics.Vulkan/PipelineBase.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs b/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs index e083768829..7ea06b3dec 100644 --- a/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs +++ b/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs @@ -1397,7 +1397,7 @@ namespace Ryujinx.Graphics.Vulkan if (!_bindingsSet) { - for (int i = 0; i < count; i++) + for (int i = 1; i < count; i++) { _newState.Internal.VertexBindingDescriptions[i] = new VertexInputBindingDescription((uint)i); } @@ -1463,7 +1463,7 @@ namespace Ryujinx.Graphics.Vulkan } } - ref var buffer = ref _vertexBuffers[i]; + ref var buffer = ref _vertexBuffers[descriptorIndex]; int oldScalarAlign = buffer.AttributeScalarAlignment; if (Gd.Capabilities.VertexBufferAlignment < 2 && @@ -1480,7 +1480,7 @@ namespace Ryujinx.Graphics.Vulkan vbSize, vertexBuffer.Stride); - buffer.BindVertexBuffer(Gd, Cbs, (uint)i, ref _newState, _vertexBufferUpdater); + buffer.BindVertexBuffer(Gd, Cbs, (uint)descriptorIndex, ref _newState, _vertexBufferUpdater); } } else @@ -1496,7 +1496,7 @@ namespace Ryujinx.Graphics.Vulkan vbSize, vertexBuffer.Stride); - _vertexBuffersDirty |= 1UL << i; + _vertexBuffersDirty |= 1UL << descriptorIndex; } buffer.AttributeScalarAlignment = oldScalarAlign;