2018-05-17 14:25:42 -04:00
|
|
|
using System;
|
|
|
|
|
2018-04-08 15:17:35 -04:00
|
|
|
using static Ryujinx.Graphics.Gal.Shader.ShaderDecodeHelper;
|
|
|
|
|
|
|
|
namespace Ryujinx.Graphics.Gal.Shader
|
|
|
|
{
|
|
|
|
static partial class ShaderDecode
|
|
|
|
{
|
2018-05-17 14:25:42 -04:00
|
|
|
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();
|
|
|
|
}
|
|
|
|
|
2018-05-29 19:37:10 -04:00
|
|
|
int Target = ((int)(OpCode >> 20) << 8) >> 8;
|
2018-05-17 14:25:42 -04:00
|
|
|
|
2018-05-29 19:37:10 -04:00
|
|
|
ShaderIrOperImm Imm = new ShaderIrOperImm(Target);
|
2018-05-17 14:25:42 -04:00
|
|
|
|
2018-05-29 19:37:10 -04:00
|
|
|
Block.AddNode(GetPredNode(new ShaderIrOp(ShaderIrInst.Bra, Imm), OpCode));
|
2018-05-17 14:25:42 -04:00
|
|
|
}
|
|
|
|
|
2018-04-08 15:17:35 -04:00
|
|
|
public static void Exit(ShaderIrBlock Block, long OpCode)
|
|
|
|
{
|
|
|
|
Block.AddNode(GetPredNode(new ShaderIrOp(ShaderIrInst.Exit), OpCode));
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void Kil(ShaderIrBlock Block, long OpCode)
|
|
|
|
{
|
|
|
|
Block.AddNode(GetPredNode(new ShaderIrOp(ShaderIrInst.Kil), OpCode));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|