From a0af6e4d07f623692943c5fe68b183365b38c812 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Wed, 4 Oct 2023 19:46:11 -0300 Subject: Use unique temporary variables for function call parameters on SPIR-V (#5757) * Use unique temporary variables for function call parameters on SPIR-V * Shader cache version bump --- .../CodeGen/Spirv/Declarations.cs | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'src/Ryujinx.Graphics.Shader/CodeGen/Spirv/Declarations.cs') diff --git a/src/Ryujinx.Graphics.Shader/CodeGen/Spirv/Declarations.cs b/src/Ryujinx.Graphics.Shader/CodeGen/Spirv/Declarations.cs index 54767c2f..45933a21 100644 --- a/src/Ryujinx.Graphics.Shader/CodeGen/Spirv/Declarations.cs +++ b/src/Ryujinx.Graphics.Shader/CodeGen/Spirv/Declarations.cs @@ -41,28 +41,6 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv } } - public static void DeclareLocalForArgs(CodeGenContext context, List functions) - { - for (int funcIndex = 0; funcIndex < functions.Count; funcIndex++) - { - StructuredFunction function = functions[funcIndex]; - SpvInstruction[] locals = new SpvInstruction[function.InArguments.Length]; - - for (int i = 0; i < function.InArguments.Length; i++) - { - var type = function.GetArgumentType(i); - var localPointerType = context.TypePointer(StorageClass.Function, context.GetType(type)); - var spvLocal = context.Variable(localPointerType, StorageClass.Function); - - context.AddLocalVariable(spvLocal); - - locals[i] = spvLocal; - } - - context.DeclareLocalForArgs(funcIndex, locals); - } - } - public static void DeclareAll(CodeGenContext context, StructuredProgramInfo info) { DeclareConstantBuffers(context, context.Properties.ConstantBuffers.Values); -- cgit v1.2.3