From ed754af8d5046d2fd7218c742521e38ab17cbcfe Mon Sep 17 00:00:00 2001 From: gdkchan Date: Wed, 11 Aug 2021 17:27:00 -0300 Subject: Make sure attributes used on subsequent shader stages are initialized (#2538) --- .../StructuredIr/StructuredProgramContext.cs | 35 ---------------------- 1 file changed, 35 deletions(-) (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 73fff1ec..a9e44175 100644 --- a/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgramContext.cs +++ b/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgramContext.cs @@ -277,21 +277,11 @@ namespace Ryujinx.Graphics.Shader.StructuredIr public AstOperand GetOperandDef(Operand operand) { - if (TryGetUserAttributeIndex(operand, out int attrIndex)) - { - Info.OAttributes.Add(attrIndex); - } - return GetOperand(operand); } public AstOperand GetOperandUse(Operand operand) { - if (TryGetUserAttributeIndex(operand, out int attrIndex)) - { - Info.IAttributes.Add(attrIndex); - } - return GetOperand(operand); } @@ -318,30 +308,5 @@ namespace Ryujinx.Graphics.Shader.StructuredIr return astOperand; } - - private static bool TryGetUserAttributeIndex(Operand operand, out int attrIndex) - { - if (operand.Type == OperandType.Attribute) - { - if (operand.Value >= AttributeConsts.UserAttributeBase && - operand.Value < AttributeConsts.UserAttributeEnd) - { - attrIndex = (operand.Value - AttributeConsts.UserAttributeBase) >> 4; - - return true; - } - else if (operand.Value >= AttributeConsts.FragmentOutputColorBase && - operand.Value < AttributeConsts.FragmentOutputColorEnd) - { - attrIndex = (operand.Value - AttributeConsts.FragmentOutputColorBase) >> 4; - - return true; - } - } - - attrIndex = 0; - - return false; - } } } \ No newline at end of file -- cgit v1.2.3