Added more shader instructions, including BFE, BRA (partial), FMNMX, ISCADD, SHL, LD_C, some shader related fixes, added support for texture component selection
This commit is contained in:
parent
9b9ead94cd
commit
b19c474082
28 changed files with 806 additions and 118 deletions
|
@ -1,3 +1,5 @@
|
|||
using System;
|
||||
|
||||
using static Ryujinx.Graphics.Gal.Shader.ShaderDecodeHelper;
|
||||
|
||||
namespace Ryujinx.Graphics.Gal.Shader
|
||||
|
@ -20,6 +22,41 @@ namespace Ryujinx.Graphics.Gal.Shader
|
|||
}
|
||||
}
|
||||
|
||||
public static void Ld_C(ShaderIrBlock Block, long OpCode)
|
||||
{
|
||||
int Type = (int)(OpCode >> 48) & 7;
|
||||
|
||||
if (Type > 5)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
|
||||
int Count = Type == 5 ? 2 : 1;
|
||||
|
||||
for (int Index = 0; Index < Count; Index++)
|
||||
{
|
||||
ShaderIrOperCbuf OperA = GetOperCbuf36(OpCode);
|
||||
ShaderIrOperGpr OperD = GetOperGpr0 (OpCode);
|
||||
|
||||
OperA.Pos += Index;
|
||||
OperD.Index += Index;
|
||||
|
||||
ShaderIrNode Node = OperA;
|
||||
|
||||
if (Type < 4)
|
||||
{
|
||||
//This is a 8 or 16 bits type.
|
||||
bool Signed = (Type & 1) != 0;
|
||||
|
||||
int Size = 8 << (Type >> 1);
|
||||
|
||||
Node = ExtendTo32(Node, Signed, Size);
|
||||
}
|
||||
|
||||
Block.AddNode(GetPredNode(new ShaderIrAsg(OperD, Node), OpCode));
|
||||
}
|
||||
}
|
||||
|
||||
public static void St_A(ShaderIrBlock Block, long OpCode)
|
||||
{
|
||||
ShaderIrNode[] Opers = GetOperAbuf20(OpCode);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue