Allow "reinterpretation" of framebuffer/zeta formats (#418)
* (Re)Implement format reinterpretation, other changes * Implement writeback to guest memory, some refactoring * More refactoring, implement reinterpretation the old way again * Clean up * Some fixes on M2MF (old Dma engine), added partial support for P2MF, fix conditional ssy, add Z24S8 zeta format, other fixes * nit: Formatting * Address PR feedback
This commit is contained in:
parent
bec95cacc1
commit
d4187aaa9d
52 changed files with 1594 additions and 1979 deletions
|
@ -1,12 +1,10 @@
|
|||
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, long Position)
|
||||
public static void Bra(ShaderIrBlock Block, long OpCode, int Position)
|
||||
{
|
||||
if ((OpCode & 0x20) != 0)
|
||||
{
|
||||
|
@ -15,14 +13,12 @@ namespace Ryujinx.Graphics.Gal.Shader
|
|||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
int Target = OpCode.Branch();
|
||||
|
||||
ShaderIrOperImm Imm = new ShaderIrOperImm(Target);
|
||||
ShaderIrOperImm Imm = new ShaderIrOperImm(Position + OpCode.Branch());
|
||||
|
||||
Block.AddNode(OpCode.PredNode(new ShaderIrOp(ShaderIrInst.Bra, Imm)));
|
||||
}
|
||||
|
||||
public static void Exit(ShaderIrBlock Block, long OpCode, long Position)
|
||||
public static void Exit(ShaderIrBlock Block, long OpCode, int Position)
|
||||
{
|
||||
int CCode = (int)OpCode & 0x1f;
|
||||
|
||||
|
@ -31,15 +27,14 @@ namespace Ryujinx.Graphics.Gal.Shader
|
|||
{
|
||||
Block.AddNode(OpCode.PredNode(new ShaderIrOp(ShaderIrInst.Exit)));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void Kil(ShaderIrBlock Block, long OpCode, long Position)
|
||||
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, long Position)
|
||||
public static void Ssy(ShaderIrBlock Block, long OpCode, int Position)
|
||||
{
|
||||
if ((OpCode & 0x20) != 0)
|
||||
{
|
||||
|
@ -48,19 +43,14 @@ namespace Ryujinx.Graphics.Gal.Shader
|
|||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
int Offset = OpCode.Branch();
|
||||
|
||||
int Target = (int)(Position + Offset);
|
||||
|
||||
ShaderIrOperImm Imm = new ShaderIrOperImm(Target);
|
||||
ShaderIrOperImm Imm = new ShaderIrOperImm(Position + OpCode.Branch());
|
||||
|
||||
Block.AddNode(new ShaderIrOp(ShaderIrInst.Ssy, Imm));
|
||||
}
|
||||
|
||||
public static void Sync(ShaderIrBlock Block, long OpCode, long Position)
|
||||
public static void Sync(ShaderIrBlock Block, long OpCode, int Position)
|
||||
{
|
||||
//TODO: Implement Sync condition codes
|
||||
|
||||
Block.AddNode(OpCode.PredNode(new ShaderIrOp(ShaderIrInst.Sync)));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue