AstOperand.cs
1 using Ryujinx.Graphics.Shader.IntermediateRepresentation; 2 using Ryujinx.Graphics.Shader.Translation; 3 using System.Collections.Generic; 4 5 namespace Ryujinx.Graphics.Shader.StructuredIr 6 { 7 class AstOperand : AstNode 8 { 9 public HashSet<IAstNode> Defs { get; } 10 public HashSet<IAstNode> Uses { get; } 11 12 public OperandType Type { get; } 13 14 public AggregateType VarType { get; set; } 15 16 public int Value { get; } 17 18 private AstOperand() 19 { 20 Defs = new HashSet<IAstNode>(); 21 Uses = new HashSet<IAstNode>(); 22 23 VarType = AggregateType.S32; 24 } 25 26 public AstOperand(Operand operand) : this() 27 { 28 Type = operand.Type; 29 Value = operand.Value; 30 } 31 32 public AstOperand(OperandType type, int value = 0) : this() 33 { 34 Type = type; 35 Value = value; 36 } 37 } 38 }