From ae0bb5040e96f5282d922efcef97548089553596 Mon Sep 17 00:00:00 2001 From: Gabriel A Date: Sun, 29 Oct 2023 14:30:27 -0300 Subject: [PATCH] Fix TryGetConstantBufferSlot --- src/Ryujinx.Graphics.Shader/Translation/ResourceManager.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Ryujinx.Graphics.Shader/Translation/ResourceManager.cs b/src/Ryujinx.Graphics.Shader/Translation/ResourceManager.cs index a27fae2cc..a4a8be937 100644 --- a/src/Ryujinx.Graphics.Shader/Translation/ResourceManager.cs +++ b/src/Ryujinx.Graphics.Shader/Translation/ResourceManager.cs @@ -270,6 +270,11 @@ namespace Ryujinx.Graphics.Shader.Translation { for (slot = 0; slot < _cbSlotToBindingMap.Length; slot++) { + if (_cbSlotToBindingMap[slot] < 0) + { + continue; + } + if (SetBindingPair.Pack(Constants.VkConstantBufferSetIndex, _cbSlotToBindingMap[slot]) == binding) { return true;