mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-24 06:32:01 +00:00
1f554c1093
* Renaming part 1 * Renaming part 2 * Renaming part 3 * Renaming part 4 * Renaming part 5 * Renaming part 6 * Renaming part 7 * Renaming part 8 * Renaming part 9 * Renaming part 10 * General cleanup * Thought I got all of these * Apply #595 * Additional renaming * Tweaks from feedback * Rename files
57 lines
No EOL
1.8 KiB
C#
57 lines
No EOL
1.8 KiB
C#
using System;
|
|
|
|
namespace Ryujinx.Graphics.Gal.Shader
|
|
{
|
|
static partial class ShaderDecode
|
|
{
|
|
public static void Bra(ShaderIrBlock block, long opCode, int position)
|
|
{
|
|
if ((opCode & 0x20) != 0)
|
|
{
|
|
//This reads the target offset from the constant buffer.
|
|
//Almost impossible to support with GLSL.
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
ShaderIrOperImm imm = new ShaderIrOperImm(position + opCode.Branch());
|
|
|
|
block.AddNode(opCode.PredNode(new ShaderIrOp(ShaderIrInst.Bra, imm)));
|
|
}
|
|
|
|
public static void Exit(ShaderIrBlock block, long opCode, int position)
|
|
{
|
|
int cCode = (int)opCode & 0x1f;
|
|
|
|
//TODO: Figure out what the other condition codes mean...
|
|
if (cCode == 0xf)
|
|
{
|
|
block.AddNode(opCode.PredNode(new ShaderIrOp(ShaderIrInst.Exit)));
|
|
}
|
|
}
|
|
|
|
public static void Kil(ShaderIrBlock block, long opCode, int position)
|
|
{
|
|
block.AddNode(opCode.PredNode(new ShaderIrOp(ShaderIrInst.Kil)));
|
|
}
|
|
|
|
public static void Ssy(ShaderIrBlock block, long opCode, int position)
|
|
{
|
|
if ((opCode & 0x20) != 0)
|
|
{
|
|
//This reads the target offset from the constant buffer.
|
|
//Almost impossible to support with GLSL.
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
ShaderIrOperImm imm = new ShaderIrOperImm(position + opCode.Branch());
|
|
|
|
block.AddNode(new ShaderIrOp(ShaderIrInst.Ssy, imm));
|
|
}
|
|
|
|
public static void Sync(ShaderIrBlock block, long opCode, int position)
|
|
{
|
|
//TODO: Implement Sync condition codes
|
|
block.AddNode(opCode.PredNode(new ShaderIrOp(ShaderIrInst.Sync)));
|
|
}
|
|
}
|
|
} |