diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2021-08-11 17:27:00 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-11 22:27:00 +0200 |
| commit | ed754af8d5046d2fd7218c742521e38ab17cbcfe (patch) | |
| tree | d47eda40349a7b4b3fc34d9db9ddeea8f2d0676a /Ryujinx.Graphics.Shader/StructuredIr | |
| parent | 10d649e6d3ad3e4af32d2b41e718bb0a2924da67 (diff) | |
Make sure attributes used on subsequent shader stages are initialized (#2538)
Diffstat (limited to 'Ryujinx.Graphics.Shader/StructuredIr')
| -rw-r--r-- | Ryujinx.Graphics.Shader/StructuredIr/StructuredProgramContext.cs | 35 | ||||
| -rw-r--r-- | Ryujinx.Graphics.Shader/StructuredIr/StructuredProgramInfo.cs | 6 |
2 files changed, 0 insertions, 41 deletions
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 diff --git a/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgramInfo.cs b/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgramInfo.cs index 9479d535..aeaa03ec 100644 --- a/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgramInfo.cs +++ b/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgramInfo.cs @@ -6,17 +6,11 @@ namespace Ryujinx.Graphics.Shader.StructuredIr { public List<StructuredFunction> Functions { get; } - public HashSet<int> IAttributes { get; } - public HashSet<int> OAttributes { get; } - public HelperFunctionsMask HelperFunctionsMask { get; set; } public StructuredProgramInfo() { Functions = new List<StructuredFunction>(); - - IAttributes = new HashSet<int>(); - OAttributes = new HashSet<int>(); } } }
\ No newline at end of file |
