mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2024-11-17 23:07:08 +01:00
e6eeb6f09f
* Add WIP support for Vertex Program A, add the FADD_I32 shader instruction, small fix on FFMA_I encoding, nits * Add separate subroutines for program A/B, and copy attributes to a temp * Move finalization code to main * Add new line after flip uniform on the shader * Handle possible case where VPB uses an output attribute written by VPA but not available on the vbo * Address PR feedback
42 lines
1.2 KiB
C#
42 lines
1.2 KiB
C#
using System;
|
|
|
|
using static Ryujinx.Graphics.Gal.Shader.ShaderDecodeHelper;
|
|
|
|
namespace Ryujinx.Graphics.Gal.Shader
|
|
{
|
|
static partial class ShaderDecode
|
|
{
|
|
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();
|
|
}
|
|
|
|
int Target = ((int)(OpCode >> 20) << 8) >> 8;
|
|
|
|
ShaderIrOperImm Imm = new ShaderIrOperImm(Target);
|
|
|
|
Block.AddNode(GetPredNode(new ShaderIrOp(ShaderIrInst.Bra, Imm), OpCode));
|
|
}
|
|
|
|
public static void Exit(ShaderIrBlock Block, long OpCode)
|
|
{
|
|
int CCode = (int)OpCode & 0x1f;
|
|
|
|
//TODO: Figure out what the other condition codes mean...
|
|
if (CCode == 0xf)
|
|
{
|
|
Block.AddNode(GetPredNode(new ShaderIrOp(ShaderIrInst.Exit), OpCode));
|
|
}
|
|
|
|
}
|
|
|
|
public static void Kil(ShaderIrBlock Block, long OpCode)
|
|
{
|
|
Block.AddNode(GetPredNode(new ShaderIrOp(ShaderIrInst.Kil), OpCode));
|
|
}
|
|
}
|
|
} |