ShaderIrBlock.cs 644 B

12345678910111213141516171819202122232425262728293031323334
  1. using System.Collections.Generic;
  2. namespace Ryujinx.Graphics.Gal.Shader
  3. {
  4. class ShaderIrBlock
  5. {
  6. private List<ShaderIrNode> Nodes;
  7. public ShaderIrBlock()
  8. {
  9. Nodes = new List<ShaderIrNode>();
  10. }
  11. public void AddNode(ShaderIrNode Node)
  12. {
  13. Nodes.Add(Node);
  14. }
  15. public ShaderIrNode[] GetNodes()
  16. {
  17. return Nodes.ToArray();
  18. }
  19. public ShaderIrNode GetLastNode()
  20. {
  21. if (Nodes.Count > 0)
  22. {
  23. return Nodes[Nodes.Count - 1];
  24. }
  25. return null;
  26. }
  27. }
  28. }