aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/StructuredIr/OperandInfo.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.Shader/StructuredIr/OperandInfo.cs')
-rw-r--r--Ryujinx.Graphics.Shader/StructuredIr/OperandInfo.cs17
1 files changed, 9 insertions, 8 deletions
diff --git a/Ryujinx.Graphics.Shader/StructuredIr/OperandInfo.cs b/Ryujinx.Graphics.Shader/StructuredIr/OperandInfo.cs
index 34428815..730468a4 100644
--- a/Ryujinx.Graphics.Shader/StructuredIr/OperandInfo.cs
+++ b/Ryujinx.Graphics.Shader/StructuredIr/OperandInfo.cs
@@ -1,11 +1,12 @@
using Ryujinx.Graphics.Shader.IntermediateRepresentation;
+using Ryujinx.Graphics.Shader.Translation;
using System;
namespace Ryujinx.Graphics.Shader.StructuredIr
{
static class OperandInfo
{
- public static VariableType GetVarType(AstOperand operand)
+ public static AggregateType GetVarType(AstOperand operand)
{
if (operand.Type == OperandType.LocalVariable)
{
@@ -17,16 +18,16 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
}
}
- public static VariableType GetVarType(OperandType type)
+ public static AggregateType GetVarType(OperandType type)
{
return type switch
{
- OperandType.Argument => VariableType.S32,
- OperandType.Attribute => VariableType.F32,
- OperandType.AttributePerPatch => VariableType.F32,
- OperandType.Constant => VariableType.S32,
- OperandType.ConstantBuffer => VariableType.F32,
- OperandType.Undefined => VariableType.S32,
+ OperandType.Argument => AggregateType.S32,
+ OperandType.Attribute => AggregateType.FP32,
+ OperandType.AttributePerPatch => AggregateType.FP32,
+ OperandType.Constant => AggregateType.S32,
+ OperandType.ConstantBuffer => AggregateType.FP32,
+ OperandType.Undefined => AggregateType.S32,
_ => throw new ArgumentException($"Invalid operand type \"{type}\".")
};
}