AstOperand.cs 915 B

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