diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2018-05-17 15:25:42 -0300 |
|---|---|---|
| committer | gdkchan <gab.dark.100@gmail.com> | 2018-05-17 15:25:42 -0300 |
| commit | b19c4740823ed8fcebf62bf5741a7614a2ac0aa0 (patch) | |
| tree | 8cdede3fdb90aa35ffe50c004559b80d4704bea3 /Ryujinx.Graphics/Gal/Shader/ShaderDecodeFlow.cs | |
| parent | 9b9ead94cd2f25a85468ecf91b7898bf34e10825 (diff) | |
Added more shader instructions, including BFE, BRA (partial), FMNMX, ISCADD, SHL, LD_C, some shader related fixes, added support for texture component selection
Diffstat (limited to 'Ryujinx.Graphics/Gal/Shader/ShaderDecodeFlow.cs')
| -rw-r--r-- | Ryujinx.Graphics/Gal/Shader/ShaderDecodeFlow.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderDecodeFlow.cs b/Ryujinx.Graphics/Gal/Shader/ShaderDecodeFlow.cs index d3feb92e..b5f3e0b7 100644 --- a/Ryujinx.Graphics/Gal/Shader/ShaderDecodeFlow.cs +++ b/Ryujinx.Graphics/Gal/Shader/ShaderDecodeFlow.cs @@ -1,9 +1,27 @@ +using System; + using static Ryujinx.Graphics.Gal.Shader.ShaderDecodeHelper; namespace Ryujinx.Graphics.Gal.Shader { static partial class ShaderDecode { + public static void Bra(ShaderIrBlock Block, long OpCode) + { + if ((OpCode & 0x20) != 0) + { + //This reads the target offset from the constant buffer. + //Almost impossible to support with GLSL. + throw new NotImplementedException(); + } + + int Target = ((int)(OpCode >> 20) << 8) >> 8; + + Target += Block.Position + 8; + + Block.AddNode(GetPredNode(new ShaderIrOp(ShaderIrInst.Bra, Block.GetLabel(Target)), OpCode)); + } + public static void Exit(ShaderIrBlock Block, long OpCode) { Block.AddNode(GetPredNode(new ShaderIrOp(ShaderIrInst.Exit), OpCode)); |
