From 80c6209bf24b5c58a2c336263413b49e5bb1005a Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Mon, 20 Aug 2018 23:17:37 -0300 Subject: [PATCH] Address feedback --- Ryujinx.Graphics/Gal/Shader/ShaderDecodeHelper.cs | 7 ------- Ryujinx.Graphics/Gal/Shader/ShaderDecodeMem.cs | 4 ++-- Ryujinx.Graphics/Gal/Shader/ShaderIrOperGpr.cs | 7 +++++-- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderDecodeHelper.cs b/Ryujinx.Graphics/Gal/Shader/ShaderDecodeHelper.cs index 7d7b2f6c6d..2093f07068 100644 --- a/Ryujinx.Graphics/Gal/Shader/ShaderDecodeHelper.cs +++ b/Ryujinx.Graphics/Gal/Shader/ShaderDecodeHelper.cs @@ -35,13 +35,6 @@ namespace Ryujinx.Graphics.Gal.Shader (int)(OpCode >> 20) & 0x3fff); } - public static ShaderIrOperCbuf GetOperCbuf36(long OpCode) - { - return new ShaderIrOperCbuf( - (int)(OpCode >> 36) & 0x1f, - (int)(OpCode >> 22) & 0x3fff, GetOperGpr8(OpCode)); - } - public static ShaderIrOperGpr GetOperGpr8(long OpCode) { return new ShaderIrOperGpr((int)(OpCode >> 8) & 0xff); diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderDecodeMem.cs b/Ryujinx.Graphics/Gal/Shader/ShaderDecodeMem.cs index 9e7b920ac9..c78f223573 100644 --- a/Ryujinx.Graphics/Gal/Shader/ShaderDecodeMem.cs +++ b/Ryujinx.Graphics/Gal/Shader/ShaderDecodeMem.cs @@ -52,9 +52,9 @@ namespace Ryujinx.Graphics.Gal.Shader public static void Ld_C(ShaderIrBlock Block, long OpCode) { - int Type = (int)(OpCode >> 48) & 7; - int CbufIndex = (int)(OpCode >> 36) & 0x1f; int CbufPos = (int)(OpCode >> 22) & 0x3fff; + int CbufIndex = (int)(OpCode >> 36) & 0x1f; + int Type = (int)(OpCode >> 48) & 7; if (Type > 5) { diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderIrOperGpr.cs b/Ryujinx.Graphics/Gal/Shader/ShaderIrOperGpr.cs index 88ac31299c..29ea545309 100644 --- a/Ryujinx.Graphics/Gal/Shader/ShaderIrOperGpr.cs +++ b/Ryujinx.Graphics/Gal/Shader/ShaderIrOperGpr.cs @@ -4,8 +4,6 @@ namespace Ryujinx.Graphics.Gal.Shader { public const int ZRIndex = 0xff; - public static ShaderIrOperGpr MakeTemporary() => new ShaderIrOperGpr(0x100); - public bool IsConst => Index == ZRIndex; public int Index { get; set; } @@ -14,5 +12,10 @@ namespace Ryujinx.Graphics.Gal.Shader { this.Index = Index; } + + public static ShaderIrOperGpr MakeTemporary(int Index = 0) + { + return new ShaderIrOperGpr(0x100 + Index); + } } } \ No newline at end of file