diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2018-04-19 16:18:30 -0300 |
|---|---|---|
| committer | gdkchan <gab.dark.100@gmail.com> | 2018-04-19 16:18:30 -0300 |
| commit | 03002f6537e3208e6951bc9092e958985e200c7d (patch) | |
| tree | e3e4eea4eba155d82168915ad7c3a507e3a20f59 /Ryujinx.Graphics | |
| parent | 33ae6e544bd477da629e3f4ab4925f457ecfbbb7 (diff) | |
Add SvcSetThreadActivity, tweak SignalProcessWideKey, add fmul32i shader instructions and other small fixes
Diffstat (limited to 'Ryujinx.Graphics')
| -rw-r--r-- | Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs | 2 | ||||
| -rw-r--r-- | Ryujinx.Graphics/Gal/Shader/ShaderDecodeAlu.cs | 13 | ||||
| -rw-r--r-- | Ryujinx.Graphics/Gal/Shader/ShaderDecodeHelper.cs | 5 | ||||
| -rw-r--r-- | Ryujinx.Graphics/Gal/Shader/ShaderOpCodeTable.cs | 1 |
4 files changed, 17 insertions, 4 deletions
diff --git a/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs b/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs index 457192dc..d7173bcd 100644 --- a/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs +++ b/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs @@ -193,7 +193,7 @@ namespace Ryujinx.Graphics.Gal.Shader } else if (DeclInfo.Name == GlslDecl.FragmentOutputName) { - Name = "layout (location = 0) out " + GetDecl(DeclInfo) + ";"; + Name = "layout (location = 0) out " + GetDecl(DeclInfo) + ";" + Environment.NewLine; } else { diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderDecodeAlu.cs b/Ryujinx.Graphics/Gal/Shader/ShaderDecodeAlu.cs index b796ab28..830aeb8c 100644 --- a/Ryujinx.Graphics/Gal/Shader/ShaderDecodeAlu.cs +++ b/Ryujinx.Graphics/Gal/Shader/ShaderDecodeAlu.cs @@ -41,6 +41,16 @@ namespace Ryujinx.Graphics.Gal.Shader EmitAluFfma(Block, OpCode, ShaderOper.RR); } + public static void Fmul32i(ShaderIrBlock Block, long OpCode) + { + ShaderIrNode OperA = GetOperGpr8 (OpCode); + ShaderIrNode OperB = GetOperImmf32_20(OpCode); + + ShaderIrOp Op = new ShaderIrOp(ShaderIrInst.Fmul, OperA, OperB); + + Block.AddNode(GetPredNode(new ShaderIrAsg(GetOperGpr0(OpCode), Op), OpCode)); + } + public static void Fmul_C(ShaderIrBlock Block, long OpCode) { EmitAluBinaryF(Block, OpCode, ShaderOper.CR, ShaderIrInst.Fmul); @@ -212,7 +222,6 @@ namespace Ryujinx.Graphics.Gal.Shader bool Aa = ((OpCode >> 46) & 1) != 0; bool Na = ((OpCode >> 48) & 1) != 0; bool Ab = ((OpCode >> 49) & 1) != 0; - bool Ad = ((OpCode >> 50) & 1) != 0; ShaderIrNode OperA = GetOperGpr8(OpCode), OperB; @@ -234,8 +243,6 @@ namespace Ryujinx.Graphics.Gal.Shader ShaderIrNode Op = new ShaderIrOp(Inst, OperA, OperB); - Op = GetAluAbs(Op, Ad); - Block.AddNode(GetPredNode(new ShaderIrAsg(GetOperGpr0(OpCode), Op), OpCode)); } diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderDecodeHelper.cs b/Ryujinx.Graphics/Gal/Shader/ShaderDecodeHelper.cs index de932dce..efbce20f 100644 --- a/Ryujinx.Graphics/Gal/Shader/ShaderDecodeHelper.cs +++ b/Ryujinx.Graphics/Gal/Shader/ShaderDecodeHelper.cs @@ -70,6 +70,11 @@ namespace Ryujinx.Graphics.Gal.Shader return new ShaderIrOperImm((int)(OpCode >> 20)); } + public static ShaderIrOperImmf GetOperImmf32_20(long OpCode) + { + return new ShaderIrOperImmf(BitConverter.Int32BitsToSingle((int)(OpCode >> 20))); + } + public static ShaderIrOperImm GetOperImm19_20(long OpCode) { int Value = (int)(OpCode >> 20) & 0x7ffff; diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderOpCodeTable.cs b/Ryujinx.Graphics/Gal/Shader/ShaderOpCodeTable.cs index a234f7f7..762544cb 100644 --- a/Ryujinx.Graphics/Gal/Shader/ShaderOpCodeTable.cs +++ b/Ryujinx.Graphics/Gal/Shader/ShaderOpCodeTable.cs @@ -27,6 +27,7 @@ namespace Ryujinx.Graphics.Gal.Shader Set("001100101xxxxx", ShaderDecode.Ffma_I); Set("010100011xxxxx", ShaderDecode.Ffma_RC); Set("010110011xxxxx", ShaderDecode.Ffma_RR); + Set("00011110xxxxxx", ShaderDecode.Fmul32i); Set("0100110001101x", ShaderDecode.Fmul_C); Set("0011100x01101x", ShaderDecode.Fmul_I); Set("0101110001101x", ShaderDecode.Fmul_R); |
