diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2018-05-29 20:37:10 -0300 |
|---|---|---|
| committer | gdkchan <gab.dark.100@gmail.com> | 2018-05-29 20:37:10 -0300 |
| commit | f43dd080641b3c2508e35bc7651fb0adcb282a2e (patch) | |
| tree | 9a4fb60454e558817a0eee9fd3bfe594e438d45f /Ryujinx.Graphics/Gal/Shader/ShaderIrBlock.cs | |
| parent | 9670c096e410add36314a247b77334c0c1d61256 (diff) | |
Added support for more shader instructions and texture formats, fix swapped channels in RGB565 and RGBA5551? texture formats, allow zero values on blending registers, initial work to build CFG on the shader decoder, update the BRA instruction to work with it (WIP)
Diffstat (limited to 'Ryujinx.Graphics/Gal/Shader/ShaderIrBlock.cs')
| -rw-r--r-- | Ryujinx.Graphics/Gal/Shader/ShaderIrBlock.cs | 40 |
1 files changed, 12 insertions, 28 deletions
diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderIrBlock.cs b/Ryujinx.Graphics/Gal/Shader/ShaderIrBlock.cs index 31d72169..50e563b8 100644 --- a/Ryujinx.Graphics/Gal/Shader/ShaderIrBlock.cs +++ b/Ryujinx.Graphics/Gal/Shader/ShaderIrBlock.cs @@ -4,44 +4,28 @@ namespace Ryujinx.Graphics.Gal.Shader { class ShaderIrBlock { - private List<ShaderIrNode> Nodes; + public long Position { get; set; } + public long EndPosition { get; set; } - private Dictionary<long, ShaderIrLabel> LabelsToInsert; + public ShaderIrBlock Next { get; set; } + public ShaderIrBlock Branch { get; set; } - public long Position; + public List<ShaderIrBlock> Sources { get; private set; } - public ShaderIrBlock() - { - Nodes = new List<ShaderIrNode>(); + public List<ShaderIrNode> Nodes { get; private set; } - LabelsToInsert = new Dictionary<long, ShaderIrLabel>(); - } - - public void AddNode(ShaderIrNode Node) + public ShaderIrBlock(long Position) { - Nodes.Add(Node); - } + this.Position = Position; - public ShaderIrLabel GetLabel(long Position) - { - if (LabelsToInsert.TryGetValue(Position, out ShaderIrLabel Label)) - { - return Label; - } - - Label = new ShaderIrLabel(); + Sources = new List<ShaderIrBlock>(); - LabelsToInsert.Add(Position, Label); - - return Label; + Nodes = new List<ShaderIrNode>(); } - public void MarkLabel(long Position) + public void AddNode(ShaderIrNode Node) { - if (LabelsToInsert.TryGetValue(Position, out ShaderIrLabel Label)) - { - Nodes.Add(Label); - } + Nodes.Add(Node); } public ShaderIrNode[] GetNodes() |
