From 1876b346fea647e8284a66bb6d62c38801035cff Mon Sep 17 00:00:00 2001 From: gdk Date: Sun, 13 Oct 2019 03:02:07 -0300 Subject: Initial work --- .../StructuredIr/AstAssignment.cs | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Ryujinx.Graphics.Shader/StructuredIr/AstAssignment.cs (limited to 'Ryujinx.Graphics.Shader/StructuredIr/AstAssignment.cs') diff --git a/Ryujinx.Graphics.Shader/StructuredIr/AstAssignment.cs b/Ryujinx.Graphics.Shader/StructuredIr/AstAssignment.cs new file mode 100644 index 00000000..bb3fe7af --- /dev/null +++ b/Ryujinx.Graphics.Shader/StructuredIr/AstAssignment.cs @@ -0,0 +1,35 @@ +using static Ryujinx.Graphics.Shader.StructuredIr.AstHelper; + +namespace Ryujinx.Graphics.Shader.StructuredIr +{ + class AstAssignment : AstNode + { + public IAstNode Destination { get; } + + private IAstNode _source; + + public IAstNode Source + { + get + { + return _source; + } + set + { + RemoveUse(_source, this); + + AddUse(value, this); + + _source = value; + } + } + + public AstAssignment(IAstNode destination, IAstNode source) + { + Destination = destination; + Source = source; + + AddDef(destination, this); + } + } +} \ No newline at end of file -- cgit v1.2.3