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)
This commit is contained in:
parent
9670c096e4
commit
f43dd08064
14 changed files with 749 additions and 154 deletions
|
@ -4,17 +4,23 @@ 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()
|
||||
public List<ShaderIrNode> Nodes { get; private set; }
|
||||
|
||||
public ShaderIrBlock(long Position)
|
||||
{
|
||||
Nodes = new List<ShaderIrNode>();
|
||||
this.Position = Position;
|
||||
|
||||
LabelsToInsert = new Dictionary<long, ShaderIrLabel>();
|
||||
Sources = new List<ShaderIrBlock>();
|
||||
|
||||
Nodes = new List<ShaderIrNode>();
|
||||
}
|
||||
|
||||
public void AddNode(ShaderIrNode Node)
|
||||
|
@ -22,28 +28,6 @@ namespace Ryujinx.Graphics.Gal.Shader
|
|||
Nodes.Add(Node);
|
||||
}
|
||||
|
||||
public ShaderIrLabel GetLabel(long Position)
|
||||
{
|
||||
if (LabelsToInsert.TryGetValue(Position, out ShaderIrLabel Label))
|
||||
{
|
||||
return Label;
|
||||
}
|
||||
|
||||
Label = new ShaderIrLabel();
|
||||
|
||||
LabelsToInsert.Add(Position, Label);
|
||||
|
||||
return Label;
|
||||
}
|
||||
|
||||
public void MarkLabel(long Position)
|
||||
{
|
||||
if (LabelsToInsert.TryGetValue(Position, out ShaderIrLabel Label))
|
||||
{
|
||||
Nodes.Add(Label);
|
||||
}
|
||||
}
|
||||
|
||||
public ShaderIrNode[] GetNodes()
|
||||
{
|
||||
return Nodes.ToArray();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue