Add support for Vertex Program A and other small shader improvements (#192)
* 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
This commit is contained in:
parent
900a84ae0a
commit
e6eeb6f09f
9 changed files with 303 additions and 78 deletions
|
@ -31,6 +31,24 @@ namespace Ryujinx.Graphics.Gal.Shader
|
|||
EmitAluBinaryF(Block, OpCode, ShaderOper.Immf, ShaderIrInst.Fadd);
|
||||
}
|
||||
|
||||
public static void Fadd_I32(ShaderIrBlock Block, long OpCode)
|
||||
{
|
||||
ShaderIrNode OperA = GetOperGpr8 (OpCode);
|
||||
ShaderIrNode OperB = GetOperImmf32_20(OpCode);
|
||||
|
||||
bool NegB = ((OpCode >> 53) & 1) != 0;
|
||||
bool AbsA = ((OpCode >> 54) & 1) != 0;
|
||||
bool NegA = ((OpCode >> 56) & 1) != 0;
|
||||
bool AbsB = ((OpCode >> 57) & 1) != 0;
|
||||
|
||||
OperA = GetAluFabsFneg(OperA, AbsA, NegA);
|
||||
OperB = GetAluFabsFneg(OperB, AbsB, NegB);
|
||||
|
||||
ShaderIrOp Op = new ShaderIrOp(ShaderIrInst.Fadd, OperA, OperB);
|
||||
|
||||
Block.AddNode(GetPredNode(new ShaderIrAsg(GetOperGpr0(OpCode), Op), OpCode));
|
||||
}
|
||||
|
||||
public static void Fadd_R(ShaderIrBlock Block, long OpCode)
|
||||
{
|
||||
EmitAluBinaryF(Block, OpCode, ShaderOper.RR, ShaderIrInst.Fadd);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue