aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics/Gal/Shader/ShaderDecodeFlow.cs
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2018-09-08 14:51:50 -0300
committergdkchan <gab.dark.100@gmail.com>2018-09-08 14:51:50 -0300
commitce1d5be212e6f71a7ca32c3bd7b48e32d9f51b9a (patch)
tree759fe422127ce08c545d4616ccc9691f668032ec /Ryujinx.Graphics/Gal/Shader/ShaderDecodeFlow.cs
parenta0c78f792012cdea060444d7cb6a36dbabb04d52 (diff)
Move GPU emulation from Ryujinx.HLE to Ryujinx.Graphics and misc changes (#402)
* Move GPU LLE emulation from HLE to Graphics * Graphics: Move Gal/Texture to Texture * Remove Engines/ directory and namespace * Use tables for image formats * Abstract OpCode decoding * Simplify image table * Do not leak Read* symbols in TextureReader * Fixups * Rename IGalFrameBuffer -> IGalRenderTarget * Remove MaxBpp hardcoded value * Change yet again texture data and add G8R8 flipping * Rename GalFrameBufferFormat to GalSurfaceFormat * Unident EnsureSetup in ImageHandler * Add IsCompressed * Address some feedback
Diffstat (limited to 'Ryujinx.Graphics/Gal/Shader/ShaderDecodeFlow.cs')
-rw-r--r--Ryujinx.Graphics/Gal/Shader/ShaderDecodeFlow.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderDecodeFlow.cs b/Ryujinx.Graphics/Gal/Shader/ShaderDecodeFlow.cs
index 2c699a1b..dfd10e00 100644
--- a/Ryujinx.Graphics/Gal/Shader/ShaderDecodeFlow.cs
+++ b/Ryujinx.Graphics/Gal/Shader/ShaderDecodeFlow.cs
@@ -15,11 +15,11 @@ namespace Ryujinx.Graphics.Gal.Shader
throw new NotImplementedException();
}
- int Target = ((int)(OpCode >> 20) << 8) >> 8;
+ int Target = OpCode.Branch();
ShaderIrOperImm Imm = new ShaderIrOperImm(Target);
- Block.AddNode(GetPredNode(new ShaderIrOp(ShaderIrInst.Bra, Imm), OpCode));
+ Block.AddNode(OpCode.PredNode(new ShaderIrOp(ShaderIrInst.Bra, Imm)));
}
public static void Exit(ShaderIrBlock Block, long OpCode, long Position)
@@ -29,14 +29,14 @@ namespace Ryujinx.Graphics.Gal.Shader
//TODO: Figure out what the other condition codes mean...
if (CCode == 0xf)
{
- Block.AddNode(GetPredNode(new ShaderIrOp(ShaderIrInst.Exit), OpCode));
+ Block.AddNode(OpCode.PredNode(new ShaderIrOp(ShaderIrInst.Exit)));
}
}
public static void Kil(ShaderIrBlock Block, long OpCode, long Position)
{
- Block.AddNode(GetPredNode(new ShaderIrOp(ShaderIrInst.Kil), OpCode));
+ Block.AddNode(OpCode.PredNode(new ShaderIrOp(ShaderIrInst.Kil)));
}
public static void Ssy(ShaderIrBlock Block, long OpCode, long Position)
@@ -48,7 +48,7 @@ namespace Ryujinx.Graphics.Gal.Shader
throw new NotImplementedException();
}
- int Offset = ((int)(OpCode >> 20) << 8) >> 8;
+ int Offset = OpCode.Branch();
int Target = (int)(Position + Offset);
@@ -61,7 +61,7 @@ namespace Ryujinx.Graphics.Gal.Shader
{
//TODO: Implement Sync condition codes
- Block.AddNode(GetPredNode(new ShaderIrOp(ShaderIrInst.Sync), OpCode));
+ Block.AddNode(OpCode.PredNode(new ShaderIrOp(ShaderIrInst.Sync)));
}
}
} \ No newline at end of file