From b34de74f81ef73a78d43d169b9f1ce7f175035b5 Mon Sep 17 00:00:00 2001 From: gdkchan <gab.dark.100@gmail.com> Date: Sat, 23 Jul 2022 11:15:58 -0300 Subject: Avoid adding shader buffer descriptors for constant buffers that are not used (#3478) * Avoid adding shader buffer descriptors for constant buffers that are not used * Shader cache version --- Ryujinx.Graphics.Shader/StructuredIr/StructuredProgramContext.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Ryujinx.Graphics.Shader/StructuredIr/StructuredProgramContext.cs') diff --git a/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgramContext.cs b/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgramContext.cs index 2a39d021..05325144 100644 --- a/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgramContext.cs +++ b/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgramContext.cs @@ -300,6 +300,11 @@ namespace Ryujinx.Graphics.Shader.StructuredIr if (operand.Type != OperandType.LocalVariable) { + if (operand.Type == OperandType.ConstantBuffer) + { + Config.SetUsedConstantBuffer(operand.GetCbufSlot()); + } + return new AstOperand(operand); } -- cgit v1.2.3-70-g09d2